I chopped out barrier types as individual classes, just like
I had done with rooms. Now every barrier
has the same booleans; many just won't change.
This was so that way I could have an easier time coding up locking
things, so the player can lock doors and windows (and potentially items).
So, I got locking barriers to work next (at least barrier
types that are lockable without a key).
So windows and doors default to lockable without a key, so the player
can type "lock door" and it will lock the door in the room. I'm working on functionality to check for
more than one door and for the player to specify which door. I'm also partway there with lockable items,
like chests and stuff.
Next, of course, I had to add a check for locked barriers
when the player tries to move, so if the door is locked they can't get through
it. The error message is still simply
"you can't go that way", so I'll have to find a way to split up
messages to say expressly why a player can't go a certain way.
Next comes unlocking.
And probably preventing locking in common areas, because that would get
annoying.
No comments:
Post a Comment