generic room #3

Parent #1Owner #361Flags obsolete1, read, fertileSource hellcore/hellcore.db

Aliases: generic room

161 verbs · 92 properties · 4 children

Verbs

VerbSpecFlagsDefinerLines
confuncthis none thisrxd#35
disfuncthis none thisrxd#34
sayany any anyrxd#31
emoteany any anyrxd#324
announcethis none thisrxd#35
match_exitthis none thisrxd#316
tell_contentsthis none thisrxd#321
look_selfthis none thisrxd#3109
acceptablethis none thisrxd#31
goany any anyrxd#39
announce_allthis none thisrxd#35
announce_all_butthis none thisrxd#311
enterfuncthis none thisrxd#344
exitfuncthis none thisrxd#340
remove_exitthis none thisrxd#38
recyclethis none thisrxd#353
e east w west s south n north ne northeast nw northwest se southeast sw southwest u up d down in outnone none nonerxd#315
matchthis none thisrxd#311
who_location_msgthis none thisrxd#31
exits entrancesthis none thisrxd#35
obvious_exits obvious_entrancesthis none thisrxd#37
here_huhthis none thisrxd#313
room_announce*_all_butthis none thisrxd#31
examine_commands_okthis none thisrxd#31
examine_contentsthis none thisrxd#34
broadcast_eventthis none thisrxd#317
player_integration_msgthis none thisrxd#334
next_hop_tothis none thisrxd#374
recalc_next_hopsthis none thisrxd#390
destinationsthis none thisrxd#37
list_exitsthis none thisrxd#340
titlethis none thisrxd#330
go_fail_msgthis none thisrxd#31
buildingthis none thisrxd#37
add_stub_roomthis none thisrxd#310
descriptionthis none thisrxd#326
time_msgthis none thisrxd#312
cover hidenone none nonerxd#311
track_strengththis none thisrxd#312
track_exitthis none thisrxd#331
track_agethis none thisrxd#314
time_windows_msgthis none thisrxd#39
sky_roomthis none thisrxd#31
-* `*any any anyrxd#313
player_integration_msg_backupthis none thisrxd#347
sittersthis none thisrxd#33
reclinersthis none thisrxd#33
free_seatsthis none thisrxd#35
do_sitthis none thisrxd#329
do_reclinethis none thisrxd#328
do_standthis none thisrxd#310
destinations_mapokthis none thisrxd#39
draw_mapthis none thisrxd#33
_iconthis none thisrxd#31
broadcast_noise broadcast_soundthis none thisrxd#341
fall_intothis none thisrxd#353
integrated_objectsthis none thisrxd#36
sitnone none nonerxd#31
users_msgthis none thisrxd#369
validate_occupantsthis none thisrxd#312
rise standnone none nonerxd#32
look_place_msgthis none thisrxd#31
infectthis none thisrxd#328
recline lie laynone none nonerxd#31
powerplantthis none thisrxd#35
match_someonethis none thisrxd#313
tell_mapthis none thisrxd#389
search scavengenone none nonerxd#32
yell shout screamthis none thisrxd#31
set_xyz_recthis none thisrxd#344
add_exitthis none thisrxd#33
sort_exitsthis none thisrxd#39
chill_factorthis none thisrxd#324
add_residentthis none thisrxd#32
check_forbid_actionthis none thisrxd#315
do_creature_heartbeatthis none thisrxd#33
_client_iconthis none thisrxd#31
client_titlethis none thisrxd#31
@residentsnone none nonerxd#310
remove_residentthis none thisrxd#36
@rmresident @removeresidentany none nonerxd#313
_yellthis none thisrxd#312
hide_itemthis none thisrxd#323
client_map tell_client_mapthis none thisrxd#36
_allowsthis none thisrxd#31
debug_tellthis none thisrxd#35
psi_shimmerthis none thisrxd#38
_blank_mapthis none thisrxd#312
_render_mapthis none thisrxd#3121
_room_mapthis none thisrxd#340
_update_mapthis none thisrxd#334
spy_reportthis none thisrxd#317
_link_mapthis none thisrxd#339
list_descriptionthis none thisrxd#373
render_contentsthis none thisrxd#311
@addresidentany none nonerxd#319
creature_heartbeatthis none thisrxd#314
enterfuncthis none thisrxd#30
exitfuncthis none thisrxd#30
random_exitthis none thisrxd#38
roomthis none thisrxd#31
_room_map_listthis none thisrxd#337
weather_msgthis none thisrxd#31
update_watchthis none thisrxd#318
_descriptive_map_oldthis none thisrxd#336
textmapany none nonerxd#33
announce_adminsthis none thisrxd#37
announce_admins_butthis none thisrxd#312
_coversthis none thisrxd#35
_covers_leftthis none thisrxd#31
old_make_noisethis none thisrxd#327
make_noisethis none thisrxd#349
ambiencethis none thisrxd#319
controlled_bythis none thisrxd#311
look_skythis none thisrxd#329
look_self_NEWthis none thisrxd#3137
look_self_backupthis none thisrxd#3162
random_nondoor_exitthis none thisrxd#38
look_self_backup2this none thisrxd#3168
infect_creaturethis none thisrxd#32
temperaturethis none thisrxd#320
forbid_saythis none thisrxd#31
distant_figuresthis none thisrxd#328
look_self_verybriefthis none thisrxd#317
list_exits_longthis none thisrxd#336
idle_sitthis none thisrxd#311
smellnone none nonerxd#324
extra_exit_descthis none thisrxd#314
tell_notesthis none thisrxd#321
prog_infothis none thisrxd#317
tell_mapthis none thisrxd#30
tree_tagthis none thisrxd#31
write_landmark_msgthis none thisrxd#310
floor_msgthis none thisrxd#34
inamethis none thisrxd#31
_sitthis none thisrxd#32
tell_map_backupthis none thisrxd#381
darknessthis none thisrxd#326
tell_nearby_lightsthis none thisrxd#323
auto_cleanthis none thisrxd#323
initializethis none thisrxd#32
_descriptive_mapthis none thisrxd#363
_ghosticonthis none thisrxd#313
rustlethis none thisrxd#37
examine_verbsthis none thisrxd#37
look_self_oldthis none thisrxd#3176
tell_map_oldthis none thisrxd#384
description_oldthis none thisrxd#319
list_exits_oldthis none thisrxd#336
player_integration_msg_oldthis none thisrxd#329
darkness_oldthis none thisrxd#325
allow_sethomethis none thisrxd#38
_darknessthis none thisrxd#311
_look_self_obviousthis none thisrxd#310
_look_self_furniturethis none thisrxd#310
_look_self_exitsthis none thisrxd#316
_look_self_creaturesthis none thisrxd#328
_look_self_othersthis none thisrxd#315
tell_contents_terserunthis none thisrxd#337
_radiconthis none thisrxd#316
sanitize_search_itemsthis none thisrxd#311

Properties

PropertyDefinerFlagsOwnerValue
who_location_msg#3rc#361"%T"
exits#3rc#361{}
go_fail_msg#3rc#361""
outdoor#3rc#3611
covers#3rc#361{"a rock", "a pole", "a trash pile"}
covering#3rc#361{}
tracks#3rc#361{}
windows#3rc#3610
public#3rc#3611
drop_msg#3rc#361"%DN drops %it."
get_msg#3rc#361"%DN picks up %it."
contents_msg#3rc#361"You see %t here."
contents_many_msg#3rc#361"You see %t here."
default_posture_msg#3rc#361""
seats#3rc#36116
sitting#3rc#361{}
reclining#3rc#361{}
sit_msg#3rc#361"You %<sit> on the floor."
osit_msg#3rc#361"%DN %<sits> on the floor."
sit_from_reclining#3rc#361"You sit up on the floor."
osit_from_reclining#3rc#361"%N %<sits> on the floor."
rise_msg#3rc#361"You %<stand> up from the floor."
orise_msg#3rc#361"%DN %<stands> up from the floor."
icon#3rc#361"~1b[30m~1b[43m[]~1b[0m"
map#3rc#361
list of 5{"~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m", "~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m", "~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[36m~1b[1m~1b[44m()~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m", "~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m", "~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m~1b[30m~1b[34m*~1b[37m-~1b[0m"}
recent_noises#3rc#361{}
fall_into_msg#3rc#361"%DN hits the floor with a dull crack."
size#3rc#36110
sit_from_reclining_msg#3rc#361"You %<sit> up."
osit_from_reclining_msg#3rc#361"%DN %<sits> up."
look_sitting_and_reclining#3rc#361"%sitters %sv sitting and %recliners %rv lying down here."
look_sitting_msg#3rc#361"%sitters %sv sitting down here."
recline_full_msg#3rc#361"There isn't enough room to lie down here."
already_sitting_msg#3rc#361"You're already sitting down."
already_reclining_msg#3rc#361"You're already lying down."
recline_from_sitting_msg#3rc#361"You lie down."
orecline_from_sitting_msg#3rc#361"%DN lies down."
recline_msg#3rc#361"You lie down."
orecline_msg#3rc#361"%DN lies down."
look_reclining_msg#3rc#361"%recliners %rv lying down here."
sitting_doing_msg#3rc#361"%DN is %<sitting> here %doing."
reclining_doing_msg#3rc#361"%DN is lying here %doing."
rise_failed_msg#3rc#361"You're not on the ground!"
infect_interval#3rc#36160
no_exit_msg#3rc#361"You can't go that way."
x#3rc#3610
y#3rc#3610
z#3rc#3610
residents#3rc#361{}
sit_full_msg#3rc#361"You can't find anywhere to sit down."
value#3rc#3615000
rustle_msg#3rc#361""
last_rustle#3rc#3610
thing_fall_into_msg#3rc#361"%IN lands with a thud."
decal_fall_into_msg#3rc#361"Some %n falls out of the sky, splashing onto the ground by your feet."
client_icon#3rc#361"ab"
client_map#3rc#361{"aaaaaaaaaa", "aaaaaaaaaa", "aaaaaiaaaa", "aaaaaaaaaa", "aaaaaaaaaa"}
track_msg#3rc#361"%DN paces around the area, sniffing at the ground."
watched#3rc#3610
max_objects#3rc#361100
show_map#3rc#3611
objects_to_echo#3rc#361{}
always_brief#3rc#3610
furniture#3rc#361{}
fall_into_noise#3rc#361#214863
ambience#3rc#361{}
temperature#3rc#36165
last_temp_update#3rc#3611286806270
continue_look_self_msg#3rc#361""
map_restricted#3rc#3610
global_xyz#3r#361{0, 0, 0}
common_name_msg#3rc#361""
verb_subs#3rc#361{{"ground", {#-1, "floor_msg"}}, {"floor", {#-1, "floor_msg"}}}
darkness#3rc#361{0, 1295722886}
total_dark_description_msg#3rc#361{"You're in total darkness."}
has_commands#3rc#3610
too_dark_msg#3rc#361"You can't really see much of anything."
next_room_to_global_origin#3r#361#-1
global_xyz_anchor#3r#3610
search_items#3rc#361{}
search_items_left#3rc#361{}
already_searched#3rc#361{}
aliases#1rc#361{"generic room"}
description#1rc#361<clear>
object_size#1r#29{143543, 1298433815}
hidden_verbs#1rc#361
list of 24{"say", "emote", "@entrances", "go", "look", "@add-exit", "@remove-exit", "list_exits", "-", "e", "yell", "recline", "rise", "sit", "cover", "@residents", "@rmresident", "appraise", "search", "@addresident", "textmap", "note", "rmnote", "smell"}
phelp_msg#1rc#361<clear>
weight#1rc#361<clear>
owner_verbs#1rc#361<clear>
plural_name#1rc#361<clear>
client_image#1rc#361<clear>
listening#1rc#361<clear>

Ancestry

Ancestors (nearest first): #1 root

Children: #43 Generic Editor, #257 generic outdoor room, #258 generic indoor room, #339 Staff Lounge

Call graph

calls n3_0 #3:confunc n42_0 #42:controls n3_0->n42_0 n3_7 #3:look_self n3_0->n3_7 n3_4 #3:announce n3_0->n3_4 n6_169 #6:dnamec n3_0->n6_169 n3_6 #3:tell_contents n3_7->n3_6 n6_54 #6:check_pref n3_7->n6_54 n107_43 #107:tell n3_7->n107_43 n3_59 #3:validate_occupants n3_7->n3_59 n3_137 #3:darkness n3_7->n3_137 n100_26 #100:can_see_in_dark n3_7->n100_26 n3_153 #3:_look_self_obvious n3_7->n3_153 n3_19 #3:exits n3_7->n3_19 n3_156 #3:_look_self_creatures n3_7->n3_156 n3_154 #3:_look_self_furniture n3_7->n3_154 n3_155 #3:_look_self_exits n3_7->n3_155 n3_157 #3:_look_self_others n3_7->n3_157 n3_35 #3:description n3_7->n3_35 n3_31 #3:title n3_7->n3_31 n1_11 #1:tell_lines n3_7->n1_11 n3_66 #3:tell_map n3_7->n3_66 n3_83 #3:client_map n3_7->n3_83 n3_138 #3:tell_nearby_lights n3_7->n3_138 n3_158 #3:tell_contents_terserun n3_7->n3_158 n3_30 #3:list_exits n3_7->n3_30 n3_144 #3:examine_verbs n3_7->n3_144 n3_100 #3:room n3_7->n3_100 n6_180 #6:systell n3_7->n6_180 n1_67 #1:list_hint_msg n3_7->n1_67 n3_1 #3:disfunc n3_1->n42_0 n3_1->n3_4 n3_1->n6_169 n3_2 #3:say n107_34 #107:say n3_2->n107_34 n3_3 #3:emote n20_34 #20:pronoun_sub n3_3->n20_34 n3_10 #3:announce_all n3_3->n3_10 n6_151 #6:name n3_3->n6_151 n20_77 #20:escape n3_3->n20_77 n154_0 #154:popmon n3_3->n154_0 n1_23 #1:contents n3_6->n1_23 n98_2 #98:aggregate_names n3_6->n98_2 n3_6->n6_54 n3_6->n107_43 n3_94 #3:render_contents n3_6->n3_94 n3_94->n1_23 n3_94->n98_2 n3_94->n6_54 n3_153->n1_23 n3_155->n6_54 n3_35->n3_137 n3_35->n100_26 n3_31->n3_137 n3_31->n100_26 n3_66->n3_137 n3_66->n3_31 n3_66->n1_11 n3_138->n107_43 n3_138->n3_137 n3_158->n3_6 n3_158->n1_23 n3_158->n107_43 n3_30->n3_137 n3_30->n100_26 n3_9 #3:go n3_9->n107_43 n92_2 #92:queue_action n3_9->n92_2 n3_12 #3:enterfunc n3_12->n3_7 n3_103 #3:update_watch n3_12->n3_103 n3_123 #3:look_self_verybrief n3_12->n3_123 n3_70 #3:add_exit n3_12->n3_70 n3_123->n107_43 n3_123->n3_31 n3_13 #3:exitfunc n3_13->n3_103

Showing 48 of 194 verbs; 146 not shown.

Source

confunc

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1if ((((cp = caller_perms()) == player) || $perm_utils:controls(cp, player)) || (caller == this))
2"Need the first check because guests don't control themselves";
3this:look_self();
4this:announce(player:dnamec(), " wakes up from ", player.pp, " trance.  (", $ansi.cyan, player:dnamec(), " has connected.", $ansi.reset, ")");
5endif

disfunc

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1if ((((cp = caller_perms()) == player) || $perm_utils:controls(cp, player)) || (caller == this))
2this:announce(tostr(player:dnamec(), " abruptly falls into a dazed trance.  (", $ansi.cyan, player:dnamec(), " has disconnected.", $ansi.reset, ")"));
3"need the first check since guests don't control themselves";
4endif

say

Spec any any anyFlags rxdOwner #361Definer #3

Referenced by

none

Source

1player:say(argstr);

emote

Spec any any anyFlags rxdOwner #361Definer #3

Referenced by

none

Source

1if ((!player.programmer) && ($skills.brains:total(player) < 6))
2m = #130830.emotes;
3m = m[random(length(m))];
4m = $su:ps(m, player);
5this:announce_all(player:name(), m);
6return;
7endif
8argstr = $su:escape(argstr);
9if ((argstr != "") && (argstr[1] == ":"))
10this:announce_all(player:name(), argstr[2..length(argstr)]);
11else
12if (argstr == "!")
13`player:popmon(1) ! ANY => 0';
14elseif (argstr == "!!")
15`player:popmon(2) ! ANY => 0';
16elseif (argstr == "!!!")
17`player:popmon(3) ! ANY => 0';
18elseif ((argstr == "?!") || (argstr == "!?"))
19`player:popmon(4) ! ANY => 0';
20elseif (argstr == "1")
21`player:popmon(-1) ! ANY => 0';
22endif
23this:announce_all(player:name(), " ", argstr);
24endif

