server.config.commands.play_pickup_attempt_hook = play_pickup_attempt_hook
import server.config.misc
-server.config.misc.make_map_func = make_map
+server.config.misc.make_map = make_map
server.config.misc.decrement_lifepoints = decrement_lifepoints
-server.config.misc.calc_effort_func = calc_effort
+server.config.misc.calc_effort = calc_effort
import server.config.make_world_helpers
-server.config.make_world_helpers.pos_test_func = pos_test
-server.config.make_world_helpers.world_makable_func = world_makable
-server.config.make_world_helpers.make_map_func = make_map
+server.config.make_world_helpers.pos_test = pos_test
+server.config.make_world_helpers.world_makable = world_makable
+server.config.make_world_helpers.make_map = make_map
import server.config.thingproliferation
server.config.thingproliferation.field_spreadable = field_spreadable
from server.make_map import make_map
from server.world_makable import world_makable
-pos_test_func = lambda a, b, c: True
-make_map_func = make_map
-world_makable_func = world_makable
+pos_test = lambda a, b, c: True
+make_map = make_map
+world_makable = world_makable
from server.calc_effort import calc_effort
decrement_lifepoints = decrement_lifepoints
-calc_effort_func = calc_effort
+calc_effort = calc_effort
from server.config.world_data import world_db, symbols_passable
-from server.config.make_world_helpers import make_map_func, \
- world_makable_func, pos_test_func
+from server.config.make_world_helpers import make_map, world_makable, pos_test
from server.config.io import io_db
from server.utils import rand, libpr, id_setter
from server.new_thing import new_Thing
y = rand.next() % world_db["MAP_LENGTH"]
x = rand.next() % world_db["MAP_LENGTH"]
if chr(world_db["MAP"][y * world_db["MAP_LENGTH"] + x]) in \
- symbols_passable and pos_test_func(type, y, x):
+ symbols_passable and pos_test(type, y, x):
break
i += 1
if i == 65535:
break
return (y, x)
- playertype = world_makable_func()
+ playertype = world_makable()
if playertype < 0:
return
rand.seed = seed
libpr.set_maplength(world_db["MAP_LENGTH"])
world_db["Things"] = {}
- make_map_func()
+ make_map()
world_db["WORLD_ACTIVE"] = 1
world_db["TURN"] = 1
for i in range(world_db["ThingTypes"][playertype]["TT_START_NUMBER"]):
"""Run game world and its inhabitants until new player input expected."""
from server.ai import ai
from server.config.actions import action_db
- from server.config.misc import calc_effort_func
+ from server.config.misc import calc_effort
from server.update_map_memory import update_map_memory
from server.thingproliferation import thingproliferation
id = 0
taid = [a for a in world_db["ThingActions"]
if a == Thing["T_COMMAND"]][0]
ThingAction = world_db["ThingActions"][taid]
- effort = calc_effort_func(ThingAction, Thing)
+ effort = calc_effort(ThingAction, Thing)
if Thing["T_PROGRESS"] == effort:
action = action_db["actor_" + ThingAction["TA_NAME"]]
action(Thing)