Empty Transfer

version 4 by Emily Short

  • Home page
  • Complete text



  • Version 4 of Empty Transfer by Emily Short begins here.

    "Adds actions for emptying containers."

    Include Locksmith by Emily Short.

    Understand "empty [container]" as emptying. Understand "empty [something]" as emptying.

    This is the noun must be open rule:
        if the noun is closed:
            follow the noun autoopening rule;
        if the noun is closed:
            stop the action;
        make no decision.

    This is the second noun must be open rule:
        if the second noun is closed:
            follow the second noun autoopening rule;
        if the second noun is closed:
            stop the action;
        make no decision.
        
    This is the noun autoopening rule:
        if the sequential action option is active:
            if the player is the person asked:
                try opening the noun;
            otherwise:
                try the person asked trying opening the noun;
        otherwise:
            if the player is the person asked:
                say "(first opening [the noun])[command clarification break]";
                silently try opening the noun;
            otherwise:
                try the person asked trying opening the noun;

    This is the second noun autoopening rule:
        if the sequential action option is active:
            if the player is the person asked:
                try opening the second noun;
            otherwise:
                try the person asked trying opening the second noun;
        otherwise:
            if the player is the person asked:
                say "(first opening [the second noun])[line break]";
                silently try opening the second noun;
            otherwise:
                try the person asked trying opening the second noun.

    Emptying is an action applying to one thing.

    Check an actor emptying something (this is the can't empty what's not a container rule):
        if the noun is not a container:
            if the player is the person asked:
                say "You can't empty [a noun].";
            stop the action.

    Check an actor emptying (this is the can't empty what's closed rule):
        abide by the noun must be open rule.
        
    Check an actor emptying (this is the can't empty what's empty rule):
        if the noun does not contain something:
            if the player is the person asked:
                say "There is nothing in [the noun].";
            stop the action;
        
    Carry out an actor emptying (this is the move emptied items rule):
        now every thing is unmarked for listing;
        repeat with item running through things in the noun:
            if the person asked is the player:
                silently try taking the item;
            otherwise:
                silently try the person asked trying taking the item;
            if the person asked carries the item:
                if the person asked is the player:
                    silently try dropping the item;
                otherwise:
                    silently try the person asked trying dropping the item;
                if the person asked does not carry the item:
                    now the item is marked for listing;

    Report an actor emptying (this is the standard empty report rule):
        if the number of marked for listing things is 0:
            say "Nothing comes out of [the noun]." instead;
        if the player is the person asked:
            say "You empty ";
        otherwise:
            say "[The person asked] empties ";
        say "[the list of marked for listing things] from [the noun].";
        now every thing is unmarked for listing.
        
    Understand "empty [container] into/in [container]" as transferring it into. Understand "empty [something] into/in [something]" as transferring it into. Understand the command "dump" as "empty".

    Transferring it into is an action applying to two things.

    Check an actor transferring something into something (this is the can't transfer what's not a container rule):
        abide by the can't empty what's not a container rule.

    Check an actor transferring something into something (this is the can't transfer from closed containers rule):
        abide by the noun must be open rule.

    Check an actor transferring something into something (this is the can't transfer from empty containers rule):
        abide by the can't empty what's empty rule.

    Check an actor transferring something into something (this is the can't transfer into what's not a container rule):
        if the second noun is not a container:
            if the player is the person asked:
                say "[The second noun] cannot contain things.";
            stop the action.

    Check an actor transferring something into something (this is the can't transfer to closed containers rule):
        abide by the second noun must be open rule.
        
    Check an actor transferring something into something (this is the can't transfer something within itself rule):
        if the noun encloses the second noun:
            abide by the must hold the second noun rule.
        
    Carry out an actor transferring something into something (this is the move transferred items rule):
        now every thing is unmarked for listing;
        repeat with item running through things in the noun:
            if the player is the person asked:
                silently try taking the item;
            otherwise:
                silently try the person asked trying taking the item;
            if the person asked carries the item:
                if the person asked is the player:
                    try silently inserting the item into the second noun;
                otherwise:
                    silently try the person asked trying inserting the item into the second noun;
                if the item is in the second noun:
                    now the item is marked for listing.

    Report an actor transferring something into something (this is the standard transfer report rule):
        if the number of marked for listing things is 0:
            say "Nothing comes out of [the noun]." instead;
        if the player is the person asked:
            say "You empty ";
        otherwise:
            say "[The person asked] empties ";
        say "[the list of marked for listing things] from [the noun] ";
        if the second noun is a container:
            say "into";
        otherwise:
            say "onto";
        say " [the second noun][if something is in the noun]. [The list of things in the noun] remain[s] in [the noun][end if].";
        now every thing is unmarked for listing.


    Understand "empty [container] on/onto [supporter]" as dumping it onto. Understand "empty [something] on/onto [something]" as dumping it onto.

    Dumping it onto is an action applying to two things.

    Check an actor dumping something onto something (this is the can't dump from unheld containers rule):
        abide by the must hold the noun rule.

    Check an actor dumping something onto something (this is the can't dump from non containers rule):
        abide by the can't empty what's not a container rule.

    Check an actor dumping something onto something (this is the can't dump from closed containers rule):
        abide by the noun must be open rule.

    Check an actor dumping something onto something (this is the can't dump empty containers rule):
        abide by the can't empty what's empty rule.

    Check an actor dumping something onto something (this is the can't dump onto what's not a supporter rule):
        if the second noun is not a supporter:
            if the player is the person asked, say "[The second noun] cannot support things.";
            stop the action;
        
    Check an actor dumping something onto something (this is the can't dump onto itself rule):
        abide by the can't transfer something within itself rule.
        
    Carry out an actor dumping something onto something (this is the move dumped items rule):
        now every thing is unmarked for listing;
        repeat with item running through things in the noun:
            if the player is the person asked:
                silently try taking the item;
            otherwise:
                silently try the person asked trying taking the item;
            if the person asked carries the item:
                if the person asked is the player:
                    try silently putting the item on the second noun;
                otherwise:
                    silently try the person asked trying putting the item on the second noun;
                if the item is on the second noun:
                    now the item is marked for listing.
        
    Report an actor dumping something onto something (this is the standard report dumping rule):
        follow the standard transfer report rule.

    Empty Transfer ends here.