-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Default behavior
You are in a room.
You can see a table (on which there is a basket (containing a bag (containing a ball))).
> get all
basket: You pick it up.
bag: You pick it up.
ball: You pick it up.
> drop all
basket: You drop it.
bag: You drop it.
ball: You drop it.
> undo
Undo: drop all
> undo
Undo: get all
> l
You are in a room.
You can see a table (on which there is a basket (containing a bag (containing a ball))).
> get basket
You pick it up.
> i
You are carrying a basket (containing a bag (containing a ball)).
> drop all
basket: You drop it.
bag: You are not carrying it.
ball: You are not carrying it.
My "fixes"
EDIT This is no good!
This may not be the best way to handle this, but it seems to work VERY well UNLESS directly dealing with an object in a held container.
Take
if (multiple and ListCount(object) = 0) {
msg ("Nothing here to take.")
}
else {
foreach (obj, object) {
if (not ListContains(GetAllChildObjects(game.pov),obj)) {
DoTake (obj, multiple)
}
}
}Drop
if (multiple and ListCount(object) = 0) {
msg ("You are not carrying anything.")
}
else {
foreach (obj, object) {
if (obj.parent = game.pov) {
DoDrop (obj, multiple)
}
}
}You are in a room.
You can see a table (on which there is a basket (containing a bag (containing a ball))).
> get all
basket: You pick it up.
> i
You are carrying a basket (containing a bag (containing a ball)).
> drop all
basket: You drop it.
> i
You are not carrying anything.
> l
You are in a room.
You can see a table and a basket (containing a bag (containing a ball)).
> get all
basket: You pick it up.
> i
You are carrying a basket (containing a bag (containing a ball)).
> l
You are in a room.
You can see a table.
> put basket on table
Done.
> i
You are not carrying anything.
> l
You are in a room.
You can see a table (on which there is a basket (containing a bag (containing a ball))).