generic outdoor room #257

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

Aliases: generic outdoor room

5 verbs · 93 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
descriptionthis none thisrxd#2575
_room_mapthis none thisrxd#25751
_render_mapthis none thisrxd#257128
smellnone none nonerxd#25730
_darknessthis none thisrxd#25715

Properties

PropertyDefinerFlagsOwnerValue
landmark_msg#257rc#361""
who_location_msg#3rc#361<clear>
exits#3rc#361<clear>
go_fail_msg#3rc#361<clear>
outdoor#3rc#361<clear>
covers#3rc#361<clear>
covering#3rc#361<clear>
tracks#3rc#361{}
windows#3rc#361<clear>
public#3rc#3611
drop_msg#3rc#361<clear>
get_msg#3rc#361<clear>
contents_msg#3rc#361"You see %t lying on the ground."
contents_many_msg#3rc#361"On the ground you can see %t."
default_posture_msg#3rc#361<clear>
seats#3rc#36150
sitting#3rc#361{}
reclining#3rc#361{}
sit_msg#3rc#361"You sit down on the %<l:ground>."
osit_msg#3rc#361"%DN sits down on the %<l:ground>."
sit_from_reclining#3rc#361<clear>
osit_from_reclining#3rc#361<clear>
rise_msg#3rc#361"You get up off the %<l:ground>."
orise_msg#3rc#361"%DN gets up off the %<l:ground>."
icon#3rc#361"~1b[30m~1b[42m[]~1b[0m"
map#3rc#361<clear>
recent_noises#3rc#361<clear>
fall_into_msg#3rc#361"%DN hits the ground with a wet thud."
size#3rc#36120
sit_from_reclining_msg#3rc#361<clear>
osit_from_reclining_msg#3rc#361<clear>
look_sitting_and_reclining#3rc#361<clear>
look_sitting_msg#3rc#361<clear>
recline_full_msg#3rc#361<clear>
already_sitting_msg#3rc#361<clear>
already_reclining_msg#3rc#361<clear>
recline_from_sitting_msg#3rc#361<clear>
orecline_from_sitting_msg#3rc#361<clear>
recline_msg#3rc#361<clear>
orecline_msg#3rc#361<clear>
look_reclining_msg#3rc#361<clear>
sitting_doing_msg#3rc#361<clear>
reclining_doing_msg#3rc#361<clear>
rise_failed_msg#3rc#361<clear>
infect_interval#3rc#361<clear>
no_exit_msg#3rc#361<clear>
x#3rc#361<clear>
y#3rc#361<clear>
z#3rc#361<clear>
residents#3rc#361<clear>
sit_full_msg#3rc#361<clear>
value#3rc#361<clear>
rustle_msg#3rc#361<clear>
last_rustle#3rc#361<clear>
thing_fall_into_msg#3rc#361<clear>
decal_fall_into_msg#3rc#361<clear>
client_icon#3rc#361"ab"
client_map#3rc#361<clear>
track_msg#3rc#361<clear>
watched#3rc#3610
max_objects#3rc#361<clear>
show_map#3rc#361<clear>
objects_to_echo#3rc#361<clear>
always_brief#3rc#361<clear>
furniture#3rc#361{}
fall_into_noise#3rc#361<clear>
ambience#3rc#361<clear>
temperature#3rc#36165
last_temp_update#3rc#3611251248004
continue_look_self_msg#3rc#361<clear>
map_restricted#3rc#361<clear>
global_xyz#3rc#361<clear>
common_name_msg#3rc#361<clear>
verb_subs#3rc#361<clear>
darkness#3rc#361{0, 1292152565}
total_dark_description_msg#3rc#361<clear>
has_commands#3rc#3610
too_dark_msg#3rc#361<clear>
next_room_to_global_origin#3rc#361<clear>
global_xyz_anchor#3r#361<clear>
search_items#3rc#361<clear>
search_items_left#3rc#361<clear>
already_searched#3rc#361<clear>
aliases#1rc#361{"generic outdoor room"}
description#1rc#361<clear>
object_size#1r#29{8315, 1298433815}
hidden_verbs#1rc#361<clear>
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): #3 generic room#1 root

