home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TCE: Eat on every wall attack, not just on successful ones.
[plomrogue]
/
server
/
io.py
diff --git
a/server/io.py
b/server/io.py
index bb5d3ac13e7661feb6bfd3b7f2594038759c6772..5e02ed4287d1c22e4724a982f2f72718ef3af839 100644
(file)
--- a/
server/io.py
+++ b/
server/io.py
@@
-170,7
+170,7
@@
def save_world():
for _id in sorted(world_db[category].keys()):
string = string + id_string + " " + str(_id) + "\n"
for key in sorted(world_db[category][_id].keys()):
for _id in sorted(world_db[category].keys()):
string = string + id_string + " " + str(_id) + "\n"
for key in sorted(world_db[category][_id].keys()):
- if not key in special_keys:
+ if
key.isupper() and
not key in special_keys:
x = world_db[category][_id][key]
argument = quote_escape(x) if str == type(x) else str(x)
string = string + key + " " + argument + "\n"
x = world_db[category][_id][key]
argument = quote_escape(x) if str == type(x) else str(x)
string = string + key + " " + argument + "\n"
@@
-185,7
+185,7
@@
def save_world():
t = world_db["Things"][tid]
for key in sorted(t.keys()):
if key not in {"T_CARRIES", "carried", "fovmap", "T_MEMMAP",
t = world_db["Things"][tid]
for key in sorted(t.keys()):
if key not in {"T_CARRIES", "carried", "fovmap", "T_MEMMAP",
- "T_MEMTHING", "T_MEMDEPTHMAP"}:
+ "T_MEMTHING", "T_MEMDEPTHMAP"
, "pos"
}:
argument = t[key]
string += key + " " + (quote_escape(argument) if \
str == type(argument) else str(argument)) + "\n"
argument = t[key]
string += key + " " + (quote_escape(argument) if \
str == type(argument) else str(argument)) + "\n"
@@
-212,6
+212,7
@@
def save_world():
string = string + "T_ID " + str(tid) + "\n"
for carried in sorted(world_db["Things"][tid]["T_CARRIES"]):
string = string + "T_CARRIES " + str(carried) + "\n"
string = string + "T_ID " + str(tid) + "\n"
for carried in sorted(world_db["Things"][tid]["T_CARRIES"]):
string = string + "T_CARRIES " + str(carried) + "\n"
+ string = string + io_db["hook_save"]()
string = string + "SEED_RANDOMNESS " + str(rand.seed) + "\n" + \
"WORLD_ACTIVE " + str(world_db["WORLD_ACTIVE"])
atomic_write(io_db["path_save"], string)
string = string + "SEED_RANDOMNESS " + str(rand.seed) + "\n" + \
"WORLD_ACTIVE " + str(world_db["WORLD_ACTIVE"])
atomic_write(io_db["path_save"], string)
@@
-286,7
+287,7
@@
def obey_lines_in_file(path, name, do_record=False):
def try_worldstate_update():
"""Write worldstate file if io_db["worldstate_updateable"] is set."""
def try_worldstate_update():
"""Write worldstate file if io_db["worldstate_updateable"] is set."""
- if io_db["worldstate_updateable"]:
+ if
world_db["WORLD_ACTIVE"] and
io_db["worldstate_updateable"]:
string = ""
for entry in io_db["worldstate_write_order"]:
if entry[1] == "world_int":
string = ""
for entry in io_db["worldstate_write_order"]:
if entry[1] == "world_int":