home · contact · privacy
Server, plugin: Fix buggy passing of strings to C library.
[plomrogue] / server / config / world_data.py
index 45acf4f5a17e0b61b1dc47bbcbe91e8ed39391de..8e5a781dac66acc70b10b4f8555b8e110ee23d0f 100644 (file)
@@ -1,3 +1,8 @@
+# This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
+# or any later version. For details on its copyright, license, and warranties,
+# see the file NOTICE in the root directory of the PlomRogue source package.
+
+
 """World state database. With sane default values. (Randomness is in rand.)"""
 world_db = {
     "TURN": 0,
@@ -5,11 +10,48 @@ world_db = {
     "PLAYER_TYPE": 0,
     "WORLD_ACTIVE": 0,
     "MAP": False,
+    "PLUGIN": [],
     "ThingActions": {},
     "ThingTypes": {},
-    "Things": {}
+    "Things": {},
+    "terrain_names": {
+        " ": "UNKNOWN",
+        "X": "TREE",
+        "~": "SEA",
+        ".": "EARTH"
+    }
 }
 
 """Mapping of direction names to internal direction chars."""
 directions_db = {"east": "d", "south-east": "c", "south-west": "x",
                  "west": "s", "north-west": "w", "north-east": "e"}
+
+thing_defaults = {
+    "T_ARGUMENT": 0,
+    "T_PROGRESS": 0,
+    "T_SATIATION": 0,
+    "T_COMMAND": 0,
+    "T_CARRIES": [],
+    "carried": False,
+    "T_MEMTHING": [],
+    "T_MEMMAP": False,
+    "T_MEMDEPTHMAP": False,
+    "fovmap": False
+}
+
+thingtype_defaults = {
+        "TT_NAME": "(none)",
+        "TT_TOOLPOWER": 0,
+        "TT_LIFEPOINTS": 0,
+        "TT_PROLIFERATE": 0,
+        "TT_START_NUMBER": 0,
+        "TT_SYMBOL": "?",
+        "TT_TOOL": ""
+}
+
+symbols_passable = "."
+symbols_hide = "X"
+
+thingprol_field_spreadable = lambda x, y: x in symbols_passable
+thingprol_test_hook = lambda x: True
+thingprol_post_create_hook = lambda x: None