Generic Integrating Description Room #6792
Aliases: Generic Integrating Description Room
4 verbs · 8 properties · 1 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
look_self | this none this | | #6792 | 19 |
description | this none this | | #6792 | 18 |
ok | this none this | | #6792 | 14 |
description(old) | this none this | rd | #6792 | 18 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
enabled | #6792 | rc | — | -1 |
look_sep_msg | #6792 | rc | — | " " |
entrances | #6792 | | — | not readable (E_PERM) |
exits | #6792 | | — | not readable (E_PERM) |
key | #6792 | | — | not readable (E_PERM) |
aliases | #6792 | | — | {"Generic Integrating Description Room"} |
description | #6792 | | — | value (236 chars)"Integrates some objects in its .contents or .exits into its description. .enabled >0 all objects with :look_msg() verbs or .look_msg property, <0 not players, 0 none of them. Inspired by a similar room on alphamoo that Woodlock wrote." |
object_size | #6792 | | — | {3706, 1141286549} |
Ancestry
Ancestors (nearest first): #3879 Matching Room → #27777 Self-Cleaning Room
Children: #364 outside room
Call graph
Source
look_self
Referenced by
- #258:look_self line 2:
pass(
Source
1if ((!this.enabled) || (args && args[1])) 2 return pass(@args); 3endif 4player:tell(this:title()); 5c = i = {}; 6for k in (this:exits()) 7 if (valid(k) && (this:ok(k) > 0)) 8 i = listappend(i, k); 9 endif 10endfor 11for k in (setremove(this:contents(), player)) 12 if ((y = this:ok(k)) > 0) 13 i = setadd(i, k); 14 elseif (y == 0) 15 c = listappend(c, k); 16 endif 17endfor 18player:tell_lines(this:description(@i)); 19this:tell_contents(c, this.ctype);
description
Referenced by
- #364:description line 5:
pass( - #364:description line 9:
pass( - #364:description line 11:
pass( - #6792:look_self line 18:
this:description
Source
1d = pass(); 2if ((args == {}) || (!this.enabled)) 3 return d; 4else 5 s = ex = ""; 6 for k in (args) 7 lookmsg = $object_utils:has_verb(k, "look_msg") ? k:look_msg() | k.look_msg; 8 s = tostr(s, ex, $string_utils:pronoun_sub(lookmsg, k, k)); 9 ex = this.look_sep_msg; 10 endfor 11endif 12if (typeof(d) == LIST) 13 return listappend(d, s); 14elseif (typeof(d) == STR) 15 return (d + this.look_sep_msg) + s; 16else 17 return s; 18endif
ok
Referenced by
- #6792:look_self line 7:
this:ok - #6792:look_self line 12:
this:ok
Source
1"An object is 'OK' for inclusion in the room's desc if it has some sort of look_msg"; 2"If the message is a string it gets included."; 3"If it's a non-string the object is invisible (must be owned by the room's owner, or a resident)."; 4".enabled<0 suppresses players being included."; 5k = args[1]; 6if (($object_utils:has_callable_verb(k, "look_msg") && (y = k:look_msg())) || ($object_utils:has_property(k, "look_msg") && (y = k.look_msg))) 7 if (is_player(k) && (this.enabled <= 0)) 8 return 0; 9 elseif ((k.owner == this.owner) || (k in this.residents)) 10 return (typeof(y) == STR) ? 1 | ((typeof(y) == OBJ) ? -1 | 0); 11 else 12 return (typeof(y) == STR) && 1; 13 endif 14endif
description(old)
Referenced by
none
Source
1"Copied from Generic Integrating Description Room (#6792):description by Gary_Severn (#15) Wed Sep 1 01:52:23 1993 PDT"; 2d = pass(); 3if ((args == {}) || (!this.enabled)) 4 return d; 5else 6 s = ex = ""; 7 for k in (args) 8 s = (s + ex) + $string_utils:pronoun_sub($object_utils:has_verb(k, "look_msg") ? k:look_msg() | k.look_msg, k); 9 ex = this.look_sep_msg; 10 endfor 11endif 12if (typeof(d) == LIST) 13 return listappend(d, s); 14elseif (typeof(d) == STR) 15 return (d + this.look_sep_msg) + s; 16else 17 return s; 18endif