From: Christian Heller Date: Sat, 28 Nov 2015 11:44:13 +0000 (+0100) Subject: New client: Read in player position and map size. X-Git-Tag: tce~246 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/tasks?a=commitdiff_plain;h=07aa70614961f46cf93830f2f3d7a33f9c4ef6c1;p=plomrogue New client: Read in player position and map size. --- diff --git a/client_prototype.py b/client_prototype.py index bed6400..a625629 100644 --- 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 }