home
·
contact
·
privacy
projects
/
plomrogue2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enable player movement in admin mode.
[plomrogue2]
/
rogue_chat_curses.py
diff --git
a/rogue_chat_curses.py
b/rogue_chat_curses.py
index 5ad366a78815e6fd6d3526d256f62e8232b1c7ed..86c6ba4267bd9dc40cea33439f2ecc65d068c5fa 100755
(executable)
--- a/
rogue_chat_curses.py
+++ b/
rogue_chat_curses.py
@@
-820,6
+820,11
@@
class TUI:
content += '/%s or /study – switch to study mode\n' % self.keys['switch_to_study']
content += '/%s or /edit – switch to map edit mode\n' % self.keys['switch_to_edit']
content += '/%s or /admin – switch to admin mode\n' % self.keys['switch_to_admin_enter']
content += '/%s or /study – switch to study mode\n' % self.keys['switch_to_study']
content += '/%s or /edit – switch to map edit mode\n' % self.keys['switch_to_edit']
content += '/%s or /admin – switch to admin mode\n' % self.keys['switch_to_admin_enter']
+ elif self.mode.name == 'admin':
+ content += "Available actions:\n"
+ if 'MOVE' in self.game.tasks:
+ content += "[%s] – move player\n" % ','.join(self.movement_keys)
+ content += '\n'
content += self.mode.list_available_modes(self)
for i in range(self.size.y):
safe_addstr(i,
content += self.mode.list_available_modes(self)
for i in range(self.size.y):
safe_addstr(i,
@@
-1024,6
+1029,8
@@
class TUI:
elif self.mode.name == 'admin':
if self.mode.mode_switch_on_key(self, key):
continue
elif self.mode.name == 'admin':
if self.mode.mode_switch_on_key(self, key):
continue
+ elif key in self.movement_keys and 'MOVE' in self.game.tasks:
+ self.send('TASK:MOVE ' + self.movement_keys[key])
elif self.mode.name == 'edit':
if self.mode.mode_switch_on_key(self, key):
continue
elif self.mode.name == 'edit':
if self.mode.mode_switch_on_key(self, key):
continue