home · contact · privacy
Add multi-class thing type system.
[plomrogue2-experiments] / new / example_client.py
index a877da84f603bc0de3e69cfbc2beca7439aaf1c5..039d8de6bc134f9835c4f70a130a3a4879fb7890 100755 (executable)
@@ -3,7 +3,7 @@ import curses
 import socket
 import threading
 from plomrogue.parser import ArgError, Parser
-from plomrogue.commands import cmd_MAP, cmd_THING_TYPE, cmd_THING_POS
+from plomrogue.commands import cmd_MAP, cmd_THING_POS
 from plomrogue.game import Game, WorldBase
 from plomrogue.mapping import MapBase
 from plomrogue.io import PlomSocket
@@ -105,6 +105,11 @@ def cmd_GAME_STATE_COMPLETE(self):
     self.to_update['turn'] = True
     self.to_update['map'] = True
 
+def cmd_THING_TYPE(game, i, type_):
+    t = game.world.get_thing(i)
+    t.type_ = type_
+cmd_THING_TYPE.argtypes = 'int:nonneg string'
+
 
 class Game: