scrom / Experiments

a NodeJS text adventure - deliberately coded badly to re-experience the pain of legacy code
http://mvta.herokuapp.com/
2 stars 0 forks source link

Some locked doors are being left open by npcs #361

Closed scrom closed 8 years ago

scrom commented 8 years ago

as the game progresses, some doors aren't auto-closing or being re-locked. Office doors, waste area door are the main ones.

scrom commented 8 years ago

Bins are sorted. Need to watch state of office doors and figure out what's going on.

scrom commented 8 years ago

Got it - kindof. Autoclose doors are being marked as locked but aren't actually being closed. That'll be in the ticks of the door.

scrom commented 8 years ago

It's because we were manually setting the _locked flag rather than using the lock method. If manually setting the flag, we also need to manually set the open flag to closed.

scrom commented 8 years ago

Found another issue with autolock. marking a door closed didn't hide the exit.

Now fixed - also added "autoClose" support - basically "autoLock" will just auto-close if not "lockable"