"A dump of #52766 on Sun Dec 17 13:43:46 1995 PST @create $thing named GM Equipment Dispenser:GM Equipment Dispenser,GMED,Grabber ,unlicensed particle accelerator @prop #52766."recycler" #4489 rc @prop #52766."dispenses" {} rc ;;#52766.("dispenses") = {#873, #874, #1247, #2138, #457, #20864, #20865, #283, #76, #155, #243, #1660, #331, #2231, #1454, #1394, #154, #3791, #159, #370, #3089, #4038, #8751, #10902, #20769, #20868, #4318, #8833, #8909, #9350, #21543, #20847, #43337, #38579, #38584, #40308, #40305, #5506, #47326, #20253, #52610, #58135, #58137, #42517, #21564, #4878, #53156, #16005, #51801, #39910, #37179, #51818, #64134, #11636, #45865, #22841, #52728, #60226, #22586, #60608, #69882, #85550, #10466, #52618, #65484, #1804, #28065, #16268, #11901, #60126, #26790, #21331, #60614, #14201} @prop #52766."vacuum" #10161 rc ;;#52766.("key") = 0 ;;#52766.("aliases") = {"GM Equipment Dispenser", "GMED", "Grabber", "unlicensed particle accelerator"} ;;#52766.("description") = "A facility through which Gamemasters can grab weapons directly, without having to walk to the Academy each time they wish to arm a monster. Also a quick way to put non-traditional weapons into circulation." ;;#52766.("object_size") = {4585, 819192523} @verb #52766:"request grab" this none this @program #52766:request ":grab(STR|OBJ parent[, OBJ recipient]) -- Grabs a weapon/armour with the given parent (as object or name), and moves it to `recipient' (which defaults to caller)."; " => E_PERM if a non-GM calls the verb"; " => $failed_match if the given object is not available"; " => $ambiguous_match if an ambiguous string-reference is given"; " => object number of item found if the `grab' was successful."; if (!$local.rpg:trusted(caller_perms())) return E_PERM; endif what = this:match_dispensed(args[1]); if (!$recycler:valid(what)) return what; endif new = this:create(what, @listdelete(args, 1)); new.name = what.name; new.aliases = what.aliases; new.unique = 0; new:moveto((length(args) > 1) ? args[2] | (valid(caller) ? caller | caller_perms())); return new; "StarDancer 19-NOV-95 -- Dispenser will no longer produce unique items."; . @verb #52766:"rem_dispensed remove_dispensed" this none this @program #52766:rem_dispensed ":rem_dispensed(OBJ parent_object) -- Removes the object from this.dispenses, so that it's kids are no longer available for grabbing."; if (!this:may_edit(caller_perms())) return E_PERM; else return this.dispenses = $set_utils:difference(this.dispenses, args); endif . @verb #52766:"add_dispensed add_dispenses" this none this @program #52766:add_dispensed ":add_dispensed(OBJ parent_object) -- Adds the object to this.dispenses, making its children available for grabbing."; if (!this:may_edit(caller_perms())) return E_PERM; else return this.dispenses = $set_utils:union(this.dispenses, args); endif . @verb #52766:"may_edit" this none this @program #52766:may_edit ":may_edit(OBJ caller_perms) => True if given player can modify properties on this object."; return $local.rpg:is_grandmaster(args[1]); . @verb #52766:"match_dispensed" this none this @program #52766:match_dispensed ":match_dispensed(STR|OBJ what)"; available = this.dispenses; if (typeof(target = args[1]) == OBJ) return (target in available) ? target | ((parent(target) in available) ? parent(target) | $failed_match); endif return $string_utils:match(target, available, "name"); "return $string_utils:match(target, available, \"name\", available, \"aliases\")"; "Profane 13-APR-95 13:11EST - Added in matching on name as well as aliases. So we don't get $ambiguous_match 'cause of having `katana' and `katana of quality' inna dispenser."; "StarDancer 7-DEC-95 -- changed matching to name only because using aliases returns $ambiguous_match."; . @verb #52766:"destroy" this none this @program #52766:destroy ":destroy(equipment) => result -- Destroys killable RPG equipment."; if (!$local.rpg:trusted(caller_perms())) return E_PERM; elseif (!this.vacuum:killable(args[1])) return E_NACC; else return this.recycler:_recycle(@args); endif . @verb #52766:"create" this none this rx @program #52766:create ":create(item) => A kid of given item. Calls :make_fertile just in case."; if (caller != this) return E_PERM; else args[1]:make_fertile(); return this.recycler:_create(@args); endif . "***finished***