re-formatted README.txt
This commit is contained in:
parent
bb836c5177
commit
31d3ea54d8
50
README.txt
50
README.txt
@ -7,13 +7,14 @@ Procedure for testing:
|
||||
4. Take a stack out of one of the inventory slots of the demo-object and put it
|
||||
into an *empty* receiving slot in your player-inventory.
|
||||
|
||||
Expected result: stack removed from demo-object and moved into your inventory;
|
||||
Expected result: stack removed from demo-object and moved into your inv
|
||||
allow_metadata_inventory_take is called and ALLOWS the move
|
||||
Observed behaviour: OK - works as expected
|
||||
With patch: OK - works as expected
|
||||
|
||||
|
||||
5. Try to take a stack from your inventory and put it into an *empty* slot of the demo object.
|
||||
5. Try to take a stack from your inventory and put it into an *empty* slot of
|
||||
the demo object.
|
||||
|
||||
Expected result: move denied
|
||||
stack will appear back in your inventory
|
||||
@ -21,33 +22,42 @@ Expected result: move denied
|
||||
Observed behaviour: OK
|
||||
With patch: OK
|
||||
|
||||
6. Try to take a stack out of the demo-object and place it on a slot in your player
|
||||
inventory that *already contains* a diffrent stack.
|
||||
6. Try to take a stack out of the demo-object and place it on a slot in your
|
||||
player inventory that *already contains* a diffrent stack.
|
||||
|
||||
Expected result: move denied - the destination inventory slot is occupied, and the output slot
|
||||
of the demo object does not want any input
|
||||
Observed behaviour: allow_metadata_inventory_take is called and allows taking the stack out of the demo-object;
|
||||
The stack in the receiving slot never appears as a parameter in any api call.
|
||||
The stack in the receiving slot is PUT (swpapped) into the output-only-slot of the demo object.
|
||||
The demo object does not receive any information at all about the new stack in its output-only-slot.
|
||||
Expected result: move denied - the destination inventory slot is occupied,
|
||||
and the output slot of the demo object does not want any
|
||||
input
|
||||
Observed behaviour: allow_metadata_inventory_take is called and allows taking
|
||||
the stack out of the demo-object;
|
||||
The stack in the receiving slot never appears as a
|
||||
parameter in any api call.
|
||||
The stack in the receiving slot is PUT (swapped) into the
|
||||
output-only-slot of the demo object.
|
||||
The demo object does not receive any information at all
|
||||
about the new stack in its output-only-slot.
|
||||
With patch: OK
|
||||
|
||||
So far, so good. Bug fixed. But: An undesired side-effect shows up which is bad for gameplay:
|
||||
So far, so good. Bug fixed. But: An undesired side-effect shows up which is bad
|
||||
for gameplay:
|
||||
|
||||
7. Place a normal chest. (default:chest)
|
||||
8. Put a stack of something into the chest.
|
||||
9. As in 6., take the stack back out of the chest and try to place it in a slot of your inventory that already contains
|
||||
a diffrent stack.
|
||||
9. As in 6., take the stack back out of the chest and try to place it in a slot
|
||||
of your inventory that already contains a diffrent stack.
|
||||
|
||||
Expected result: The stack out of the chest is placed into your inventory slot.
|
||||
The stack that occupied your inventory slot before is placed in the chest.
|
||||
Observed behaviour: OK - The old stack from your inventory gets put into the chest, and the new stack will stick to your mouse,
|
||||
ready to be put into the - now empty - slot in your inventory.
|
||||
Expected result: The stack out of the chest is placed into your inventory
|
||||
slot. The stack that occupied your inventory slot before is
|
||||
placed in the chest.
|
||||
Observed behaviour: OK - The old stack from your inventory gets put into the
|
||||
chest, and the new stack will stick to your mouse,
|
||||
ready to be put into the - now empty - slot in your
|
||||
inventory.
|
||||
With patch: Move denied.
|
||||
|
||||
|
||||
Possible solution:
|
||||
Extend allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
Possible solution: Extend
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
by adding a new parameter that provides information about the RECEIVING slot:
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player, will_swap )
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player, will_swap )
|
||||
If the destination inventory cannot (fully) take the stack, will_swap is true. Else false.
|
||||
|
Loading…
x
Reference in New Issue
Block a user