made door actionable

This commit is contained in:
Lukas Nöllemeyer 2024-08-17 14:47:34 +02:00
parent 6a5e5d3137
commit 0d9de5b208
4 changed files with 13 additions and 14 deletions

View file

@ -9,8 +9,8 @@ from tcod.map import Map
import g
from game.components import Gold, Graphic, Position
from game.tags import IsActor, IsItem, IsPlayer, IsDoor
from game.components import Action, Gold, Graphic, Position
from game.tags import IsActor, IsItem, IsPlayer
world_center: Final = Position(50, 50)
@ -30,9 +30,9 @@ def add_door(world, pos):
world.new_entity(
components={
Position: pos,
Graphic: Graphic(ord('\\'))
},
tags=[IsDoor]
Graphic: Graphic(ord('\\')),
Action: unlock_door
}
)
add_wall(world, pos)