home · contact · privacy
Server: Make make_world function selectable.
[plomrogue] / server / commands.py
index 9a103372d91fd8aae96bf403dc93d7fc881a80d8..f55400b4b8595f7113702a523952ba47a013934f 100644 (file)
@@ -7,8 +7,9 @@ from server.config.world_data import world_db
 from server.config.io import io_db
 from server.io import log, strong_write 
 from server.utils import integer_test, id_setter
-from server.world import build_fov_map, update_map_memory, set_world_inactive,\
-        turn_over
+from server.world import set_world_inactive, turn_over
+from server.update_map_memory import update_map_memory
+from server.build_fov_map import build_fov_map
 
 
 def command_plugin(str_plugin):
@@ -83,8 +84,8 @@ def command_makeworld(seed_string):
     """Call make_world()."""
     val = integer_test(seed_string, 0, 4294967295)
     if None != val:
-        from server.world import make_world
-        make_world(val)
+        from server.config.misc import make_world_func
+        make_world_func(val)
 
 
 def command_maplength(maplength_string):
@@ -149,7 +150,7 @@ def command_tid(id_string):
             print("Ignoring: No ThingType to settle new Thing in.")
             return
         type = list(world_db["ThingTypes"].keys())[0]
-        from server.world import new_Thing
+        from server.new_thing import new_Thing
         world_db["Things"][id] = new_Thing(type)