generic lockpickable RPG container #59000
Aliases: generic lockpickable RPG container
12 verbs · 14 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
pick_lock | this none this | | #59000 | 24 |
pick_msg pick_mod pick_failed locked | this none this | | #59000 | 2 |
make_fertile | this none this | | #59000 | 15 |
pu*t ins*ert st*ore ca*che | any in this | rx | #59000 | 6 |
lock_msg olock_msg unlock_msg ounlock_msg no_key_msg | this none this | rx | #59000 | 1 |
lock unlock | this none none | | #59000 | 25 |
re*move ex*tract rec*over ge*t ta*ke | any from this | rx | #59000 | 6 |
acceptable | this none this | | #59000 | 3 |
set_locked | this none this | | #59000 | 5 |
holds_key | this none this | | #59000 | 7 |
is_openable_by | this none this | | #59000 | 1 |
reset_lock | this none this | | #59000 | 10 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
oclose_msg | #59000 | | — | "%n %<closes> %d." |
oopen_msg | #59000 | | — | "%n %<opens> %d." |
open_key | #59000 | | — | 0 |
store_action | #59000 | | — | "store" |
encumbrance | #59000 | | — | 100 |
manufactured | #59000 | | — | 749722886 |
worth | #59000 | | — | -1 |
condition | #59000 | | — | 100 |
odrop_failed_msg | #59000 | | — | "%<tries> to drop %t but fails!" |
odrop_succeeded_msg | #59000 | | — | "%<drops> %t." |
otake_succeeded_msg | #59000 | | — | "%<picks> up %t." |
key | #59000 | | — | not readable (E_PERM) |
aliases | #59000 | | — | {"generic lockpickable RPG container"} |
object_size | #59000 | | — | {9127, 1141286565} |
Ancestry
Ancestors (nearest first): #43001 generic openable/closable RPG container → #9338 generic RPG container → #2409 LRPG Adventuring Gear → #112297 Generic Dyable LRPG Thing → #517 Generic LRPG Thing
Children: none
Call graph
Source
pick_lock
Referenced by
none
Source
1":pick_lock(thief, Resolve-result) -- picked by a lockpick successfully."; 2if (!$object_utils:isa(caller, this.lockpick)) 3 return E_PERM; 4endif 5{pc, result, @extra_args} = args; 6if (this:locked()) 7 $local.rpg:say_action(this.opick_success_msg, pc, this, this.location); 8 this:set_locked(0); 9else 10 return player:tell("It is already unlocked."); 11endif 12if (!this.reset_time) 13 return; 14endif 15fork (this.reset_time) 16 joe = (pc.location == this.location) ? pc | $no_one; 17 if (!this:locked()) 18 $local.rpg:say_action(this.relock_msg, joe, this, this.location); 19 this:set_locked(1); 20 endif 21 this:set_opened(0); 22endfork 23"TM 23-DEC-1995: changed line 6 to use the successful pick msg instead of the picking msg, also added a check to display relocking message only if container is still unlocked, and added check to not print the relock msg to the lockpicker if they're left the room."; 24"THX (#105941) - Thu Feb 3, 2000 - Hannibal added a check to see if the lock was already picked before forking. THX changed to a scatter assignment and from $you:say_action to $local.rpg:say_action.";
pick_msg pick_mod pick_failed locked
Referenced by
- #59000:pick_lock line 6:
this:locked - #59000:pick_lock line 17:
this:locked - #59000:lock line 8:
this:locked - #59000:re*move line 2:
this:locked - #59000:acceptable line 2:
this:locked - #59000:is_openable_by line 1:
this:locked - #59000:reset_lock line 5:
this:locked
Source
1"You can customize to have :pick_failed fire some nasty traps at the would-be thief, heh, or whatever your cruel imagination can think of."; 2return this.(verb);
make_fertile
Referenced by
none
Source
1"Copied from generic resting/sleeping dungeon (#5804):make_fertile by Quinn (#19845) Sat Sep 18 00:17:46 1993 PDT"; 2"If you'd like to make children of this room, I suggest you use the following sequence to create a room which will be the generic for all the rooms in your RPG-area. Then, just make kids of that object."; 3";foo:make_fertile();bar = create(foo)"; 4who = caller_perms(); 5if (#46:trust() && (this == #59000)) 6 if (this.f) 7 who:tell(this.name, " (", this, ") is already fertile."); 8 else 9 this.f = 1; 10 fork (0) 11 this.f = 0; 12 endfork 13 who:tell(this.name, " (", this, ") is now fertile."); 14 endif 15endif
pu*t ins*ert st*ore ca*che
Referenced by
none
Source
1"Prevent transfer if container is locked"; 2if (this.locked) 3 player:tell(this.name, " is locked."); 4 return 0; 5endif 6pass(@args);
lock_msg olock_msg unlock_msg ounlock_msg no_key_msg
Referenced by
- #59000:lock line 3:
this:no_key_msg - #59000:lock line 13:
this:unlock_msg - #59000:lock line 14:
this:ounlock_msg - #59000:lock line 22:
this:lock_msg - #59000:lock line 23:
this:olock_msg
Source
1return (msg = this.(verb)) ? $string_utils:pronoun_sub(msg, @args) | "";
lock unlock
Referenced by
none
Source
1":lock/unlock <this> - uses keys if desired; default only lets the owner manipulate."; 2if (!(val = this:holds_key(player))) 3 player:tell(this:no_key_msg()); 4 return 0; 5elseif ((val == -1) && (!(player in {this.owner, @this.trusted}))) 6 player:tell(tostr("You aren't allowed to ", verb, " ", this.name, ".")); 7 return E_PERM; 8elseif (this:locked()) 9 if (verb == "lock") 10 player:tell("It is already locked."); 11 else 12 this:set_locked(0); 13 player:tell(this:unlock_msg()); 14 player.location:announce_all_but({player}, this:ounlock_msg()); 15 endif 16else 17 if (verb == "unlock") 18 player:tell("It is already unlocked."); 19 else 20 this:set_locked(1); 21 this:set_opened(0); 22 player:tell(this:lock_msg()); 23 player.location:announce_all_but({player}, this:olock_msg()); 24 endif 25endif
re*move ex*tract rec*over ge*t ta*ke
Referenced by
none
Source
1"Prevent transfer if container is locked"; 2if (this:locked()) 3 player:tell(this.name, " is locked."); 4 return 0; 5endif 6pass(@args);
acceptable
Referenced by
none
Source
1"Allow $local.rpg.equipment only if opened and unlocked"; 2return ((pass(@args) && (!this:locked())) || (caller_perms() in $local.rpg.grand_masters)) || $perm_utils:controls(caller_perms(), this); 3"TM 23-DEC-1995 14:00 EST: added $perm_utils check to help GMs teleporting stuff in without unlocking and opening first.";
set_locked
Referenced by
- #59000:pick_lock line 8:
this:set_locked - #59000:pick_lock line 19:
this:set_locked - #59000:lock line 12:
this:set_locked - #59000:lock line 20:
this:set_locked - #59000:reset_lock line 7:
this:set_locked
Source
1if ((!$perm_utils:controls(caller.owner, this)) && (caller_perms() != this.lockpick.owner)) 2 return E_PERM; 3endif 4this.locked = locked = !(!args[1]); 5return locked;
holds_key
Referenced by
- #59000:lock line 2:
this:holds_key
Source
1":holds_key(pc) ==> 1 if the pc holds a 'key' object for the container. Kudos to Quinn for the wonderful idea"; 2if ((typeof(key = this.key_obj) != OBJ) || (!valid(key))) 3 return -1; 4elseif (key.location == (pc = args[1])) 5 return 1; 6endif 7return 0;
is_openable_by
Referenced by
none
Source
1return (!this:locked()) || $perm_utils:controls(caller_perms(), this);
reset_lock
Referenced by
none
Source
1return; 2":reset_lock ([OBJ lockpicking player]) - reset the lock on the container."; 3pc = (length(args) > 1) ? args[1] | $no_one; 4joe = (pc.location == this.location) ? pc | $no_one; 5if (!this:locked()) 6 $local.rpg:say_action(this.relock_msg, joe, this, this.location); 7 this:set_locked(1); 8endif 9this:set_opened(0); 10"THX (#105941) - Thu Feb 3, 2000 - subst /$you/$local.rpg/g 1-$";