generic area #114
Aliases: generic area
60 verbs · 58 properties · 3 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
accept | this none this | rxd | #114 | 9 |
find_all_paths | this none this | rxd | #114 | 26 |
add_stub_room | this none this | rxd | #114 | 5 |
time_msg | this none this | rxd | #114 | 1 |
time_windows_msg | this none this | rxd | #114 | 11 |
do_reset | this none this | rxd | #114 | 44 |
@force-reset @reset | this none none | rxd | #114 | 33 |
on_reset | this none this | rxd | #114 | 56 |
powerplant | this none this | rxd | #114 | 1 |
announce_all | this none this | rxd | #114 | 7 |
initialize | this none this | rxd | #114 | 4 |
recycle | this none this | rxd | #114 | 2 |
calculate_offset | this none this | rxd | #114 | 65 |
find_reset_listeners | this none this | rxd | #114 | 23 |
weather_msg | this none this | rxd | #114 | 1 |
change_weather | this none this | rxd | #114 | 37 |
announce_all_players | this none this | rxd | #114 | 3 |
heartbeat | this none this | rxd | #114 | 1 |
weather_announce | this none this | rxd | #114 | 7 |
@weather-compile @compile-weather @cw @wc | this none none | rxd | #114 | 15 |
weather | this none this | rxd | #114 | 4 |
find_transitions | this none this | rx | #114 | 34 |
next_area_to | this none this | rxd | #114 | 19 |
random_room | this none this | rxd | #114 | 10 |
area | this none this | rxd | #114 | 1 |
tree_tag | this none this | rxd | #114 | 1 |
creature_enterfunc | this none this | rxd | #114 | 12 |
creature_exitfunc | this none this | rxd | #114 | 4 |
dname | this none this | rxd | #114 | 5 |
dnamec | this none this | rxd | #114 | 5 |
hibernate | this none this | rxd | #114 | 22 |
unhibernate | this none this | rxd | #114 | 16 |
_www | this none this | rxd | #114 | 50 |
reset_map | this none this | rxd | #114 | 5 |
who_name | this none this | rxd | #114 | 1 |
_allows | this none this | rxd | #114 | 7 |
spy_report | this none this | rxd | #114 | 16 |
path_ok | this none this | rxd | #114 | 1 |
next_hop_override | this none this | rxd | #114 | 3 |
next_hop_out | this none this | rxd | #114 | 29 |
look_self | this none this | rxd | #114 | 2 |
enterfunc | this none this | rxd | #114 | 6 |
@list-costs | this none none | rxd | #114 | 10 |
room_added | this none this | rxd | #114 | 4 |
exitfunc | this none this | rxd | #114 | 6 |
room_removed | this none this | rxd | #114 | 4 |
store_sorted_rooms_by_z | this none this | rxd | #114 | 10 |
ambience | this none this | rxd | #114 | 4 |
random_npc | this none this | rxd | #114 | 18 |
chown | this none this | rxd | #114 | 11 |
offset_shift | this none this | rxd | #114 | 7 |
announce_low_sky | this none this | rxd | #114 | 22 |
may_chat | this none this | rxd | #114 | 2 |
random_ground | this none this | rxd | #114 | 12 |
tell | this none this | rxd | #114 | 9 |
junk_ok | this none this | rxd | #114 | 4 |
ok_to_pick | this none this | rxd | #114 | 1 |
make_public make_private | this none this | rxd | #114 | 9 |
indoor_darkness | this none this | rxd | #114 | 0 |
path_between | this none this | rxd | #114 | 61 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
adjacent_areas | #114 | rc | #361 | {} |
reset_listeners | #114 | rc | #361 | {} |
recalc_paths_on_reset | #114 | rc | #361 | 1 |
generic_citizen | #114 | rc | #361 | #-1 |
citizen_population | #114 | rc | #361 | 0 |
thirst_modifier | #114 | rc | #361 | 0.5 |
powerplant | #114 | rc | #361 | #-1 |
blank_icon | #114 | rc | #361 | " " |
combat_ok | #114 | rc | #361 | 1 |
combat_fail_msg | #114 | rc | #361 | "You get the impression you shouldn't be doing that here." |
contiguous_map | #114 | rc | #361 | {} |
icon | #114 | rc | #361 | "~1b[41m~1b[37m~1b[1m<>~1b[0m" |
heart | #114 | rc | #361 | 0 |
heart_tick | #114 | rc | #361 | 0 |
reset_interval | #114 | rc | #361 | 20 |
last_reset | #114 | rc | #361 | 0 |
contiguous_map_offsets | #114 | rc | #361 | {} |
area_link_icons | #114 | r | #361 | {} |
icon_blocks | #114 | rc | #361 | {} |
adjacent_area_rooms | #114 | rc | #361 | {} |
value | #114 | rc | #361 | 0 |
has_proper_name | #114 | rc | #361 | 0 |
client_blank_icon | #114 | rc | #361 | "aa" |
client_bg_icon | #114 | rc | #361 | "ae" |
default_exit_type | #114 | rc | #361 | #55 |
gee | #114 | rc | #361 | 1.0 |
may_chat | #114 | rc | #361 | 1 |
players | #114 | rc | #361 | {} |
dont_hibernate | #114 | rc | #361 | 0 |
linkable | #114 | rc | #361 | 1 |
_allow_combat | #114 | rc | #361 | 1 |
bigmap | #114 | rc | #361 | #-1 |
next_hop_ok | #114 | rc | #361 | 1 |
maproom | #114 | rc | #361 | #-1 |
area_code | #114 | rwc | #361 | -1 |
claimed_by | #114 | rc | #361 | #-1 |
claimable | #114 | rc | #361 | 0 |
multiland | #114 | rc | #361 | 0 |
z_sorted_rooms | #114 | rc | #361 | {} |
admin_ok | #114 | rc | #361 | 0 |
show_time | #114 | rc | #361 | 1 |
knockout_ok | #114 | rc | #361 | 1 |
dark_night | #114 | rc | #361 | 1 |
path_link_ok | #114 | rc | #361 | 1 |
auto_clean | #114 | rc | #361 | 0 |
docks | #114 | rc | #361 | {} |
wall_msg | #114 | rc | #361 | "a wall" |
hibernating | #114 | rc | #361 | 0 |
aliases | #1 | rc | #361 | {"generic area"} |
description | #1 | rc | #361 | <clear> |
object_size | #1 | r | #29 | {50069, 1298433815} |
hidden_verbs | #1 | rc | #361 | <clear> |
phelp_msg | #1 | rc | #361 | <clear> |
weight | #1 | rc | #361 | <clear> |
owner_verbs | #1 | rc | #361 | <clear> |
plural_name | #1 | rc | #361 | <clear> |
client_image | #1 | rc | #361 | <clear> |
listening | #1 | rc | #361 | <clear> |
Ancestry
Ancestors (nearest first): #1 root
Children: #273 generic real area, #334 generic blueprint, #340 generic ethereal area
Call graph
Showing 48 of 87 verbs; 39 not shown.
Source
accept
Referenced by
- #114:on_reset line 23:
this:accept
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
Referenced by
- #114:@force-reset line 7:
this:find_all_paths - #334:reset line 13:
this:find_all_paths
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
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
Referenced by
none
Source
1return "";
time_windows_msg
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
Referenced by
- #114:@force-reset line 31:
this:do_reset - #334:reset line 40:
this:do_reset
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
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
Referenced by
- #114:do_reset line 16:
this:on_reset
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
Referenced by
none
Source
1return this.powerplant;
announce_all
Referenced by
none
Source
1return; 2fork (0) 3for x in (this.contents) 4x:announce_all(@args); 5$cu:sin(0); 6endfor 7endfork
initialize
Referenced by
none
Source
1if (this.reset_interval) 2$heart:register_long(this); 3endif 4return pass(@args);
recycle
Referenced by
none
Source
1$heart:unregister_long(this); 2return pass(@args);
calculate_offset
Referenced by
- #114:@force-reset line 11:
this:calculate_offset - #334:reset line 17:
this:calculate_offset
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
Referenced by
- #114:@force-reset line 13:
this:find_reset_listeners - #334:reset line 19:
this:find_reset_listeners
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
Referenced by
none
Source
1return `this:weather():look_place_msg() ! ANY => ""';
change_weather
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
Referenced by
none
Source
1for x in (this.players) 2x:tell(@args); 3endfor
heartbeat
Referenced by
none
Source
1
weather_announce
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
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
Referenced by
- #114:weather_msg line 1:
this:weather - #114:change_weather line 4:
this:weather
Source
1if (is_a(w = this.weather_master, $area)) 2return w:weather(); 3endif 4return this.weather;
find_transitions
Referenced by
- #114:@force-reset line 9:
this:find_transitions - #334:reset line 15:
this:find_transitions
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
Referenced by
- #114:next_hop_out line 14:
this:next_area_to
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
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
Referenced by
none
Source
1return this;
tree_tag
Referenced by
none
Source
1return this.blank_icon;
creature_enterfunc
Referenced by
- #321:creature_enterfunc line 5:
pass(
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
Referenced by
none
Source
1who = args[1]; 2if (is_player(who)) 3this.players = setremove(this.players, who); 4endif
dname
Referenced by
- #334:edit line 2:
this:dname - #334:authorize line 5:
this:dname
Source
1if (this.has_proper_name) 2return $su:capitalize_words(this.name); 3else 4return pass(@args); 5endif
dnamec
Referenced by
none
Source
1if (this.has_proper_name) 2return $su:capitalize(this.name); 3else 4return pass(@args); 5endif
hibernate
Referenced by
- #114:on_reset line 53:
this:hibernate
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
Referenced by
- #114:on_reset line 51:
this:unhibernate - #114:on_reset line 55:
this:unhibernate
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
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
Referenced by
- #114:@force-reset line 27:
this:reset_map - #334:reset line 6:
this:reset_map - #334:reset line 36:
this:reset_map
Source
1for x in (this:occupants($room)) 2x.map = {}; 3x:draw_map(); 4$cu:sin(0); 5endfor
who_name
Referenced by
none
Source
1return $ansi:strip(this.name);
_allows
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
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
Referenced by
none
Source
1return this.next_hop_ok;
next_hop_override
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
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
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
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
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
Referenced by
- #114:enterfunc line 5:
this:room_added
Source
1room = args[1]; 2if ($ou:has_property(room, "airstrip")) 3this.airstrips = setadd(this.airstrips, room); 4endif
exitfunc
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
Referenced by
- #114:exitfunc line 3:
this:room_removed - #334:room_removed line 5:
pass(
Source
1room = args[1]; 2if (room in this.airstrips) 3this.airstrips = setremove(this.airstrips, room); 4endif
store_sorted_rooms_by_z
Referenced by
- #114:@force-reset line 17:
this:store_sorted_rooms_by_z - #334:reset line 26:
this:store_sorted_rooms_by_z
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
Referenced by
none
Source
1where = args[1]; 2who = args[2]; 3m = $su:msg(this.weather.ambience_msg); 4who:tell(m);
random_npc
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
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
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
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
Referenced by
none
Source
1{?who = player} = args; 2return is_a(who, $immortal) || this.may_chat;
random_ground
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
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
Referenced by
none
Source
1if (has_callable_verb(this, "uninstantiate")) 2return 1; 3endif 4return 0;
ok_to_pick
Referenced by
none
Source
1return E_NONE;
make_public make_private
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
Referenced by
none
Source
No program (verb defined but unprogrammed).
path_between
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;