Facility door
This commit is contained in:
@@ -627,7 +627,7 @@ export interface BlockApi {
|
||||
// how long breaking it by hand takes without a tool, in seconds, from the block's mining. Infinity for one that
|
||||
// can't be broken. for machines that break blocks, like a drill
|
||||
toughness(id: Id): number;
|
||||
// the components its json lists and their params, a copy, like ItemApi.components
|
||||
// the components its json lists and their params, a copy, like ItemApi.components. air has none
|
||||
components(id: Id): Record<Id, unknown>;
|
||||
// whether it's solid like stone: drawn in the solid layer, and a whole block to bump into in every state. glass,
|
||||
// leaves, slabs and chests aren't. what passes signals on, and what wire turns corners around. false for air
|
||||
|
||||
@@ -61,7 +61,7 @@ export function blocks_api(): SharedContext["blocks"] {
|
||||
};
|
||||
return {
|
||||
exists: (id) => EverythingRegistry.get("blocks", id) !== undefined,
|
||||
components: (id) => structuredClone(known(id).components ?? {}),
|
||||
components: (id) => id === AIR_ID ? {} : structuredClone(known(id).components ?? {}),
|
||||
solid: (id) => id !== AIR_ID && is_solid(known(id)),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user