Fill on serverworld and clear out tiles on new day
This commit is contained in:
@@ -147,8 +147,13 @@ let interior_tiles: PlacedTile[] = [];
|
||||
// the vents placed in the interior, for monsters to come out of
|
||||
let interior_vents: Marker[] = [];
|
||||
|
||||
// takes away the last interior, so the next one goes in where there's nothing. the surface is placed over itself
|
||||
function clear_map(ctx: ServerContext) {
|
||||
// theres no need to clear the surface but we do need to clear each tile
|
||||
for (const { box: { min: [x0, y0, z0], max: [x1, y1, z1] } } of interior_tiles) {
|
||||
ctx.world.fill({ x: x0, y: y0, z: z0 }, { x: x1, y: y1, z: z1 }, "cubi:air");
|
||||
}
|
||||
interior_tiles = [];
|
||||
interior_vents = [];
|
||||
}
|
||||
|
||||
function place_surface(ctx: ServerContext) {
|
||||
|
||||
Reference in New Issue
Block a user