generic dispenser #1387

Parent #517Owner Flags Source rpg_march_2006/Misc/dispenser.txt

Aliases: dispenser, generic dispenser, generic

4 verbs · 12 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
take get removeany from thisrxd#138729
put place insertany in thisrxd#138724
look_selfnone none nonerxd#13876
make_fertilethis none this#13872

Properties

PropertyDefinerFlagsOwnerValue
dispenses#1387rc{}
takers#1387r{#-1, #-1}
unique#13871
worth#1387-1
condition#1387E_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#1387not 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

calls n1387_2 #1387:look_self n517_14 #517:look_self n1387_2->n517_14

Source

take get remove

Spec any from thisFlags rxdDefiner #1387

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

Spec any in thisFlags rxdDefiner #1387

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

Spec none none noneFlags rxdDefiner #1387

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

Spec this none thisDefiner #1387

Referenced by

none

Source

1player:tell("Contact Grand_Master about adopting your generic gear.");
2return E_PERM;