Generic Edible Object (#101)

(an instance of Generic Boomerang Thing made by Calkins)

     The it becomes this raining sensual object.

Go to location of this object, wooden box.


HELP MANUAL:
     The Generic Edible Object (GEO) is the simplest of a class of edible, feelable, smellable 
objects.  After making a child of this object, you set the following messages:
     
        smell_msg          - what player reads when he does "smell "
        taste_msg          - what player reads when he does "taste "
        feel_msg           - what player reads when he does "feel "
        eat_msg            - what player reads when he does "eat "
        drink_msg          - what player reads when he does "drink "
        smoke_msg
        
        osmell_msg         - what others see when player smells the object.
        otaste_msg                  etc, etc...
        ofeel_msg
        oeat_msg
        odrink_msg
        osmoke_msg
        
        delayed_eat_msg    - delayed action after eating, drinking or smoking.
     
     If delayed_eat_msg is a string, it will be displayed to the player after 12 seconds. 
 If it is a list of strings, randomly selected strings will be displayed to the user 
starting in 12 seconds and spaced 15 seconds apart.  In that case, the number of 
messages shown will be the square root of the length of the list of strings.  The 
chances of seeing a duplicate are then fairly rare.
     
     GEO is a child of Dred's Generic Boomerang Object.  See help for that generic to 
set automatic return-to-home behavior for edible objects.




VERB SOURCE CODE:

smell taste feel eat drink smoke:
if ((this.location == player) || (this.location == player.location))
    msg = verb + "_msg";
    omsg = "o" + msg;
    if (this.(msg))
        player:tell($string_utils:pronoun_sub(this.(msg)));
        if (this.(omsg))
            this.location:announce(player.name, " ", $string_utils:pronoun_sub(this.(omsg)));
        else
            this.location:announce(player.name, " ", verb, "s ", this.name, ".");
        endif
        if ((((verb == "eat") || (verb == "drink")) || (verb == "smoke")) && this.delayed_eat_msg)
            fork (12)
                if (typeof(this.delayed_eat_msg) == STR)
                    player:tell($string_utils:pronoun_sub(this.delayed_eat_msg));
                elseif (typeof(this.delayed_eat_msg) == LIST)
                    n = sqrt(length(this.delayed_eat_msg));
                    for i in [1..n]
                        dmsg = this.delayed_eat_msg[random(length(this.delayed_eat_msg))];
                        player:tell($string_utils:pronoun_sub(dmsg));
                        suspend(15);
                    endfor
                endif
            endfork
        endif
    else
        player:tell(this.name, " has nothing to ", verb);
        this.location:announce(player.name, " tries unsuccessfully to ", verb, " 
", this.name, ".");
    endif
else
    player:tell("You are not close enough to ", this.name, " to ", verb, " it.");
endif
.



PROPERTY DATA:
      smell_msg
      taste_msg
      feel_msg
      eat_msg
      osmell_msg
      otaste_msg
      ofeel_msg
      oeat_msg
      delayed_eat_msg
      smoke_msg
      osmoke_msg

CHILDREN:
nutmeg fruit caviar generic lunch a big black spider Red Pill Blue Pill Silver Hookah tiramisu chocolate truffles cassatta alla Siciliana tartes a plate of fruit partly rotted potato mostly rotted potato sickly brown mush