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:
7c9c3b3
)
Server/py: Extend command_worldactive().
author
Christian Heller
<c.heller@plomlompom.de>
Mon, 2 Mar 2015 04:50:00 +0000
(
05:50
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Mon, 2 Mar 2015 04:50:00 +0000
(
05:50
+0100)
plomrogue-server.py
patch
|
blob
|
history
diff --git
a/plomrogue-server.py
b/plomrogue-server.py
index 4cb138a3a6da7b2af8b11fa80b84b6dc784d653f..94925ed2bf0f4886787f35e5fd373a010050d08e 100755
(executable)
--- a/
plomrogue-server.py
+++ b/
plomrogue-server.py
@@
-382,14
+382,18
@@
def command_worldactive(worldactive_string):
set_world_inactive()
elif 0 == world_db["WORLD_ACTIVE"]:
wait_exists = False
set_world_inactive()
elif 0 == world_db["WORLD_ACTIVE"]:
wait_exists = False
+ for ThingAction in world_db["ThingActions"]:
+ if "wait" == ThingAction["TA_NAME"]:
+ wait_exists = True
+ break
player_exists = False
player_exists = False
- map_exists = False
-
# TODO: perform tests
:
- # Is there thing action of name 'wait'?
- # Is there a player thing?
- # Is there a map?
+ for Thing in world_db["Things"]:
+
if 0 == ThingAction["T_ID"]
:
+ player_exists = True
+ break
+ map_exists = "MAP" in world_db
if wait_exists and player_exists and map_exists:
if wait_exists and player_exists and map_exists:
- # TODO: rebuild al things' FOVs, map memories
+ # TODO: rebuild al
l
things' FOVs, map memories
world_db["WORLD_ACTIVE"] = 1
world_db["WORLD_ACTIVE"] = 1