announce

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1if (this.watched)
2for dude in (setremove(this.contents, player))
3`dude.listening ! ANY => 0' && dude:tell(@args);
4endfor
5endif

match_exit

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1what = args[1];
2if (what)
3yes = $failed_match;
4for e in (this.exits)
5if ((valid(e) && (!e.hidden)) && (what in {e.name, e.direction, @e.aliases}))
6if (yes == $failed_match)
7yes = e;
8elseif (yes != e)
9return $ambiguous_match;
10endif
11endif
12endfor
13return yes;
14else
15return $nothing;
16endif

tell_contents

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1if (length(args) > 0)
2contents = args[1];
3else
4contents = this:contents();
5endif
6if (player.brief)
7c = {};
8for x in (contents)
9if ((!is_a(x, $exit)) && (x != player))
10c = listappend(c, x);
11endif
12endfor
13cn = $english_utils:aggregate_names(c);
14if (player:check_pref("boldnames"))
15player:tell("You see: ", $ansi.bold_on, cn, $ansi.reset, ".");
16else
17player:tell("You see: ", cn, ".");
18endif
19else
20player:tell(this:render_contents(@args));
21endif

look_self

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1":look_self([OBJ or LIST objs-to-exclude]) => Prints a description of the room and its contents to the player";
2{?exclude = {}, @other_args} = args;
3this:validate_occupants();
4"--- a. options ---";
5if (`player.brief ! E_PROPNF => 0')
6show_map = 0;
7show_desc = 0;
8else
9show_map = ((this.show_map && (!(this in $rpg.nomap_rooms))) && (!`player.client ! ANY => 0')) && player:check_pref("showmap");
10show_desc = player:check_pref("showdesc");
11endif
12"--- b. info about the player ---";
13dark = this:darkness(1, player);
14seedark = player:can_see_in_dark();
15edark = seedark ? 0 | dark;
16terserun = 0;
17if ((player.executing && player.queue) && player:check_pref("terserun"))
18terserun = (player.executing[1] == $actions.move) && (player.queue[1][1] == $actions.move);
19endif
20"--- 1. Get the object lists ---";
21exclude = (typeof(exclude) == LIST) ? exclude | {exclude};
22everything = this:_look_self_obvious(exclude);
23exits = this:exits();
24creatures = furniture = rendered = {};
25for x in (everything)
26if (is_a(x, $creature))
27creatures = {@creatures, x};
28elseif (is_a(x, $furniture))
29furniture = {@furniture, x};
30endif
31endfor
32"--- 2. gather actual object descs ---";
33if (terserun)
34furniture_desc = exit_desc = other_desc = "";
35{creature_desc, rendered} = this:_look_self_creatures(furniture, creatures, rendered);
36show_desc = 0;
37else
38{furniture_desc, rendered} = this:_look_self_furniture(furniture, rendered);
39{exit_desc, rendered} = this:_look_self_exits(exits, rendered);
40{creature_desc, rendered} = this:_look_self_creatures(furniture, creatures, rendered);
41{other_desc, rendered} = this:_look_self_others(everything, rendered);
42endif
43contents = $set_utils:difference(everything, {@rendered, @exits});
44if (show_desc)
45full_desc = this:description();
46else
47full_desc = {};
48exit_desc = "";
49if (has_callable_verb(this, "brief_description"))
50full_desc = {@full_desc, @this:brief_description()};
51endif
52endif
53if ((edark < 3) && (edark > -3))
54if (furniture_desc)
55full_desc = {@full_desc, furniture_desc};
56endif
57if (exit_desc)
58full_desc = {@full_desc, exit_desc};
59endif
60if (other_desc)
61full_desc = {@full_desc, other_desc};
62endif
63endif
64"--- 3. tell descs to player ---";
65player:tell("");
66if ((!show_map) || (terserun && player:check_pref("nomaprun")))
67title_desc = this:title() + (player.brief ? (" (" + (this.public ? "public" | "private")) + ")" | "");
68player:tell_lines({title_desc, @full_desc});
69else
70this:tell_map(full_desc, player);
71endif
72if (`player.client ! ANY => 0')
73this:client_map();
74endif
75if ((!terserun) && (dark > 1))
76this:tell_nearby_lights();
77endif
78if (((dark < 2) || seedark) && (dark > -2))
79if (terserun)
80this:tell_contents_terserun(contents);
81else
82this:tell_contents(contents);
83endif
84endif
85if (((dark < 3) || seedark) && (dark > -3))
86if (creature_desc)
87player:tell(creature_desc);
88endif
89endif
90if (terserun)
91player:tell("");
92return;
93endif
94this:list_exits();
95"--- 4. tell about commands in the room ---";
96if (this.has_commands == E_NONE)
97this:examine_verbs(player);
98endif
99if (this.has_commands && player:check_pref("showroomcmd"))
100player:tell($ansi.cyan, $ansi.bold_on, "[ ", $ansi.bold_off, "There are special commands here.  '", $ansi.bold_on, "ex here", $ansi.bold_off, "' to learn more. ", $ansi.bold_on, "]", $ansi.reset);
101endif
102if ((hint = `this.hint_msg ! ANY') && player:check_pref("hints"))
103fork (1)
104(player.location == this:room()) && player:systell(hint);
105if (valid(quest = `this.hint_quest ! ANY => #-1'))
106quest:add_hint(player, this:list_hint_msg(hint));
107endif
108endfork
109endif

acceptable

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1return 1;

go

Spec any any anyFlags rxdOwner #361Definer #3

Referenced by

none

Source

1if ((!args) || (!(dir = args[1])))
2player:tell("You need to specify a direction.");
3return E_INVARG;
4else
5"Just queue all that shit as movement actions.  The actions will take care of validation.";
6for d in (args)
7player:queue_action(player.move_action, {d}, 1, "go " + d);
8endfor
9endif

announce_all

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1if (this.watched)
2for dude in (this.contents)
3`dude.listening ! ANY => 0' && dude:tell(@args);
4endfor
5endif

announce_all_but

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1":announce_all_but(LIST objects to ignore, text)";
2if (this.watched)
3{ignore, @text} = args;
4contents = this.contents;
5for l in (ignore)
6contents = setremove(contents, l);
7endfor
8for listener in (contents)
9`listener.listening ! ANY => 0' && listener:tell(@text);
10endfor
11endif

enterfunc

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1object = args[1];
2if (is_a(object, $creature) && (is_player(object) && is_connected(object)))
3this:update_watch(1);
4if (object == player)
5if (player.brief == 2)
6this:look_self_verybrief();
7else
8this:look_self();
9endif
10else
11player = object;
12this:look_self();
13endif
14endif
15if (is_a(object, $exit))
16this:add_exit(object);
17return;
18endif
19if (is_a(object, $furniture))
20this.furniture = setadd(this.furniture, object);
21object:reset();
22return;
23endif
24this.darkness[2] = 0;
25"Not sure why it used to be like this:";
26"if ((is_a(object, $living) && (!is_a(object, #5738))) || is_a(object, #26002))";
27if ((!this.f) && is_a(object, $living))
28i = 0;
29for x in [1..length(this.tracks)]
30if (this.tracks[x][1] == object)
31this.tracks[x][2] = time();
32this.tracks[x][3] = 0;
33i = 1;
34endif
35endfor
36if ((!i) && (!is_a(object, $immortal)))
37this.tracks = listappend(this.tracks, {object, time(), 0});
38endif
39if (object.posture == "sitting")
40this.sitting = setadd(this.sitting, object);
41elseif (object.posture == "reclining")
42this.reclining = setadd(this.reclining, object);
43endif
44endif

exitfunc

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1what = args[1];
2if (is_a(what, $creature))
3if (is_player(what) && is_connected(what))
4this:update_watch(-1);
5endif
6if (what in this.sitting)
7this.sitting = setremove(this.sitting, what);
8what.posture = "standing";
9endif
10if (what in this.reclining)
11this.reclining = setremove(this.reclining, what);
12what.posture = "standing";
13endif
14for f in (this.furniture)
15`f:remove_user(what) ! ANY => 0';
16endfor
17if (what in this.covering)
18this.covering = setremove(this.covering, what);
19what.posture = "standing";
20endif
21for x in [1..length(this.tracks)]
22if (this.tracks[x][1] == what)
23this.tracks[x][3] = time();
24endif
25endfor
26if (length(this.tracks) > 20)
27this.tracks = this.tracks[1..20];
28endif
29what:disengage_from_combat();
30return;
31elseif (is_a(what, $furniture))
32this.furniture = setremove(this.furniture, what);
33what:reset();
34return;
35elseif (what in this.exits)
36this:remove_exit(what);
37return;
38endif
39this.darkness[2] = 0;
40return 1;

remove_exit

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1exit = args[1];
2if (caller != exit)
3set_task_perms(caller_perms());
4endif
5if (ei = exit in this.exits)
6this.exits = setremove(this.exits, exit);
7return this.exits;
8endif

recycle

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1"Make a mild attempt to keep people and objects from ending up in #-1 when people recycle a room";
2if (((caller == this) || (caller == $bu)) || $perm_utils:controls(caller_perms(), this))
3for x in (this.exits)
4if (is_a(x, #160093))
5x:moveto(#-1);
6else
7if (is_a(x.otherside, $exit))
80 && player:tell("Recycling exit ", $su:nn(x.otherside), "...");
9$recycler:_recycle(x.otherside);
10endif
110 && player:tell("Recycling exit ", $su:nn(x), "...");
12$recycler:_recycle(x);
13endif
14endfor
15"... first try spilling them out onto the floor of enclosing room if any";
16if (is_a(this.location, $room))
17"Don't put shit in areas.";
18for x in (this.contents)
19try
20x:moveto(this.location);
21except (ANY)
22continue x;
23endtry
24endfor
25endif
26"... try sending them home...";
27for x in (this.contents)
28if (is_player(x))
29if ((typeof(x.home) == OBJ) && valid(x.home))
30try
31x:moveto(x.home);
32except (ANY)
33continue x;
34endtry
35endif
36if (x.location == this)
37move(x, $limbo);
38endif
39elseif (is_a(x.owner, $immortal) && (x.owner != #984))
40try
41x:moveto(x.owner);
42except (ANY)
43continue x;
44endtry
45if (x.location == this)
46move(x, $lostnfound);
47endif
48endif
49endfor
50pass(@args);
51else
52return E_PERM;
53endif

e east w west s south n north ne northeast nw northwest se southeast sw southwest u up d down in out

Spec none none noneFlags rxdOwner #361Definer #3

Referenced by

none

Source

1set_task_perms((caller_perms() == #-1) ? player | caller_perms());
2if (player:is_doing($actions.move) || $lu:assoc($actions.move, player.queue))
3player:queue_action($actions.move, {verb}, 1, verb);
4elseif (valid(exit = this:match_exit(verb)))
5if ((!valid(exit.otherside)) || (!valid(exit.otherside.location)))
6player:tell(this.no_exit_msg);
7player.programmer && player:tell($ansi.cyan, "[ invalid .otherside ]", $ansi.reset);
8return;
9endif
10exit:invoke(player);
11elseif (exit == $failed_match)
12player:tell(this.no_exit_msg);
13else
14player:tell("I don't know which direction `", verb, "' you mean.");
15endif

match

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1target = this:contents();
2if (valid(m = $su:match(args[1], target, "name", target, "aliases")))
3return m;
4else
5for x in (this.exits)
6if (args[1] in x:aliases())
7return x;
8endif
9endfor
10return m;
11endif

who_location_msg

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1return (msg = `this.(verb) ! ANY') ? $string_utils:pronoun_sub(msg, args[1]) | "";

exits entrances

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1"if ((caller == this) || $perm_utils:controls(caller_perms(), this))";
2return this.(verb);
3"else";
4"  return E_PERM;";
5"endif";

obvious_exits obvious_entrances

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1r = {};
2for x in (this.exits)
3if (is_a(x, $exit) && x:obvious())
4r = setadd(r, x);
5endif
6endfor
7return r;

here_huh

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1":here_huh(verb,args)  -- room-specific :huh processing.  This should return 1 if it finds something interesting to do and 0 otherwise; see $command_utils:do_huh.";
2"For the generic room, we check for the case of the caller specifying an exit for which a corresponding verb was never defined.";
3set_task_perms(caller_perms());
4if (args[2] || ($failed_match == (exit = this:match_exit(verb = args[1]))))
5"... okay, it's not an exit.  we give up...";
6return 0;
7elseif (valid(exit))
8exit:invoke(player);
9else
10"... ambiguous exit ...";
11player:tell("I don't know which direction `", verb, "' you mean.");
12endif
13return 1;

room_announce*_all_but

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1this:(verb[6..$])(@args);

examine_commands_ok

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1return this == args[1].location;

examine_contents

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1"examine_contents(who)";
2if (caller == this)
3this:tell_contents(this.contents, 1);
4endif

broadcast_event

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1":broadcast_event(INT is_start, OBJ action, OBJ source, LIST callback_args)";
2fork (0)
3event = args[2].name;
4event = strsub(event, " ", "_");
5event = "hear_event_" + event;
6for x in ({this, @this.contents})
7if (x != args[3])
8try
9x:(event)(@args);
10except e (E_VERBNF)
11"no problem";
12except e (ANY)
13$rpg:report_error(e, tostr(event, $su:from_value(args, 10, 10)));
14endtry
15endif
16endfor
17endfork

player_integration_msg

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1"Copied from shortername (#187816):player_integration_msg by Dagon (#298277) Mon Jan  4 18:57:16 2010 CST";
2dark = this:darkness(1, player);
3if (((dark == 2) || (dark == -2)) && (!(see_in_dark = player:can_see_in_dark())))
4p = length(setremove(occupants(this, $creature), player));
5if (!p)
6return "";
7elseif ((p == 1) && (dark == 2))
8return "You can make out a shadowy figure in the darkness.";
9elseif (dark == 2)
10return ("You squint and see " + $su:english_number(p)) + " shadowy figures in the dark.";
11elseif ((p == 1) && (dark == -2))
12return "You can make out a figure in the bright light.";
13elseif (dark == -2)
14return ("You squint and see " + $su:english_number(p)) + " shadowy figures in the bright light.";
15endif
16elseif (((dark > 2) || (dark < -2)) && (!player:can_see_in_dark()))
17return "";
18endif
19msg_db = {};
20names = {};
21text = "";
22{?people = occupants(this, $creature)} = args;
23msg_db = $su:message_db(people, "posture_msg");
24for x in (msg_db)
25if (length(x[1]) > 1)
26verbstr = "are ";
27else
28verbstr = "is ";
29endif
30aggverb = player:check_pref("boldnames") ? "aggregate_names_bold" | "aggregate_names";
31sentence = ((($english_utils:(aggverb)(x[1]) + " ") + verbstr) + x[2]) + " ";
32text = text + $su:capitalize(sentence);
33endfor
34return $su:trim(text) + $ansi.reset;

next_hop_to

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1{target, ?dont_recurse = 0} = args;
2if (!gamevalid(target))
3return #-1;
4elseif ((room = target:room()) == this)
5return #-1;
6elseif ((!valid(room)) && (!is_a(target_area = target, $area)))
7return #-1;
8elseif (!this.exits)
9return #-1;
10elseif (length(this.exits) == 1)
11return this.exits[1];
12endif
13isolated = 1;
14my_area = area(this);
15"Next door?";
16for x in (this.exits)
17if (`area(x.otherside) ! ANY' == my_area)
18isolated = 0;
19endif
20if (`x.otherside.location ! ANY' == room)
21return x;
22endif
23endfor
24if (!valid(target_area = area(target)))
25return #-1;
26endif
27"Is there a traverse_area to get to the target?";
28if (valid(traverse_area = `room.traverse_area ! ANY => #-1'))
29if (traverse_area != `this.traverse_area ! ANY')
30if (traverse_area == my_area)
31target = room.traverse_exit;
32if (target in this.exits)
33return target;
34endif
35room = target:room();
36target_area = my_area;
37else
38target_area = traverse_area;
39endif
40endif
41elseif ((valid(traverse_area = `this.traverse_area ! ANY => #-1') && (target_area in {traverse_area, my_area})) || isolated)
42if (valid(traverse_area))
43target_area = traverse_area;
44if (valid(traverse_exit = `this.traverse_exit ! ANY => #-1') && (traverse_exit.otherside.location == this))
45return traverse_exit.otherside;
46endif
47endif
48endif
49"Is target in a remote area?  Get the next hop from the target area.";
50if (target_area != my_area)
51if (valid(override = target_area:next_hop_override(this, target)))
52target = override;
53elseif (valid(arealink = my_area:next_hop_out(target_area, this)))
54target = arealink;
55else
56return #-1;
57endif
58if (is_a(target, $exit) && (target.location == this))
59return target;
60endif
61room = target:room();
62endif
63"Get the next hop to the room in this area.";
64for ei in (this.exits)
65if (room in ei.next_hops)
66return ei;
67endif
68endfor
69for ei in (this.exits)
70if (ei.next_hops == {#0})
71return ei;
72endif
73endfor
74return #-1;

recalc_next_hops

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1exits = this.exits;
2for x in (exits)
3if (!$ou:has_property(x, "otherside"))
4player:tell("At ", $su:nn(this), ", found a non-exit: ", $su:nn(x), " - removing.");
5this.exits = setremove(this.exits, x);
6elseif (!valid(x.otherside))
7player:tell("At ", $su:nn(this), ", found a one-sided exit: ", $su:nn(x), " - removing.");
8this.exits = setremove(this.exits, x);
9elseif (!$ou:isa(x.otherside, $exit))
10player:tell("At ", $su:nn(this), ", found an exit with a non-exit otherside: ", $su:nn(x), " - removing.");
11this.exits = setremove(this.exits, x);
12endif
13endfor
14exits = this.exits;
15if (length(exits) < 1)
16return {};
17elseif ($rpg.optimize_next_hops && (length(exits) < 2))
18this.exits[1].next_hops = {#0};
19return {};
20endif
21area = area(this);
22areas = {};
23allhops = {this};
24mapexits = {};
25for x in (exits)
26if (valid(x.otherside))
27dest = x.otherside.location;
28if ((valid(dest) && x.next_hop_ok) && x.passable)
29if ((a = dest:area()) != area)
30dest = a;
31endif
32x.next_hops = {dest};
33allhops = {@allhops, dest};
34mapexits = setadd(mapexits, x);
35else
36x.next_hops = {};
37endif
38else
39x.next_hops = {};
40endif
41endfor
42if (!mapexits)
43return {};
44endif
45last_result = allhops;
46while (last_result)
47new_last = {};
48yield;
49for x in (last_result)
50if (is_a(x, $room))
51xdest = x:destinations_mapok();
52xi = #-1;
53for z in (mapexits)
54if (x in z.next_hops)
55xi = z;
56endif
57endfor
58if (valid(xi))
59for y in (xdest)
60if (valid(y))
61if ((ya = area(y)) != area)
62if (ya.path_link_ok)
63areas = setadd(areas, ya);
64y = ya;
65endif
66endif
67if (!(y in allhops))
68new_last = setadd(new_last, y);
69allhops = setadd(allhops, y);
70xi.next_hops = setadd(xi.next_hops, y);
71endif
72endif
73yield;
74endfor
75endif
76endif
77yield;
78endfor
79last_result = new_last;
80endwhile
81if ($rpg.optimize_next_hops)
82biggest = mapexits[1];
83for x in (mapexits)
84if (length(x.next_hops) > length(biggest.next_hops))
85biggest = x;
86endif
87endfor
88biggest.next_hops = {#0};
89endif
90return areas;

destinations

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1d = {};
2for x in (this.exits)
3if (valid(dx = x.otherside))
4d = {@d, dx.location};
5endif
6endfor
7return d;

list_exits

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1"Copied from shortername (#187816):list_exits by Dagon (#298277) Mon Jan  4 18:57:09 2010 CST";
2who = (length(args) > 0) ? args[1] | player;
3force = (length(args) > 1) ? args[2] | 0;
4dark = this:darkness(1, player);
5show = (who in this.contents) || force;
6if (show && (((dark >= 3) && (!player:can_see_in_dark())) || (dark <= -3)))
7who:tell($ansi.cyan, "[ Exits: ", $ansi.bold_on, "?", $ansi.bold_off, " ]", $ansi.reset);
8return;
9endif
10if (who:check_pref("longexits"))
11return this:list_exits_long(@args);
12endif
13exits = this:obvious_exits();
14exits = $lu:sort_cardinal_suspended(exits);
15"How does the client and MXP shit deal with darkness?";
16if (`who.client ! ANY => 0')
17who:client_tell($client.exits_start);
18for exit in (exits)
19who:client_tell(exit.direction in $client.dirs, ",", exit.name);
20yield;
21endfor
22who:client_tell($client.exits_end);
23elseif (is_a(who, $player) && who:check_pref("mxp"))
24if (show)
25exitspec = "";
26for exit in (exits)
27exitspec = tostr(exitspec, $ansi.reset, "  ", exit:exit_spec_mxp());
28endfor
29$mxp:tell_secure_line(who, tostr("<EXPIRE exits>", $ansi.cyan, "[ Exits:", $ansi.reset, exitspec, $ansi.cyan, " ]", $ansi.reset));
30endif
31else
32if (show)
33exitspec = "";
34shortpref = who:check_pref("shortdirs");
35for exit in (exits)
36exitspec = tostr(exitspec, $ansi.reset, "  ", exit:exit_spec(shortpref));
37endfor
38who:tell(tostr($ansi.cyan, "[ Exits:", $ansi.reset, exitspec, $ansi.reset, $ansi.cyan, " ]", $ansi.reset));
39endif
40endif

title

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1"Copied from shortername (#187816):title by Dagon (#298277) Mon Jan  4 18:57:20 2010 CST";
2dark = this:darkness(1, player);
3if ((dark >= 3) && (!player:can_see_in_dark()))
4t = "in the dark";
5elseif (dark <= -3)
6t = "in the bright light";
7else
8if (0 && player.programmer)
9t = this.name ? ($ansi.yellow + $ansi.bold_on) + this.name | this.common_name_msg;
10t = t + $ansi.reset;
11t = t + ((this.common_name_msg && this.name) ? ", " + this.common_name_msg | "");
12else
13t = $ansi:roomtitle(this:name());
14endif
15endif
16if (valid(a = area(this)))
17if (is_a(a, $real_area))
18t = (t + " (") + $ansi:areatitle(a.name);
19else
20t = (((t + " (") + $ansi.cyan) + a.name) + $ansi.reset;
21endif
22if (valid(r = this:region()) && r.show_in_room_title)
23t = (t + ", ") + $ansi:regiontitle(r.name);
24endif
25t = t + ")";
26endif
27if (valid(a) && a.show_time)
28t = (t + "   ") + $time:ctime_short();
29endif
30return t;

go_fail_msg

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1return this.(verb);

building

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1if (!valid(this.location))
2return #-1;
3elseif ($ou:isa(this.location, $building))
4return this.location;
5else
6return #-1;
7endif

add_stub_room

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1return;
2room = args[1];
3from = args[2];
4if ((room != this) && (from != this))
5for x in [1..length(this.next_hops)]
6if (from in this.next_hops[x])
7this.next_hops[x] = setadd(this.next_hops[x], room);
8endif
9endfor
10endif

description

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1"Copied from shortername (#187816):description by Dagon (#298277) Mon Jan  4 18:57:04 2010 CST";
2"if (fire = occupants(this, $decals.fire))";
3"  d = (typeof(this.description) == LIST) ? this.description | {this.description};";
4"  d = {@d, (($ansi.red + $ansi.bold_on) + this.burning_msg[fire[1].accumulation]) + $ansi.reset};";
5"  return d;";
6"endif";
7dark = this:darkness(1, player);
8if ((dark >= 3) && (!player:can_see_in_dark()))
9return {"You're in total darkness."};
10elseif ((dark == 2) && (!player:can_see_in_dark()))
11return {"You can make out only vague forms in the darkness."};
12elseif (dark <= -3)
13return {"You are completely blinded by the bright light."};
14elseif (dark == -2)
15return {"You can make out only vague forms in the blindingly bright light."};
16endif
17if (this.outdoor || this.windows)
18m = this.outdoor ? this:time_msg() | this:time_windows_msg();
19if (typeof(desc = pass(@args)) == LIST)
20return {@desc, m};
21else
22return {(desc + "  ") + m};
23endif
24else
25return (typeof(this.description) == LIST) ? this.description | {this.description};
26endif

time_msg

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1m = $time.day_segments[$time:day_segment()] + "_msg";
2if (has_property(this, m) && (typeof(this.(m)) == LIST))
3m = this.(m)[random(length(this.(m)))];
4elseif (has_property(this, m) && (typeof(this.(m)) == STR))
5m = this.(m);
6else
7m = area(this):time_msg();
8endif
9if (m2 = this:weather_msg())
10return (m + "  ") + m2;
11endif
12return m;

cover hide

Spec none none noneFlags rxdOwner #361Definer #3

Referenced by

none

Source

1if (player in this.covering)
2player:tell("You're already taking cover.");
3elseif (player.fight_style == 5)
4player:tell("You're berserkin', pal!  What are you some kinda pussy?!");
5elseif (player.posture != "standing")
6player:tell("You're sitting down.");
7elseif (!this:_covers())
8player:tell("You don't see anywhere to take cover.");
9else
10player:queue_action($actions.cover, {}, 1, verb);
11endif

track_strength

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1":track_strength(OBJ who)";
2"Return INT strength of who's tracks.";
3who = args[1];
4for x in (this.tracks)
5if (x[1] == who)
6if (!x[3])
7return 100;
8else
9return (max(min(x[3] - x[2], 120), 10) - ((time() - x[3]) / 10)) / 4;
10endif
11endif
12endfor

track_exit

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1":track_exit(WHO obj)";
2"Return {exit, strength}.";
3who = args[1];
4exit = #-1;
5s = 999999999;
6strength = 0;
7for x in (this.contents)
8if (is_a(x, who))
9return #-1;
10endif
11endfor
12for x in (this.exits)
13if (valid(x.otherside))
14for y in (x.otherside.location.contents)
15if (is_a(y, who))
16return {x, 0};
17endif
18endfor
19if (t = x.otherside.location:track_age(who))
20if (t < s)
21exit = x;
22s = t;
23strength = t;
24endif
25endif
26endif
27endfor
28if (strength)
29return {exit, strength};
30endif
31return {#-1, 0};

track_age

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1who = args[1];
2maxage = 9999999;
3for x in (this.tracks)
4if (is_a(x[1], who))
5thisage = time() - (x[3] ? x[3] | (time() - 1));
6strength = (x[3] ? x[3] | time()) - x[2];
7if (thisage < maxage)
8maxage = thisage;
9endif
10endif
11endfor
12if (maxage < 999999)
13return max(1, maxage / 60);
14endif

time_windows_msg

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1return "";
2m = $time.day_segments[$time:day_segment()] + "_windows_msg";
3if ((!$ou:has_property(this, m)) || (!(mv = this.(m))))
4mv = area(this):time_windows_msg();
5endif
6if (typeof(mv) == LIST)
7mv = mv[random(length(mv))];
8endif
9return mv;

sky_room

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1return this:area():sky_room(args ? args[1] | this);

-* `*

Spec any any anyFlags rxdOwner #361Definer #3

Referenced by

none

Source

1name = verb[2..$];
2who = $player_db:find_exact(name);
3if (!(who in this:occupants($player)))
4who = $match_utils:match(name, {@this:occupants($creature), @this.exits});
5endif
6if (!valid(who))
7who = $match_utils:match(name, this.contents);
8endif
9if (!valid(who))
10player:tell("Talk to whom?  You don't see '", name, "' here.");
11else
12player:say(argstr, who);
13endif

player_integration_msg_backup

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1msg_db = {};
2names = {};
3text = "";
4{?people = this:occupants($creature)} = args;
5msg_db = $su:message_db(people, "posture_msg");
6for x in (msg_db)
7if (length(x[1]) > 1)
8verbstr = "are ";
9else
10verbstr = "is ";
11endif
12names = {};
13for y in (x[1])
14$cu:sin(0);
15name = y:iname();
16added = 0;
17for z in [1..length(names)]
18if (names[z][1] == name)
19names[z][2] = names[z][2] + 1;
20added = 1;
21break;
22endif
23endfor
24if (!added)
25names = listappend(names, {name, 1});
26endif
27endfor
28namestrs = {};
29for z in (names)
30$cu:sin(0);
31if (z[2] > 1)
32name = z[1];
33if ((length(name) > 2) && (name[1..2] == "a "))
34name = name[3..$];
35elseif ((length(name) > 3) && (name[1..3] == "an "))
36name = name[4..$];
37elseif ((length(name) > 4) && (name[1..4] == "the "))
38name = name[5..$];
39endif
40namestrs = setadd(namestrs, ($su:aggregate_number(z[2]) + " ") + $su:plural(name));
41else
42namestrs = setadd(namestrs, z[1]);
43endif
44endfor
45text = ((((text + "  ") + $su:capitalize($su:english_list(namestrs))) + " ") + verbstr) + x[2];
46endfor
47return $su:trim(text);

sitters

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1":sitters() => {@this.sitting}";
2"Returns a list of everyone stiing on the furniture";
3return this.sitting;

recliners

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1":recliners() => {@this.recliners}";
2"Returns a list of people reclining on the furniture.";
3return this.reclining;

free_seats

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1":free_seats() => INT number_of_free_seats";
2"This verb returns the number of currently available seats";
3free = this.seats - length(this.sitting);
4free = free - (2 * length(this.reclining));
5return max(0, free);

do_sit

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1":do_sit(who, iobj = this) => Announce messages, update internal state";
2"This verb does the state transition on the furniture and makes announcements to the who and the room about what happened.";
3if (is_a(this, #50))
4return 1;
5endif
6who = args[1];
7if (valid(seat = who:sitting_on()) && (seat != this))
8who:tell("You're already sitting on ", seat:dname(), ".");
9return 1;
10elseif (valid(seat = who:reclining_on()) && (seat != this))
11who:tell("You're already reclining on ", seat:dname(), ".");
12return 1;
13elseif (this:free_seats() < 1)
14who:tell($string_utils:pronoun_sub(this.sit_full_msg));
15return 1;
16elseif (who in this.sitting)
17who:tell($string_utils:pronoun_sub(this.already_sitting_msg));
18return 1;
19elseif (who in this.reclining)
20this.sitting = {@this.sitting, who};
21this.reclining = setremove(this.reclining, who);
22who.posture = "sitting";
23who:tell($string_utils:pronoun_sub(this.sit_from_reclining_msg));
24who.location:announce($string_utils:pronoun_sub(this.osit_from_reclining_msg));
25else
26this.sitting = {@this.sitting, who};
27who.location:announce($string_utils:pronoun_sub(this.osit_msg));
28who:tell($string_utils:pronoun_sub(this.sit_msg));
29endif

do_recline

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1":do_recline() => Announce messages and adjust internal state";
2"This verb is the callback for recline actions that have been placed on the event queue.  It should only be called in order to complete the processing of a recline action.";
3who = args[1];
4free_seats = this:free_seats();
5if (valid(seat = who:reclining_on()) && (seat != this))
6who:tell("You're already reclining on ", seat:dname(), ".");
7return 1;
8elseif (valid(seat = who:sitting_on()) && (seat != this))
9who:tell("You're already sitting on ", seat:dname(), ".");
10return 1;
11elseif (who in this.reclining)
12"is the who already reclining?";
13who:tell($string_utils:pronoun_sub(this.already_reclining_msg));
14return 1;
15elseif (!((free_seats > 1) || ((free_seats > 0) && (who in this.sitting))))
16who:tell($string_utils:pronoun_sub(this.recline_full_msg));
17return 1;
18elseif (who in this.sitting)
19this.sitting = setremove(this.sitting, who);
20this.reclining = {@this.reclining, who};
21who:tell($string_utils:pronoun_sub(this.recline_from_sitting_msg));
22who.location:announce($string_utils:pronoun_sub(this.orecline_from_sitting_msg));
23else
24this.reclining = {@this.reclining, who};
25who.location:announce($string_utils:pronoun_sub(this.orecline_msg));
26who:tell($string_utils:pronoun_sub(this.recline_msg));
27endif
28who.posture = "reclining";

do_stand

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1":do_stand() => Announce messages and adjust internal state";
2"This verb does the real work of standing from the furniture in question.  It is a callback verb which should be called only from the processing of events which have already been placed on the event queue by the 'stand' verb.";
3if (!((player in this.sitting) || (player in this.reclining)))
4player:tell($string_utils:pronoun_sub(this.rise_failed_msg));
5else
6this.sitting = setremove(this.sitting, player);
7this.reclining = setremove(this.reclining, player);
8player:tell($string_utils:pronoun_sub(this.rise_msg));
9player.location:announce($string_utils:pronoun_sub(this.orise_msg));
10endif

destinations_mapok

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1d = {};
2for x in (this.exits)
3if ((is_a(x, $exit) && x.next_hop_ok) && x.passable)
4if (valid(dx = x.otherside))
5d = {@d, dx.location};
6endif
7endif
8endfor
9return d;

draw_map

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1if (((!this.map) || (!this.client_map)) || `this.map_restricted ! ANY')
2this:_update_map();
3endif

_icon

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1return this.icon;

broadcast_noise broadcast_sound

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1":broadcast_noise(STR noise-message, INT volume[, INT noiseid, OBJ sourceexit])";
2"THIS VERB IS DEPRECATED. Please use the fancier $room:make_noise";
3msg = args[1];
4volume = args[2];
5sourceexit = (length(args) > 3) ? args[4] | #-1;
6noiseid = (length(args) > 2) ? args[3] | 0;
7if (!noiseid)
8noiseid = random(9999999);
9endif
10if (noiseid in this.recent_noises)
11"...we already heard this, it's an echo, ignore it...";
12return;
13endif
14if (sourceexit == #-1)
15report = "OLD SOUND: ";
16report = tostr(report, msg, " x", volume, " at ", $su:nn(this));
17stack = callers();
18if (stack)
19report = tostr(report, " from ", $su:nn(stack[1][4]), ":", stack[1][2]);
20endif
21endif
22this.recent_noises = {noiseid, @this.recent_noises};
23if (length(this.recent_noises) > 5)
24this.recent_noises = this.recent_noises[1..5];
25endif
26descriptive_volume = max(volume, -4);
27descriptive_volume = min(descriptive_volume, 12);
28sd = {"very faint", "distant", "faint", "faint", "soft", "muffled", "muffled", "loud", "loud", "very loud", "deafening", "deafening", "deafening", "eardrum-splitting", "eardrum-splitting", "eardrum-splitting", "eardrum-splitting", "eardrum-splitting", "eardrum-splitting"}[descriptive_volume + 5];
29if (valid(sourceexit))
30"...only announce in here if it came from somewhere else...";
31mymsg = strsub(msg, "%vol", sd);
32mymsg = strsub(mymsg, "%dir", sourceexit:dname());
33for x in (occupants(this, $living))
34x:_hear(mymsg, sourceexit);
35$cu:sin();
36endfor
37endif
38for x in (setremove(this.exits, sourceexit))
39x:broadcast_noise(msg, volume, noiseid);
40$cu:sin();
41endfor

fall_into

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1":fall_into(OBJ who[, OBJ from][, INT meters][, LIST targets][, INT accuracy])";
2"Hurt the person who fell into this room from 'meters' m up.";
3who = args[1];
4fromroom = (length(args) > 1) ? args[2] | #-1;
5height = (length(args) > 2) ? args[3] | 1000;
6victims = (length(args) > 3) ? (typeof(args[4]) == LIST) ? args[4] | {args[4]} | this:occupants($living);
7accuracy = (length(args) > 4) ? args[5] | 10;
8if (random(accuracy) > 1)
9victims = {};
10endif
11if (is_a(who, $creature))
12hmax = max(3, min(0, (ck = $skills.reflexes:check(who, 1)) / 4) + 1);
13if (ck < -1)
14hmax = -1;
15endif
16eheight = height - hmax;
17if (eheight < 1)
18this:announce_all(who:dnamec(), " lands lightly on ", who.pp, " feet.");
19return;
20endif
21this:announce_all($su:ps(this.fall_into_msg, who, this, this));
22damage = eheight + random(eheight * 2);
23for x in (who.wearing)
24if (mod = `x.falling_damage ! ANY => E_NONE')
25damage = toint(tofloat(damage) * mod);
26endif
27endfor
28if (damage < 25)
29part = {#300, #301, #302}[random(3)];
30else
31part = $bodyparts.abdomen;
32endif
33who:take_damage(#268, damage, part);
34this:make_noise(this.fall_into_noise, who);
35elseif (is_a(who, $thing))
36amt = max(random(max(1, toint(tofloat(height * who.weight) / 1000.0))), 1);
37if (victims)
38victim = victims[random($)];
39if (is_a(victim, $creature))
40this:announce_all(who:inamec(), " bounces off ", victim:dname(), "'s head.");
41victim:take_damage(#268, amt, #300);
42if (is_a(victim, $player))
43this:make_noise($noises.cursing, victim);
44endif
45endif
46endif
47this:announce_all($su:ps(this.thing_fall_into_msg, who, this, this));
48`who:take_damage(#268, amt, $bodypart, this) ! E_VERBNF => 0';
49elseif (is_a(who, $decal))
50par = parent(who);
51elseif (is_a(who, $flyer))
52who:_impact();
53endif

integrated_objects

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1":integrated_objects() => { all objects that are sitting or reclining in this room }";
2integrated = {};
3for x in ({@this.sitting, @this.reclining})
4integrated = setadd(integrated, x);
5endfor
6return setadd(integrated, this);

sit

Spec none none noneFlags rxdOwner #361Definer #3

Referenced by

none

Source

1this:_sit(player);

users_msg

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1":users_msg([LIST exclude_list[, OBJ looker]]) => STR text description of who is using this and what they're doing";
2{?exclude_list = {}, ?looker = player} = args;
3text = "";
4msg_db = {};
5sitters = this:sitters();
6recliners = this:recliners();
7looker_sitting = 0;
8looker_reclining = 0;
9if (looker in sitters)
10looker_sitting = 1;
11elseif (looker in recliners)
12looker_reclining = 1;
13endif
14for x in (exclude_list)
15sitters = setremove(sitters, x);
16recliners = setremove(recliners, x);
17endfor
18users = {@sitters, @recliners};
19"build a message database for what everyone is doing";
20for x in (users)
21if ((x != looker) && ((x.posture == "sitting") && looker_sitting))
22if ((doing = x:doing_msg()) == looker:doing_msg())
23msg = ((x.posture + " here") + (doing ? " " + doing | "")) + " with you";
24else
25msg = (x.posture + " here") + (doing ? " " + doing | "");
26endif
27elseif ((x != looker) && ((x.posture == "reclining") && looker_reclining))
28if ((doing = x:doing_msg()) == looker:doing_msg())
29msg = ((x.posture + " here") + (doing ? " " + doing | "")) + " with you";
30else
31msg = (x.posture + " here") + (doing ? " " + doing | "");
32endif
33else
34msg = (x.posture + " here") + ((doing = x:doing_msg()) ? " " + doing | "");
35endif
36if (msg_db)
37added = 0;
38for y in [1..length(msg_db)]
39if (msg_db[y][1] == msg)
40msg_db[y][2] = setadd(msg_db[y][2], x);
41added = 1;
42break;
43endif
44endfor
45if (!added)
46msg_db = setadd(msg_db, {msg, {x}});
47endif
48else
49msg_db = {{msg, {x}}};
50endif
51endfor
52"Now print all the messages";
53for x in (msg_db)
54if ((length(x[2]) > 1) || (x[2][1] == looker))
55verbstr = " are ";
56else
57verbstr = " is ";
58endif
59names = {};
60for y in (x[2])
61if (y == looker)
62names = setadd(names, "you");
63else
64names = setadd(names, y:name());
65endif
66endfor
67text = (text + "  ") + $su:capitalize((($su:english_list(names) + verbstr) + x[1]) + ".");
68endfor
69return $su:trim(text);

validate_occupants

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1":validate_occupants() => 0";
2"This verb makes sure that the objects listed in the sitters and reliners list are actually in the same location as the furniture itself.";
3for x in (y = this.sitting)
4if (x.location != this)
5this.sitting = setremove(this.sitting, x);
6endif
7endfor
8for x in (y = this.reclining)
9if (x.location != this)
10this.reclining = setremove(this.reclining, x);
11endif
12endfor

rise stand

Spec none none noneFlags rxdOwner #361Definer #3

Referenced by

none

Source

1target = valid(dobj) ? dobj | player;
2target:queue_action($actions.stand, {this}, 1, (verb + " ") + argstr);

look_place_msg

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1return `this.look_place_msg ! ANY => ""';

infect

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1if (this.biohazards)
2victims = args ? args | occupants(this, $creature);
3for dude in (victims)
4yield;
5for x in (this.biohazards)
6".biohazards is a list of three element lists:";
7" hazard -- the disease/drug in question";
8" chance -- percentage chance that an infection will occur";
9" doses  -- the number of doses per round that get a chance to infect";
10"[method]-- the infection method (0=intravenous,1=mouth,2=skin)";
11hazard = x[1];
12chance = x[2];
13doses = (length(x) > 2) ? x[3] | 1;
14method = (length(x) > 3) ? x[4] | 2;
15count = 0;
16for y in [1..doses]
17if (random(100) <= chance)
18count = count + 1;
19endif
20endfor
21if (count)
22if (is_a(dude, $creature) && (dude.location == this))
23this:infect_creature(dude, hazard, count, method);
24endif
25endif
26endfor
27endfor
28endif

recline lie lay

Spec none none noneFlags rxdOwner #361Definer #3

Referenced by

none

Source

1player:queue_action($actions.recline, {this}, 1, (verb + " ") + argstr);

powerplant

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1if (plants = this:occupants($powerplant))
2return plants[1];
3endif
4powerplant = ((!this.outdoor) && is_a(pp = area(this).powerplant, $powerplant)) ? pp | #-1;
5return powerplant;

match_someone

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1s = args[1];
2who = #-1;
3if (valid(who = $match_utils:match(s, occupants(this, $creature))))
4if (is_a(who, $corpse))
5who = #-1;
6endif
7endif
8if (!valid(who))
9if (valid(who = $su:match_player(s)))
10return who;
11endif
12endif
13return who;

tell_map

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1"Copied from shortername (#187816):tell_map by Dagon (#298277) Mon Jan  4 18:56:50 2010 CST";
2d = {};
3d = args[1];
4this:draw_map();
5m = {@this.map};
6if (`this.map_restricted ! ANY')
7m[1] = "          ";
8m[5] = "          ";
9for x in [2..4]
10m[x] = ("  " + $ansi:strip(m[x])[3..8]) + "  ";
11endfor
12endif
13darkness = this:darkness(1, player);
14light_mode = "none";
15if ((darkness >= 2) && (light_mode == "darken"))
16m = {"          ", "          ", "          ", "          ", "          "};
17endif
18if ((darkness <= -1) && (light_mode != "darken"))
19light_mode = "too bright";
20endif
21if ((darkness <= -2) && (light_mode == "too bright"))
22m = {"          ", "          ", "          ", "          ", "          "};
23endif
24m2 = {};
25for ml in (m)
26if (light_mode == "darken")
27ml = $ansi:strip(ml);
28ml = tostr($ansi.bg_black, $ansi.dark_gray, ml, $ansi.reset);
29elseif (light_mode == "blinding")
30ml = $ansi:strip(ml);
31ml = tostr($ansi.bg_green, $ansi.black, ml, $ansi.reset);
32elseif (light_mode == "greenify")
33ml = $ansi:strip(ml);
34ml = tostr($ansi.bg_black, $ansi.green, $ansi.bold_on, ml, $ansi.reset);
35elseif (light_mode == "redify")
36ml = $ansi:strip(ml);
37ml = tostr($ansi.bg_black, $ansi.red, $ansi.bold_on, ml, $ansi.reset);
38elseif (light_mode == "darkred")
39ml = $ansi:strip(ml);
40ml = tostr($ansi.bg_black, $ansi.red, ml, $ansi.reset);
41elseif (light_mode == "too bright")
42ml = $ansi:strip(ml);
43ml = tostr($ansi.bg_white, $ansi.yellow, ml, $ansi.reset);
44endif
45m2 = {@m2, ml + " "};
46endfor
47m = {@m2, "          "};
48o = {};
49if (is_a(player, $prog) && $prog_options:get(player.prog_options, "room_info"))
50roomtitle = (((this:title() + " ") + $ansi.bold_on) + tostr(this)) + $ansi.reset;
51d = {roomtitle, this:prog_info(), @d};
52else
53if (typeof(d) == LIST)
54d = {this:title(), @d};
55else
56d = {this:title(), d};
57endif
58endif
59mapline = 0;
60wrapat = abs(`player.linelen ? player.linelen | 70 ! ANY => 70');
61for line in (d)
62mapline = mapline + 1;
63o = {@o, (mapline > length(m)) ? "" | ($ansi.reset + m[mapline])};
64wordlen = 0;
65hasmap = o[$] ? 1 | 0;
66for word in ($su:fast_words(line))
67yield;
68if (word)
69if (((wordlen + (striplen = length($ansi:strip(word)))) + 1) > (hasmap ? wrapat - 12 | wrapat))
70mapline = mapline + 1;
71o = {@o, (mapline > length(m)) ? "" | ($ansi.reset + m[mapline])};
72wordlen = 0;
73hasmap = o[$] ? 1 | 0;
74endif
75if (word[$] == ".")
76word = word + " ";
77endif
78o[$] = (o[$] + " ") + word;
79wordlen = (wordlen + striplen) + 1;
80endif
81endfor
82yield;
83endfor
84while (mapline < length(m))
85mapline = mapline + 1;
86o = {@o, m[mapline]};
87endwhile
88player:tell_lines(o);
89return o;

Spec none none noneFlags rxdOwner #361Definer #3

Referenced by

none

Source

1"Hunt around the area for useful loot.";
2player:queue_action($actions.search, {this}, 1, "search " + this.name);

yell shout scream

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1this:_yell(player, $su:from_list(args, " "));

set_xyz_rec

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1if (args)
2if ((this.x != 9999) && (this.x != 99999))
3return;
4endif
5{x, y, z, area} = args;
6this.x = x;
7this.y = y;
8this.z = z;
9else
10x = this.x;
11y = this.y;
12z = this.z;
13area = this:area();
14endif
15player:tell($ansi.cyan + "  set coords of ", $su:nn(this), " to ", x, "-", y, "-", z, $ansi.reset);
16for ex in (this.exits)
17if (ex.draw_ok)
18player:tell(((($ansi.cyan + "    (following ") + $su:nn(ex)) + ")") + $ansi.reset);
19nx = x;
20ny = y;
21nz = z;
22if (ex.otherside:area() == area)
23if ((dir = ex.direction) in {"north", "northwest", "northeast"})
24ny = y - 1;
25elseif (dir in {"south", "southwest", "southeast"})
26ny = y + 1;
27endif
28if (dir in {"east", "northeast", "southeast"})
29nx = x + 1;
30elseif (dir in {"west", "southwest", "northwest"})
31nx = x - 1;
32endif
33if (dir == "up")
34nz = z - 1;
35elseif (dir == "down")
36nz = z + 1;
37endif
38suspend(1);
39ex.otherside.location:set_xyz_rec(nx, ny, nz, area);
40else
41player:tell(((((($ansi.cyan + "    goes to different area! ") + $su:nn(ex.otherside:area())) + ":") + $su:nn(area)) + " skip") + $ansi.reset);
42endif
43endif
44endfor

add_exit

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1this.exits = setadd(this.exits, args[1]);
2se = {};
3this:sort_exits();

sort_exits

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1se = {};
2for x in (this.exits)
3i = x.direction in {"north", "northeast", "east", "southeast", "south", "southwest", "west", "northwest", "up", "down", "in", "out"};
4i = i || 999;
5se = {@se, {x, i}};
6endfor
7se = $lu:sort_alist(se, 2);
8se = $lu:slice(se, 1);
9return this.exits = se;

chill_factor

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1{?who = #-1} = args;
2f = 0;
3parents = {};
4extra = 0;
5for x in (this.contents)
6if (!is_a(x, $furniture))
7parent = parent(x);
8if ((parent in parents) && ((!$api.boltable:is_on(x)) || (!x.bolted)))
9extra = extra + 1;
10else
11f = f + `x:chill_factor(who) ! E_VERBNF => 0';
12parents = setadd(parents, parent);
13endif
14endif
15yield;
16endfor
17if ((clutter = length(occupants(this, $thing))) > 10)
18clutter = clutter - 10;
19clutter = clutter / 2;
20f = max(0, f - clutter);
21endif
22f = f + `this.chill_factor ! E_PROPNF => 0';
23f = max(0, f);
24return f * 2;

add_resident

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1who = args[1];
2this.residents = setadd(this.residents, who);

check_forbid_action

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1action = args[2];
2forbid_verb = "forbid_action_" + action.name;
3for x in ({@this.contents, this})
4if (has_callable_verb(x, forbid_verb))
5if (x:(forbid_verb)(@args))
6return 1;
7endif
8endif
9if (has_callable_verb(x, "forbid_action"))
10if (x:forbid_action(@args))
11return 1;
12endif
13endif
14endfor
15return 0;

do_creature_heartbeat

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1for x in ({this, @this.contents})
2$ou:has_verb(x, "creature_heartbeat") && x:creature_heartbeat(@args);
3endfor

_client_icon

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1return this.client_icon;

client_title

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1return ((this.name + " (") + this:area().name) + ")";

@residents

Spec none none noneFlags rxdOwner #361Definer #3

Referenced by

none

Source

1if ((player != this.owner) && (!player.programmer))
2player:tell("You don't own ", this:name(), ", so you can't tell who lives here.");
3return;
4else
5player:tell(("Residents of " + this:name()) + ":");
6player:tell(this.owner:name() + " (owner)");
7for x in (this.residents)
8player:tell(x:name());
9endfor
10endif

remove_resident

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1who = args[1];
2this.residents = setremove(this.residents, who);
3if (who.home == this)
4"Set their home to the cube hotel.";
5who.home = #445;
6endif

@rmresident @removeresident

Spec any none noneFlags rxdOwner #361Definer #3

Referenced by

none

Source

1if ((player != this.owner) && (!player.programmer))
2player:tell("You don't own ", this:name(), ".");
3return;
4endif
5who = $su:match_player(dobjstr);
6if (!valid(who))
7player:tell("There isn't any player named '", dobjstr, "'.");
8elseif (who in this.residents)
9this:remove_resident(who);
10player:tell(who:dnamec(), (" is no longer a resident of " + this:name()) + ".");
11else
12player:tell(who:dnamec(), (" is not a resident of " + this:name()) + ".");
13endif

_yell

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1{who, text, ?filter = 1} = args;
2if (is_a(who, $player))
3text = who:text_sub(text);
4endif
5text = $su:uppercase(text) + "!";
6if (`this:forbid_yell(who, text) ! E_VERBNF => 0')
7return;
8endif
9voice = $eu:voice_of(who);
10this:make_noise($noises.yelling_voice, who, {voice, text});
11this:announce_all(tostr(who:dnamec(), " yells, \"", text, "\""));
12return {voice, text};

hide_item

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1"(OBJ item, INT difficulty) Hide an item (or generic) here.";
2item = args[1];
3difficulty = args[2];
4is1 = 0;
5is2 = 0;
6for x in (this.search_items)
7if (x[1] == item)
8is1 = 1;
9endif
10endfor
11for x in (this.search_items_left)
12if (x[1] == item)
13is2 = 1;
14endif
15endfor
16if (!is1)
17this.search_items = {@this.search_items, {item, difficulty}};
18endif
19if (!is2)
20this.search_items_left = {@this.search_items_left, {item, difficulty}};
21endif
22item:moveto($stashed);
23return 1;

client_map tell_client_map

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1player:client_tell($client.map_start);
2player:client_tell("$#$bg:" + this:area().client_bg_icon);
3for x in (this.client_map)
4player:client_tell(x);
5endfor
6player:client_tell($client.map_end);

_allows

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1return `this.("_allow_" + args[1]) ! E_PROPNF => E_NONE' && area(this):(verb)(@args);

debug_tell

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1for x in (this:occupants_suspended($prog))
2if ((x == args[1]) || x:check_pref("debugfromroom"))
3x:debug_tell(args[2], "[from ", $su:nn(args[1]), "] ", @args[3..$]);
4endif
5endfor

psi_shimmer

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1shimmers = this:occupants(#200772);
2if (!shimmers)
3return 0;
4endif
5if (shimmers[1]:_check_disperse())
6return 0;
7endif
8return shimmers[1].accumulation;

_blank_map

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1icon = (length(args) > 0) ? args[1] | "  ";
2width = (length(args) > 1) ? args[2] | 5;
3height = (length(args) > 2) ? args[3] | 5;
4lines = {};
5for y in [1..height]
6line = {};
7for x in [1..width]
8line = listappend(line, icon);
9endfor
10lines = listappend(lines, line);
11endfor
12return lines;

_render_map

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1{?width = 5, ?height = 5, ?icon_verb = "_icon", ?blank_icon = 0, ?include_position = 1, ?include_links = 1} = args;
2do_rush = player.programmer ? 0 | 1;
3if ((width % 2) == 0)
4width = width + 1;
5endif
6if ((height % 2) == 0)
7height = height + 1;
8endif
9midx = width / 2;
10midy = height / 2;
11minx = this.x - midx;
12miny = this.y - midy;
13maxx = this.x + midx;
14maxy = this.y + midy;
15area = this:area();
16if (!is_a(area.bigmap, $bigmap))
17override_z = 0;
18if (!blank_icon)
19normal_map = this:_blank_map(area.blank_icon, width, height);
20else
21normal_map = this:_blank_map(blank_icon, width, height);
22endif
23client_map = this:_blank_map(area.client_blank_icon, width, height);
24icon_blocks = area.icon_blocks;
25area_links = {{area, area.area_link_icons}};
26ignore_links = {};
27else
28override_z = 1;
29if (this.z <= area.bigmap.sky_z)
30normal_map = this:_blank_map(area.bigmap.sky_normal_icon, width, height);
31client_map = this:_blank_map(area.bigmap.sky_client_icon, width, height);
32z = -1;
33elseif (this.z >= area.bigmap.underground_z)
34normal_map = this:_blank_map(area.bigmap.underground_normal_icon, width, height);
35client_map = this:_blank_map(area.bigmap.underground_client_icon, width, height);
36z = 1;
37else
38normal_map = this:_blank_map(area.bigmap.blank_normal_icon, width, height);
39client_map = this:_blank_map(area.bigmap.blank_client_icon, width, height);
40z = this.z;
41endif
42if (blank_icon)
43normal_map = this:_blank_map(blank_icon, width, height);
44endif
45if (idx = z in area.bigmap.icon_block_z)
46icon_blocks = area.bigmap.icon_block_data[idx];
47else
48icon_blocks = {};
49endif
50area_links = area.bigmap:area_link_icons();
51ignore_links = area.bigmap.areas;
52endif
53if (is_a(this, #142063) && is_a(this:area().flyer, $flyer))
54ignore_links = 0;
55endif
56room_map = this:_room_map(width, height);
57for block in (icon_blocks)
58yield do_rush ? 0 | 3;
59if (((!override_z) && (typeof(block[1]) == INT)) && (block[1] != this.z))
60continue;
61elseif (((!override_z) && (typeof(block[1]) == LIST)) && ((this.z < block[1][1]) || (this.z > block[1][2])))
62continue;
63elseif ((block[2] > maxx) || (block[4] < minx))
64continue;
65elseif ((block[3] > maxy) || (block[5] < miny))
66continue;
67endif
68for y in [block[3]..block[5]]
69yield do_rush ? 0 | 3;
70if ((y > maxy) || (y < miny))
71continue;
72endif
73for x in [block[2]..block[4]]
74yield do_rush ? 0 | 3;
75if ((x > maxx) || (x < minx))
76continue;
77endif
78normal_map[1 + (y - miny)][1 + (x - minx)] = block[6];
79endfor
80endfor
81endfor
82for y in [1..height]
83for x in [1..width]
84if (gamevalid(room_map[y][x]))
85icon = $ou:has_verb(room_map[y][x], icon_verb) ? room_map[y][x]:(icon_verb)() | room_map[y][x]:_icon();
86if (icon)
87normal_map[y][x] = icon;
88endif
89client_map[y][x] = room_map[y][x]:_client_icon();
90endif
91yield do_rush ? 0 | 3;
92endfor
93endfor
94if (typeof(ignore_links) == LIST)
95for area_link in (area_links)
96link_area = area_link[1];
97icon_links = area_link[2];
98for link in (icon_links)
99yield do_rush ? 0 | 3;
100if ((link[1] in ignore_links) && (this:area() != link_area))
101continue;
102elseif (((link[1] in ignore_links) && (area(this) == link_area)) && (!include_links))
103continue;
104elseif (link[4] != this.z)
105continue;
106elseif ((link[2] > maxx) || (link[2] < minx))
107continue;
108elseif ((link[3] > maxy) || (link[3] < miny))
109continue;
110elseif (!is_a(link[1], $area))
111continue;
112endif
113normal_map[1 + (link[3] - miny)][1 + (link[2] - minx)] = link[1].icon;
114yield do_rush ? 0 | 3;
115endfor
116endfor
117endif
118if (include_position)
119normal_map[1 + midy][1 + midx] = ((($ansi.cyan + $ansi.bold_on) + $ansi.bg_blue) + "()") + $ansi.reset;
120endif
121return {normal_map, client_map};

_room_map

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1"$room:_room_map([width][, height])";
2area = this:area();
3width = (length(args) > 0) ? args[1] | 5;
4height = (length(args) > 1) ? args[2] | 5;
5if ((width % 2) == 0)
6width = width + 1;
7endif
8if ((height % 2) == 0)
9height = height + 1;
10endif
11map = this:_blank_map(#-1, width, height);
12midx = width / 2;
13midy = height / 2;
14minx = this.x - midx;
15miny = this.y - midy;
16maxx = this.x + midx;
17maxy = this.y + midy;
18map[1 + midy][1 + midx] = this;
19if (is_a(area.bigmap, $bigmap))
20rooms = area.bigmap.z_sorted_rooms;
21else
22rooms = area.z_sorted_rooms;
23endif
24do_rush = player.programmer ? 0 | 1;
25for room in (rooms)
26yield do_rush ? 0 | 3;
27if ((!is_a(room, $room)) || `room.no_draw ! ANY')
28continue;
29elseif (room == this)
30continue;
31elseif (room.z != this.z)
32continue;
33elseif ((room.x > maxx) || (room.x < minx))
34continue;
35elseif ((room.y > maxy) || (room.y < miny))
36continue;
37endif
38map[1 + ((room.y - this.y) + midy)][1 + ((room.x - this.x) + midx)] = room;
39endfor
40return map;

_update_map

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1if (this.f)
2return;
3endif
4if ((is_a(this, #44253) && this.exterior_radar) && gamevalid(this:area().vehicle))
5"Vehicle radars.";
6{normal_map, client_map} = this:area().vehicle.location:_render_map(5, 5);
7elseif ((is_a(this, #23025) && is_a(this:area(), #20103)) && is_a(this:area().flyer, $flyer))
8"Flyer radars.";
9{normal_map, client_map} = this:area().flyer.location:_render_map(5, 5);
10else
11{normal_map, client_map} = this:_render_map(5, 5);
12endif
13lines = {};
14for y in (normal_map)
15line = "";
16for x in (y)
17line = line + x;
18$cu:sin(0);
19endfor
20lines = listappend(lines, line);
21$cu:sin(0);
22endfor
23this.map = lines;
24lines = {};
25for y in (client_map)
26line = "";
27for x in (y)
28line = line + x;
29$cu:sin(0);
30endfor
31lines = listappend(lines, line);
32$cu:sin(0);
33endfor
34this.client_map = lines;

spy_report

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1players = {};
2animals = {};
3loot = {};
4bodies = {};
5for o in (this.contents)
6$cu:sin();
7if (is_a(o, $thing))
8loot = {@loot, o};
9elseif (is_a(o, $player))
10players = {@players, o};
11elseif (is_a(o, $npc))
12animals = {@animals, o};
13elseif (is_a(o, $body))
14bodies = {@bodies, o};
15endif
16endfor
17return {players, animals, loot, bodies};

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1"$room:_room_map([width][, height])";
2area = this:area();
3width = (length(args) > 0) ? args[1] | 5;
4height = (length(args) > 1) ? args[2] | 5;
5if ((width % 2) == 0)
6width = width + 1;
7endif
8if ((height % 2) == 0)
9height = height + 1;
10endif
11map = this:_blank_map(#-1, width, height);
12midx = width / 2;
13midy = height / 2;
14minx = this.x - midx;
15miny = this.y - midy;
16maxx = this.x + midx;
17maxy = this.y + midy;
18if (is_a(area.bigmap, $bigmap))
19area_links = area.bigmap:area_link_icons();
20else
21area_links = {{area, area.area_link_icons}};
22endif
23for area_link in (area_links)
24$cu:sin(0);
25link_area = area_link[1];
26icon_links = area_link[2];
27for link in (icon_links)
28$cu:sin(0);
29if (link[4] != this.z)
30continue;
31elseif ((link[2] > maxx) || (link[2] < minx))
32continue;
33elseif ((link[3] > maxy) || (link[3] < miny))
34continue;
35endif
36map[1 + (link[3] - miny)][1 + (link[2] - minx)] = link[1];
37endfor
38endfor
39return map;

list_description

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1if (player.brief)
2player:tell(this:title());
3this:tell_contents();
4return;
5endif
6d = {{}, {}, {}, {}, {}, {}};
7esc_room = 1;
8esc_exit = 2;
9esc_furniture = 3;
10esc_other = 4;
11esc_contents = 5;
12esc_player = 6;
13seating = {};
14rendered = {player};
15"handle furniture";
16for x in (setadd(this:occupants($furniture), this))
17seating = setadd(seating, x);
18if (msg = x:look_place_msg())
19d[esc_furniture] = listappend(d[esc_furniture], msg);
20rendered = setadd(rendered, x);
21endif
22endfor
23"handle exits";
24for x in (this:exits())
25if (msg = x:look_place_msg(this))
26d[esc_exit] = listappend(d[esc_exit], msg);
27rendered = setadd(rendered, x);
28endif
29endfor
30"handle players";
31for x in (seating)
32if (msg = x:users_msg({player}))
33rendered = {@rendered, @x:integrated_objects()};
34d[esc_player] = listappend(d[esc_player], msg);
35endif
36endfor
37"now render anyone that's left";
38for x in ($set_utils:difference(this:occupants($creature), rendered))
39if ($object_utils:has_verb(x, "look_place_msg") && (msg = x:look_place_msg()))
40d[esc_player] = listappend(d[esc_player], msg);
41rendered = setadd(rendered, x);
42endif
43endfor
44"now render players with no :look_place_msg()";
45players = this:player_integration_msg($set_utils:difference(chars = this:occupants($creature), rendered));
46if (players)
47d[esc_player] = listappend(d[esc_player], players);
48endif
49for z in (chars)
50rendered = setadd(rendered, z);
51endfor
52"finally integrate anything that's left";
53for x in ($set_utils:difference(this:contents(), rendered))
54if ($object_utils:has_verb(x, "look_place_msg") && (msg = x:look_place_msg()))
55d[esc_other] = listappend(d[esc_other], msg);
56rendered = setadd(rendered, x);
57endif
58endfor
59full = this:description();
60if (typeof(full) == STR)
61d[esc_room] = listinsert(d[esc_room], full, 1);
62else
63d[esc_room] = {@d[esc_room], @full};
64endif
65contents = this:render_contents(setremove($set_utils:difference(this:contents(), rendered), player));
66if (contents)
67d[esc_contents] = listappend(d[esc_contents], contents);
68endif
69r = {};
70for i in [1..length(d)]
71r = listappend(r, $su:from_list(d[i], "  "));
72endfor
73return r;

render_contents

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1things = (length(args) > 0) ? args[1] | this:contents();
2if (things)
3msg = (length(things) > 1) ? this.contents_many_msg | this.contents_msg;
4things = $english_utils:aggregate_names(things);
5if (player:check_pref("boldnames"))
6things = ($ansi.bold_on + things) + $ansi.bold_off;
7endif
8return $su:capitalize(strsub(msg, "%t", things));
9else
10return "";
11endif

@addresident

Spec any none noneFlags rxdOwner #361Definer #3

Referenced by

none

Source

1if (this.owner != player)
2player:tell("You don't own ", this.location.name, ".");
3if (!this.owner.programmer)
4player:tell("If you'd like to be a resident, ask the owner to @addresident you.");
5endif
6return;
7endif
8who = $su:match_player(dobjstr);
9if (!valid(who))
10player:tell("There isn't any player named '", dobjstr, "'.");
11elseif (who == this)
12player:tell("You don't need to add yourself as a resident.");
13elseif (who in this.residents)
14player:tell(who:dnamec(), " is already a resident of ", this.name, ".");
15else
16this:add_resident(who);
17player:tell(who:dnamec(), " added as a resident of ", this.name, ".");
18player:tell("If you ever change your mind, just @rmresident ", who.name, ".");
19endif

creature_heartbeat

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1"if (this.outdoor)";
2"  area = area(this);";
3"  if (valid(wmaster = area.weather_master))";
4"    weather = wmaster:weather();";
5"  else";
6"    weather = area:weather();";
7"  endif";
8"  `weather:creature_heartbeat(args[1]) ! E_VERBNF => 0';";
9"endif";
10if ((((typeof(this.ambience) == OBJ) && valid(this.ambience)) && is_player(args[1])) && (random(100) <= this.ambience.chance))
11this:ambience(args[1]);
12elseif ((this.ambience && is_player(args[1])) && (random(100) <= this.ambience[1].chance))
13this:ambience(args[1]);
14endif

enterfunc

Spec this none thisFlags rxdOwner #362Definer #3

Referenced by

none

Source

No program (verb defined but unprogrammed).

exitfunc

Spec this none thisFlags rxdOwner #362Definer #3

Referenced by

none

Source

No program (verb defined but unprogrammed).

random_exit

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1who = args[1];
2s = {};
3for x in (this.exits)
4if (((!x.hidden) && x.obvious) && x:allows(who))
5s = {@s, x};
6endif
7endfor
8return s ? s[random($)] | #-1;

room

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1return this;

_room_map_list

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1"$room:_room_map([width][, height])";
2area = this:area();
3width = (length(args) > 0) ? args[1] | 5;
4height = (length(args) > 1) ? args[2] | 5;
5if ((width % 2) == 0)
6width = width + 1;
7endif
8if ((height % 2) == 0)
9height = height + 1;
10endif
11map = {};
12midx = width / 2;
13midy = height / 2;
14minx = this.x - midx;
15miny = this.y - midy;
16maxx = this.x + midx;
17maxy = this.y + midy;
18map = setadd(map, this);
19if (is_a(area.bigmap, $bigmap))
20rooms = area.bigmap.z_sorted_rooms;
21else
22rooms = area.z_sorted_rooms;
23endif
24for room in (rooms)
25$cu:sin(0);
26if (room == this)
27continue;
28elseif (room.z != this.z)
29continue;
30elseif ((room.x > maxx) || (room.x < minx))
31continue;
32elseif ((room.y > maxy) || (room.y < miny))
33continue;
34endif
35map = setadd(map, room);
36endfor
37return map;

weather_msg

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1return area(this):weather_msg();

update_watch

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1"update_watch([INT delta]). Updates this room's .watched value, optionally with a precalculated delta (used in exitfunc and enterfunc.) => INT the new value.";
2if (args)
3watch = max(0, this.watched + args[1]);
4else
5watch = 0;
6for o in (this.contents)
7if (is_player(o) && is_connected(o))
8watch = watch + 1;
9elseif (is_a(o, #9402))
10watch = watch + 1;
11elseif (`o.possessors ! ANY' || `o.listening ! ANY')
12watch = watch + 1;
13endif
14yield 0;
15endfor
16endif
17this.watched = watch;
18return watch;

_descriptive_map_old

Spec this none thisFlags rxdOwner #29Definer #3

Referenced by

none

Source

1width = (length(args) > 0) ? args[1] | 5;
2height = (length(args) > 1) ? args[2] | 5;
3icon_verb = ((length(args) > 2) && args[3]) ? args[3] | "_icon";
4blank_icon = (length(args) > 3) ? args[4] | 0;
5include_position = (length(args) > 4) ? args[5] | 1;
6if ((width % 2) == 0)
7width = width + 1;
8endif
9if ((height % 2) == 0)
10height = height + 1;
11endif
12midx = width / 2;
13midy = height / 2;
14minx = this.x - midx;
15miny = this.y - midy;
16maxx = this.x + midx;
17maxy = this.y + midy;
18area = this:area();
19normal_map = {};
20if (is_a(this, #142063) && is_a(this:area().flyer, $flyer))
21ignore_links = 0;
22endif
23room_map = this:_room_map(width, height);
24for y in [1..height]
25for x in [1..width]
26dir = this:next_hop_to(room_map[y][x]);
27if ((valid(room_map[y][x]) == 1) && (valid(dir) == 1))
28if (!dir:obvious())
29continue;
30endif
31normal_map = setadd(normal_map, ((("To get to " + room_map[y][x]:name()) + ", head ") + dir:name()) + ".");
32endif
33$cu:sin(0);
34endfor
35endfor
36return {normal_map};

textmap

Spec any none noneFlags rxdOwner #29Definer #3

Referenced by

none

Source

1size = argstr ? toint(argstr) | 2;
2size = max(min(size * 2, 16), 2);
3player:tell_lines(this:_descriptive_map(size, size)[1]);

announce_admins

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1"Copied from generic room (#3):announce_all by Satan (#2) Tue Jul 29 23:28:06 2008 CDT";
2if (this.watched)
3for dude in (this.contents)
4(dude.listening && is_a(dude, $builder)) && dude:tell(@args);
5endfor
6$cu:sin(0);
7endif

announce_admins_but

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1"Copied from generic room (#3):announce_all_but by Satan (#2) Wed Aug 13 19:57:22 2008 CDT";
2":announce_all_but(LIST objects to ignore, text)";
3if (this.watched)
4{ignore, @text} = args;
5contents = this:occupants($builder);
6for l in (ignore)
7contents = setremove(contents, l);
8endfor
9for listener in (contents)
10`listener.listening ! ANY => 0' && listener:tell(@text);
11endfor
12endif

_covers

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1c = this.covers;
2for x in (this:occupants($furniture))
3c = {@c, x};
4endfor
5return c;

_covers_left

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1

old_make_noise

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1":broadcast_noise(OBJ noise, OBJ source[, LIST params, INT volume, INT noiseid, OBJ sourceexit])";
2noise = args[1];
3source = (length(args) > 1) ? args[2] | #-1;
4params = (length(args) > 2) ? args[3] | {};
5volume = (length(args) > 3) ? args[4] | noise.default_volume;
6noiseid = (length(args) > 4) ? args[5] | 0;
7sourceexit = (length(args) > 5) ? args[6] | #-1;
8if (!noiseid)
9noiseid = random(9999999);
10endif
11volume = min(volume, 12);
12volume = max(volume, -4);
13if (noiseid in this.recent_noises)
14"...we already heard this, it's an echo, ignore it...";
15return;
16endif
17this.recent_noises = {noiseid, @this.recent_noises};
18if (length(this.recent_noises) > 5)
19this.recent_noises = this.recent_noises[1..5];
20endif
21if (valid(sourceexit))
22"...only announce in here if it came from somewhere else...";
23noise:sound_in(this, source, params, volume, sourceexit);
24endif
25for x in (setremove(this.exits, sourceexit))
26x:pass_noise(noise, source, params, volume, noiseid);
27endfor

make_noise

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1":make_noise(OBJ noise, OBJ source[, LIST params, INT volume, INT noiseid, OBJ sourceexit])";
2{noise, ?source = #-1, ?params = {}, ?volume = noise.default_volume, ?noiseid = 0, ?sourceexit = #-1, ?propagate_only = 0} = args;
3if (!noiseid)
4noiseid = random(9999999);
5endif
6startvol = max(-4, min(volume, 12));
7to_hear = {};
8if ((sourceexit == #-1) && 0)
9report = tostr($su:nn(noise), "x", volume, " from ", $su:nn(source), " -- ", toliteral(params), " at ", $su:nn(this));
10#83818:announce(#2, report, 1);
11endif
12"first, grab exits in this";
13for x in (this.exits)
14if ((!gamevalid(xo = x.otherside)) || (!gamevalid(loc = xo.location)))
15continue;
16endif
17try
18xvol = x:attenuate(noise, startvol);
19if (xvol >= -3)
20to_hear = {@to_hear, {xo, loc, xvol}};
21endif
22except e (ANY)
23$rpg:report_error(e);
24endtry
25endfor
26"now, propagate sound.";
27heard = {this};
28while (to_hear)
29{from, room, vol} = to_hear[1];
30noise:sound_in(room, source, params, vol, from);
31heard = {@heard, room};
32for x in (setremove(room.exits, from))
33if (!is_a(x, $exit))
34player:tell($su:nn(room));
35endif
36if ((gamevalid(xo = x.otherside) && gamevalid(loc = xo.location)) && (!(loc in heard)))
37try
38xvol = x:attenuate(noise, vol);
39if (xvol >= -3)
40to_hear = {@to_hear, {xo, loc, xvol}};
41endif
42except e (ANY)
43$rpg:report_error(e);
44endtry
45endif
46endfor
47to_hear = to_hear[2..$];
48yield;
49endwhile

ambience

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1who = args[1];
2ok = {};
3if (typeof(this.ambience) == OBJ)
4amb = {this.ambience};
5else
6amb = this.ambience;
7endif
8for x in (amb)
9if (x:can_ambience(this))
10ok = {@ok, x};
11endif
12endfor
13if ((area = area(this)).weather.ambience_msg)
14ok = {@ok, area};
15endif
16if (ok)
17a = ok[random(length(ok))];
18a:ambience(this, who);
19endif

controlled_by

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1{who} = args;
2if (who == this.owner)
3return 1;
4elseif (who in this.residents)
5return 1;
6elseif (`who.wizard ! E_PROPNF => 0')
7return 1;
8elseif (gamevalid(who.employer) && who.employer:permit_control(who, this))
9return 1;
10endif
11return 0;

look_sky

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1see_sky = 0;
2if (this.outdoor)
3see_sky = 1;
4elseif (is_a(this, $indoor_room) && this.windows)
5see_sky = 1;
6endif
7if (!see_sky)
8player:tell("You can't really see the sky from here.");
9return;
10endif
11weather = this:area().weather;
12wm = weather.look_sky_from_ground_msg;
13player:tell(wm);
14if (is_a(sky = this:area():sky_room(this), $room))
15if (weather.see_through)
16if ($time:day_segment() > 4)
17moon = $time:moon_phase(3);
18player:tell(moon);
19endif
20con = sky:occupants($actor);
21if (con)
22player:tell("You can make out ", $su:english_list($lu:map_verb(con, "iname")), " high in the sky.");
23else
24player:tell("You don't see anything flying around up there.");
25endif
26else
27player:tell("The sky is too obscured to see if anything's flying.");
28endif
29endif

look_self_NEW

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1":look_self() => Prints a description of the room and its contents to the player";
2"There are several classes of objects in the room's contents that we group together:  exits, furniture, and players.  In addition, exits, objects, and other items can be integrated in one of three styles:";
3"0 - No integration at all.  The objects in question won't have any special treatment.";
4"1 - Separation integrations.  The objects in question will appear grouped together in their own paragraph.";
5"2 - Description integration.  The objects in question will appear as a part of the room description itself.";
6"An additional complication is that furniture can provide an integration message which lists its occupants and what they're doing.  This message needs to be grouped with players.";
7this:validate_occupants();
8show_map = ((this.show_map && (!(this in $rpg.nomap_rooms))) && (!`player.client ! ANY => 0')) && player:check_pref("showmap");
9show_desc = player:check_pref("showdesc");
10room_desc = "";
11exit_desc = "";
12furniture_desc = "";
13other_desc = "";
14player_desc = "";
15seating = {};
16rendered = {player};
17"handle furniture";
18if (this.furniture_integration)
19for x in ({this, @this:occupants($furniture)})
20seating = {@seating, x};
21if (msg = x:look_place_msg())
22if (this.furniture_integration == 2)
23room_desc = (room_desc + "  ") + msg;
24else
25furniture_desc = (furniture_desc + "  ") + msg;
26endif
27rendered = setadd(rendered, x);
28endif
29endfor
30endif
31"handle exits";
32if (this.exit_integration)
33for x in (this:exits())
34if ($ou:has_verb(x, "look_place_msg") && (msg = x:look_place_msg(this)))
35if (this.exit_integration == 2)
36room_desc = (room_desc + "  ") + msg;
37else
38exit_desc = (exit_desc + "  ") + msg;
39endif
40rendered = setadd(rendered, x);
41endif
42endfor
43endif
44"handle players";
45if (this.player_integration)
46for x in (seating)
47if (msg = x:users_msg({player}))
48rendered = {@rendered, @x:integrated_objects()};
49if (this.player_integration == 2)
50room_desc = (room_desc + "  ") + msg;
51else
52player_desc = (player_desc + "  ") + msg;
53endif
54endif
55endfor
56"now render anyone that's left";
57for x in ($set_utils:difference(this:occupants($creature), rendered))
58if ($object_utils:has_verb(x, "look_place_msg") && (msg = x:look_place_msg()))
59if (this.player_integration == 2)
60room_desc = (room_desc + "  ") + msg;
61else
62player_desc = (player_desc + "  ") + msg;
63endif
64rendered = setadd(rendered, x);
65endif
66endfor
67"now render players with no :look_place_msg()";
68player_desc = (player_desc + "  ") + this:player_integration_msg($set_utils:difference(chars = this:occupants($creature), rendered));
69for z in (chars)
70rendered = setadd(rendered, z);
71endfor
72endif
73"finally integrate anything that's left";
74if (this.other_integration)
75for x in (this:contents())
76if (((!(x in rendered)) && $object_utils:has_verb(x, "look_place_msg")) && (msg = x:look_place_msg()))
77if (this.other_integration == 2)
78room_desc = (room_desc + "  ") + msg;
79else
80other_desc = (other_desc + "  ") + msg;
81endif
82rendered = setadd(rendered, x);
83endif
84endfor
85endif
86room_desc = $su:trim(room_desc);
87exit_desc = $su:trim(exit_desc);
88furniture_desc = $su:trim(furniture_desc);
89player_desc = $su:trim(player_desc);
90other_desc + $su:trim(other_desc);
91if (show_desc)
92full_desc = this:description();
93if (room_desc)
94if (typeof(full_desc) == STR)
95full_desc = {tostr(full_desc, "  ", room_desc, $ansi.reset)};
96else
97full_desc = {@full_desc, room_desc + $ansi.reset};
98endif
99endif
100else
101full_desc = {};
102exit_desc = {};
103if (is_a(this, #23025) && (outside_desc = this:outside_description()))
104full_desc = {@full_desc, @outside_desc};
105endif
106endif
107if (furniture_desc)
108full_desc = {@full_desc, ($ansi.bold_on + furniture_desc) + $ansi.reset};
109endif
110if (exit_desc)
111full_desc = {@full_desc, exit_desc + $ansi.reset};
112endif
113if (other_desc)
114full_desc = {@full_desc, ($ansi.bold_on + other_desc) + $ansi.reset};
115endif
116suspend(0);
117if (show_map)
118this:tell_map(full_desc);
119else
120title_desc = this:title();
121if (this.public)
122title_desc = title_desc + " (public)";
123else
124title_desc = title_desc + " (private)";
125endif
126player:tell_lines({title_desc, @full_desc});
127endif
128suspend(0);
129what = $set_utils:difference(this:contents(), rendered);
130what = setremove(what, player);
131this:tell_contents(what);
132if (player_desc)
133player:tell(($ansi.bold_on + player_desc) + $ansi.reset);
134endif
135if ((!is_player(player)) || player:check_pref("showexits"))
136this:list_exits();
137endif

look_self_backup

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1"Copied from generic room (#3):look_self by Satan (#2) Sat Nov  8 00:38:10 2008 CST";
2":look_self() => Prints a description of the room and its contents to the player";
3"There are several classes of objects in the room's contents that we group together:  exits, furniture, and players.  In addition, exits, objects, and other items can be integrated in one of three styles:";
4"0 - No integration at all.  The objects in question won't have any special treatment.";
5"1 - Separation integrations.  The objects in question will appear grouped together in their own paragraph.";
6"2 - Description integration.  The objects in question will appear as a part of the room description itself.";
7"An additional complication is that furniture can provide an integration message which lists its occupants and what they're doing.  This message needs to be grouped with players.";
8this:validate_occupants();
9if (`player.client ! ANY => 0')
10this:client_map();
11else
12if (player.brief || this.always_brief)
13if (this.public)
14pub = "public";
15else
16pub = "private";
17endif
18player:tell(this:title(), " (", pub, ")");
19if (is_a(this, #23025))
20if (valid(`outside = this.location.flyer.location ! ANY => #-1'))
21player:tell(("Outside, you see " + outside.name) + ".");
22endif
23endif
24this:tell_contents(this.contents);
25if ((!is_player(player)) || player:check_pref("showexits"))
26this:list_exits();
27endif
28return;
29endif
30if (((!(this in $rpg.nomap_rooms)) && player:check_pref("showmap")) && this.show_map)
31return this:look_self_map();
32endif
33endif
34room_desc = "";
35exit_desc = "";
36furniture_desc = "";
37other_desc = "";
38player_desc = "";
39seating = {};
40rendered = {player};
41"handle furniture";
42if (this.furniture_integration)
43for x in ({this, @this:occupants($furniture)})
44seating = {@seating, x};
45if (msg = x:look_place_msg())
46if (this.furniture_integration == 2)
47room_desc = tostr(room_desc, "  ", msg);
48else
49furniture_desc = tostr(furniture_desc, "  ", msg);
50endif
51rendered = setadd(rendered, x);
52endif
53endfor
54endif
55"handle exits";
56if (this.exit_integration)
57for x in (this:exits())
58if (msg = x:look_place_msg(this))
59if (this.exit_integration == 2)
60room_desc = tostr(room_desc, "  ", msg);
61else
62exit_desc = tostr(exit_desc, "  ", msg);
63endif
64rendered = setadd(rendered, x);
65endif
66endfor
67endif
68"handle players";
69if (this.player_integration)
70for x in (seating)
71if (msg = x:users_msg({player}))
72rendered = {@rendered, @x:integrated_objects()};
73if (this.player_integration == 2)
74room_desc = tostr(room_desc, "  ", msg);
75else
76player_desc = tostr(player_desc, "  ", msg);
77endif
78endif
79endfor
80"now render anyone that's left";
81for x in ($set_utils:difference(this:occupants($creature), rendered))
82if ($object_utils:has_verb(x, "look_place_msg") && (msg = x:look_place_msg()))
83if (this.player_integration == 2)
84room_desc = tostr(room_desc, "  ", msg);
85else
86player_desc = tostr(player_desc, "  ", msg);
87endif
88rendered = setadd(rendered, x);
89endif
90endfor
91"now render players with no :look_place_msg()";
92player_desc = (player_desc + "  ") + this:player_integration_msg($set_utils:difference(chars = this:occupants($creature), rendered));
93for z in (chars)
94rendered = setadd(rendered, z);
95endfor
96endif
97"finally integrate anything that's left";
98if (this.other_integration)
99for x in ($set_utils:difference(this:contents(), rendered))
100if ($ou:has_verb(x, "look_place_msg") && (msg = x:look_place_msg()))
101if (this.other_integration == 2)
102room_desc = tostr(room_desc, "  ", msg);
103else
104other_desc = tostr(other_desc, "  ", msg);
105endif
106rendered = setadd(rendered, x);
107endif
108endfor
109endif
110room_desc = $su:trim(room_desc);
111exit_desc = $su:trim(exit_desc);
112furniture_desc = $su:trim(furniture_desc);
113player_desc = $su:trim(player_desc);
114other_desc = $su:trim(other_desc);
115player:tell("");
116full_desc = this:description();
117if (room_desc)
118if (typeof(full_desc) == STR)
119full_desc = (full_desc + "  ") + room_desc;
120else
121full_desc = {@full_desc, room_desc};
122endif
123endif
124if (player.client)
125player:client_tell($client.roomdesc_start);
126player:client_tell($client.roomdesc_title, this:client_title());
127if (full_desc)
128player:tell_lines(full_desc);
129endif
130if (furniture_desc)
131player:tell(furniture_desc);
132endif
133if (exit_desc)
134player:tell(exit_desc);
135endif
136if (other_desc)
137player:tell(other_desc);
138endif
139player:client_tell($client.roomdesc_end);
140endif
141player:tell(this:title());
142if (player:check_pref("showdesc") && full_desc)
143player:tell_lines(full_desc);
144endif
145if (furniture_desc)
146player:tell(furniture_desc);
147endif
148if (exit_desc)
149player:tell(exit_desc);
150endif
151if (other_desc)
152player:tell(other_desc);
153endif
154what = $set_utils:difference(this:contents(), rendered);
155what = setremove(what, player);
156this:tell_contents(what);
157if (player_desc)
158player:tell(player_desc);
159endif
160if ((!is_player(player)) || player:check_pref("showexits"))
161this:list_exits();
162endif

random_nondoor_exit

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1who = args[1];
2s = {};
3for x in (this.exits)
4if ((!is_a(x, $door)) && x:allows(who))
5s = {@s, x};
6endif
7endfor
8return s ? s[random($)] | #-1;

look_self_backup2

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1"Copied from generic room (#3):look_self by Satan (#2) Sun Nov  9 00:59:07 2008 CST";
2"Copied from Testing Facility (#233238):look_self by Satan (#2) Sat Nov  8 00:40:19 2008 CST";
3"Copied from generic room (#3):look_self by Satan (#2) Sat Nov  8 00:23:38 2008 CST";
4":look_self() => Prints a description of the room and its contents to the player";
5"There are several classes of objects in the room's contents that we group together:  exits, furniture, and players.  In addition, exits, objects, and other items can be integrated in one of three styles:";
6"0 - No integration at all.  The objects in question won't have any special treatment.";
7"1 - Separation integrations.  The objects in question will appear grouped together in their own paragraph.";
8"2 - Description integration.  The objects in question will appear as a part of the room description itself.";
9"An additional complication is that furniture can provide an integration message which lists its occupants and what they're doing.  This message needs to be grouped with players.";
10this:validate_occupants();
11seating = {};
12rendered = {player};
13furniture = this:occupants($furniture);
14exits = this:exits();
15creatures = this:occupants($creature);
16everything = this:contents();
17if (`player.client ! ANY => 0')
18this:client_map();
19else
20if (player.brief || this.always_brief)
21if (this.public)
22pub = "public";
23else
24pub = "private";
25endif
26player:tell(this:title(), " (", pub, ")");
27if (is_a(this, #23025))
28if (valid(`outside = this.location.flyer.location ! ANY => #-1'))
29player:tell(("Outside, you see " + outside.name) + ".");
30endif
31endif
32this:tell_contents(this.contents);
33if ((!is_player(player)) || player:check_pref("showexits"))
34this:list_exits();
35endif
36return;
37endif
38if (((!(this in $rpg.nomap_rooms)) && player:check_pref("showmap")) && this.show_map)
39return this:look_self_map();
40endif
41endif
42room_desc = "";
43exit_desc = "";
44furniture_desc = "";
45other_desc = "";
46player_desc = "";
47"handle furniture";
48if (this.furniture_integration)
49for x in ({this, @furniture})
50seating = {@seating, x};
51if (msg = x:look_place_msg())
52if (this.furniture_integration == 2)
53room_desc = tostr(room_desc, "  ", msg);
54else
55furniture_desc = tostr(furniture_desc, "  ", msg);
56endif
57rendered = setadd(rendered, x);
58endif
59endfor
60endif
61"handle exits";
62if (this.exit_integration)
63for x in (exits)
64if (msg = x:look_place_msg(this))
65if (this.exit_integration == 2)
66room_desc = tostr(room_desc, "  ", msg);
67else
68exit_desc = tostr(exit_desc, "  ", msg);
69endif
70rendered = setadd(rendered, x);
71endif
72endfor
73endif
74"handle players";
75if (this.player_integration)
76for x in (seating)
77if (msg = x:users_msg({player}))
78rendered = {@rendered, @x:integrated_objects()};
79if (this.player_integration == 2)
80room_desc = tostr(room_desc, "  ", msg);
81else
82player_desc = tostr(player_desc, "  ", msg);
83endif
84endif
85endfor
86"now render anyone that's left";
87for x in ($set_utils:difference(creatures, rendered))
88if ($object_utils:has_verb(x, "look_place_msg") && (msg = x:look_place_msg()))
89if (this.player_integration == 2)
90room_desc = tostr(room_desc, "  ", msg);
91else
92player_desc = tostr(player_desc, "  ", msg);
93endif
94rendered = setadd(rendered, x);
95endif
96endfor
97"now render players with no :look_place_msg()";
98player_desc = (player_desc + "  ") + this:player_integration_msg($set_utils:difference(creatures, rendered));
99for z in (creatures)
100rendered = setadd(rendered, z);
101endfor
102endif
103"finally integrate anything that's left";
104if (this.other_integration)
105for x in ($set_utils:difference(everything, rendered))
106if ($ou:has_verb(x, "look_place_msg") && (msg = x:look_place_msg()))
107if (this.other_integration == 2)
108room_desc = tostr(room_desc, "  ", msg);
109else
110other_desc = tostr(other_desc, "  ", msg);
111endif
112rendered = setadd(rendered, x);
113endif
114endfor
115endif
116room_desc = $su:trim(room_desc);
117exit_desc = $su:trim(exit_desc);
118furniture_desc = $su:trim(furniture_desc);
119player_desc = $su:trim(player_desc);
120other_desc = $su:trim(other_desc);
121player:tell("");
122full_desc = this:description();
123if (room_desc)
124if (typeof(full_desc) == STR)
125full_desc = (full_desc + "  ") + room_desc;
126else
127full_desc = {@full_desc, room_desc};
128endif
129endif
130if (player.client)
131player:client_tell($client.roomdesc_start);
132player:client_tell($client.roomdesc_title, this:client_title());
133if (full_desc)
134player:tell_lines(full_desc);
135endif
136if (furniture_desc)
137player:tell(furniture_desc);
138endif
139if (exit_desc)
140player:tell(exit_desc);
141endif
142if (other_desc)
143player:tell(other_desc);
144endif
145player:client_tell($client.roomdesc_end);
146endif
147player:tell(this:title());
148if (player:check_pref("showdesc") && full_desc)
149player:tell_lines(full_desc);
150endif
151if (furniture_desc)
152player:tell(furniture_desc);
153endif
154if (exit_desc)
155player:tell(exit_desc);
156endif
157if (other_desc)
158player:tell(other_desc);
159endif
160what = $set_utils:difference(everything, rendered);
161what = setremove(what, player);
162this:tell_contents(what);
163if (player_desc)
164player:tell(player_desc);
165endif
166if ((!is_player(player)) || player:check_pref("showexits"))
167this:list_exits();
168endif

infect_creature

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1who = args[1];
2who:ingest(@args[2..$]);

temperature

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1force = 0;
2if (args)
3force = args[1];
4endif
5if ((!force) && ((time() - this.last_temp_update) < 60))
6return this.temperature;
7endif
8this.last_temp_update = time();
9t = `area(this).indoor_temperature ! ANY => 65';
10if (temp = `this.base_temperature ! ANY')
11t = temp;
12elseif (this.outdoor)
13t = `area(this).temperature ! ANY => 65';
14t = t + `area(this).weather:temperature(this) ! ANY => 0';
15endif
16for x in (this.contents)
17t = t + `x:room_heat() ! ANY => 0';
18endfor
19this.temperature = t;
20return t;

forbid_say

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1return 0;

distant_figures

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1figs = {};
2for x in (occupants(this, $creature))
3fig = x.distant_form_msg;
4if (fig)
5found = 0;
6for i in [1..length(figs)]
7if (figs[i][1] == fig)
8figs[i][2] = figs[i][2] + 1;
9found = 1;
10endif
11endfor
12if (!found)
13figs = {@figs, {fig, 1}};
14endif
15endif
16endfor
17if (figs)
18mall = {};
19for x in (figs)
20if (x[2] == 1)
21m = "a " + x[1];
22else
23m = (($su:english_number(x[2]) + " ") + x[1]) + "s";
24endif
25mall = {@mall, m};
26endfor
27return $su:english_list(mall);
28endif

look_self_verybrief

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1player:tell(this:title());
2interesting = this:occupants($living);
3interesting = setremove(interesting, player);
4creatures_left = {};
5descs = {};
6for x in (interesting)
7if (msg = `x:look_place_msg(this) ! E_VERBNF => ""')
8descs = {@descs, msg};
9else
10creatures_left = {@creatures_left, x};
11endif
12endfor
13if (descs)
14player:tell($su:from_list(descs, " "), "  ", this:player_integration_msg(creatures_left));
15elseif (creatures_left)
16player:tell(this:player_integration_msg(creatures_left));
17endif

list_exits_long

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1"Copied from generic room (#3):list_exits by Spunky (#97) Tue Mar  3 01:49:34 2009 CST";
2who = (length(args) > 0) ? args[1] | player;
3force = (length(args) > 1) ? args[2] | 0;
4exits = this:obvious_exits();
5exits = $lu:sort_cardinal_suspended(exits);
6if (`who.client ! ANY => 0')
7who:client_tell($client.exits_start);
8for exit in (exits)
9who:client_tell(exit.direction in $client.dirs, ",", exit.name);
10$cu:sin();
11endfor
12who:client_tell($client.exits_end);
13elseif (is_a(who, $player) && who:check_pref("mxp"))
14if ((who in this.contents) || force)
15exitspec = "";
16for exit in (exits)
17exitspec = tostr(exitspec, $ansi.reset, "  ", exit:exit_spec_mxp());
18endfor
19$mxp:tell_secure_line(who, tostr("<EXPIRE exits>", $ansi.cyan, "[ Exits:", $ansi.reset, exitspec, $ansi.cyan, " ]", $ansi.reset));
20endif
21else
22if ((who in this.contents) || force)
23exitspec = "";
24for exit in (exits)
25if (!(edesc = exit:look_place_msg()))
26if (!exit.opaque)
27edesc = exit.otherside.location.name;
28else
29edesc = "";
30endif
31endif
32s = ((((((($ansi.cyan + "[ ") + exit:exit_spec()) + $ansi.reset) + $ansi.cyan) + " : ") + edesc) + " ]") + $ansi.reset;
33player:tell(s);
34endfor
35endif
36endif

idle_sit

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1who = args[1];
2if (valid(seat = who:sitting_on()))
3comfort = seat;
4elseif (valid(bed = who:reclining_on()))
5comfort = bed;
6else
7comfort = this;
8endif
9if (free_seats = `comfort:free_seats() ! ANY => 0')
10who:queue_action($actions.sit, {comfort}, 1, "sit");
11endif

smell

Spec none none noneFlags rxdOwner #361Definer #3

Referenced by

none

Source

1silent = args ? 1 | 0;
2ss = {};
3for x in ({@this:occupants($gas), @this:occupants($liquid)})
4if (m = x.smell_msg)
5ss = setadd(ss, m);
6endif
7endfor
8if (roomsmell = `this.smell_msg ! E_PROPNF => ""')
9ss = {@ss, @$lu:as_list(roomsmell)};
10endif
11for x in (this.contents)
12if (has_callable_verb(x, "room_smell_msg"))
13if (smell = x:room_smell_msg())
14ss = {@ss, smell};
15endif
16elseif (has_property(x, "room_smell_msg") && x.room_smell_msg)
17ss = {@ss, x.room_smell_msg};
18endif
19endfor
20if (ss)
21player:tell("You smell ", $su:english_list(ss), ".");
22elseif (!silent)
23player:tell("You don't smell anything out of the ordinary.");
24endif

extra_exit_desc

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1rendered = args ? args[1] | {};
2inc = {};
3if (m = this.continue_look_self_msg)
4for x in (this.exits)
5if (!(x in rendered))
6if ((is_a(x.otherside, $exit) && is_a(x.otherside.location, $room)) && (x.otherside.location.continue_look_self_msg == m))
7inc = {@inc, x};
8endif
9endif
10endfor
11if (inc)
12return strsub(m, "%dir", $su:english_list($lu:map_prop(inc, "direction")));
13endif
14endif

tell_notes

Spec this none thisFlags rxdOwner #29Definer #3

Referenced by

Source

1who = (length(args) > 0) ? args[1] | player;
2if (is_a(a = this:area(), $blueprint))
3i = 1;
4types = {"obj_notes", "ambience_notes", "misc_notes"};
5for p in (types)
6i = p in types;
7n = `a.(p)[this] ! E_RANGE => ""';
8if (n)
9who:tell(tostr(i), ". ", n);
10endif
11endfor
12endif
13return;
14"OLD CODE BELOW.";
15i = 1;
16for x in (this.notes)
17if (x)
18who:tell(tostr(i), ". ", x);
19endif
20i = i + 1;
21endfor

prog_info

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1parent = strsub(parent(this).name, "generic ", "") + tostr(" [", parent(this), "]");
2v = verbs(this) ? "v" | " ";
3p = properties(this) ? "p" | " ";
4xyz = tostr("(", this.x, ",", this.y, ",", this.z, ")");
5glob_xyz = tostr($ansi.cyan, "<", $su:from_list(this.global_xyz, ","), ">");
6if (this.global_xyz_anchor)
7glob_xyz = glob_xyz + " <ANCHOR>";
8endif
9msg = tostr($ansi.yellow, parent, "  ", xyz, "  ", glob_xyz, $ansi.red);
10if (verbs(this))
11msg = msg + "v";
12endif
13if (properties(this))
14msg = msg + "p";
15endif
16msg = msg + $ansi.reset;
17return msg;

tell_map

Spec this none thisFlags rxdOwner #362Definer #3

Referenced by

none

Source

No program (verb defined but unprogrammed).

tree_tag

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1return $su:right(this.common_name_msg, -20);

write_landmark_msg

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1m = "";
2for x in (this:area().landmarks)
3m = (m + x:as_seen_from(this)) + " ";
4endfor
5if (length(m) > 1)
6this.landmark_msg = m;
7return m;
8endif
9this.landmark_msg = "";
10return "";

floor_msg

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1if (`this.floor_msg ! ANY')
2return this.floor_msg;
3endif
4return this.outdoor ? "ground" | "floor";

iname

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1return this.name;

_sit

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1{who} = args;
2who:queue_action($actions.sit, {this}, 1, "sit");

tell_map_backup

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1"Copied from generic room (#3):tell_map by Gilmore (#98) Mon Jul 27 22:21:58 2009 CDT";
2d = args[1];
3this:draw_map();
4m = {@this.map, "          "};
5if (`this.map_restricted ! ANY')
6m[1] = "          ";
7m[5] = "          ";
8for x in [2..4]
9m[x] = ("  " + $ansi:strip(m[x])[3..8]) + "  ";
10endfor
11endif
12m2 = {};
13lightactive = !area(this).dark_night;
14if (!lightactive)
15for light in (this:occupants($light))
16if (light:active())
17lightactive = 1;
18break;
19endif
20endfor
21endif
22darken = 0;
23for x in (player.wearing)
24if (is_a(x, #84197))
25darken = 1;
26break;
27endif
28endfor
29if (this.outdoor)
30if ((!lightactive) && (!player:can_see_in_dark()))
31if ($time:day_segment() >= 5)
32darken = 1;
33endif
34endif
35endif
36for ml in (m)
37if (darken)
38ml = $ansi:strip(ml);
39ml = (($ansi.bg_black + $ansi.gray) + ml) + $ansi.reset;
40endif
41m2 = {@m2, ml + " "};
42endfor
43m = m2;
44o = {};
45if (player.programmer && $prog_options:get(player.prog_options, "room_info"))
46roomtitle = (((this:title() + " ") + $ansi.bold_on) + tostr(this)) + $ansi.reset;
47d = {roomtitle, this:prog_info(), @d};
48else
49d = {this:title(), @d};
50endif
51mapline = 0;
52wrapat = abs(`player.linelen ? player.linelen | 70 ! ANY => 70');
53for line in (d)
54mapline = mapline + 1;
55o = {@o, (mapline > length(m)) ? "" | m[mapline]};
56wordlen = 0;
57hasmap = o[$] ? 1 | 0;
58for word in ($su:fast_words(line))
59yield;
60if (word)
61if (((wordlen + (striplen = length($ansi:strip(word)))) + 1) > (hasmap ? wrapat - 12 | wrapat))
62mapline = mapline + 1;
63o = {@o, (mapline > length(m)) ? "" | m[mapline]};
64wordlen = 0;
65hasmap = o[$] ? 1 | 0;
66endif
67if (word[$] == ".")
68word = word + " ";
69endif
70o[$] = (o[$] + " ") + word;
71wordlen = (wordlen + striplen) + 1;
72endif
73endfor
74$cu:sin();
75endfor
76while (mapline < length(m))
77mapline = mapline + 1;
78o = {@o, m[mapline]};
79endwhile
80player:tell_lines(o);
81return o;

darkness

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1{?force_flush = 0, ?who = #-1} = args;
2if (gamevalid(who))
3if (is_a(who, $npc))
4return 0;
5endif
6endif
7if ((!force_flush) && ((time() - this.darkness[2]) < 30))
8dark = this.darkness[1];
9else
10dark = this:_darkness();
11for x in (this.contents)
12if (`x.superbright ! E_PROPNF => 0')
13dark = max(-3, dark - `x:light_level() ! E_VERBNF => 0');
14elseif (dark >= 0)
15dark = max(0, dark - `x:light_level() ! E_VERBNF => 0');
16endif
17yield 0;
18endfor
19this.darkness = {dark, time()};
20endif
21"if (dark && occupants(this, $decals.fire))";
22"  return 0;";
23"endif";
24reverse = valid(who) ? `who:reverse_light() ! E_VERBNF => 0' | 0;
25dark = dark - reverse;
26return dark;

tell_nearby_lights

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1d1 = {};
2d2 = {};
3thisdark = this:darkness();
4for x in (this.exits)
5if (((((!is_a(x, $door)) || x.open) && x.obvious) && valid(x.otherside)) && valid(x.otherside.location))
6dark = x.otherside.location:darkness();
7if (!dark)
8d2 = {@d2, x};
9elseif (thisdark && (dark <= 1))
10d1 = {@d1, x};
11endif
12endif
13endfor
14m = {};
15if (d1)
16m = {@m, "a faint glow " + $su:english_list($lu:map_verb(d1, "to_msg"))};
17endif
18if (d2)
19m = {@m, "a light " + $su:english_list($lu:map_verb(d2, "to_msg"))};
20endif
21if (m)
22player:tell(("You see " + $su:english_list(m)) + ".");
23endif

auto_clean

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1if ((occupants(this, $player) || ((!this.owner.programmer) && (this.owner != #984))) || this.residents)
2return;
3endif
4kids = [];
5for x in (this.contents)
6if (((is_a(x, $thing) && (x.weight > 0)) && x:junk_ok()) && (x.value < 4000))
7parent = parent(x);
8if ((parent in $rpg.always_clean_these) || (random(100) < 20))
9$rpg:junk(x);
10elseif (parent in kids)
11kids[parent] = {@kids[parent], x};
12else
13kids[parent] = {x};
14endif
15endif
16yield;
17endfor
18for x in (keys(kids))
19if (length(k = kids[x]) > 2)
20$rpg:junk(k[1]);
21endif
22yield;
23endfor

initialize

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1pass(@args);
2this.tracks = {};

_descriptive_map

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1width = (length(args) > 0) ? args[1] | 5;
2height = (length(args) > 1) ? args[2] | 5;
3icon_verb = ((length(args) > 2) && args[3]) ? args[3] | "_icon";
4blank_icon = (length(args) > 3) ? args[4] | 0;
5include_position = (length(args) > 4) ? args[5] | 1;
6if ((width % 2) == 0)
7width = width + 1;
8endif
9if ((height % 2) == 0)
10height = height + 1;
11endif
12midx = max(1, width / 2);
13midy = max(1, height / 2);
14minx = this.x - midx;
15miny = this.y - midy;
16maxx = this.x + midx;
17maxy = this.y + midy;
18area = this:area();
19build = [];
20normal_map = {};
21if (is_a(this, #142063) && is_a(this:area().flyer, $flyer))
22ignore_links = 0;
23endif
24area = area(this);
25targets = $lu:flatten(this:_room_map(width, height));
26for target in (targets)
27if (gamevalid(target))
28path = area:path_between(this, target, {}, 1);
29if (path)
30start = path[1];
31accessible = `build[start] ! E_RANGE => {}';
32for exit in (path)
33if (((!is_a(exit, $exit)) || (!is_a(exit.otherside, $exit))) || (!is_a(exit.otherside.location, $room)))
34break;
35elseif ((!exit.passable) || (!exit:obvious()))
36break;
37elseif (is_a(exit, $door) && (!exit.open))
38break;
39endif
40accessible = setadd(accessible, exit.otherside.location);
41endfor
42build[start] = accessible;
43endif
44endif
45yield;
46endfor
47for item in (build)
48{exit, targets} = item;
49if (targets)
50names = {};
51for target in (targets)
52names = setadd(names, target:name());
53endfor
54dir = exit.direction ? exit.direction | exit:name();
55if (is_a(exit, $door) && (!exit.open))
56name = exit:dname();
57normal_map = setadd(normal_map, tostr("Head ", dir, " to enter ", name, "."));
58else
59normal_map = setadd(normal_map, tostr("Head ", dir, " to go to ", $su:english_list(names), "."));
60endif
61endif
62endfor
63return {normal_map};

_ghosticon

Spec this none thisFlags rxdOwner #29Definer #3

Referenced by

none

Source

1icon = this:_icon();
2icon = $ansi:strip(icon);
3icon = ($ansi.brightblue + icon) + $ansi.reset;
4for h in (this:occupants(#35827))
5icon = h.icon;
6endfor
7for g in (this:occupants(#35821))
8icon = g.icon;
9endfor
10for c in (this:occupants(#22823))
11icon = c.icon;
12endfor
13return icon;

rustle

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1now = time();
2if (this.rustle_msg && ((now - this.last_rustle) > 15))
3fork (2)
4this:make_noise(#147423, this, {this.rustle_msg});
5endfork
6this.last_rustle = now;
7endif

examine_verbs

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1r = pass(@args);
2if (r)
3this.has_commands = 1;
4else
5this.has_commands = 0;
6endif
7return r;

look_self_old

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1"Copied from generic room (#3):look_self by Gilmore (#98) Mon Jan  4 18:55:15 2010 CST";
2":look_self([OBJ or LIST objs-to-exclude]) => Prints a description of the room and its contents to the player";
3"An additional complication is that furniture can provide an integration message which lists its occupants and what they're doing.  This message needs to be grouped with players.";
4{?exclude = {}, @other_args} = args;
5this:validate_occupants();
6show_map = ((this.show_map && (!(this in $rpg.nomap_rooms))) && (!`player.client ! ANY => 0')) && player:check_pref("showmap");
7show_desc = player:check_pref("showdesc");
8if (`player.brief ! E_PROPNF => 0')
9show_map = 0;
10show_desc = 0;
11endif
12player:tell("");
13room_desc = "";
14exit_desc = "";
15furniture_desc = "";
16other_desc = "";
17player_desc = "";
18if (typeof(exclude) == OBJ)
19rendered = {exclude, player};
20elseif (typeof(exclude) == LIST)
21rendered = {@exclude, player};
22else
23rendered = {player};
24endif
25everything = this:contents();
26furniture = this:occupants($furniture);
27creatures = this:occupants($creature);
28for x in (everything)
29if (`x:is_hidden() ! E_VERBNF')
30rendered = setadd(rendered, x);
31everything = setremove(everything, x);
32endif
33endfor
34"handle furniture";
35for x in (furniture)
36if (x in rendered)
37continue;
38endif
39if (msg = x:look_place_msg())
40furniture_desc = (furniture_desc + "  ") + msg;
41rendered = listappend(rendered, x);
42endif
43endfor
44"handle exits";
45if (longexits = player:check_pref("longexits"))
46rendered = {@rendered, @this:exits()};
47else
48for x in (this:exits())
49if (x in rendered)
50continue;
51endif
52if (msg = `x:look_place_msg(this) ! E_VERBNF => ""')
53exit_desc = (exit_desc + "  ") + msg;
54rendered = listappend(rendered, x);
55endif
56endfor
57endif
58if (extra = `this:extra_exit_desc(rendered) ! E_VERBNF => ""')
59exit_desc = (extra + "  ") + exit_desc;
60endif
61"handle players";
62for x in (furniture)
63if (x in rendered)
64continue;
65endif
66if (msg = x:users_msg({player}))
67rendered = {@rendered, @x:integrated_objects()};
68player_desc = (player_desc + "  ") + msg;
69endif
70endfor
71"now render anyone that's left";
72creatures_left = {};
73for x in (creatures)
74if (x in rendered)
75continue;
76endif
77if (msg = `x:look_place_msg(this) ! E_VERBNF => ""')
78player_desc = (player_desc + "  ") + msg;
79rendered = setadd(rendered, x);
80else
81creatures_left = listappend(creatures_left, x);
82endif
83endfor
84"now render players with no :look_place_msg()";
85player_desc = (player_desc + "  ") + this:player_integration_msg(creatures_left);
86rendered = {@rendered, @creatures_left};
87"finally integrate anything that's left";
88for x in (everything)
89if (is_a(x, $exit))
90continue;
91elseif (x in rendered)
92continue;
93elseif (!(msg = `x:look_place_msg(this) ! E_VERBNF => ""'))
94continue;
95endif
96other_desc = (other_desc + "  ") + msg;
97rendered = listappend(rendered, x);
98endfor
99room_desc = $su:trim(room_desc);
100exit_desc = $su:trim(exit_desc);
101furniture_desc = $su:trim(furniture_desc);
102player_desc = $su:trim(player_desc);
103other_desc = $su:trim(other_desc);
104if (show_desc)
105full_desc = this:description();
106if (room_desc)
107if (typeof(full_desc) == STR)
108if (full_desc)
109full_desc = {tostr(full_desc, "  ", room_desc, $ansi.reset)};
110else
111full_desc = {tostr(room_desc, $ansi.reset)};
112endif
113else
114full_desc = {@full_desc, room_desc + $ansi.reset};
115endif
116endif
117else
118full_desc = {};
119exit_desc = {};
120if (has_callable_verb(this, "brief_description"))
121full_desc = {@full_desc, @this:brief_description()};
122endif
123endif
124dark = this:darkness();
125if (dark < 3)
126if (furniture_desc)
127full_desc = {@full_desc, furniture_desc};
128endif
129if (exit_desc)
130full_desc = {@full_desc, exit_desc + $ansi.reset};
131endif
132if (other_desc)
133full_desc = {@full_desc, other_desc + $ansi.reset};
134endif
135endif
136if (show_map)
137this:tell_map(full_desc);
138else
139title_desc = this:title();
140if (this.public)
141title_desc = title_desc + " (public)";
142else
143title_desc = title_desc + " (private)";
144endif
145player:tell_lines({title_desc, @full_desc});
146endif
147if (`player.client ! ANY => 0')
148this:client_map();
149endif
150what = $set_utils:difference(everything, rendered);
151for x in (what)
152if (is_a(x, $exit))
153what = setremove(what, x);
154endif
155endfor
156if (dark > 1)
157this:tell_nearby_lights();
158endif
159if ((dark < 2) || player:can_see_in_dark())
160this:tell_contents(what);
161endif
162if ((dark < 3) || player:can_see_in_dark())
163if (player_desc)
164player:tell(player_desc);
165endif
166endif
167this:list_exits();
168if (this.has_commands == E_NONE)
169this:examine_verbs(player);
170endif
171if (this.has_commands && player:check_pref("showroomcmd"))
172player:tell($ansi.cyan, $ansi.bold_on, "[ ", $ansi.bold_off, "There are special commands here.  '", $ansi.bold_on, "ex here", $ansi.bold_off, "' to learn more. ", $ansi.bold_on, "]", $ansi.reset);
173endif
174if (is_a(area(this), $blueprint))
175this:tell_notes();
176endif

tell_map_old

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1d = {};
2d = args[1];
3this:draw_map();
4m = {@this.map};
5if (`this.map_restricted ! ANY')
6m[1] = "          ";
7m[5] = "          ";
8for x in [2..4]
9m[x] = ("  " + $ansi:strip(m[x])[3..8]) + "  ";
10endfor
11endif
12darkness = this:darkness();
13light_mode = "none";
14if (player:is_wearing(#84197))
15light_mode = "darken";
16elseif (player:is_wearing(#6563))
17if (!darkness)
18light_mode = "blinding";
19else
20light_mode = "greenify";
21endif
22elseif ((darkness > 0) && (!player:can_see_in_dark()))
23light_mode = "darken";
24endif
25if ((darkness >= 2) && (light_mode == "darken"))
26m = {"          ", "          ", "          ", "          ", "          "};
27endif
28m2 = {};
29for ml in (m)
30if (light_mode == "darken")
31ml = $ansi:strip(ml);
32ml = tostr($ansi.bg_black, $ansi.gray, ml, $ansi.reset);
33elseif (light_mode == "blinding")
34ml = $ansi:strip(ml);
35ml = tostr($ansi.bg_green, $ansi.black, ml, $ansi.reset);
36elseif (light_mode == "greenify")
37ml = $ansi:strip(ml);
38ml = tostr($ansi.bg_black, $ansi.green, $ansi.bold_on, ml, $ansi.reset);
39endif
40m2 = {@m2, ml + " "};
41endfor
42m = {@m2, "          "};
43o = {};
44if (player.programmer && $prog_options:get(player.prog_options, "room_info"))
45roomtitle = (((this:title() + " ") + $ansi.bold_on) + tostr(this)) + $ansi.reset;
46d = {roomtitle, this:prog_info(), @d};
47else
48if (typeof(d) == LIST)
49d = {this:title(), @d};
50else
51d = {this:title(), d};
52endif
53endif
54mapline = 0;
55wrapat = abs(`player.linelen ? player.linelen | 70 ! ANY => 70');
56for line in (d)
57mapline = mapline + 1;
58o = {@o, (mapline > length(m)) ? "" | m[mapline]};
59wordlen = 0;
60hasmap = o[$] ? 1 | 0;
61for word in ($su:fast_words(line))
62yield;
63if (word)
64if (((wordlen + (striplen = length($ansi:strip(word)))) + 1) > (hasmap ? wrapat - 12 | wrapat))
65mapline = mapline + 1;
66o = {@o, (mapline > length(m)) ? "" | m[mapline]};
67wordlen = 0;
68hasmap = o[$] ? 1 | 0;
69endif
70if (word[$] == ".")
71word = word + " ";
72endif
73o[$] = (o[$] + " ") + word;
74wordlen = (wordlen + striplen) + 1;
75endif
76endfor
77$cu:sin();
78endfor
79while (mapline < length(m))
80mapline = mapline + 1;
81o = {@o, m[mapline]};
82endwhile
83player:tell_lines(o);
84return o;

description_old

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1"Copied from generic room (#3):description by Gilmore (#98) Mon Jan  4 18:55:38 2010 CST";
2dark = this:darkness();
3if (dark && (!player:can_see_in_dark()))
4if (dark >= 3)
5return {"You're in total darkness."};
6elseif (dark == 2)
7return {"You can make out only vague forms in the darkness."};
8endif
9endif
10if (this.outdoor || this.windows)
11m = this.outdoor ? this:time_msg() | this:time_windows_msg();
12if (typeof(desc = pass(@args)) == LIST)
13return {@desc, m};
14else
15return {(desc + "  ") + m};
16endif
17else
18return (typeof(this.description) == LIST) ? this.description | {this.description};
19endif

list_exits_old

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1"Copied from generic room (#3):list_exits by Gilmore (#98) Mon Jan  4 18:55:52 2010 CST";
2who = (length(args) > 0) ? args[1] | player;
3force = (length(args) > 1) ? args[2] | 0;
4if ((this:darkness() >= 3) && (!player:can_see_in_dark()))
5who:tell($ansi.cyan, "[ Exits: ", $ansi.bold_on, "?", $ansi.bold_off, " ]", $ansi.reset);
6return;
7endif
8if (who:check_pref("longexits"))
9return this:list_exits_long(@args);
10endif
11exits = this:obvious_exits();
12exits = $lu:sort_cardinal_suspended(exits);
13if (`who.client ! ANY => 0')
14who:client_tell($client.exits_start);
15for exit in (exits)
16who:client_tell(exit.direction in $client.dirs, ",", exit.name);
17yield;
18endfor
19who:client_tell($client.exits_end);
20elseif (is_a(who, $player) && who:check_pref("mxp"))
21if ((who in this.contents) || force)
22exitspec = "";
23for exit in (exits)
24exitspec = tostr(exitspec, $ansi.reset, "  ", exit:exit_spec_mxp());
25endfor
26$mxp:tell_secure_line(who, tostr("<EXPIRE exits>", $ansi.cyan, "[ Exits:", $ansi.reset, exitspec, $ansi.cyan, " ]", $ansi.reset));
27endif
28else
29if ((who in this.contents) || force)
30exitspec = "";
31for exit in (exits)
32exitspec = tostr(exitspec, $ansi.reset, "  ", exit:exit_spec());
33endfor
34who:tell(tostr($ansi.cyan, "[ Exits:", $ansi.reset, exitspec, $ansi.cyan, " ]", $ansi.reset));
35endif
36endif

player_integration_msg_old

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1"Copied from generic room (#3):player_integration_msg by Gilmore (#98) Mon Jan  4 18:56:10 2010 CST";
2if (((dark = this:darkness()) == 2) && (!(see_in_dark = player:can_see_in_dark())))
3p = length(setremove(this:occupants($creature), player));
4if (!p)
5return "";
6elseif (p == 1)
7return "You can make out a shadowy figure in the darkness.";
8else
9return ("You squint and see " + $su:english_number(p)) + " shadowy figures in the dark.";
10endif
11elseif ((dark > 2) && (!player:can_see_in_dark()))
12return "";
13endif
14msg_db = {};
15names = {};
16text = "";
17{?people = this:occupants($creature)} = args;
18msg_db = $su:message_db(people, "posture_msg");
19for x in (msg_db)
20if (length(x[1]) > 1)
21verbstr = "are ";
22else
23verbstr = "is ";
24endif
25aggverb = player:check_pref("boldnames") ? "aggregate_names_bold" | "aggregate_names";
26sentence = ((($english_utils:(aggverb)(x[1], 1) + " ") + verbstr) + x[2]) + " ";
27text = text + $su:capitalize(sentence);
28endfor
29return $su:trim(text);

darkness_old

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1{?force_flush = 0} = args;
2if ((!force_flush) && ((time() - this.darkness[2]) < 3))
3return this.darkness[1];
4endif
5dark = this.outdoor ? `this.dark_night ! ANY => `area(this).dark_night ! ANY => 0'' | 0;
6if (dark && this.outdoor)
7moon_phase = $time:moon_phase();
8if ($time:day_segment() < 5)
9dark = 0;
10elseif (area(this).weather.see_through && ((moon_phase < 10) || (moon_phase > 20)))
11dark = min(1, dark);
12endif
13endif
14if (always_dark = `this.always_dark ! ANY => 0')
15dark = always_dark;
16endif
17if (dark)
18for x in (this.contents)
19if (dark > 0)
20dark = max(0, dark - `x:light_level() ! E_VERBNF => 0');
21endif
22endfor
23endif
24this.darkness = {dark, time()};
25return dark;

allow_sethome

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1who = args[1];
2if (who == this.owner)
3return 1;
4elseif (who in this.residents)
5return 1;
6elseif (who.wizard)
7return 1;
8endif

_darkness

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1if (always_dark = `this.always_dark ! ANY => 0')
2return always_dark;
3endif
4if (always_dark = `area(this).always_dark ! ANY => 0')
5return always_dark;
6endif
7if (dn = `this.dark_night ! ANY')
8if ($time:day_segment() >= 5)
9return dn;
10endif
11endif

_look_self_obvious

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1{exclude} = args;
2everything = this:contents();
3hidden = {};
4for x in (everything)
5if (`x:is_hidden(player) ! E_VERBNF')
6hidden = {@hidden, x};
7endif
8endfor
9exclude = {player, @exclude, @hidden};
10return $set_utils:difference(everything, exclude);

_look_self_furniture

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1{furniture, rendered} = args;
2desc = "";
3for x in (furniture)
4if (msg = x:look_place_msg())
5desc = (desc + "  ") + msg;
6rendered = {@rendered, x};
7endif
8endfor
9desc = $su:trim(desc);
10return {desc, rendered};

_look_self_exits

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1{exits, rendered} = args;
2desc = "";
3if (player:check_pref("longexits"))
4return {"", {@rendered, @exits}};
5endif
6for x in (exits)
7if (msg = `x:look_place_msg(this) ! E_VERBNF => ""')
8desc = (desc + "  ") + msg;
9rendered = {@rendered, x};
10endif
11endfor
12if (extra = `this:extra_exit_desc(rendered) ! E_VERBNF => ""')
13desc = (extra + "  ") + desc;
14endif
15desc = $su:trim(desc);
16return {desc, rendered};

_look_self_creatures

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1{furniture, creatures, rendered} = args;
2desc = "";
3for x in (furniture)
4if (x in rendered)
5continue;
6endif
7if (msg = x:users_msg({player}))
8rendered = {@rendered, @x:integrated_objects()};
9desc = (desc + "  ") + msg;
10endif
11endfor
12creatures_left = {};
13for x in (creatures)
14if (x in rendered)
15continue;
16endif
17if (msg = `x:look_place_msg(this) ! E_VERBNF => ""')
18desc = (desc + "  ") + msg;
19rendered = {@rendered, x};
20else
21creatures_left = {@creatures_left, x};
22endif
23endfor
24"now render creatures with no :look_place_msg()";
25desc = (desc + "  ") + this:player_integration_msg(creatures_left);
26rendered = {@rendered, @creatures_left};
27desc = $su:trim(desc);
28return {desc, rendered};

_look_self_others

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1{everything, rendered} = args;
2desc = "";
3for x in (everything)
4if (is_a(x, $exit))
5continue;
6elseif (x in rendered)
7continue;
8elseif (!(msg = `x:look_place_msg(this) ! E_VERBNF => ""'))
9continue;
10endif
11desc = (desc + "  ") + msg;
12rendered = {@rendered, x};
13endfor
14desc = $su:trim(desc);
15return {desc, rendered};

tell_contents_terserun

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

Source

1{?contents = this:contents()} = args;
2new_contents = {};
3for c in (contents)
4if (is_a(c, $furniture) || is_a(c, $exit))
5continue;
6elseif (`c:look_place_msg() ! ANY')
7continue;
8endif
9new_contents = {@new_contents, c};
10endfor
11contents = new_contents;
12n = length(contents);
13if (!n)
14return;
15endif
16senses = $skills.senses:total(player);
17if (n <= (senses / 2))
18this:tell_contents(contents);
19else
20if (n == 1)
21msg = "something";
22elseif (n <= senses)
23msg = $su:english_number(n) + " things";
24elseif (n < 20)
25msg = "a bunch of things";
26elseif (n < 51)
27msg = "lots of things";
28else
29msg = "a huge pile of stuff";
30endif
31if (`player.brief ! ANY')
32player:tell("You see: ", msg, ".");
33else
34msg = strsub(this.contents_many_msg, "%t", msg);
35player:tell(msg);
36endif
37endif

_radicon

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1icon = this:_icon();
2icon = $ansi:strip(icon);
3icon = ($ansi.darkgray + icon) + $ansi.reset;
4for r in (this.biohazards)
5if (r[1] == #1324)
6icon = ($ansi.orange + $ansi:strip(icon)) + $ansi.reset;
7break;
8endif
9endfor
10for m in (this:occupants(#54998))
11icon = ($ansi.pink + "==") + $ansi.reset;
12endfor
13for m in (this:occupants($mutator))
14icon = ($ansi.brightgreen + "??") + $ansi.reset;
15endfor
16return icon;

sanitize_search_items

Spec this none thisFlags rxdOwner #361Definer #3

Referenced by

none

Source

1for p in ({"search_items", "search_items_left"})
2nsi = {};
3for si in (this.(p))
4{what, diff} = si;
5if (is_a(what, #5))
6nsi = {@nsi, si};
7endif
8endfor
9this.(p) = nsi;
10endfor
11return 1;