home · contact · privacy
Server: Save PLUGIN command at top of save file.
[plomrogue] / server / io.py
index ab3bbffc071e7e7b739c82f921ee4df71f22676b..877e525e3b23c14eccff83df2e9c572fd99bb7b1 100644 (file)
@@ -179,13 +179,13 @@ def save_world():
         return string
 
     string = ""
+    for plugin in world_db["PLUGIN"]:
+        string = string + "PLUGIN " + plugin + "\n"
     for key in sorted(world_db.keys()):
         if (not isinstance(world_db[key], dict) and
             not isinstance(world_db[key], list)) and key != "MAP" and \
            key != "WORLD_ACTIVE":
             string = string + key + " " + str(world_db[key]) + "\n"
-    for plugin in world_db["PLUGIN"]:
-        string = string + "PLUGIN " + plugin + "\n"
     string = string + mapsetter("MAP")()
     string = string + helper("ThingActions", "TA_ID")
     string = string + helper("ThingTypes", "TT_ID", {"TT_CORPSE_ID": False})
@@ -260,7 +260,7 @@ def obey(command, prefix, replay=False, do_record=False):
                     io_db["save_wait"] = time.time()
             io_db["worldstate_updateable"] = world_db["WORLD_ACTIVE"]
     elif 0 != len(tokens):
-        print("Invalid command/argument, or bad number of tokens.")
+        print("Invalid command/argument, or bad number of tokens: " + command)
 
 
 def obey_lines_in_file(path, name, do_record=False):