X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=plugins%2Fserver%2FPleaseTheIslandGod.py;h=3b571c7d053547dab3ece329adfc073a630ec563;hb=dc6fe5e5b871e529cc0079458c80b58b2883d053;hp=09672b227c0f325ed25616a5581bb34cebe64a4c;hpb=22508813dc1bc6a53652349253f9ee19b1ac4a0f;p=plomrogue diff --git a/plugins/server/PleaseTheIslandGod.py b/plugins/server/PleaseTheIslandGod.py index 09672b2..3b571c7 100644 --- a/plugins/server/PleaseTheIslandGod.py +++ b/plugins/server/PleaseTheIslandGod.py @@ -5,13 +5,9 @@ from server.config.io import io_db from server.new_thing import new_Thing def make_world(seed): - from server.config.world_data import world_db, symbols_passable - from server.config.misc import make_map_func - from server.config.io import io_db - from server.utils import rand, libpr, id_setter - from server.new_thing import new_Thing - from server.io import strong_write from server.update_map_memory import update_map_memory + from server.config.misc import make_map_func + from server.utils import libpr def free_pos(plant=False): i = 0 @@ -83,10 +79,8 @@ def make_world(seed): strong_write(io_db["file_out"], "NEW_WORLD\n") def thingproliferation(t, prol_map): - from server.config.world_data import directions_db, symbols_passable,\ - world_db - from server.utils import mv_yx_in_dir_legal, rand from server.new_thing import new_Thing + global directions_db, mv_yx_in_dir_legal prolscore = world_db["ThingTypes"][t["T_TYPE"]]["TT_PROLIFERATE"] if prolscore and \ (world_db["ThingTypes"][t["T_TYPE"]]["TT_LIFEPOINTS"] == 0 or @@ -119,8 +113,7 @@ def thingproliferation(t, prol_map): # world_db["GOD_FAVOR"] += 750 def make_map(): - from server.config.world_data import world_db - from server.utils import rand + global rand def is_neighbor(coordinates, type): y = coordinates[0] @@ -269,9 +262,8 @@ def actor_drop(t): def actor_move(t): - from server.utils import mv_yx_in_dir_legal + from server.config.world_data import symbols_passable from server.build_fov_map import build_fov_map - from server.config.world_data import directions_db, symbols_passable def decrement_lifepoints(t): t["T_LIFEPOINTS"] -= 1 _id = [_id for _id in world_db["Things"] if world_db["Things"][_id] == t][0]