Children: none

Call graph

calls n257_0 #257:description n3_35 #3:description n257_0->n3_35 n257_1 #257:_room_map n3_89 #3:_room_map n257_1->n3_89 n1_33 #1:area n257_1->n1_33 n3_87 #3:_blank_map n257_1->n3_87 n257_2 #257:_render_map n257_2->n257_1 n257_2->n1_33 n257_2->n3_87 n3_88 #3:_render_map n257_2->n3_88 n45_2 #45:has_verb n257_2->n45_2 n257_3 #257:smell n257_3->n1_33 n257_3->n45_2 n1_42 #1:occupants n257_3->n1_42 n47_57 #47:as_list n257_3->n47_57 n45_0 #45:has_property n257_3->n45_0 n20_81 #20:msg n257_3->n20_81 n107_43 #107:tell n257_3->n107_43 n20_6 #20:english_list n257_3->n20_6 n257_4 #257:_darkness n3_152 #3:_darkness n257_4->n3_152 n112_3 #112:day_segment n257_4->n112_3 n112_13 #112:moon_phase n257_4->n112_13

Source

description

Spec this none thisFlags rxdOwner #361Definer #257

Referenced by

none

Source

1d = pass(@args);
2if (this.landmark_msg)
3d = {@d, this.landmark_msg};
4endif
5return d;

_room_map

Spec this none thisFlags rxdOwner #361Definer #257

Referenced by

Source

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

_render_map

Spec this none thisFlags rxdOwner #29Definer #257

Referenced by

none

Source

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

smell

Spec none none noneFlags rxdOwner #361Definer #257

Referenced by

none

Source

1"Copied from generic necropolis outdoor room (#34129):smell by Necanthrope (#142) Tue Nov  3 15:58:08 2009 CST";
2silent = args ? 1 | 0;
3ss = {};
4for x in ({@this:occupants($gas), @this:occupants($liquid)})
5if (m = x.smell_msg)
6ss = setadd(ss, m);
7endif
8endfor
9if (roomsmell = `this.smell_msg ! E_PROPNF => ""')
10ss = {@ss, @$lu:as_list(roomsmell)};
11endif
12for x in (this.contents)
13if ($ou:has_verb(x, "room_smell_msg"))
14if (smell = x:room_smell_msg())
15ss = {@ss, smell};
16endif
17elseif ($ou:has_prop(x, "room_smell_msg") && x.room_smell_msg)
18ss = {@ss, x.room_smell_msg};
19endif
20endfor
21ss_prefix = "You ";
22if (is_a(this:area().weather, $weather) && ($su:msg(this:area().weather.smell_msg) != ""))
23player:tell("You sniff the air...  ", $su:msg(this:area().weather.smell_msg));
24ss_prefix = "Other than that, you ";
25endif
26if (ss)
27player:tell(ss_prefix, "smell ", $su:english_list(ss), ".");
28elseif (!silent)
29player:tell(ss_prefix, "don't smell anything out of the ordinary.");
30endif

_darkness

Spec this none thisFlags rxdOwner #361Definer #257

Referenced by

none

Source

1dark = pass(@args);
2if (this.outdoor && (!dark))
3dark = `area(this).dark_night ! ANY => 0';
4if (dark && ($time:day_segment() < 5))
5dark = 0;
6endif
7if (dark)
8moon_phase = $time:moon_phase();
9"if (area(this).weather.see_through && ((moon_phase < 10) || (moon_phase > 20)))";
10if ((moon_phase < 10) || (moon_phase > 20))
11dark = min(1, dark);
12endif
13endif
14endif
15return dark;