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:
8164be4
)
Server: Update worldstate during any turn change -> be more responsive.
author
Christian Heller
<c.heller@plomlompom.de>
Sat, 5 Mar 2016 12:26:40 +0000
(13:26 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sat, 5 Mar 2016 12:26:40 +0000
(13:26 +0100)
server/world.py
patch
|
blob
|
history
diff --git
a/server/world.py
b/server/world.py
index 21d5f67c14e9bb950992ded6e6e2b3cd0e6f3ddf..ff8043ed492398fa9ce5947e868696fb738124af 100644
(file)
--- a/
server/world.py
+++ b/
server/world.py
@@
-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()