home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4f88b91
)
Server, plugin: Some minor variable renaming.
author
Christian Heller
<c.heller@plomlompom.de>
Mon, 29 Feb 2016 01:33:00 +0000
(
02:33
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Mon, 29 Feb 2016 01:33:00 +0000
(
02:33
+0100)
plugins/server/PleaseTheIslandGod.py
patch
|
blob
|
history
server/config/make_world_helpers.py
patch
|
blob
|
history
server/config/misc.py
patch
|
blob
|
history
server/make_world.py
patch
|
blob
|
history
server/world.py
patch
|
blob
|
history
diff --git
a/plugins/server/PleaseTheIslandGod.py
b/plugins/server/PleaseTheIslandGod.py
index fba17fc6a6325c0008206072d7892ec5397a5402..95b46d0f18fd4595e82db847daa1780d2e8d0e87 100644
(file)
--- a/
plugins/server/PleaseTheIslandGod.py
+++ b/
plugins/server/PleaseTheIslandGod.py
@@
-527,14
+527,14
@@
server.config.commands.play_use_attempt_hook = play_use_attempt_hook
server.config.commands.play_pickup_attempt_hook = play_pickup_attempt_hook
import server.config.misc
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.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
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
import server.config.thingproliferation
server.config.thingproliferation.field_spreadable = field_spreadable
diff --git
a/server/config/make_world_helpers.py
b/server/config/make_world_helpers.py
index 21b4239813e8df6382fabfc8e345c715ccc7d4c9..aba18c57a78e27fe97f12c3925540a6c4e217732 100644
(file)
--- a/
server/config/make_world_helpers.py
+++ b/
server/config/make_world_helpers.py
@@
-5,6
+5,6
@@
from server.make_map import make_map
from server.world_makable import world_makable
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
diff --git
a/server/config/misc.py
b/server/config/misc.py
index 299486b5b07103824a1d423751970f004fb99f73..3d97a3e3f70e47b0884b4b8b66527fd019e2d102 100644
(file)
--- a/
server/config/misc.py
+++ b/
server/config/misc.py
@@
-7,4
+7,4
@@
from server.decrement_lifepoints import decrement_lifepoints
from server.calc_effort import calc_effort
decrement_lifepoints = decrement_lifepoints
from server.calc_effort import calc_effort
decrement_lifepoints = decrement_lifepoints
-calc_effort
_func
= calc_effort
+calc_effort = calc_effort
diff --git
a/server/make_world.py
b/server/make_world.py
index 23609c686d7a860ae6df4b3bb1761a1191853324..424bd1a9c627f7e78fa29f8cebb43ce78666d312 100644
(file)
--- a/
server/make_world.py
+++ b/
server/make_world.py
@@
-4,8
+4,7
@@
from server.config.world_data import world_db, symbols_passable
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
from server.config.io import io_db
from server.utils import rand, libpr, id_setter
from server.new_thing import new_Thing
@@
-32,7
+31,7
@@
def make_world(seed):
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 \
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
i += 1
if i == 65535:
@@
-46,13
+45,13
@@
def make_world(seed):
break
return (y, x)
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"] = {}
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"]):
world_db["WORLD_ACTIVE"] = 1
world_db["TURN"] = 1
for i in range(world_db["ThingTypes"][playertype]["TT_START_NUMBER"]):
diff --git
a/server/world.py
b/server/world.py
index 90b26de7db3807a394450f150c7beef6442ccb07..cde01988a2fe542e5cb7c95a2b61e3928bd2efb7 100644
(file)
--- a/
server/world.py
+++ b/
server/world.py
@@
-53,7
+53,7
@@
def turn_over():
"""Run game world and its inhabitants until new player input expected."""
from server.ai import ai
from server.config.actions import action_db
"""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
from server.update_map_memory import update_map_memory
from server.thingproliferation import thingproliferation
id = 0
@@
-82,7
+82,7
@@
def turn_over():
taid = [a for a in world_db["ThingActions"]
if a == Thing["T_COMMAND"]][0]
ThingAction = world_db["ThingActions"][taid]
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)
if Thing["T_PROGRESS"] == effort:
action = action_db["actor_" + ThingAction["TA_NAME"]]
action(Thing)