Move variables and triggers to be defined in the database

* Variables are now defined in the database, rather than the game
  itself.
* Triggers are now defined in the database, rather than hidden away in a
  method in the game. Custom triggers can now be added as well, in case
  a game needs more complex behavior that isn't necessarily available in
  the base library.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2021-11-18 17:32:45 -08:00
parent 0f6433eabd
commit ff5d4484fe
3 changed files with 31 additions and 20 deletions

View File

@@ -1,8 +1,7 @@
"""
Define all game variables here.
"""
from . import database
vars = {
"cabin_door_open": False,
"mailbox_open": False,
}
database.add_var("cabin_door_open", False)
database.add_var("mailbox_open", False)