home · contact · privacy
Server: Add save hook.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 10 Mar 2016 01:30:22 +0000 (02:30 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 10 Mar 2016 01:30:22 +0000 (02:30 +0100)
server/config/io.py
server/io.py

index 463163843aeb2bdfc76c8866371e259d24813e29..dabe2558061ded9e9ff5511783c97306ba99d040 100644 (file)
@@ -31,5 +31,6 @@ io_db = {
         ["MAP_LENGTH", "world_int"],
         [write_fov_map, "func"],
         [write_mem_map, "func"]
-    ]
+    ],
+    "hook_save": lambda: "",
 }
index ce3ee1a947eca4b9109cf4e9df51c57f41248028..5e02ed4287d1c22e4724a982f2f72718ef3af839 100644 (file)
@@ -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 + 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)