home
·
contact
·
privacy
projects
/
plomrogue2-experiments
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add multi-class thing type system.
[plomrogue2-experiments]
/
new
/
example_client.py
diff --git
a/new/example_client.py
b/new/example_client.py
index 7a9902708a60cf36140ae2024fd1e9c21cbb00d6..039d8de6bc134f9835c4f70a130a3a4879fb7890 100755
(executable)
--- a/
new/example_client.py
+++ b/
new/example_client.py
@@
-3,10
+3,11
@@
import curses
import socket
import threading
from plomrogue.parser import ArgError, Parser
import socket
import threading
from plomrogue.parser import ArgError, Parser
-from plomrogue.commands import cmd_MAP, cmd_THING_
TYPE, cmd_THING_
POS
-from plomrogue.game import Game, WorldBase
, ThingBase
+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
from plomrogue.mapping import MapBase
from plomrogue.io import PlomSocket
+from plomrogue.things import ThingBase
import types
import types
@@
-104,6
+105,11
@@
def cmd_GAME_STATE_COMPLETE(self):
self.to_update['turn'] = True
self.to_update['map'] = True
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:
class Game: