generic area #114

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

Aliases: generic area

60 verbs · 58 properties · 3 children

Verbs

VerbSpecFlagsDefinerLines
acceptthis none thisrxd#1149
find_all_pathsthis none thisrxd#11426
add_stub_roomthis none thisrxd#1145
time_msgthis none thisrxd#1141
time_windows_msgthis none thisrxd#11411
do_resetthis none thisrxd#11444
@force-reset @resetthis none nonerxd#11433
on_resetthis none thisrxd#11456
powerplantthis none thisrxd#1141
announce_allthis none thisrxd#1147
initializethis none thisrxd#1144
recyclethis none thisrxd#1142
calculate_offsetthis none thisrxd#11465
find_reset_listenersthis none thisrxd#11423
weather_msgthis none thisrxd#1141
change_weatherthis none thisrxd#11437
announce_all_playersthis none thisrxd#1143
heartbeatthis none thisrxd#1141
weather_announcethis none thisrxd#1147
@weather-compile @compile-weather @cw @wcthis none nonerxd#11415
weatherthis none thisrxd#1144
find_transitionsthis none thisrx#11434
next_area_tothis none thisrxd#11419
random_roomthis none thisrxd#11410
areathis none thisrxd#1141
tree_tagthis none thisrxd#1141
creature_enterfuncthis none thisrxd#11412
creature_exitfuncthis none thisrxd#1144
dnamethis none thisrxd#1145
dnamecthis none thisrxd#1145
hibernatethis none thisrxd#11422
unhibernatethis none thisrxd#11416
_wwwthis none thisrxd#11450
reset_mapthis none thisrxd#1145
who_namethis none thisrxd#1141
_allowsthis none thisrxd#1147
spy_reportthis none thisrxd#11416
path_okthis none thisrxd#1141
next_hop_overridethis none thisrxd#1143
next_hop_outthis none thisrxd#11429
look_selfthis none thisrxd#1142
enterfuncthis none thisrxd#1146
@list-coststhis none nonerxd#11410
room_addedthis none thisrxd#1144
exitfuncthis none thisrxd#1146
room_removedthis none thisrxd#1144
store_sorted_rooms_by_zthis none thisrxd#11410
ambiencethis none thisrxd#1144
random_npcthis none thisrxd#11418
chownthis none thisrxd#11411
offset_shiftthis none thisrxd#1147
announce_low_skythis none thisrxd#11422
may_chatthis none thisrxd#1142
random_groundthis none thisrxd#11412
tellthis none thisrxd#1149
junk_okthis none thisrxd#1144
ok_to_pickthis none thisrxd#1141
make_public make_privatethis none thisrxd#1149
indoor_darknessthis none thisrxd#1140
path_betweenthis none thisrxd#11461

Properties

PropertyDefinerFlagsOwnerValue
adjacent_areas#114rc#361{}
reset_listeners#114rc#361{}
recalc_paths_on_reset#114rc#3611
generic_citizen#114rc#361#-1
citizen_population#114rc#3610
thirst_modifier#114rc#3610.5
powerplant#114rc#361#-1
blank_icon#114rc#361" "
combat_ok#114rc#3611
combat_fail_msg#114rc#361"You get the impression you shouldn't be doing that here."
contiguous_map#114rc#361{}
icon#114rc#361"~1b[41m~1b[37m~1b[1m<>~1b[0m"
heart#114rc#3610
heart_tick#114rc#3610
reset_interval#114rc#36120
last_reset#114rc#3610
contiguous_map_offsets#114rc#361{}
area_link_icons#114r#361{}
icon_blocks#114rc#361{}
adjacent_area_rooms#114rc#361{}
value#114rc#3610
has_proper_name#114rc#3610
client_blank_icon#114rc#361"aa"
client_bg_icon#114rc#361"ae"
default_exit_type#114rc#361#55
gee#114rc#3611.0
may_chat#114rc#3611
players#114rc#361{}
dont_hibernate#114rc#3610
linkable#114rc#3611
_allow_combat#114rc#3611
bigmap#114rc#361#-1
next_hop_ok#114rc#3611
maproom#114rc#361#-1
area_code#114rwc#361-1
claimed_by#114rc#361#-1
claimable#114rc#3610
multiland#114rc#3610
z_sorted_rooms#114rc#361{}
admin_ok#114rc#3610
show_time#114rc#3611
knockout_ok#114rc#3611
dark_night#114rc#3611
path_link_ok#114rc#3611
auto_clean#114rc#3610
docks#114rc#361{}
wall_msg#114rc#361"a wall"
hibernating#114rc#3610
aliases#1rc#361{"generic area"}
description#1rc#361<clear>
object_size#1r#29{50069, 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): #1 root

Children: #273 generic real area, #334 generic blueprint, #340 generic ethereal area

Call graph

calls n114_1 #114:find_all_paths n107_43 #107:tell n114_1->n107_43 n1_42 #1:occupants n114_1->n1_42 n48_8 #48:suspend_if_needed n114_1->n48_8 n20_59 #20:name_and_number n114_1->n20_59 n114_2 #114:add_stub_room n114_2->n1_42 n114_4 #114:time_windows_msg n112_3 #112:day_segment n114_4->n112_3 n114_5 #114:do_reset n114_5->n1_42 n114_5->n48_8 n114_5->n20_59 n45_2 #45:has_verb n114_5->n45_2 n103_24 #103:report_error n114_5->n103_24 n114_7 #114:on_reset n114_5->n114_7 n1_53 #1:region n114_5->n1_53 n114_7->n48_8 n114_7->n20_59 n114_0 #114:accept n114_7->n114_0 n47_25 #47:randomly_permute n114_7->n47_25 n114_31 #114:unhibernate n114_7->n114_31 n114_30 #114:hibernate n114_7->n114_30 n114_6 #114:@force-reset n114_6->n114_1 n114_6->n107_43 n114_6->n20_59 n114_6->n114_5 n114_21 #114:find_transitions n114_6->n114_21 n114_12 #114:calculate_offset n114_6->n114_12 n114_13 #114:find_reset_listeners n114_6->n114_13 n114_46 #114:store_sorted_rooms_by_z n114_6->n114_46 n114_33 #114:reset_map n114_6->n114_33 n114_21->n107_43 n114_21->n1_42 n114_21->n48_8 n114_21->n1_53 n57_2 #57:_create n114_21->n57_2 n114_12->n107_43 n114_12->n1_42 n114_12->n48_8 n114_12->n20_59 n114_13->n107_43 n114_13->n1_42 n114_13->n48_8 n114_13->n20_59 n114_13->n45_2 n114_46->n48_8 n114_33->n1_42 n114_33->n48_8 n114_31->n1_42 n114_31->n48_8 n114_30->n1_42 n150_2 #150:unregister n114_30->n150_2 n114_9 #114:announce_all n114_9->n48_8 n114_10 #114:initialize n150_11 #150:register_long n114_10->n150_11 n1_0 #1:initialize n114_10->n1_0 n114_11 #114:recycle n150_12 #150:unregister_long n114_11->n150_12 n1_1 #1:recycle n114_11->n1_1 n114_14 #114:weather_msg n114_20 #114:weather n114_14->n114_20 n114_15 #114:change_weather n114_15->n114_20 n114_19 #114:@weather-compile n114_19->n107_43 n20_38 #20:explode n114_19->n20_38 n20_17 #20:match n114_19->n20_17 n45_23 #45:leaves n114_19->n45_23 n114_22 #114:next_area_to n57_9 #57:valid n114_22->n57_9 n114_23 #114:random_room n114_23->n1_42 n114_23->n47_25 n114_28 #114:dname n20_121 #20:capitalize_words n114_28->n20_121 n1_31 #1:dname n114_28->n1_31 n114_29 #114:dnamec n20_15 #20:capitalize n114_29->n20_15 n1_39 #1:dnamec n114_29->n1_39

Showing 48 of 87 verbs; 39 not shown.

Source

accept

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

Source

1if (is_a(args[1], $room))
2return 1;
3elseif (is_a(args[1], $subarea))
4return 1;
5elseif (is_a(args[1], $prog))
6return 1;
7else
8return 0;
9endif

find_all_paths

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

Source

1":find_all_paths()";
2"Recalculate .next_hops on all rooms in the area.  Obviously, this may be very tick-intensive.";
3old_adj = this.adjacent_areas;
4oareas = {};
5player.programmer && player:tell((($ansi.bold_on + $ansi.yellow) + "Tracing internal paths...") + $ansi.reset);
6total = 0;
7for x in (this:occupants($room))
8if (a = x:recalc_next_hops())
9for y in (a)
10oareas = setadd(oareas, y);
11endfor
12endif
13tl = ticks_left();
14if ($command_utils:suspend_if_needed(2))
15total = total + (100000 - tl);
16endif
17endfor
18this.adjacent_areas = oareas;
19if (player.programmer)
20change = $set_utils:difference(oareas, old_adj);
21if (change)
22for x in (change)
23player:tell($ansi.bold_on + $ansi.yellow, "WARNING: Link change in area ", $su:nn(x), ".  You should probably @force-reset ", x, "." + $ansi.reset);
24endfor
25endif
26endif

add_stub_room

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1":add_stub_room(OBJ room, OBJ from)";
2"Add room to everyone's next_hops, as a stub from 'from'.";
3for x in (this:occupants($room))
4x:add_stub_room(@args);
5endfor

time_msg

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1return "";

time_windows_msg

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1"Return a random message appropriate to the time, for window rooms.";
2d = $time.day_segments[$time:day_segment()];
3if (m = this.(d + "_windows_msg"))
4if (typeof(m) == STR)
5return m;
6else
7return m[random(length(m))];
8endif
9else
10return "";
11endif

do_reset

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

Source

1fork (0)
2new_listeners = {};
3for x in (this.reset_listeners)
4if ($ou:has_verb(x, "on_reset"))
5try
6x:on_reset();
7except e (ANY)
8$rpg:report_error(e, tostr("from area ", $su:nn(this)), $nets.heartnet);
9endtry
10$command_utils:suspend_if_needed(1);
11new_listeners = {@new_listeners, x};
12endif
13endfor
14this.reset_listeners = new_listeners;
15endfork
16this:on_reset();
17$cu:sin();
18auto_clean = (this.auto_clean && this.owner.programmer) && (this:region() == $earth);
19if (auto_clean && (random(10) < 4))
20for x in (this:occupants($room))
21$cu:sin(1);
22`x:auto_clean() ! ANY';
23x.tracks = {};
24endfor
25endif
26"if (random(100) <= this.weather_change_chance)";
27"  this:change_weather();";
28"endif";
29"if (random(5000) <= this.quake_chance)";
30"  strength = random(5);";
31"  if (random(100) <= this.quake_chance)";
32"    strength = strength + random(4);";
33"  endif";
34"  fork (5)";
35"    this:earthquake(strength);";
36"  endfork";
37"endif";
38"if (this.invasions && (!is_a(this.invasion, $invasion)))";
39"  if (random(100) <= this.invasion_chance)";
40"    invasion = this.invasions[random(length(this.invasions))];";
41"    invasion = $rpg:spawn(invasion);";
42"    this.invasion = invasion;";
43"  endif";
44"endif";

@force-reset @reset

Spec this none noneFlags rxdOwner #361Definer #114

Referenced by

none

Source

1if (player.programmer != 1)
2player:tell("I don't understand that.");
3return;
4endif
5player:tell("");
6player:tell($ansi.bold_on + "Compiling area ", $su:nn(this), "..." + $ansi.reset);
7this:find_all_paths();
8suspend(2);
9this:find_transitions();
10suspend(1);
11this:calculate_offset();
12suspend(1);
13this:find_reset_listeners();
14suspend(1);
15if (!is_a(this.bigmap, $bigmap))
16player:tell($ansi.yellow + $ansi.bold_on, "Storing a cache of z sorted rooms...", $ansi.reset);
17this:store_sorted_rooms_by_z();
18suspend(1);
19endif
20"player:tell($ansi.yellow + $ansi.bold_on, \"Rewriting landmark_msg on outdoors...\", $ansi.reset);";
21"this:write_landmarks();";
22suspend(1);
23if (is_a(this.bigmap, $bigmap))
24player:tell($ansi.yellow + $ansi.bold_on, ("WARNING: This area is part of a $bigmap so I will not redraw radars. Do @reset-maps " + tostr(this.bigmap)) + " to reset it.", $ansi.reset);
25else
26player:tell($ansi.yellow + $ansi.bold_on, "Forcing redraw of all radars...", $ansi.reset);
27this:reset_map();
28suspend(1);
29endif
30player:tell($ansi.bold_on + $ansi.yellow, "Resetting the area...", $ansi.reset);
31this:do_reset();
32player:tell($ansi.bold_on + "Done compiling ", $su:nn(this), "." + $ansi.reset);
33player:tell("");

on_reset

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

Source

1if (valid(this.generic_citizen))
2citizens = 0;
3for x in (children(this.generic_citizen))
4$cu:sin(1);
5if (x:area() == this)
6citizens = citizens + 1;
7endif
8endfor
9while (citizens < this:citizen_population())
10this:spawn_citizen();
11citizens = citizens + 1;
12$cu:sin(1);
13endwhile
14endif
15nl = {};
16"for x in (this.landmarks)";
17"  if (x:area() == this)";
18"    nl = setadd(nl, x);";
19"  endif";
20"endfor";
21"this.landmarks = nl;";
22for x in (this.contents)
23if (!this:accept(x))
24move(x, $tomb);
25$nets.heartnet:announce(this, tostr($su:nn(x), " was in ", $su:nn(this)), 1);
26continue;
27endif
28if (is_a(x, $room))
29si = $lu:randomly_permute(x.search_items);
30smax = `x.max_search_items ! ANY => 4';
31if (length(si) > smax)
32si = si[1..smax];
33endif
34x.search_items_left = si;
35x.already_searched = {};
36for y in (x:occupants($decal))
37y:hear_event_move(0);
38endfor
39endif
40$cu:sin(1);
41endfor
42np = {};
43for x in (this.players)
44$cu:sin();
45if (is_player(x) && (x:area() == this))
46np = {@np, x};
47endif
48endfor
49this.players = np;
50if (this.players && this.hibernating)
51this:unhibernate();
52elseif (((!this.players) && (!this.hibernating)) && (!this.dont_hibernate))
53this:hibernate();
54elseif (this.hibernating && this.dont_hibernate)
55this:unhibernate();
56endif

