chest duplication glitch #5085

Closed
opened 2023-08-09 05:58:50 +02:00 by copper248 · 16 comments

This chest duplication glitch works by attempting to destroy a open chest. This has parallels to #5068, the open chest instead of being moved is blown up and when it is closed a blank (no slot chest) appears and a chest is thrown to the floor by the explosion. The blank chest can then be mined for a second chest

This chest duplication glitch works by attempting to destroy a open chest. This has parallels to [#5068](https://gitea.your-land.de/your-land/bugtracker/issues/5068), the open chest instead of being moved is blown up and when it is closed a blank (no slot chest) appears and a chest is thrown to the floor by the explosion. The blank chest can then be mined for a second chest
flux added the
1. kind/bug
label 2023-08-09 20:47:44 +02:00
Member

ugh.

ugh.
Author

It is another open chest problem, lets just get rid of them

It is another open chest problem, lets just get rid of them
Member

Chest duplication works with all chests registerd by default.chest.register_chest. So mesechests should be affected too.

I was curious how chests and their fs are handled...
(50% of the code are needed to open/close chests :P)

They store a table with all open chests. Everytime a player submits a fs they look in this table if the player has an open chest which can be closed. They forgot to check whether there is still a chest at this position... (not to mention that this will delete any other node which might result again in chests with wrong meta)
960aff2f63/mods/default/chests.lua (L46)

NOTE: I somehow rememberd #1979
petz does NOT use the default chest registration but instead copy/pasted it, made some minor changes and copied the bug too. It would need the same fix here...
5df53174ae/petz/misc/chests.lua (L40)

Chest duplication works with all chests registerd by `default.chest.register_chest`. So mesechests should be affected too. I was curious how chests and their fs are handled... (50% of the code are needed to open/close chests :P) They store a table with all open chests. Everytime a player submits a fs they look in this table if the player has an open chest which can be closed. They forgot to check whether there is still a chest at this position... (not to mention that this will delete any other node which might result again in chests with wrong meta) https://github.com/minetest/minetest_game/blob/960aff2f6366c2de864bdd9d4fd4f5eafa956bf3/mods/default/chests.lua#L46 NOTE: I somehow rememberd #1979 petz does NOT use the default chest registration but instead copy/pasted it, made some minor changes and copied the bug too. It would need the same fix here... https://github.com/runsy/petz/blob/5df53174ae9a35f5a945dc88c5dc85b421e428ce/petz/misc/chests.lua#L40
Member

i got rid of open chests 34fe76ee92

i guess i need to fix petz too though, i forgot about that.

i got rid of open chests https://gitea.your-land.de/your-land/yl_commons/commit/34fe76ee925571df70424b7813291957aee0ebd5 i guess i need to fix petz too though, i forgot about that.
Member

fixed the petz chest as well (i think) c0f98b5cca

fixed the petz chest as well (i think) https://gitea.your-land.de/your-land/yl_commons/commit/c0f98b5ccad60036585d7cfc70143047ebd58e05
flux added the
4. step/ready to QA test
label 2023-08-10 22:15:53 +02:00
AliasAlreadyTaken added this to the 1.1.120 milestone 2023-08-11 00:17:50 +02:00

I liked the "open chest" thingy, but if it gives us only headaches, there's no point keeping it.

I liked the "open chest" thingy, but if it gives us only headaches, there's no point keeping it.
Member

i suppose another option instead of getting rid of the open chests would be to make the "close" action verify that there's actually still an open chest in that location before swapping out the node.

i suppose another option instead of getting rid of the open chests would be to make the "close" action verify that there's actually still an open chest in that location before swapping out the node.
Member

i suppose if i add a check to the close lid code, i could possibly even get this updated upstream. i'll try that. in the meantime, chests won't open.

i suppose if i add a check to the close lid code, i could possibly even get this updated upstream. i'll try that. in the meantime, chests won't open.
Member
mtg PR: https://github.com/minetest/minetest_game/pull/3046
flux added the
4. step/blocked
3. source/mod upstream
labels 2023-08-11 02:30:49 +02:00
flux removed the
4. step/blocked
label 2023-08-11 21:51:21 +02:00
Member

mtg PR got merged

mtg PR got merged
Member

i've removed the code to get rid of the open chests: 50ccd70c66

i guess i still need to PR petz to prevent problems there.

i've removed the code to get rid of the open chests: https://gitea.your-land.de/your-land/yl_commons/commit/50ccd70c6656499e69376f203bdbadf03c32ea19 i guess i still need to PR petz to prevent problems there.
Member
petz PR https://github.com/runsy/petz/pull/192
Member

petz PR was merged

petz PR was merged

This is blocked until the new MTG is delivered, right? We usually only update MTG with a new MT version, next would be 5.8.0, which is due sometime soonish.

Also, what business has petz to change chests??

This is blocked until the new MTG is delivered, right? We usually only update MTG with a new MT version, next would be 5.8.0, which is due sometime soonish. Also, what business has petz to change chests??
AliasAlreadyTaken added the
4. step/QA OK
label 2023-09-21 05:42:43 +02:00

QA

I cannot reproduce the issue with the fixese, even without latest MTG

QA I cannot reproduce the issue with the fixese, even without latest MTG
flux added
5. result/fixed
and removed
4. step/ready to QA test
labels 2023-11-17 01:12:30 +01:00
Member

this is live

this is live
flux closed this issue 2023-11-17 01:12:54 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#5085
No description provided.