home · contact · privacy
Server: Update worldstate during any turn change -> be more responsive.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 5 Mar 2016 12:26:40 +0000 (13:26 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 5 Mar 2016 12:26:40 +0000 (13:26 +0100)
server/world.py

index 21d5f67c14e9bb950992ded6e6e2b3cd0e6f3ddf..ff8043ed492398fa9ce5947e868696fb738124af 100644 (file)
@@ -67,6 +67,8 @@ def turn_over():
     from server.config.misc import calc_effort
     from server.update_map_memory import update_map_memory
     from server.thingproliferation import thingproliferation
     from server.config.misc import calc_effort
     from server.update_map_memory import update_map_memory
     from server.thingproliferation import thingproliferation
+    from server.io import try_worldstate_update
+    from server.config.io import io_db
     id = 0
     while world_db["Things"][0]["T_LIFEPOINTS"]:
         proliferable_map = world_db["MAP"][:]
     id = 0
     while world_db["Things"][0]["T_LIFEPOINTS"]:
         proliferable_map = world_db["MAP"][:]
@@ -101,3 +103,5 @@ def turn_over():
                         Thing["T_PROGRESS"] = 0
             thingproliferation(Thing, proliferable_map)
         world_db["TURN"] += 1
                         Thing["T_PROGRESS"] = 0
             thingproliferation(Thing, proliferable_map)
         world_db["TURN"] += 1
+        io_db["worldstate_updateable"] = True
+        try_worldstate_update()