From: Christian Heller Date: Tue, 3 Mar 2015 01:59:19 +0000 (+0100) Subject: Server/py: Improve comments. X-Git-Tag: tce~429 X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/%7B%7Bprefix%7D%7D/add_structured?a=commitdiff_plain;h=7543a2420dd05a73aa8f6569ecd4a8517873cebb;p=plomrogue Server/py: Improve comments. --- diff --git a/plomrogue-server.py b/plomrogue-server.py index 15f2c09..72e0fdb 100755 --- a/plomrogue-server.py +++ b/plomrogue-server.py @@ -7,7 +7,7 @@ import time def strong_write(file, string): - """Apply write(string), flush() and os.fsync() to file.""" + """Apply write(string), flush(), and os.fsync() to file.""" file.write(string) file.flush() os.fsync(file) @@ -465,7 +465,7 @@ def command_makeworld(seed_string): and set world_db["WORLD_ACTIVE"], world_db["TURN"] to 1. Build new Things according to ThingTypes' TT_START_NUMBERS, with Thing of ID 0 to ThingType of ID = world["PLAYER_TYPE"]. Place Things randomly, and actors not on each - other; init their FOV/memory maps. Write "NEW_WORLD" line to out file. + other. Init player's FOV/memory map. Write "NEW_WORLD" line to out file. """ setter(None, "SEED_RANDOMNESS", 0, 4294967295)(seed_string) setter(None, "SEED_MAP", 0, 4294967295)(seed_string) @@ -495,11 +495,12 @@ def command_makeworld(seed_string): for i in range(world_db["ThingTypes"][playertype]["TT_START_NUMBER"]): id = id_setter(-1, "Things") world_db["Things"][id] = new_Thing(playertype) + # TODO: Positioning. Init player's FOV / memory map. for type in world_db["ThingTypes"]: for i in range(world_db["ThingTypes"][type]["TT_START_NUMBER"]): id = id_setter(-1, "Things") world_db["Things"][id] = new_Thing(playertype) - # TODO: position? update FOVs / map memories? (only at the end) + # TODO: Positioning. strong_write(io_db["file_out"], "NEW_WORLD\n")