powerplant

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1return this.powerplant;

announce_all

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1return;
2fork (0)
3for x in (this.contents)
4x:announce_all(@args);
5$cu:sin(0);
6endfor
7endfork

initialize

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1if (this.reset_interval)
2$heart:register_long(this);
3endif
4return pass(@args);

recycle

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1$heart:unregister_long(this);
2return pass(@args);

calculate_offset

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

Source

1player:tell(($ansi.bold_on + $ansi.yellow) + "Computing border area map offsets...", $ansi.reset);
2offsets = {};
3for x in (this.contiguous_map)
4offsets = {@offsets, {0, 0, 0}};
5endfor
6alinks = {};
7for room in (this:occupants($room))
8for ex in (room.exits)
9if (((!is_a(ex, $exit)) || (!valid(ex.otherside))) || (!is_a(ex.otherside.location, $room)))
10player:tell("BROKEN EXIT: ", $su:nn(ex), ".  Aborted.");
11return;
12endif
13a = #-1;
14if (valid(ex.otherside) && (i = (a = ex.otherside.location:area()) in this.contiguous_map))
15minex = ex.location.x;
16miney = ex.location.y;
17minez = ex.location.z;
18if (ex.direction in {"north", "northeast", "northwest"})
19miney = miney - 1;
20elseif (ex.direction in {"south", "southeast", "southwest"})
21miney = miney + 1;
22endif
23if (ex.direction in {"east", "southeast", "northeast"})
24minex = minex + 1;
25elseif (ex.direction in {"west", "southwest", "northwest"})
26minex = minex - 1;
27elseif (ex.direction == "up")
28minez = minez - 1;
29elseif (ex.direction == "down")
30minez = minez + 1;
31endif
32ol = ex.otherside.location;
33offx = minex - ol.x;
34offy = miney - ol.y;
35offz = minez - ol.z;
36offsets[i] = {offx, offy, offz};
37endif
38if ((valid(a) && (a != this)) && `a.linkable ! ANY => 0')
39if (!`ex.linkable ! ANY => 1')
40continue;
41endif
42oax = ex.location.x;
43oay = ex.location.y;
44oaz = ex.location.z;
45if (ex.direction in {"east", "southeast", "northeast"})
46oax = oax + 1;
47elseif (ex.direction in {"west", "southwest", "northwest"})
48oax = oax - 1;
49endif
50if (ex.direction in {"north", "northwest", "northeast"})
51oay = oay - 1;
52elseif (ex.direction in {"south", "southwest", "southeast"})
53oay = oay + 1;
54elseif (ex.direction == "up")
55oaz = oaz - 1;
56elseif (ex.direction == "down")
57oaz = oaz + 1;
58endif
59alinks = {@alinks, {a, oax, oay, oaz}};
60endif
61endfor
62$cu:sin(1);
63endfor
64this.area_link_icons = alinks;
65return this.contiguous_map_offsets = offsets;

find_reset_listeners

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

Source

1player:tell($ansi.yellow + $ansi.bold_on, "Finding reset objects...", $ansi.reset);
2rl = {};
3door = 0;
4for x in (this:occupants($room))
5for y in ({x, @x.contents})
6$cu:sin();
7if ($ou:has_verb(y, "on_reset"))
8if (`y:should_reset(this) ! E_VERBNF => 1')
9if (!is_a(y, $door))
10player:tell("  Found ", $su:nn(y), " at ", y.location.name, ".");
11else
12door = door + 1;
13endif
14rl = {@rl, y};
15endif
16endif
17endfor
18$cu:sin(0);
19endfor
20if (door)
21player:tell("  Found ", door, " door", (door == 1) ? "" | "s", ".");
22endif
23this.reset_listeners = rl;

weather_msg

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1return `this:weather():look_place_msg() ! ANY => ""';

change_weather

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1if (this.weather_master != #-1)
2return;
3endif
4ow = this:weather();
5pw = {};
6found = 0;
7if (!args)
8if (!this.weather_tree)
9return;
10endif
11nw = ow;
12for x in (this.weather_tree)
13if (x[1] == this.weather)
14if (length(x) == 1)
15"doesn't ever change!";
16return;
17endif
18nw = x[2..$];
19nw = nw[random(length(nw))];
20found = 1;
21endif
22pw = {@pw, x[1]};
23endfor
24if (!found)
25nw = pw[random(length(pw))];
26endif
27else
28nw = args[1];
29endif
30m = `nw.("change_from_" + ow.name) ! ANY => 0' || `ow.("change_to_" + nw.name) ! ANY => 0';
31for x in ({this, @this.weather_slaves})
32if (m)
33x:weather_announce(m);
34endif
35x.weather = nw;
36endfor
37this.weather = nw;

announce_all_players

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1for x in (this.players)
2x:tell(@args);
3endfor

heartbeat

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1

weather_announce

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1fork (0)
2for x in (this.players)
3if (is_a(x.location, $room) && x.location.outdoor)
4x:tell(@args);
5endif
6endfor
7endfork

@weather-compile @compile-weather @cw @wc

Spec this none noneFlags rxdOwner #361Definer #114

Referenced by

none

Source

1wt = {};
2for line in (this.weather_tree_msg)
3wl = {};
4for x in ($su:explode(line, ","))
5w = $su:match(x, $ou:leaves($weather), "name");
6if (!valid(w))
7player:tell("ERROR: no such weather as '", x, "'.  Aborted.");
8return;
9endif
10wl = {@wl, w};
11endfor
12wt = {@wt, wl};
13endfor
14this.weather_tree = wt;
15player:tell("Compiled!");

weather

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

Source

1if (is_a(w = this.weather_master, $area))
2return w:weather();
3endif
4return this.weather;

find_transitions

Spec this none thisFlags rxOwner #361Definer #114

Referenced by

Source

1player:tell($ansi.bold_on + $ansi.yellow, "Locating area transition rooms...", $ansi.reset);
2ar = {};
3na = {};
4for x in (this.adjacent_areas)
5if (is_a(x, $area) && (!is_a(x, #376063)))
6ar = {@ar, #-1};
7na = {@na, x};
8endif
9endfor
10this.adjacent_areas = na;
11for x in (this:occupants($room))
12for exit in (x.exits)
13if (exit.next_hop_ok && (!`exit.not_interconnect ! ANY'))
14if ((e2 = exit.otherside:area()) != this)
15if (i = e2 in this.adjacent_areas)
16ar[i] = x;
17endif
18endif
19endif
20endfor
21$cu:sin(0);
22endfor
23this.adjacent_area_rooms = ar;
24if (valid(this:region().map_area))
25if (is_a(this.maproom, $room))
26this.maproom:setup();
27else
28maproom = $recycler:_create(#111089);
29this.maproom = maproom;
30maproom.area = this;
31maproom:moveto(this:region().map_area);
32maproom:setup();
33endif
34endif

next_area_to

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

Source

1da = args[1];
2if (da == this)
3return #-1;
4elseif (da in this.adjacent_areas)
5return da;
6elseif (length(this.adjacent_areas) == 1)
7return this.adjacent_areas[1];
8elseif (!this.adjacent_areas)
9return #-1;
10else
11if (((!$recycler:valid(this.maproom)) || (!$recycler:valid(da))) || (!$recycler:valid(da.maproom)))
12return #-1;
13endif
14maproom = this.maproom:next_hop_to(da.maproom);
15if (valid(maproom))
16return maproom.dest_area;
17endif
18endif
19return #-1;

random_room

Spec this none thisFlags rxdOwner #29Definer #114

Referenced by

none

Source

1"Select a random room from this area.";
2"Optional argument: type of room to be selected.";
3roomtype = args ? args[1] | $room;
4rooms = this:occupants(roomtype);
5if (rooms)
6rooms = $lu:randomly_permute(rooms);
7return rooms[1];
8else
9return #-1;
10endif

area

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1return this;

tree_tag

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1return this.blank_icon;

creature_enterfunc

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

Source

1":creature_enterfunc(OBJ who, OBJ from-area)";
2"Do something if a creature enters the area.";
3who = args[1];
4if (is_player(who))
5this.players = setadd(this.players, who);
6"if ((!valid(this.travel_quest)) && this.make_travel_quest)";
7"  this:make_travel_quest();";
8"endif";
9"if (valid(this.travel_quest))";
10"  this.travel_quest:award_to(who);";
11"endif";
12endif

creature_exitfunc

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1who = args[1];
2if (is_player(who))
3this.players = setremove(this.players, who);
4endif

dname

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

Source

1if (this.has_proper_name)
2return $su:capitalize_words(this.name);
3else
4return pass(@args);
5endif

dnamec

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1if (this.has_proper_name)
2return $su:capitalize(this.name);
3else
4return pass(@args);
5endif

hibernate

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

Source

1this.hibernating = 1;
2total = 0;
3for x in (this:occupants($room))
4for y in (x:occupants($npc))
5if (((!y.dont_hibernate) && y.heart) && (!y.f))
6$heart:unregister(y);
7y:cancel_current_action();
8y:clear_queue();
9y.fighting = {};
10if (task_valid(y.process_queue))
11kill_task(y.process_queue);
12endif
13total = total + 1;
14yield;
15endif
16endfor
17endfor
18if (total)
19$nets.gamenet:announce(#-1, ((this.name + " hibernating (") + tostr(total)) + " NPCs sleeping).", 1);
20else
21$nets.gamenet:announce(#-1, this.name + " hibernating.", 1);
22endif

unhibernate

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

Source

1this.hibernating = 0;
2total = 0;
3for x in (this:occupants($room))
4for y in (x:occupants($npc))
5if ((!y.heart) && (!y.f))
6$heart:register(y);
7total = total + 1;
8$cu:sin(0);
9endif
10endfor
11endfor
12if (total)
13$nets.gamenet:announce(#-1, ((this.name + " waking up (") + tostr(total)) + " NPCs awakened).", 1);
14else
15$nets.gamenet:announce(#-1, this.name + " waking up.", 1);
16endif

_www

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1text = {((("<HTML><head><title>" + $network.MOO_name) + ": ") + $su:nn(this)) + "</title></head>"};
2text = {@text, "<body bgcolor=\"#000000\" text=\"#22cc22\">"};
3text = {@text, ("<h2>" + $su:capitalize($su:nn(this))) + "</h2>"};
4text = {@text, this:description()};
5text = {@text, "<hr>"};
6max_x = -999;
7max_y = -999;
8min_x = 999;
9min_y = 999;
10for room in (this:occupants($room))
11$cu:sin();
12if (room.z == 0)
13if (room.x > max_x)
14max_x = room.x;
15endif
16if (room.x < min_x)
17min_x = room.x;
18endif
19if (room.y > max_y)
20max_y = room.y;
21endif
22if (room.y < min_y)
23min_y = room.y;
24endif
25endif
26endfor
27min_diff = 9999;
28x_size = abs(max_x - min_x) + 1;
29y_size = abs(max_y - min_y) + 1;
30x_cent = min_x + tonum(tofloat(x_size) / 2.0);
31y_cent = min_y + tonum(tofloat(y_size) / 2.0);
32for room in (this.contents)
33$cu:sin();
34if (is_a(room, $room))
35if (room.z == 0)
36x_diff = abs(room.x - x_cent);
37y_diff = abs(room.y - y_cent);
38if ((x_diff + y_diff) < min_diff)
39min_diff = x_diff + y_diff;
40firstroom = room;
41endif
42endif
43endif
44endfor
45x_size = x_size + min_diff;
46y_size = y_size + min_diff;
47map_www = $rpg:draw_map_www(firstroom, x_size, y_size);
48text = {@text, @map_www};
49text = {@text, "</body></html>"};
50return text;

reset_map

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

Source

1for x in (this:occupants($room))
2x.map = {};
3x:draw_map();
4$cu:sin(0);
5endfor

who_name

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1return $ansi:strip(this.name);

_allows

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1if (!(args[1] in $rpg.allowable_area_settings))
2raise(E_PROPNF);
3endif
4if (valid(this:region()) && (!this:region():_allows(args[1])))
5return 0;
6endif
7return `this.("_allow_" + args[1]) ! E_PROPNF => 0';

spy_report

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1players = {};
2animals = {};
3loot = {};
4bodies = {};
5for room in (this:contents())
6$cu:sin(0);
7if ((!is_a(room, $room)) || is_a(room, this.depositbox))
8continue;
9endif
10{rplayers, ranimals, rloot, rbodies} = room:spy_report();
11players = {@players, @rplayers};
12animals = {@animals, @ranimals};
13loot = {@loot, @rloot};
14bodies = {@bodies, @rbodies};
15endfor
16return {players, animals, loot, bodies};

path_ok

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1return this.next_hop_ok;

next_hop_override

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1":next_hop_override(OBJ sourceroom, OBJ dest) => Do we want to override a next_hop_to headed for us from sourceroom?";
2"If so, return back a room to walk toward instead of dest.";
3return #-1;

next_hop_out

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1":next_hop_out(OBJ area) => What room should we head for, to get to area targetarea?";
2targetarea = args[1];
3from = args[2];
4room = #-1;
5if (!is_a(targetarea, $area))
6#98:tell("ERROR!  ", $su:nn(targetarea), " not area");
7endif
8if (!this.adjacent_areas)
9return #-1;
10endif
11if (i = targetarea in this.adjacent_areas)
12room = this.adjacent_area_rooms[i];
13else
14if (valid(targetarea = this:next_area_to(targetarea)))
15room = this.adjacent_area_rooms[targetarea in this.adjacent_areas];
16endif
17endif
18if (valid(room))
19if (room != from)
20return room;
21else
22for exit in (room.exits)
23if (valid(exit.otherside) && (exit.otherside:area() == targetarea))
24return exit;
25endif
26endfor
27endif
28endif
29return #-1;

look_self

Spec this none thisFlags rxdOwner #29Definer #114

Referenced by

none

Source

1"Copied from generic maze area (#15767):look_self by Necanthrope (#142) Tue Sep 11 15:26:09 2007 CDT";
2player:tell_lines($rpg:draw_map(this.contents[1], 40, 20));

enterfunc

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1what = args[1];
2if (is_a(what, $creature))
3what:moveto(this.contents[1]);
4elseif (is_a(what, $room))
5this:room_added(what);
6endif

@list-costs

Spec this none noneFlags rxdOwner #361Definer #114

Referenced by

none

Source

1total = 0;
2for thing in ($lu:sort_alist($blueprint:_itemize_costs(this), 2))
3$cu:sin(1);
4if (thing[2] <= 0)
5continue;
6endif
7total = total + thing[2];
8player:tell($su:left($su:nn(thing[1]), -50), " ", $ansi.green, "$", $su:right($su:group_number(thing[2]), -15), $ansi.reset);
9endfor
10player:tell($ansi.bold_on, $su:left("  Total:", -50), " ", $ansi.green, "$", $su:right($su:group_number(total), -15), $ansi.reset);

room_added

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

Source

1room = args[1];
2if ($ou:has_property(room, "airstrip"))
3this.airstrips = setadd(this.airstrips, room);
4endif

exitfunc

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1what = args[1];
2if (is_a(what, $room))
3this:room_removed(what);
4endif
5"there is no :exitfunc above $area, this would raise E_VERBNF";
6"return pass(@args);";

room_removed

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

Source

1room = args[1];
2if (room in this.airstrips)
3this.airstrips = setremove(this.airstrips, room);
4endif

store_sorted_rooms_by_z

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

Source

1if (!is_a(this.bigmap, $bigmap))
2rooms = this:occupants_suspended($room);
3heights = {};
4for height in (rooms)
5heights = listappend(heights, height.z * -1);
6$cu:sin(1);
7endfor
8rooms = $lu:sort(rooms, heights);
9this.z_sorted_rooms = rooms;
10endif

ambience

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1where = args[1];
2who = args[2];
3m = $su:msg(this.weather.ambience_msg);
4who:tell(m);

random_npc

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1if (valid(cit = this.generic_citizen))
2while kids (children(cit))
3cit = kids[random($)];
4if (!cit.f)
5return cit;
6endif
7endwhile
8endif
9rooms = this.contents;
10while (rooms)
11room = rooms[i = random($)];
12if (npcs = room:occupants($npc))
13return npcs[random($)];
14endif
15rooms[i..i] = {};
16yield;
17endwhile
18return $ou:leaves(#750)[random($)];

chown

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1set_task_perms(caller_perms());
2who = args[1];
3for x in (this.contents)
4$wiz_utils:set_owner(x, who);
5for y in (`x.exits ! ANY => {}')
6$wiz_utils:set_owner(y, who);
7$cu:sin();
8endfor
9$cu:sin();
10endfor
11return $wiz_utils:set_owner(this, who);

offset_shift

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1{xs, ys, zs} = args;
2for x in (this.contents)
3x.x = x.x + xs;
4x.y = x.y + ys;
5x.z = x.z + zs;
6endfor
7player:tell("Done.");

announce_low_sky

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1text = args[1];
2source = args[2];
3radius = args[3];
4at_source = (length(args) > 3) ? args[4] | 1;
5fork (0)
6for x in (this.contents)
7if (is_a(x, $room) && x.outdoor)
8if (x == source)
9at_source && x:announce_all("Overhead, you see ", text, ".");
10else
11adx = abs(source.x - x.x);
12ady = abs(source.y - x.y);
13dist = `$math_utils:sqrt((adx * adx) + (ady * ady)) ! ANY => 0';
14if (dist <= radius)
15dir = $rpg:describe_coord_dir(x, source);
16x:announce_all("In the sky to the ", dir, ", you see ", text, ".");
17endif
18endif
19endif
20$cu:sin(1);
21endfor
22endfork

may_chat

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1{?who = player} = args;
2return is_a(who, $immortal) || this.may_chat;

random_ground

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1p = {};
2for x in (this.contents)
3$cu:sin();
4if ((x.outdoor && x.public) && (x.exits != {}))
5p = setadd(p, x);
6endif
7endfor
8if (p)
9return p[random(length(p))];
10else
11return #-1;
12endif

tell

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1if (this.listening)
2for x in (this.contents)
3if (is_a(x, $room))
4x:announce_all(@args);
5endif
6endfor
7else
8pass(@args);
9endif

junk_ok

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1if (has_callable_verb(this, "uninstantiate"))
2return 1;
3endif
4return 0;

ok_to_pick

Spec this none thisFlags rxdOwner #29Definer #114

Referenced by

none

Source

1return E_NONE;

make_public make_private

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1for x in (this:occupants($room))
2if (verb[6..$] == "public")
3x.grind_ok = 1;
4x.public = 1;
5else
6x.grind_ok = 0;
7x.public = 0;
8endif
9endfor

indoor_darkness

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

No program (verb defined but unprogrammed).

path_between

Spec this none thisFlags rxdOwner #361Definer #114

Referenced by

none

Source

1":path_between(OBJ start, OBJ end[, LIST legal_rooms]) => Generate a path using the given legal rooms.";
2{end, start, ?legal_rooms = {}, ?suspend = 0} = args;
3round = 0;
4last_round = {start};
5marks = [];
6marks[start] = -1;
7found = 0;
8while (!found)
9if (!last_round)
10return {};
11endif
12pool = last_round;
13last_round = {};
14for x in (pool)
15for exit in (x.exits)
16if (is_a(exit.otherside, $exit) && is_a(exit.otherside.location, $room))
17oside = exit.otherside.location;
18if (oside == end)
19found = 1;
20elseif ((!legal_rooms) || (oside in legal_rooms))
21if ((!(oside in keys(marks))) && (!(oside in last_round)))
22marks[oside] = round;
23last_round = {@last_round, oside};
24endif
25endif
26endif
27if (suspend)
28yield;
29endif
30endfor
31endfor
32round = round + 1;
33endwhile
34cursor = end;
35path = {};
36epath = {};
37for ii in [2..round + 2]
38i = round - ii;
39path = {@path, cursor};
40if (cursor != start)
41for x in (cursor.exits)
42if (is_a(x.otherside, $exit) && is_a(x.otherside.location, $room))
43oside = x.otherside.location;
44if (oside in keys(marks))
45if (marks[oside] == i)
46cursor = oside;
47epath = {@epath, x};
48endif
49endif
50endif
51if (suspend)
52yield;
53endif
54endfor
55endif
56if (suspend)
57yield;
58endif
59endfor
60path = {@path, start};
61return epath;