home · contact · privacy
Server: Force control for proper map length before world generation.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 6 Feb 2016 01:37:09 +0000 (02:37 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 6 Feb 2016 01:37:09 +0000 (02:37 +0100)
server/world.py

index f31c3a69cae77efcd104006f1e0ce88c52c700c8..902a554dfe9c534bce435fdb620f3030f42d3d1e 100644 (file)
@@ -264,6 +264,10 @@ def make_world(seed):
         return (y, x)
 
     rand.seed = seed 
+    if world_db["MAP_LENGTH"] < 1:
+        print("Ignoring: No map length >= 1 defined.")
+        return
+    libpr.set_maplength(world_db["MAP_LENGTH"])
     player_will_be_generated = False
     playertype = world_db["PLAYER_TYPE"]
     for ThingType in world_db["ThingTypes"]: