Skip to content

Commit

Permalink
Update fluids.lua (#3501)
Browse files Browse the repository at this point in the history
Using an empty fluid container on a filled container would make them both empty containers.
The script should copy the fluid type from the target container before transforming the target container to en empty one.
It was doing the reverse: transforming en empty one, then copying no fluid type
  • Loading branch information
Sundance committed Jul 17, 2021
1 parent ea817a9 commit e2ae1b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/actions/scripts/other/fluids.lua
Expand Up @@ -33,8 +33,8 @@ function onUse(player, item, fromPosition, target, toPosition, isHotkey)
item:transform(item:getId(), 0)
return true
elseif target.type ~= 0 and item.type == 0 then
target:transform(target:getId(), 0)
item:transform(item:getId(), target.type)
target:transform(target:getId(), 0)
return true
end
end
Expand Down

0 comments on commit e2ae1b5

Please sign in to comment.