generic room #3
Aliases: generic room
161 verbs · 92 properties · 4 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
confunc | this none this | rxd | #3 | 5 |
disfunc | this none this | rxd | #3 | 4 |
say | any any any | rxd | #3 | 1 |
emote | any any any | rxd | #3 | 24 |
announce | this none this | rxd | #3 | 5 |
match_exit | this none this | rxd | #3 | 16 |
tell_contents | this none this | rxd | #3 | 21 |
look_self | this none this | rxd | #3 | 109 |
acceptable | this none this | rxd | #3 | 1 |
go | any any any | rxd | #3 | 9 |
announce_all | this none this | rxd | #3 | 5 |
announce_all_but | this none this | rxd | #3 | 11 |
enterfunc | this none this | rxd | #3 | 44 |
exitfunc | this none this | rxd | #3 | 40 |
remove_exit | this none this | rxd | #3 | 8 |
recycle | this none this | rxd | #3 | 53 |
e east w west s south n north ne northeast nw northwest se southeast sw southwest u up d down in out | none none none | rxd | #3 | 15 |
match | this none this | rxd | #3 | 11 |
who_location_msg | this none this | rxd | #3 | 1 |
exits entrances | this none this | rxd | #3 | 5 |
obvious_exits obvious_entrances | this none this | rxd | #3 | 7 |
here_huh | this none this | rxd | #3 | 13 |
room_announce*_all_but | this none this | rxd | #3 | 1 |
examine_commands_ok | this none this | rxd | #3 | 1 |
examine_contents | this none this | rxd | #3 | 4 |
broadcast_event | this none this | rxd | #3 | 17 |
player_integration_msg | this none this | rxd | #3 | 34 |
next_hop_to | this none this | rxd | #3 | 74 |
recalc_next_hops | this none this | rxd | #3 | 90 |
destinations | this none this | rxd | #3 | 7 |
list_exits | this none this | rxd | #3 | 40 |
title | this none this | rxd | #3 | 30 |
go_fail_msg | this none this | rxd | #3 | 1 |
building | this none this | rxd | #3 | 7 |
add_stub_room | this none this | rxd | #3 | 10 |
description | this none this | rxd | #3 | 26 |
time_msg | this none this | rxd | #3 | 12 |
cover hide | none none none | rxd | #3 | 11 |
track_strength | this none this | rxd | #3 | 12 |
track_exit | this none this | rxd | #3 | 31 |
track_age | this none this | rxd | #3 | 14 |
time_windows_msg | this none this | rxd | #3 | 9 |
sky_room | this none this | rxd | #3 | 1 |
-* `* | any any any | rxd | #3 | 13 |
player_integration_msg_backup | this none this | rxd | #3 | 47 |
sitters | this none this | rxd | #3 | 3 |
recliners | this none this | rxd | #3 | 3 |
free_seats | this none this | rxd | #3 | 5 |
do_sit | this none this | rxd | #3 | 29 |
do_recline | this none this | rxd | #3 | 28 |
do_stand | this none this | rxd | #3 | 10 |
destinations_mapok | this none this | rxd | #3 | 9 |
draw_map | this none this | rxd | #3 | 3 |
_icon | this none this | rxd | #3 | 1 |
broadcast_noise broadcast_sound | this none this | rxd | #3 | 41 |
fall_into | this none this | rxd | #3 | 53 |
integrated_objects | this none this | rxd | #3 | 6 |
sit | none none none | rxd | #3 | 1 |
users_msg | this none this | rxd | #3 | 69 |
validate_occupants | this none this | rxd | #3 | 12 |
rise stand | none none none | rxd | #3 | 2 |
look_place_msg | this none this | rxd | #3 | 1 |
infect | this none this | rxd | #3 | 28 |
recline lie lay | none none none | rxd | #3 | 1 |
powerplant | this none this | rxd | #3 | 5 |
match_someone | this none this | rxd | #3 | 13 |
tell_map | this none this | rxd | #3 | 89 |
search scavenge | none none none | rxd | #3 | 2 |
yell shout scream | this none this | rxd | #3 | 1 |
set_xyz_rec | this none this | rxd | #3 | 44 |
add_exit | this none this | rxd | #3 | 3 |
sort_exits | this none this | rxd | #3 | 9 |
chill_factor | this none this | rxd | #3 | 24 |
add_resident | this none this | rxd | #3 | 2 |
check_forbid_action | this none this | rxd | #3 | 15 |
do_creature_heartbeat | this none this | rxd | #3 | 3 |
_client_icon | this none this | rxd | #3 | 1 |
client_title | this none this | rxd | #3 | 1 |
@residents | none none none | rxd | #3 | 10 |
remove_resident | this none this | rxd | #3 | 6 |
@rmresident @removeresident | any none none | rxd | #3 | 13 |
_yell | this none this | rxd | #3 | 12 |
hide_item | this none this | rxd | #3 | 23 |
client_map tell_client_map | this none this | rxd | #3 | 6 |
_allows | this none this | rxd | #3 | 1 |
debug_tell | this none this | rxd | #3 | 5 |
psi_shimmer | this none this | rxd | #3 | 8 |
_blank_map | this none this | rxd | #3 | 12 |
_render_map | this none this | rxd | #3 | 121 |
_room_map | this none this | rxd | #3 | 40 |
_update_map | this none this | rxd | #3 | 34 |
spy_report | this none this | rxd | #3 | 17 |
_link_map | this none this | rxd | #3 | 39 |
list_description | this none this | rxd | #3 | 73 |
render_contents | this none this | rxd | #3 | 11 |
@addresident | any none none | rxd | #3 | 19 |
creature_heartbeat | this none this | rxd | #3 | 14 |
enterfunc | this none this | rxd | #3 | 0 |
exitfunc | this none this | rxd | #3 | 0 |
random_exit | this none this | rxd | #3 | 8 |
room | this none this | rxd | #3 | 1 |
_room_map_list | this none this | rxd | #3 | 37 |
weather_msg | this none this | rxd | #3 | 1 |
update_watch | this none this | rxd | #3 | 18 |
_descriptive_map_old | this none this | rxd | #3 | 36 |
textmap | any none none | rxd | #3 | 3 |
announce_admins | this none this | rxd | #3 | 7 |
announce_admins_but | this none this | rxd | #3 | 12 |
_covers | this none this | rxd | #3 | 5 |
_covers_left | this none this | rxd | #3 | 1 |
old_make_noise | this none this | rxd | #3 | 27 |
make_noise | this none this | rxd | #3 | 49 |
ambience | this none this | rxd | #3 | 19 |
controlled_by | this none this | rxd | #3 | 11 |
look_sky | this none this | rxd | #3 | 29 |
look_self_NEW | this none this | rxd | #3 | 137 |
look_self_backup | this none this | rxd | #3 | 162 |
random_nondoor_exit | this none this | rxd | #3 | 8 |
look_self_backup2 | this none this | rxd | #3 | 168 |
infect_creature | this none this | rxd | #3 | 2 |
temperature | this none this | rxd | #3 | 20 |
forbid_say | this none this | rxd | #3 | 1 |
distant_figures | this none this | rxd | #3 | 28 |
look_self_verybrief | this none this | rxd | #3 | 17 |
list_exits_long | this none this | rxd | #3 | 36 |
idle_sit | this none this | rxd | #3 | 11 |
smell | none none none | rxd | #3 | 24 |
extra_exit_desc | this none this | rxd | #3 | 14 |
tell_notes | this none this | rxd | #3 | 21 |
prog_info | this none this | rxd | #3 | 17 |
tell_map | this none this | rxd | #3 | 0 |
tree_tag | this none this | rxd | #3 | 1 |
write_landmark_msg | this none this | rxd | #3 | 10 |
floor_msg | this none this | rxd | #3 | 4 |
iname | this none this | rxd | #3 | 1 |
_sit | this none this | rxd | #3 | 2 |
tell_map_backup | this none this | rxd | #3 | 81 |
darkness | this none this | rxd | #3 | 26 |
tell_nearby_lights | this none this | rxd | #3 | 23 |
auto_clean | this none this | rxd | #3 | 23 |
initialize | this none this | rxd | #3 | 2 |
_descriptive_map | this none this | rxd | #3 | 63 |
_ghosticon | this none this | rxd | #3 | 13 |
rustle | this none this | rxd | #3 | 7 |
examine_verbs | this none this | rxd | #3 | 7 |
look_self_old | this none this | rxd | #3 | 176 |
tell_map_old | this none this | rxd | #3 | 84 |
description_old | this none this | rxd | #3 | 19 |
list_exits_old | this none this | rxd | #3 | 36 |
player_integration_msg_old | this none this | rxd | #3 | 29 |
darkness_old | this none this | rxd | #3 | 25 |
allow_sethome | this none this | rxd | #3 | 8 |
_darkness | this none this | rxd | #3 | 11 |
_look_self_obvious | this none this | rxd | #3 | 10 |
_look_self_furniture | this none this | rxd | #3 | 10 |
_look_self_exits | this none this | rxd | #3 | 16 |
_look_self_creatures | this none this | rxd | #3 | 28 |
_look_self_others | this none this | rxd | #3 | 15 |
tell_contents_terserun | this none this | rxd | #3 | 37 |
_radicon | this none this | rxd | #3 | 16 |
sanitize_search_items | this none this | rxd | #3 | 11 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
who_location_msg | #3 | rc | #361 | "%T" |
exits | #3 | rc | #361 | {} |
go_fail_msg | #3 | rc | #361 | "" |
outdoor | #3 | rc | #361 | 1 |
covers | #3 | rc | #361 | {"a rock", "a pole", "a trash pile"} |
covering | #3 | rc | #361 | {} |
tracks | #3 | rc | #361 | {} |
windows | #3 | rc | #361 | 0 |
public | #3 | rc | #361 | 1 |
drop_msg | #3 | rc | #361 | "%DN drops %it." |
get_msg | #3 | rc | #361 | "%DN picks up %it." |
contents_msg | #3 | rc | #361 | "You see %t here." |
contents_many_msg | #3 | rc | #361 | "You see %t here." |
default_posture_msg | #3 | rc | #361 | "" |
seats | #3 | rc | #361 | 16 |
sitting | #3 | rc | #361 | {} |
reclining | #3 | rc | #361 | {} |
sit_msg | #3 | rc | #361 | "You %<sit> on the floor." |
osit_msg | #3 | rc | #361 | "%DN %<sits> on the floor." |
sit_from_reclining | #3 | rc | #361 | "You sit up on the floor." |
osit_from_reclining | #3 | rc | #361 | "%N %<sits> on the floor." |
rise_msg | #3 | rc | #361 | "You %<stand> up from the floor." |
orise_msg | #3 | rc | #361 | "%DN %<stands> up from the floor." |
icon | #3 | rc | #361 | "~1b[30m~1b[43m[]~1b[0m" |
map | #3 | rc | #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 | #3 | rc | #361 | {} |
fall_into_msg | #3 | rc | #361 | "%DN hits the floor with a dull crack." |
size | #3 | rc | #361 | 10 |
sit_from_reclining_msg | #3 | rc | #361 | "You %<sit> up." |
osit_from_reclining_msg | #3 | rc | #361 | "%DN %<sits> up." |
look_sitting_and_reclining | #3 | rc | #361 | "%sitters %sv sitting and %recliners %rv lying down here." |
look_sitting_msg | #3 | rc | #361 | "%sitters %sv sitting down here." |
recline_full_msg | #3 | rc | #361 | "There isn't enough room to lie down here." |
already_sitting_msg | #3 | rc | #361 | "You're already sitting down." |
already_reclining_msg | #3 | rc | #361 | "You're already lying down." |
recline_from_sitting_msg | #3 | rc | #361 | "You lie down." |
orecline_from_sitting_msg | #3 | rc | #361 | "%DN lies down." |
recline_msg | #3 | rc | #361 | "You lie down." |
orecline_msg | #3 | rc | #361 | "%DN lies down." |
look_reclining_msg | #3 | rc | #361 | "%recliners %rv lying down here." |
sitting_doing_msg | #3 | rc | #361 | "%DN is %<sitting> here %doing." |
reclining_doing_msg | #3 | rc | #361 | "%DN is lying here %doing." |
rise_failed_msg | #3 | rc | #361 | "You're not on the ground!" |
infect_interval | #3 | rc | #361 | 60 |
no_exit_msg | #3 | rc | #361 | "You can't go that way." |
x | #3 | rc | #361 | 0 |
y | #3 | rc | #361 | 0 |
z | #3 | rc | #361 | 0 |
residents | #3 | rc | #361 | {} |
sit_full_msg | #3 | rc | #361 | "You can't find anywhere to sit down." |
value | #3 | rc | #361 | 5000 |
rustle_msg | #3 | rc | #361 | "" |
last_rustle | #3 | rc | #361 | 0 |
thing_fall_into_msg | #3 | rc | #361 | "%IN lands with a thud." |
decal_fall_into_msg | #3 | rc | #361 | "Some %n falls out of the sky, splashing onto the ground by your feet." |
client_icon | #3 | rc | #361 | "ab" |
client_map | #3 | rc | #361 | {"aaaaaaaaaa", "aaaaaaaaaa", "aaaaaiaaaa", "aaaaaaaaaa", "aaaaaaaaaa"} |
track_msg | #3 | rc | #361 | "%DN paces around the area, sniffing at the ground." |
watched | #3 | rc | #361 | 0 |
max_objects | #3 | rc | #361 | 100 |
show_map | #3 | rc | #361 | 1 |
objects_to_echo | #3 | rc | #361 | {} |
always_brief | #3 | rc | #361 | 0 |
furniture | #3 | rc | #361 | {} |
fall_into_noise | #3 | rc | #361 | #214863 |
ambience | #3 | rc | #361 | {} |
temperature | #3 | rc | #361 | 65 |
last_temp_update | #3 | rc | #361 | 1286806270 |
continue_look_self_msg | #3 | rc | #361 | "" |
map_restricted | #3 | rc | #361 | 0 |
global_xyz | #3 | r | #361 | {0, 0, 0} |
common_name_msg | #3 | rc | #361 | "" |
verb_subs | #3 | rc | #361 | {{"ground", {#-1, "floor_msg"}}, {"floor", {#-1, "floor_msg"}}} |
darkness | #3 | rc | #361 | {0, 1295722886} |
total_dark_description_msg | #3 | rc | #361 | {"You're in total darkness."} |
has_commands | #3 | rc | #361 | 0 |
too_dark_msg | #3 | rc | #361 | "You can't really see much of anything." |
next_room_to_global_origin | #3 | r | #361 | #-1 |
global_xyz_anchor | #3 | r | #361 | 0 |
search_items | #3 | rc | #361 | {} |
search_items_left | #3 | rc | #361 | {} |
already_searched | #3 | rc | #361 | {} |
aliases | #1 | rc | #361 | {"generic room"} |
description | #1 | rc | #361 | <clear> |
object_size | #1 | r | #29 | {143543, 1298433815} |
hidden_verbs | #1 | rc | #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 | #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: #43 Generic Editor, #257 generic outdoor room, #258 generic indoor room, #339 Staff Lounge
Call graph
Showing 48 of 194 verbs; 146 not shown.
Source
confunc
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
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
Referenced by
none
Source
1player:say(argstr);
emote
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
Referenced by
- #3:confunc line 4:
this:announce - #3:disfunc line 2:
this:announce
Source
1if (this.watched) 2for dude in (setremove(this.contents, player)) 3`dude.listening ! ANY => 0' && dude:tell(@args); 4endfor 5endif
match_exit
Referenced by
- #3:e line 4:
this:match_exit - #3:here_huh line 4:
this:match_exit
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
Referenced by
- #3:look_self line 82:
this:tell_contents - #3:examine_contents line 3:
this:tell_contents - #3:list_description line 3:
this:tell_contents - #3:look_self_NEW line 131:
this:tell_contents - #3:look_self_backup line 24:
this:tell_contents - #3:look_self_backup line 156:
this:tell_contents - #3:look_self_backup2 line 32:
this:tell_contents - #3:look_self_backup2 line 162:
this:tell_contents - #3:look_self_old line 160:
this:tell_contents - #3:tell_contents_terserun line 18:
this:tell_contents
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
Referenced by
- #3:confunc line 3:
this:look_self - #3:enterfunc line 8:
this:look_self - #3:enterfunc line 12:
this:look_self
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
Referenced by
- #43:acceptable line 1:
pass(
Source
1return 1;
go
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
Referenced by
- #3:emote line 5:
this:announce_all - #3:emote line 10:
this:announce_all - #3:emote line 23:
this:announce_all - #3:fall_into line 18:
this:announce_all - #3:fall_into line 21:
this:announce_all - #3:fall_into line 40:
this:announce_all - #3:fall_into line 47:
this:announce_all - #3:_yell line 11:
this:announce_all
Source
1if (this.watched) 2for dude in (this.contents) 3`dude.listening ! ANY => 0' && dude:tell(@args); 4endfor 5endif
announce_all_but
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
Referenced by
- #43:enterfunc line 5:
pass( - #65:move_em line 10:
$player_start:enterfunc
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
Referenced by
- #43:exitfunc line 9:
pass(
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
Referenced by
- #3:exitfunc line 36:
this:remove_exit
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
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
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
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
Referenced by
- #10:who_location_msg line 1:
$player_start:who_location_msg
Source
1return (msg = `this.(verb) ! ANY') ? $string_utils:pronoun_sub(msg, args[1]) | "";
exits entrances
Referenced by
- #3:look_self line 23:
this:exits - #3:list_description line 24:
this:exits - #3:look_self_NEW line 33:
this:exits - #3:look_self_backup line 57:
this:exits - #3:look_self_backup2 line 14:
this:exits - #3:look_self_old line 46:
this:exits - #3:look_self_old line 48:
this:exits
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
Referenced by
- #3:list_exits line 13:
this:obvious_exits - #3:list_exits_long line 4:
this:obvious_exits - #3:list_exits_old line 11:
this:obvious_exits
Source
1r = {}; 2for x in (this.exits) 3if (is_a(x, $exit) && x:obvious()) 4r = setadd(r, x); 5endif 6endfor 7return r;
here_huh
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
Referenced by
none
Source
1this:(verb[6..$])(@args);
examine_commands_ok
Referenced by
none
Source
1return this == args[1].location;
examine_contents
Referenced by
none
Source
1"examine_contents(who)"; 2if (caller == this) 3this:tell_contents(this.contents, 1); 4endif
broadcast_event
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
Referenced by
- #3:list_description line 45:
this:player_integration_msg - #3:look_self_NEW line 68:
this:player_integration_msg - #3:look_self_backup line 92:
this:player_integration_msg - #3:look_self_backup2 line 98:
this:player_integration_msg - #3:look_self_verybrief line 14:
this:player_integration_msg - #3:look_self_verybrief line 16:
this:player_integration_msg - #3:look_self_old line 85:
this:player_integration_msg - #3:_look_self_creatures line 25:
this:player_integration_msg
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
Referenced by
- #3:_descriptive_map_old line 26:
this:next_hop_to
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
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
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
Referenced by
- #3:look_self line 94:
this:list_exits - #3:look_self_NEW line 136:
this:list_exits - #3:look_self_backup line 26:
this:list_exits - #3:look_self_backup line 161:
this:list_exits - #3:look_self_backup2 line 34:
this:list_exits - #3:look_self_backup2 line 167:
this:list_exits - #3:look_self_old line 167:
this:list_exits
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
Referenced by
- #3:look_self line 67:
this:title - #3:tell_map line 50:
this:title - #3:tell_map line 54:
this:title - #3:tell_map line 56:
this:title - #3:list_description line 2:
this:title - #3:look_self_NEW line 120:
this:title - #3:look_self_backup line 18:
this:title - #3:look_self_backup line 141:
this:title - #3:look_self_backup2 line 26:
this:title - #3:look_self_backup2 line 147:
this:title - #3:look_self_verybrief line 1:
this:title - #3:tell_map_backup line 46:
this:title - #3:tell_map_backup line 49:
this:title - #3:look_self_old line 139:
this:title - #3:tell_map_old line 45:
this:title - #3:tell_map_old line 49:
this:title - #3:tell_map_old line 51:
this:title - #40:look_self line 2:
this:title - #43:look_self line 1:
this:title
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
Referenced by
none
Source
1return this.(verb);
building
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
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
Referenced by
- #3:look_self line 45:
this:description - #3:list_description line 59:
this:description - #3:look_self_NEW line 92:
this:description - #3:look_self_backup line 116:
this:description - #3:look_self_backup2 line 122:
this:description - #3:look_self_old line 105:
this:description - #257:description line 1:
pass(
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
Referenced by
- #3:description line 18:
this:time_msg - #3:description_old line 11:
this:time_msg
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
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
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
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
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
Referenced by
- #3:description line 18:
this:time_windows_msg - #3:description_old line 11:
this:time_windows_msg
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
Referenced by
none
Source
1return this:area():sky_room(args ? args[1] | this);
-* `*
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
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
Referenced by
- #3:users_msg line 5:
this:sitters
Source
1":sitters() => {@this.sitting}"; 2"Returns a list of everyone stiing on the furniture"; 3return this.sitting;
recliners
Referenced by
- #3:users_msg line 6:
this:recliners
Source
1":recliners() => {@this.recliners}"; 2"Returns a list of people reclining on the furniture."; 3return this.reclining;
free_seats
Referenced by
- #3:do_sit line 13:
this:free_seats - #3:do_recline line 4:
this:free_seats
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
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
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
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
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
Referenced by
- #3:tell_map line 4:
this:draw_map - #3:tell_map_backup line 3:
this:draw_map - #3:tell_map_old line 3:
this:draw_map
Source
1if (((!this.map) || (!this.client_map)) || `this.map_restricted ! ANY') 2this:_update_map(); 3endif
_icon
Referenced by
- #3:_ghosticon line 1:
this:_icon - #3:_radicon line 1:
this:_icon
Source
1return this.icon;
broadcast_noise broadcast_sound
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
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
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
Referenced by
none
Source
1this:_sit(player);
users_msg
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
Referenced by
- #3:look_self line 3:
this:validate_occupants - #3:look_self_NEW line 7:
this:validate_occupants - #3:look_self_backup line 8:
this:validate_occupants - #3:look_self_backup2 line 10:
this:validate_occupants - #3:look_self_old line 5:
this:validate_occupants
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
Referenced by
none
Source
1target = valid(dobj) ? dobj | player; 2target:queue_action($actions.stand, {this}, 1, (verb + " ") + argstr);
look_place_msg
Referenced by
none
Source
1return `this.look_place_msg ! ANY => ""';
infect
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
Referenced by
none
Source
1player:queue_action($actions.recline, {this}, 1, (verb + " ") + argstr);
powerplant
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
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
Referenced by
- #3:look_self line 70:
this:tell_map - #3:look_self_NEW line 118:
this:tell_map - #3:look_self_old line 137:
this:tell_map
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;
search scavenge
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
Referenced by
none
Source
1this:_yell(player, $su:from_list(args, " "));
set_xyz_rec
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
Referenced by
- #3:enterfunc line 16:
this:add_exit
Source
1this.exits = setadd(this.exits, args[1]); 2se = {}; 3this:sort_exits();
sort_exits
Referenced by
- #3:add_exit line 3:
this:sort_exits
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
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
Referenced by
- #3:@addresident line 16:
this:add_resident
Source
1who = args[1]; 2this.residents = setadd(this.residents, who);
check_forbid_action
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
Referenced by
none
Source
1for x in ({this, @this.contents}) 2$ou:has_verb(x, "creature_heartbeat") && x:creature_heartbeat(@args); 3endfor
_client_icon
Referenced by
none
Source
1return this.client_icon;
client_title
Referenced by
- #3:look_self_backup line 126:
this:client_title - #3:look_self_backup2 line 132:
this:client_title
Source
1return ((this.name + " (") + this:area().name) + ")";
@residents
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
Referenced by
- #3:@rmresident line 9:
this:remove_resident
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
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
Referenced by
- #3:yell line 1:
this:_yell
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
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
Referenced by
- #3:look_self line 73:
this:client_map - #3:look_self_backup line 10:
this:client_map - #3:look_self_backup2 line 18:
this:client_map - #3:look_self_old line 148:
this:client_map
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
Referenced by
none
Source
1return `this.("_allow_" + args[1]) ! E_PROPNF => E_NONE' && area(this):(verb)(@args);
debug_tell
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
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
Referenced by
- #3:_render_map line 19:
this:_blank_map - #3:_render_map line 21:
this:_blank_map - #3:_render_map line 23:
this:_blank_map - #3:_render_map line 30:
this:_blank_map - #3:_render_map line 31:
this:_blank_map - #3:_render_map line 34:
this:_blank_map - #3:_render_map line 35:
this:_blank_map - #3:_render_map line 38:
this:_blank_map - #3:_render_map line 39:
this:_blank_map - #3:_render_map line 43:
this:_blank_map - #3:_room_map line 11:
this:_blank_map - #3:_link_map line 11:
this:_blank_map - #257:_room_map line 22:
this:_blank_map - #257:_render_map line 25:
this:_blank_map - #257:_render_map line 27:
this:_blank_map - #257:_render_map line 29:
this:_blank_map - #257:_render_map line 36:
this:_blank_map - #257:_render_map line 37:
this:_blank_map - #257:_render_map line 40:
this:_blank_map - #257:_render_map line 41:
this:_blank_map - #257:_render_map line 44:
this:_blank_map - #257:_render_map line 45:
this:_blank_map - #257:_render_map line 49:
this:_blank_map
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
Referenced by
- #3:_update_map line 11:
this:_render_map - #257:_render_map line 2:
pass(
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
Referenced by
- #3:_render_map line 56:
this:_room_map - #3:_descriptive_map_old line 23:
this:_room_map - #3:_descriptive_map line 25:
this:_room_map - #257:_room_map line 3:
pass(
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
Referenced by
- #3:draw_map line 2:
this:_update_map
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
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};
_link_map
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
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
Referenced by
- #3:tell_contents line 20:
this:render_contents - #3:list_description line 65:
this:render_contents
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
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
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
Referenced by
none
Source
No program (verb defined but unprogrammed).
exitfunc
Referenced by
none
Source
No program (verb defined but unprogrammed).
random_exit
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
Referenced by
- #3:look_self line 104:
this:room
Source
1return this;
_room_map_list
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
Referenced by
- #3:time_msg line 9:
this:weather_msg
Source
1return area(this):weather_msg();
update_watch
Referenced by
- #3:enterfunc line 3:
this:update_watch - #3:exitfunc line 4:
this:update_watch
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
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
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
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
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
Referenced by
- #3:cover line 7:
this:_covers
Source
1c = this.covers; 2for x in (this:occupants($furniture)) 3c = {@c, x}; 4endfor 5return c;
_covers_left
Referenced by
none
Source
1
old_make_noise
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
Referenced by
- #3:fall_into line 34:
this:make_noise - #3:fall_into line 43:
this:make_noise - #3:_yell line 10:
this:make_noise - #3:rustle line 4:
this:make_noise
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
Referenced by
- #3:creature_heartbeat line 11:
this:ambience - #3:creature_heartbeat line 13:
this:ambience
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
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
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
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
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
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
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
Referenced by
- #3:infect line 23:
this:infect_creature
Source
1who = args[1]; 2who:ingest(@args[2..$]);
temperature
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
Referenced by
none
Source
1return 0;
distant_figures
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
Referenced by
- #3:enterfunc line 6:
this:look_self_verybrief
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
Referenced by
- #3:list_exits line 11:
this:list_exits_long - #3:list_exits_old line 9:
this:list_exits_long
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
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
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
Referenced by
- #3:look_self_old line 58:
this:extra_exit_desc - #3:_look_self_exits line 12:
this:extra_exit_desc
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
Referenced by
- #3:look_self_old line 175:
this:tell_notes
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
Referenced by
- #3:tell_map line 51:
this:prog_info - #3:tell_map_backup line 47:
this:prog_info - #3:tell_map_old line 46:
this:prog_info
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
Referenced by
none
Source
No program (verb defined but unprogrammed).
tree_tag
Referenced by
none
Source
1return $su:right(this.common_name_msg, -20);
write_landmark_msg
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
Referenced by
none
Source
1if (`this.floor_msg ! ANY') 2return this.floor_msg; 3endif 4return this.outdoor ? "ground" | "floor";
iname
Referenced by
none
Source
1return this.name;
_sit
Referenced by
- #3:sit line 1:
this:_sit
Source
1{who} = args; 2who:queue_action($actions.sit, {this}, 1, "sit");
tell_map_backup
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
Referenced by
- #3:look_self line 13:
this:darkness - #3:player_integration_msg line 2:
this:darkness - #3:list_exits line 4:
this:darkness - #3:title line 2:
this:darkness - #3:description line 7:
this:darkness - #3:tell_map line 13:
this:darkness - #3:tell_nearby_lights line 3:
this:darkness - #3:look_self_old line 124:
this:darkness - #3:tell_map_old line 12:
this:darkness - #3:description_old line 2:
this:darkness - #3:list_exits_old line 4:
this:darkness - #3:player_integration_msg_old line 2:
this:darkness
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
Referenced by
- #3:look_self line 76:
this:tell_nearby_lights - #3:look_self_old line 157:
this:tell_nearby_lights
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
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
Referenced by
- #43:initialize line 2:
pass(
Source
1pass(@args); 2this.tracks = {};
_descriptive_map
Referenced by
- #3:textmap line 3:
this:_descriptive_map
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
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
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
Referenced by
- #3:look_self line 97:
this:examine_verbs - #3:look_self_old line 169:
this:examine_verbs
Source
1r = pass(@args); 2if (r) 3this.has_commands = 1; 4else 5this.has_commands = 0; 6endif 7return r;
look_self_old
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
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
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
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
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
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
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
Referenced by
- #3:darkness line 10:
this:_darkness - #257:_darkness line 1:
pass(
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
Referenced by
- #3:look_self line 22:
this:_look_self_obvious
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
Referenced by
- #3:look_self line 38:
this:_look_self_furniture
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
Referenced by
- #3:look_self line 39:
this:_look_self_exits
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
Referenced by
- #3:look_self line 35:
this:_look_self_creatures - #3:look_self line 40:
this:_look_self_creatures
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
Referenced by
- #3:look_self line 41:
this:_look_self_others
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
Referenced by
- #3:look_self line 80:
this:tell_contents_terserun
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
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
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;