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 a877da84f603bc0de3e69cfbc2beca7439aaf1c5..039d8de6bc134f9835c4f70a130a3a4879fb7890 100755
(executable)
--- 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
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
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
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: