home · contact · privacy
Client, plugins: Make window scroll hints optional.
[plomrogue] / plugins / client / PleaseTheIslandGod.py
index e8cfa0ca3e15ecab4db7ac4ba2f61db26667cc5f..7348e76256b8cbbe660d2bed80323cb1c667a581 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.
+
+
 from client.config.io import io
 from client.config.world_data import world_data
 world_data["log"][-2] = "STATS OVERVIEW: " \
@@ -118,9 +123,17 @@ def win_map(self):
                 elif char == "=":
                     attribute = col_lumber
                 bonus = (" ", attribute)
-                if len(world_data["metamap_A"]) > 0 and \
-                        world_data["metamap_A"][pos] == "2":
-                    bonus = ("+", col_stack)
+                if len(world_data["metamap_A"]) > 0:
+                    if world_data["metamap_A"][pos] == "2":
+                        bonus = ("+", col_stack)
+                    elif not world_data["metamap_A"][pos] in "01":
+                        c = world_data["metamap_B"][pos]
+                        if world_data["metamap_A"][pos] == "a":
+                            bonus = (c, col_health_bad)
+                        elif world_data["metamap_A"][pos] == "b":
+                            bonus = (c, col_health_middle)
+                        elif world_data["metamap_A"][pos] == "c":
+                            bonus = (c, col_health_good)
                 winmap += [(char, attribute), bonus]
         if y % 2 == 0:
             winmap += "  "
@@ -129,11 +142,26 @@ def win_map(self):
 from client.config.windows import windows_config
 from client.windows import win_log, win_inventory, win_look
 windows_config[:] = [
-    {"config": [1, 33], "func": win_info, "title": "Stats"},
-    {"config": [-7, 33], "func": win_log, "title": "Log"},
-    {"config": [4, 16], "func": win_inventory, "title": "Inventory"},
-    {"config": [4, 16], "func": win_look, "title": "Things here"},
-    {"config": [0, -34], "func": win_map, "title": "PLEASE THE ISLAND GOD"}
+    {"config": [1, 33],
+     "func": win_info,
+     "scroll_hints": True,
+     "title": "Stats"},
+    {"config": [-7, 33],
+     "func": win_log,
+     "scroll_hints": True,
+     "title": "Log"},
+    {"config": [4, 16],
+     "func": win_inventory,
+     "scroll_hints": True,
+     "title": "Inventory"},
+    {"config": [4, 16],
+     "func": win_look,
+     "scroll_hints": True,
+     "title": "Things here"},
+    {"config": [0, -34],
+     "func": win_map,
+     "scroll_hints": True,
+     "title": "PLEASE THE ISLAND GOD"}
 ]
 from client.window_management import set_windows
 set_windows()