Stress for create networks

This commit is contained in:
2026-10-28 21:28:36 -03:00
parent a70375c9ad
commit 507e9aab24
10 changed files with 276 additions and 46 deletions
+3 -1
View File
@@ -32,6 +32,8 @@ export async function setup(config: Record<string, unknown> = {}) {
game.set_block(x, y, z, id, undefined, state ? set_state_value(0, info, state, value)! >>> 16 : 0);
};
const speed = (x: number, y: number, z: number) => game.world.get_tile(x, y, z)?.client_data?.speed as number ?? 0;
const overstressed = (x: number, y: number, z: number) =>
game.world.get_tile(x, y, z)?.client_data?.overstressed === true;
const state = (x: number, y: number, z: number, name: string) =>
get_state_value(game.world.get_block_value(x, y, z), game.world.get_block_info(x, y, z)!, name);
const use = (x: number, y: number, z: number, face: Face = "south") =>
@@ -44,7 +46,7 @@ export async function setup(config: Record<string, unknown> = {}) {
(EverythingRegistry.get<BlockRegistry>("blocks", "create:hand_crank")!.components!["create:hand_crank"] as {
speed: number;
}).speed;
return { ...t, move, place, speed, state, use, ticks, crank };
return { ...t, move, place, speed, overstressed, state, use, ticks, crank };
}
// create's client script with only what its visuals need, and a block for one to draw that records what its instances