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
Start new players in middle of map instead of topleft corner.
[plomrogue2-experiments]
/
new
/
example_client.py
diff --git
a/new/example_client.py
b/new/example_client.py
index bd8bcfd1a8a9667f762e74b22414cb13e860663a..19538161a5b3d575df3d80fe9cfe77c42f3b2f26 100755
(executable)
--- a/
new/example_client.py
+++ b/
new/example_client.py
@@
-103,13
+103,13
@@
def cmd_GAME_STATE_COMPLETE(game):
def cmd_THING_TYPE(game, i, type_):
def cmd_THING_TYPE(game, i, type_):
- t = game.get_thing(i)
+ t = game.get_thing(i
, create_unfound=True
)
t.type_ = type_
cmd_THING_TYPE.argtypes = 'int:nonneg string'
def cmd_THING_POS(game, i, yx):
t.type_ = type_
cmd_THING_TYPE.argtypes = 'int:nonneg string'
def cmd_THING_POS(game, i, yx):
- t = game.get_thing(i)
+ t = game.get_thing(i
,create_unfound=True
)
t.position = YX(0,0), yx
cmd_THING_POS.argtypes = 'int:nonneg yx_tuple:nonneg'
t.position = YX(0,0), yx
cmd_THING_POS.argtypes = 'int:nonneg yx_tuple:nonneg'
@@
-159,7
+159,7
@@
class Game(GameBase):
@property
def player(self):
@property
def player(self):
- return self.get_thing(self.player_id)
+ return self.get_thing(self.player_id
, create_unfound=False
)
def get_command(self, command_name):
from functools import partial
def get_command(self, command_name):
from functools import partial
@@
-370,7
+370,7
@@
class ItemsSelectorWidget(Widget):
counter = 0
for id_ in self.selection:
pointer = '*' if counter == self.tui.item_pointer else ' '
counter = 0
for id_ in self.selection:
pointer = '*' if counter == self.tui.item_pointer else ' '
- t = self.tui.game.get_thing(id_)
+ t = self.tui.game.get_thing(id_
, create_unfound=False
)
lines += ['%s %s' % (pointer, t.type_)]
counter += 1
line_width = self.size.x
lines += ['%s %s' % (pointer, t.type_)]
counter += 1
line_width = self.size.x