X-Git-Url: https://plomlompom.com/repos/?p=plomrogue2-experiments;a=blobdiff_plain;f=new%2Fexample_client.py;h=039d8de6bc134f9835c4f70a130a3a4879fb7890;hp=a877da84f603bc0de3e69cfbc2beca7439aaf1c5;hb=faf90001efa004054b41df5e2638b6c7c4c1fd98;hpb=ba338f6ed46da5c34fbb7a3e9dac28338a0406a3 diff --git a/new/example_client.py b/new/example_client.py index a877da8..039d8de 100755 --- a/new/example_client.py +++ b/new/example_client.py @@ -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: