I have a number of do_all
routines so that I can do things like GET ALL FROM CONTAINER, but still allow GET ALL and DROP ALL in a room. I have custom GET and DROP routines so that I can automatically update the display after a GET or DROP without having to use press_any_key
. This works fine, except with GET ALL and DROP ALL. As each individual action is performed, the screen is updated and the message printed. This happens so quickly, that you only get a chance to see the last message. I was hoping to avoid this with a routine something like this:
: match "get all" {
: set_integer var = "old_carried" {(carried())}
: do_all "current_location_objects";
: if (old_carried != carried()) {
: set_string var = "message" {("You " + original "verb" + " everything.")}
: gosub "refresh";
}
: print {("There's nothing to " + original "verb" + ".")}
: done;
}
However, nothing after the do_all
is executed. Is there a workaround for this? Perhaps using a while loop to step through the inventory (for DROP ALL) or the room contents (for GET ALL).