Add openable doors to generated rooms
This commit is contained in:
@@ -6,7 +6,9 @@ export const TileType = {
|
||||
EMPTY_DECO: 24,
|
||||
WALL_DECO: 12,
|
||||
EXIT: 8,
|
||||
WATER: 63 // Unused but kept for safety/legacy
|
||||
WATER: 63, // Unused but kept for safety/legacy
|
||||
DOOR_CLOSED: 5,
|
||||
DOOR_OPEN: 6
|
||||
} as const;
|
||||
|
||||
export type TileType = typeof TileType[keyof typeof TileType];
|
||||
@@ -28,7 +30,9 @@ export const TILE_DEFINITIONS: Record<number, TileBehavior> = {
|
||||
[TileType.EMPTY_DECO]: { id: TileType.EMPTY_DECO, isBlocking: false, isDestructible: false },
|
||||
[TileType.WALL_DECO]: { id: TileType.WALL_DECO, isBlocking: true, isDestructible: false },
|
||||
[TileType.EXIT]: { id: TileType.EXIT, isBlocking: false, isDestructible: false },
|
||||
[TileType.WATER]: { id: TileType.WATER, isBlocking: true, isDestructible: false }
|
||||
[TileType.WATER]: { id: TileType.WATER, isBlocking: true, isDestructible: false },
|
||||
[TileType.DOOR_CLOSED]: { id: TileType.DOOR_CLOSED, isBlocking: false, isDestructible: true, isDestructibleByWalk: true, blocksVision: true, destructsTo: TileType.DOOR_OPEN },
|
||||
[TileType.DOOR_OPEN]: { id: TileType.DOOR_OPEN, isBlocking: false, isDestructible: false }
|
||||
};
|
||||
|
||||
export function isBlocking(tile: number): boolean {
|
||||
|
||||
Reference in New Issue
Block a user