From: Christian Heller Date: Tue, 24 Feb 2015 11:24:06 +0000 (+0100) Subject: Server/py: Add PLAYER_TYPE command. X-Git-Tag: tce~474 X-Git-Url: https://plomlompom.com/repos/process_titles?a=commitdiff_plain;h=7c958f842958e0908862c56f07e432c65b4655d3;p=plomrogue Server/py: Add PLAYER_TYPE command. --- diff --git a/plomrogue-server.py b/plomrogue-server.py index 0098e47..32cf74d 100755 --- a/plomrogue-server.py +++ b/plomrogue-server.py @@ -120,6 +120,7 @@ def save_world(): # Dummy for saving all commands to reconstruct current world state. # Misses same optimizations as record() from the original record(). atomic_write(io_db["path_save"], + "PLAYER_TYPE " + str(world_db["PLAYER_TYPE"]) + "\n" + "TURN " + str(world_db["TURN"]) + "\n" + "SEED_RANDOMNESS " + str(world_db["SEED_RANDOMNESS"]) + "\n" + "SEED_MAP " + str(world_db["SEED_MAP"]) + "\n") @@ -282,7 +283,8 @@ commands_db = { "SEED_MAP": (1, False, worlddb_value_setter("SEED_MAP", 0, 4294967295)), "SEED_RANDOMNESS": (1, False, worlddb_value_setter("SEED_RANDOMNESS", 0, 4294967295)), - "TURN": (1, False, worlddb_value_setter("TURN", 0, 65535)) + "TURN": (1, False, worlddb_value_setter("TURN", 0, 65535)), + "PLAYER_TYPE": (1, False, worlddb_value_setter("PLAYER_TYPE", 0, 255)) } @@ -290,7 +292,8 @@ commands_db = { world_db = { "TURN": 0, "SEED_MAP": 0, - "SEED_RANDOMNESS": 0 + "SEED_RANDOMNESS": 0, + "PLAYER_TYPE": 0 }