Exit Class #13
6 verbs · 39 properties · 2 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
invoke | this none this | rwxd | #13 | 30 |
_open | this none this | rwxd | #13 | 3 |
_close | this none this | rwxd | #13 | 3 |
invoke_msgs | this none this | rwxd | #13 | 47 |
_lock | this none this | rwxd | #13 | 3 |
_unlock | this none this | rwxd | #13 | 3 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
source | #13 | rw | #10 | #-1 |
dest | #13 | rw | #10 | #-1 |
direction | #13 | rw | #10 | "" |
size | #13 | rw | #10 | 5 |
door | #13 | rw | #10 | 0 |
open | #13 | rw | #10 | 1 |
leave_msg | #13 | rw | #10 | "" |
leave_announce | #13 | rw | #10 | "" |
partner | #13 | rw | #10 | #13 |
arrive_msg | #13 | rw | #10 | "" |
arrive_announce | #13 | rw | #10 | "" |
functional | #13 | rw | #10 | 1 |
func_msg | #13 | rw | #10 | "" |
locked | #13 | rw | #10 | 0 |
locked_msg | #13 | rw | #10 | "" |
open_msg | #13 | rw | #10 | "" |
open_announce | #13 | rw | #10 | "" |
close_msg | #13 | rw | #10 | "" |
close_announce | #13 | rw | #10 | "" |
lockable | #13 | rw | #10 | 0 |
key | #13 | rw | #10 | 0 |
lock_msg | #13 | rw | #10 | "" |
lock_announce | #13 | rw | #10 | "" |
unlock_msg | #13 | rw | #10 | 0 |
unlock_announce | #13 | rw | #10 | "" |
description | #1 | rw | #10 | <clear> |
aliases | #1 | rw | #10 | <clear> |
home | #1 | rw | #10 | <clear> |
short_desc | #1 | rw | #10 | <clear> |
core | #1 | rw | #10 | 1 |
handedness | #1 | rw | #10 | <clear> |
base_enc | #1 | rw | #10 | <clear> |
base_weight | #1 | rw | #10 | <clear> |
capacity | #1 | rw | #10 | <clear> |
max_fit | #1 | rw | #10 | <clear> |
pprep | #1 | rw | #10 | <clear> |
gprep | #1 | rw | #10 | <clear> |
generic_name | #1 | rw | #10 | <clear> |
age | #1 | rw | #10 | <clear> |
Ancestry
Ancestors (nearest first): #11 Game Class → #1 Root Class
Children: #26 north, #35 south
Call graph
Source
invoke
Referenced by
none
Source
1"$exit:invoke this none this"; 2who = args[1]; 3if (this.door && (!this.open)) 4who:tell("%cThe door is closed.%w"); 5return 0; 6else 7"Size check. Zero always denies entrance."; 8if (this.size == 0) 9who:tell("%cThis exit is too small for anything to fit through.%w"); 10return 0; 11else 12"Size 10 always allows entrance."; 13if (this.size != 10) 14whoenc = who:encumbrance(); 15ok = $exit_size_enc[this.size]; 16if (whoenc > ok) 17who:tell("%cYou are too large to fit through this exit.%w"); 18return 0; 19endif 20endif 21endif 22endif 23oldloc = who.location; 24x = who:move_to(this.dest); 25if (x[1] == 0) 26who:tell(x[2]); 27else 28newloc = who.location; 29this:invoke_msgs(who, oldloc, newloc); 30endif
_open
Referenced by
none
Source
1"$exit:_open this none this"; 2this.open = 1; 3this.partner.open = 1;
_close
Referenced by
none
Source
1"$exit:_close this none this"; 2this.open = 0; 3this.partner.open = 0;
invoke_msgs
Referenced by
- #13:invoke line 29:
this:invoke_msgs
Source
1"$exit:invoke_msgs this none this"; 2exit = this; 3who = args[1]; 4oldroom = args[2]; 5newroom = args[3]; 6"LEAVE messages."; 7if (who:is_a($animate)) 8"Decide on appropriate message (if any) to send to invoker."; 9if (x = exit.leave_msg) 10who:tell(x); 11endif 12"Decide what to announce to the room."; 13"if WHO is flying, etc."; 14" msg = WHO flies exit.direction, blah blah"; 15"else"; 16group = oldroom:get_animates(); 17for each in (group) 18codes = {"%name", "%pro", "%dir"}; 19values = {who:known_to(each)[2], #0.(who.gender)[2], exit.direction}; 20what = (exit.leave_announce != "") ? exit.leave_announce | who.species.leave_announce; 21for y in [1..length(codes)] 22new = strsub(what, codes[y], values[y], 1); 23what = new; 24endfor 25each:tell(what); 26endfor 27"ENTER messages."; 28"Decide on appropriate message (if any) to send to invoker."; 29if (x = exit.arrive_msg) 30who:tell(x); 31endif 32"Decide what to announce to the room."; 33"if WHO is flying, etc."; 34" msg = WHO flies exit.direction, blah blah"; 35"else"; 36group = setremove(newroom:get_animates(), who); 37for each in (group) 38codes = {"%name", "%pro", "%dir"}; 39values = {who:known_to(each)[2], #0.(who.gender)[2], exit.partner.direction}; 40what = (exit.arrive_announce != "") ? exit.arrive_announce | who.species.arrive_announce; 41for y in [1..length(codes)] 42new = strsub(what, codes[y], values[y], 1); 43what = new; 44endfor 45each:tell(what); 46endfor 47endif
_lock
Referenced by
none
Source
1"$exit:_lock this none this"; 2this.locked = 1; 3this.partner.locked = 1;
_unlock
Referenced by
none
Source
1"$exit:_unlock this none this"; 2this.locked = 0; 3this.partner.locked = 0;