-# TODO: instead of sending tasks and thing types on request, send them on connection
+# TODO: instead of sending tasks, thing types etc. on request, send them on connection
def cmd_TASKS(game, connection_id):
tasks = []
def cmd_THING_TYPES(game, connection_id):
for t_t in game.thing_types.values():
- game.io.send('THING_TYPE %s %s' % (t_t.get_type(), t_t.symbol_hint),
+ game.io.send('THING_TYPE %s %s' % (t_t.get_type(), quote(t_t.symbol_hint)),
connection_id)
cmd_THING_TYPES.argtypes = ''
+def cmd_TERRAINS(game, connection_id):
+ for t in game.terrains.keys():
+ game.io.send('TERRAIN %s %s' % (quote(t), quote(game.terrains[t])),
+ connection_id)
+cmd_TERRAINS.argtypes = ''
+
def cmd_ALL(game, msg, connection_id):
def lower_msg_by_volume(msg, volume):