generic dispenser #1387
Aliases: dispenser, generic dispenser, generic
4 verbs · 12 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
take get remove | any from this | rxd | #1387 | 29 |
put place insert | any in this | rxd | #1387 | 24 |
look_self | none none none | rxd | #1387 | 6 |
make_fertile | this none this | | #1387 | 2 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
dispenses | #1387 | rc | — | {} |
takers | #1387 | r | — | {#-1, #-1} |
unique | #1387 | | — | 1 |
worth | #1387 | | — | -1 |
condition | #1387 | | — | E_NONE |
odrop_failed_msg | #1387 | | — | "%<tries> to drop %t but fails!" |
odrop_succeeded_msg | #1387 | | — | "%<drops> %t." |
otake_succeeded_msg | #1387 | | — | "%<picks> up %t." |
key | #1387 | | — | not readable (E_PERM) |
aliases | #1387 | | — | {"dispenser", "generic dispenser", "generic"} |
description | #1387 | | — | "A tangible object for use in the LambdaMOO RPG." |
object_size | #1387 | | — | {4213, 1141286558} |
Ancestry
Ancestors (nearest first): #517 Generic LRPG Thing
Children: none
Call graph
Source
take get remove
Referenced by
none
Source
1if (player.location != this.location) 2 return player:tell("I don't understand that"); 3endif 4rpg = $local.rpg; 5what = $string_utils:match(dobjstr, this.dispenses, "aliases", this.dispenses, "name"); 6if (what == $failed_match) 7 player:tell("There are no ", dobjstr, "s in the ", this.name, "."); 8 return; 9elseif (what == $ambiguous_match) 10 player:tell("I don't know which one you mean."); 11elseif ((length($list_utils:remove_duplicates(this.takers)) == 1) && (player == this.takers[1])) 12 player:tell("Greedy, aren't we? I think you've had enough for now."); 13elseif (valid(this.location)) 14 new = rpg.recycler:_create(what); 15 if (typeof(new) == ERR) 16 player:tell(this.name, " is unable to produce ", $string_utils:a_or_an(what.name), " ", what.name, ". A GM should be advised."); 17 this.location:announce(player.name, " scrabbles around ", this.name, " but comes away empty-handed."); 18 return; 19 endif 20 new.name = what.name; 21 new.aliases = what.aliases; 22 player:tell("You take a ", new.name, " from the ", this.name, "."); 23 new:moveto(player); 24 this.location:announce(player.name, " takes a ", new.name, " from the ", this.name, "."); 25 this.takers = {player, this.takers[1]}; 26endif 27"DR 25-AUG-94 -- Added short-circuit if recycler messes up."; 28"StarDancer Nov-19-95 -- Added location checks, at Bradley's suggestion"; 29"Profane 14-DEC-96 1725PST -- added 5 item limit type thing";
put place insert
Referenced by
none
Source
1what = dobj; 2if ((what == $failed_match) || (what == $nothing)) 3 player:tell("Put what in the ", this.name, "?"); 4 return; 5elseif (what == $ambiguous_match) 6 what = $string_utils:match(dobjstr, player.contents, "name", player.contents, "aliases"); 7 if (what <= $sysobj) 8 player:tell("Sorry, I don't know which ", dobjstr, " you mean."); 9 return; 10 endif 11endif 12if (what.location != player) 13 player:tell("You don't have the ", what.name, "."); 14elseif ((player.location != this.location) && (!(player in $local.rpg.gms))) 15 player:tell("My, what long arms you have."); 16elseif (parent(what) in this.dispenses) 17 player:tell("You put the ", what.name, " in the ", this.name, "."); 18 if (player.location == this.location) 19 this.location:announce(player.name, " puts a ", what.name, " in the ", this.name, "."); 20 endif 21 what:moveto($local.rpg.cemetery); 22else 23 player:tell("That doesn't fit."); 24endif
look_self
Referenced by
none
Source
1pass(@args); 2names = {}; 3for thing in (this.dispenses) 4 names = listappend(names, thing.name); 5endfor 6player:tell("The ", this.name, " contains ", $string_utils:english_list(names), ".");
make_fertile
Referenced by
none
Source
1player:tell("Contact Grand_Master about adopting your generic gear."); 2return E_PERM;