home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df973a6
)
New client: Read in player position and map size.
author
Christian Heller
<c.heller@plomlompom.de>
Sat, 28 Nov 2015 11:44:13 +0000
(12:44 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sat, 28 Nov 2015 11:44:13 +0000
(12:44 +0100)
client_prototype.py
patch
|
blob
|
history
diff --git
a/client_prototype.py
b/client_prototype.py
index bed6400196463c65ade82d006625791477c32c19..a6256294c40a8c0ecb3b19cc53ee836658789018 100644
(file)
--- a/
client_prototype.py
+++ b/
client_prototype.py
@@
-195,6
+195,9
@@
def read_worldstate():
if line == '%':
break
world_data["inventory"] += [line]
+ world_data["position"][0] = int(worldstate_file.readline())
+ world_data["position"][1] = int(worldstate_file.readline())
+ world_data["map_size"] = int(worldstate_file.readline())
worldstate_file.close()
read_worldstate.last_checked_mtime = -1
@@
-341,6
+344,8
@@
world_data = {
"inventory": [],
"lifepoints": -1,
"log": [],
+ "map_size": -1,
+ "position": [-1, -1],
"satiation": -1,
"turn": -1
}