X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/cards/%7B%7B%20card_id%20%7D%7D/delete?a=blobdiff_plain;f=plugins%2Fclient%2FTheCrawlingEater.py;h=b1f4005a02ac63fb302b487dd0f4438c23436cab;hb=8b3752b7fa7398628c7d147aa237ef96d7f5d6d2;hp=796f08cf9ad6c0fe7014dc279d3736eb96df2a6c;hpb=346f6a011bf2749fe7dadcb514983980b66dc3d3;p=plomrogue diff --git a/plugins/client/TheCrawlingEater.py b/plugins/client/TheCrawlingEater.py index 796f08c..b1f4005 100644 --- a/plugins/client/TheCrawlingEater.py +++ b/plugins/client/TheCrawlingEater.py @@ -46,8 +46,8 @@ def win_map(self): curses.init_pair(5, curses.COLOR_CYAN, curses.COLOR_BLACK) curses.init_pair(6, curses.COLOR_MAGENTA, curses.COLOR_BLACK) curses.init_pair(7, curses.COLOR_GREEN, curses.COLOR_BLACK) - curses.init_pair(8, curses.COLOR_BLACK, curses.COLOR_MAGENTA) - curses.init_pair(9, curses.COLOR_BLACK, curses.COLOR_BLUE) + curses.init_pair(8, curses.COLOR_BLACK, curses.COLOR_BLUE) + curses.init_pair(9, curses.COLOR_BLACK, curses.COLOR_MAGENTA) curses.init_pair(10, curses.COLOR_BLACK, curses.COLOR_CYAN) col_unknown = curses.color_pair(1) col_mem_obstacle = curses.color_pair(2) @@ -93,20 +93,8 @@ def win_map(self): attribute = col_mem if char == " ": attribute = col_unknown - elif char in "%#XABCDEFGHI": + elif char in "%#X": attribute = col_mem_obstacle - if char in "ADG": - char = "%" - elif char in "BEH": - char = "#" - elif char in "CFI": - char = "X" - elif char in "LO": - char = "~" - elif char in "JMP": - char = "." - elif char in "KNQ": - char = ":" bonus = (" ", attribute) winmap += [(char, attribute), bonus] else: @@ -115,68 +103,52 @@ def win_map(self): if char == "_": attribute = col_ground elif char == "~": - attribute = col_ground_wet - elif char == "L": - char = "~" - attribute = col_ground_wetter - elif char == "O": - char = "~" - attribute = col_ground_wettest + if world_data["wetmap"][pos] == "1": + attribute = col_ground_wet + if world_data["wetmap"][pos] == "2": + attribute = col_ground_wetter + if world_data["wetmap"][pos] == "3": + attribute = col_ground_wettest if char == ".": attribute = col_dirt - if char == "J": - char = "." - attribute = col_dirt_wet - if char == "M": - char = "." - attribute = col_dirt_wetter - if char == "P": - char = "." - attribute = col_dirt_wettest + if world_data["wetmap"][pos] == "1": + attribute = col_dirt_wet + if world_data["wetmap"][pos] == "2": + attribute = col_dirt_wetter + if world_data["wetmap"][pos] == "3": + attribute = col_dirt_wettest elif char == ":": attribute = col_earth - elif char == "K": - char = ":" - attribute = col_earth_wet - elif char == "N": - char = ":" - attribute = col_earth_wetter - elif char == "Q": - char = ":" - attribute = col_earth_wettest + if world_data["wetmap"][pos] == "1": + attribute = col_earth_wet + if world_data["wetmap"][pos] == "2": + attribute = col_earth_wetter + if world_data["wetmap"][pos] == "3": + attribute = col_earth_wettest elif char == "%": attribute = col_wall_dirt - elif char == "A": - char = "%" - attribute = col_wall_dirt_wet - elif char == "D": - char = "%" - attribute = col_wall_dirt_wetter - elif char == "G": - char = "%" - attribute = col_wall_dirt_wettest + if world_data["wetmap"][pos] == "1": + attribute = col_wall_dirt_wet + if world_data["wetmap"][pos] == "2": + attribute = col_wall_dirt_wetter + if world_data["wetmap"][pos] == "3": + attribute = col_wall_dirt_wettest elif char == "#": attribute = col_wall_earth - elif char == "B": - char = "#" - attribute = col_wall_earth_wet - elif char == "E": - char = "#" - attribute = col_wall_earth_wetter - elif char == "H": - char = "#" - attribute = col_wall_earth_wettest + if world_data["wetmap"][pos] == "1": + attribute = col_wall_earth_wet + if world_data["wetmap"][pos] == "2": + attribute = col_wall_earth_wetter + if world_data["wetmap"][pos] == "3": + attribute = col_wall_earth_wettest elif char == "X": attribute = col_wall_stone - elif char == "C": - char = "X" - attribute = col_wall_stone_wet - elif char == "F": - char = "X" - attribute = col_wall_stone_wetter - elif char == "I": - char = "X" - attribute = col_wall_stone_wettest + if world_data["wetmap"][pos] == "1": + attribute = col_wall_stone_wet + if world_data["wetmap"][pos] == "2": + attribute = col_wall_stone_wetter + if world_data["wetmap"][pos] == "3": + attribute = col_wall_stone_wettest elif char == "@": attribute = col_player winmap += [(char, attribute), bonus] @@ -187,9 +159,11 @@ def win_map(self): from client.config.world_data import world_data world_data["bowel"] = 0 world_data["bladder"] = 0 +world_data["wetmap"] = " " * (world_data["map_size"] ** 2) from client.config.io import io io["worldstate_read_order"] += [["bowel", "int"]] io["worldstate_read_order"] += [["bladder", "int"]] +io["worldstate_read_order"] += [["wetmap", "map"]] from client.config.windows import windows_config from client.windows import win_log windows_config[:] = [