generic thing (#5)

(an instance of Root Class made by The_Mayor)




VERB SOURCE CODE:

g*et t*ake:
set_task_perms(callers() ? caller_perms() | player);
if (this.location == player)
    player:tell("You already have that!");
elseif (this.location != player.location)
    player:tell("I don't see that here.");
else
    this:moveto(player);
    if (this.location == player)
        player:tell(this:take_succeeded_msg() || "Taken.");
        if (msg = this:otake_succeeded_msg())
            player.location:announce(player.name, " ", msg);
        endif
    else
        player:tell(this:take_failed_msg() || "You can't pick that up.");
        if (msg = this:otake_failed_msg())
            player.location:announce(player.name, " ", msg);
        endif
    endif
endif
.


d*rop th*row:
set_task_perms(callers() ? caller_perms() | player);
if (this.location != player)
    player:tell("You don't have that.");
elseif (!player.location:acceptable(this))
    player:tell("You can't drop that here.");
else
    this:moveto(player.location);
    if (this.location == player.location)
        player:tell_lines(this:drop_succeeded_msg() || "Dropped.");
        if (msg = this:odrop_succeeded_msg())
            player.location:announce(player.name, " ", msg);
        endif
    else
        player:tell_lines(this:drop_failed_msg() || "You can't seem to drop that 
here.");
        if (msg = this:odrop_failed_msg())
            player.location:announce(player.name, " ", msg);
        endif
    endif
endif
.


moveto:
where = args[1];
"if (!valid(where) || this:is_unlocked_for(where))";
if (this:is_unlocked_for(where))
    pass(where);
endif
.


take_failed_msg take_succeeded_msg otake_failed_msg otake_succeeded_msg drop_failed_msg drop_succeeded_msg odrop_failed_msg odrop_succeeded_msg:
set_task_perms(caller_perms());
return $string_utils:pronoun_sub(this.(verb));
.


gi*ve ha*nd:
set_task_perms(callers() ? caller_perms() | player);
if (this.location != player)
    player:tell("You don't have that!");
elseif (!valid(player.location))
    player:tell("I see no \"", iobjstr, "\" here.");
elseif ($command_utils:object_match_failed(who = player.location:match_object(iobjstr), 
iobjstr))
elseif (who.location != player.location)
    player:tell("I see no \"", iobjstr, "\" here.");
elseif (who == player)
    player:tell("Give it to yourself?");
else
    this:moveto(who);
    if (this.location == who)
        player:tell("You hand ", this:title(), " to ", who:title(), ".");
        who:tell(player:titlec(), " ", $gender_utils:get_conj("hands/hand", player), 
" you ", this:title(), ".");
    else
        player:tell(who:titlec(), " ", $gender_utils:get_conj("does/do", who), " 
not want that item.");
    endif
endif
.


examine_key:
"examine_key(examiner)";
"return a list of strings to be told to the player, indicating what the key on this 
type of object means, and what this object's key is set to.";
"the default will only tell the key to a wizard or this object's owner.";
who = args[1];
if (((caller == this) && $perm_utils:controls(who, this)) && (this.key != 0))
    return {tostr(this:title(), " can only be moved to locations matching this key:"), 
tostr("  ", $lock_utils:unparse_key(this.key))};
endif
.



PROPERTY DATA:
      drop_failed_msg
      drop_succeeded_msg
      odrop_failed_msg
      odrop_succeeded_msg
      otake_succeeded_msg
      otake_failed_msg
      take_succeeded_msg
      take_failed_msg

CHILDREN:
generic container generic note Recycling Center Generic Feature Object dbMeter Core Updater Generic Light Shield Generic Automaton Twisted Oak Tree generic candle Generic Boomerang Thing medal Generic Message Player Request Board Generic pile of stuff generic comic book clothes Generic Fart-Bonker with Elvis Song Spoofing map Slot Machine Generic Wearable Thing a bench thing600 rummagesale legs a mirror palm frond young angel feather microphone a flute Fly on the Wall Generic Scripted Object medal Gothic Bed Wrist Cuffs skull salt certified freeze-dried badger repellent weirdness magnet the moon Object999 Dhalgren_utils Thatcher's Grave Key to the World Plutonium Map of Africa Camels hoarded magic number1 hoarded magic number2 a cuppa joe Trevor calliope broken pieces of stained glass big steel barrel Self_Fulfilling_Prophecy Bose Acoustimass-7 speakers Technics turntable player Pioneer 18-disc c.d. changer Pioneer dual cassette recorder plum Jupiter Coffee Grounds Coffee Flask Shotgun Bullet Shield of Achilles pint_of_Guinness Pint_of_Guinness Generic Elevator Call Button Generic Dispenser Generic Music Machine Super Chicken Torch a ki-rin a unicorn an eagle a gryphon a dragon A sign for newcomers A sign for builders A sign about waste disposal A welcome banner A signpost shrubs Encyclopedia of the TinyWorld up recycling up killing up gender up pennies up strings up objects Dictionary of Commands up look up goto up say up @dig up linking up @create up @lock treestump ash tree A gold plaque inset into the rock Statue of Lynx Statue of Three Statue of Garrett Statue of Nightfall Statue of Chrysalis A robot with a Darth Vader helmet How to Send Mail How to Create a Mailbox How to Read Mail Generic Implement of Fiery Destruction log braces over a BOG Generic Flammable Object a plastic sign Generic Wind-Up Toy Newborn ga Tourist Information Sign shyguy gold ring scantily clad helpless virgin Beldin's Alchemy set. zeron Star Crystal Staff of DEATH plaster cow Black Rose D.E.A.T.H. slime mold used_up condom icky thing Cirdan Lynx Vixie soap-on-a-rope a hanger inside an old wardrobe tattoo gun laser gun some pins cotton candy a gargoyle Generic Phone Generic Phone Switch silver anklet a seed Can of Hair Spray small pile of leaves a metal crate a rose for Zenith HAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA djembe old dildoes blankets Big 'ol poster of Jon Bon Jovi extra kisses bubbles Mein Hertzen a tubful of water Bob a virtual Sybarite expiring of a surfeit of textual chocolate My So-Called Knife Insanity Hex soap-on-a-rope Tenant Directory #911 11001001 Mama Hunch quarter feather bed rolled up blanket Hohner harmonica key toy glass couch booger a Hallucination of Cioccolato Candle a Menu green leather thongs thongs blanket a fancy case with fractured glass Fascinating Thing holder a laser probe [wilted daisy] flower b c f pearl emerald roulette glasses bookshelf agate Gouda delicate_web cock Post Holocaust Daisy Please No more NUKES button. thing radioactive tongue stud amber crimson onyx The Bedai Hammock Crusader the Cat! Orange