[3] Doors

05/15/2023, 05:15pm

Been a while since I made a post. Got a few things in progress over here, but a cool thing I just got done is Doors.

Doors are just entities with a server-side DoorComponent. They can be locked, but I haven't implemented keys or any way to unlock them yet. I had to modify a bit of interaction code to get them working. Doors are unique in that their interactions (Open, Close, Lock, Unlock, etc) are dependent on the state of the entity itself, and therefore can change. Anyway, now interactables are a bit more dynamic.

Another unique property about doors is that they modify the walkability of whatever tile they are on. This required a new system to handle mutation of the map data at runtime, which will be nice to have in the future for other stuff too.

ents/door.toml [networked] [info] name = "Door" description = "A door - the nexus between two rooms." model_id = 70 [transform] [interactable] interactions = ["open", "close", "walk-to", "examine"] [animator] animation_controller_id = 6 [door] is_open = false is_locked = false

Doors themselves are entities, but the frame has to be carved out of a wall.

- Declan (@dooskington)