13 location_key =
'finding_location'
17 """Append 'a' or 'an' to the given object's name."""
19 if name[0].lower()
in {
'a',
'e',
'i',
'o'}:
23 return article +
" " + name
26 """Identify the object if it hasn't already."""
32 return ",".join(
map(str, l))
35 return list(
map(int, s.split(
",")))
41 if dist <= world_size:
43 elif dist <= 5*world_size:
44 modifier =
"moderately"
50 whoami = Crossfire.WhoAmI()
51 player = Crossfire.WhoIsActivator()
53 Crossfire.SetReturnValue(1)
56 if whoami.Env == player:
63 if current_location ==
False:
65 player.Message(
"The %s rattles for a moment, then stops." % whoami.QueryName())
68 if whoami.Env == player:
70 stored_str = whoami.ReadKey(location_key)
73 player.Message(
"The %s vibrates for a moment, then stops." % whoami.QueryName())
77 player.Message(
"The %s tugs you %s." % (whoami.QueryName(),
describe_vec(delta)))
80 whoami.WriteKey(location_key,
loc_to_str(current_location), 1)
81 player.Message(
"The %s glows blue." % whoami.QueryName())