Buggy container behavior
Freak
25 Jun 2009, 12:44You are in The Room.
There is bag and box here.
You can go east, west or to Shack.
> get bag
You pick it up.
> put bag in box
Done.
> get box
You pick it up.
> x bag
I can't see that here.
** ??? **
> get box
I can't see that here.
** I'm holding it! **
> x box
It contains bag.
> get bag
I can't see that here.
** ??? **
> x bag
Nothing out of the ordinary.
> put box in bag
Done.
> x bag
It contains box.
> x box
It contains bag.
> e
You are in Other Room.
You can go west.
> drop bag
(Quest crashes)
There is bag and box here.
You can go east, west or to Shack.
> get bag
You pick it up.
> put bag in box
Done.
> get box
You pick it up.
> x bag
I can't see that here.
** ??? **
> get box
I can't see that here.
** I'm holding it! **
> x box
It contains bag.
> get bag
I can't see that here.
** ??? **
> x bag
Nothing out of the ordinary.
> put box in bag
Done.
> x bag
It contains box.
> x box
It contains bag.
> e
You are in Other Room.
You can go west.
> drop bag
(Quest crashes)
Alex
25 Jun 2009, 18:02Thanks. I make that three bugs then:
1. Quest has no separate error for "you have already have that". An object in the player's inventory is not technically in the current room, which is why the disambiguation fails. I'll add an extra check for "take" so it prints a sensible error.
2. When adding an object to a container that hasn't been looked at yet, the container contents are still hidden. I suppose adding something to a container should trigger a "look" at its contents if they've not been seen already - if there was something already in the container, you would logically see that when adding something else to it.
3. There's nothing stopping you from creating a loop in a chain of parents.
I'll add these to the list for v4.1.
1. Quest has no separate error for "you have already have that". An object in the player's inventory is not technically in the current room, which is why the disambiguation fails. I'll add an extra check for "take" so it prints a sensible error.
2. When adding an object to a container that hasn't been looked at yet, the container contents are still hidden. I suppose adding something to a container should trigger a "look" at its contents if they've not been seen already - if there was something already in the container, you would logically see that when adding something else to it.
3. There's nothing stopping you from creating a loop in a chain of parents.
I'll add these to the list for v4.1.
Freak
25 Jun 2009, 20:53You are in The Room.
There is bag and box here.
You can go east, west or to Shack.
> get bag
You pick it up.
> get box
You pick it up.
> put box in bag
Done.
> x bag
It contains box.
> i
You are carrying:
bag and box.
** ??? **
> x box
Nothing out of the ordinary.
> x bag
It contains box.
> get box
I can't see that here.
** ??? **
(BTW, most other systems avoid these problems by only using one property where you have "location" and "parent". In such a case, box.parent would be bag; bag.parent would be player_obj.)
There is bag and box here.
You can go east, west or to Shack.
> get bag
You pick it up.
> get box
You pick it up.
> put box in bag
Done.
> x bag
It contains box.
> i
You are carrying:
bag and box.
** ??? **
> x box
Nothing out of the ordinary.
> x bag
It contains box.
> get box
I can't see that here.
** ??? **
(BTW, most other systems avoid these problems by only using one property where you have "location" and "parent". In such a case, box.parent would be bag; bag.parent would be player_obj.)