Return to repo list

tzed

Simple story-driven open world 2D CRPG.
Return to HMagellan.com

commit 1eb1909b1220757a4093be1c639876e3a3b6255c
parent e54a7bc1c9e3f2ba7976ee57b1b806d5af0e9240
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Thu, 26 Aug 2021 17:03:42 -0500

added waiting

Diffstat:
Mdata/etc/defaults.json | 4+++-
Msrc/game.py | 3++-
Msrc/interface.py | 5+++++
3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/data/etc/defaults.json b/data/etc/defaults.json @@ -10,7 +10,9 @@ "up" : [119, 1073741906], "down" : [115, 1073741905], "left" : [97, 1073741904], - "right": [100, 1073741903] + "right": [100, 1073741903], + "wait" : [32, 53, 1073741917], + "examine" : [101] }, "color_palette" : [ [0, 0, 0], diff --git a/src/game.py b/src/game.py @@ -208,7 +208,8 @@ class Game(object): def collect_game_data(self): """ Collect a bunch of info about the current - state of the game and game objects. + state of the game and game objects. This can + be safely called multiple times per frame. """ # TODO: This will see regular expansion self.gamedata["$PLAYERNAME"] = "Joe" diff --git a/src/interface.py b/src/interface.py @@ -98,6 +98,11 @@ class Interface(object): for j in CONTROLS["right"]: self.key_bools[j] = False return + elif k in CONTROLS["wait"]: + self.game.post_message("$PLAYERNAME waits.") + for j in CONTROLS["wait"]: + self.key_bools[j] = False + return def handle_mouse_click(self, event): """