X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=server%2Fworld.py;h=d472e1f680ca2dd5f10eb7ea72b1eedb98779fa2;hb=refs%2Ftags%2Ftce;hp=21d5f67c14e9bb950992ded6e6e2b3cd0e6f3ddf;hpb=2f7c446f698dbcf510a4997e1689e3a2df3e24be;p=plomrogue diff --git a/server/world.py b/server/world.py index 21d5f67..d472e1f 100644 --- a/server/world.py +++ b/server/world.py @@ -62,12 +62,14 @@ def set_world_inactive(): def turn_over(): """Run game world and its inhabitants until new player input expected.""" + # TODO: Add build_fov_map, actor_move trigger not enough on changing maps. from server.ai import ai from server.config.actions import action_db from server.config.misc import calc_effort from server.update_map_memory import update_map_memory from server.thingproliferation import thingproliferation - id = 0 + from server.io import try_worldstate_update + from server.config.io import io_db while world_db["Things"][0]["T_LIFEPOINTS"]: proliferable_map = world_db["MAP"][:] for tid in [tid for tid in world_db["Things"] @@ -101,3 +103,5 @@ def turn_over(): Thing["T_PROGRESS"] = 0 thingproliferation(Thing, proliferable_map) world_db["TURN"] += 1 + io_db["worldstate_updateable"] = True + try_worldstate_update()