1 # This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
2 # or any later version. For details on its copyright, license, and warranties,
3 # see the file NOTICE in the root directory of the PlomRogue source package.
8 curses.init_pair(79, curses.COLOR_WHITE, curses.COLOR_BLUE)
9 for i in range(world_data["bladder"]):
10 winmap += [("~", curses.color_pair(79))]
11 winmap_size = [1, len(winmap)]
13 return offset, winmap_size, winmap
18 curses.init_pair(80, curses.COLOR_YELLOW, curses.COLOR_RED)
19 for i in range(world_data["bowel"]):
20 winmap += [("#", curses.color_pair(80))]
21 winmap_size = [1, len(winmap)]
23 return offset, winmap_size, winmap
30 if world_data["map_center"][i] * (i + 1) > win_size[i] / 2 and \
31 win_size[i] < world_data["map_size"] * (i + 1):
32 if world_data["map_center"][i] * (i + 1) \
33 < world_data["map_size"] * (i + 1) - win_size[i] / 2:
34 offset[i] = world_data["map_center"][i] * (i + 1) \
35 - int(win_size[i] / 2)
37 offset[1] = offset[1] + world_data["map_center"][0] % 2
39 offset[i] = world_data["map_size"] * (i + 1) - win_size[i] + i
40 winmap_size = [world_data["map_size"], world_data["map_size"] * 2 + 1]
42 curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLACK)
43 curses.init_pair(2, curses.COLOR_BLUE, curses.COLOR_BLACK)
44 curses.init_pair(3, curses.COLOR_RED, curses.COLOR_BLACK)
45 curses.init_pair(4, curses.COLOR_YELLOW, curses.COLOR_BLACK)
46 curses.init_pair(5, curses.COLOR_MAGENTA, curses.COLOR_BLACK)
47 curses.init_pair(6, curses.COLOR_BLACK, curses.COLOR_BLUE)
48 col_unknown = curses.color_pair(1)
49 col_mem_obstacle = curses.color_pair(2)
50 col_mem = curses.color_pair(2)
51 col_stone = curses.color_pair(1)
52 col_dirt = curses.color_pair(4)
53 col_earth = curses.color_pair(3)
54 col_player = curses.color_pair(5)
55 col_water = curses.color_pair(6)
56 for y in range(world_data["map_size"]):
57 for x in range(world_data["map_size"]):
58 pos = y * world_data["map_size"] + x
59 char = world_data["fov_map"][pos]
60 if world_data["look_mode"] and y == world_data["map_center"][0] \
61 and x == world_data["map_center"][1]:
63 char = world_data["mem_map"][pos]
64 winmap += [(char, curses.A_REVERSE), ("?", curses.A_REVERSE)]
67 char = world_data["mem_map"][pos]
70 attribute = col_unknown
71 elif char == "X" or char == "#":
72 attribute = col_mem_obstacle
73 bonus = (" ", attribute)
74 winmap += [(char, attribute), bonus]
89 attribute = col_player
90 bonus = (char, attribute)
91 winmap += [(char, attribute), bonus]
94 return offset, winmap_size, winmap
96 from client.config.world_data import world_data
97 world_data["bowel"] = 0
98 world_data["bladder"] = 0
99 from client.config.io import io
100 io["worldstate_read_order"] += [["bowel", "int"]]
101 io["worldstate_read_order"] += [["bladder", "int"]]
102 from client.config.windows import windows_config
103 from client.windows import win_log
104 windows_config[:] = [
105 {"config": [0, -34], "func": win_map, "title": "The Crawling Eater"},
106 {"config": [1, 33], "func": win_bowel, "title": "bowel"},
107 {"config": [1, 33], "func": win_bladder, "title": "bladder"},
108 {"config": [-4, 33], "func": win_log, "title": "log"}
110 from client.window_management import set_windows
112 from client.commands import command_sender
113 from client.config.commands import commands
114 commands["S"] = (command_sender("drop"),)
115 commands["D"] = (command_sender("drink"),)
116 commands["P"] = (command_sender("pee"),)