Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tnt compatibility #37

Merged
merged 1 commit into from
Nov 16, 2023
Merged

Conversation

fluxionary
Copy link
Contributor

  1. drop the item in the anvil (currently it is just lost)
  2. remove the entity (currently it can persist without the anvil)

Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Will merge in a few days unless there are objections.

@SmallJoker SmallJoker merged commit cafef4e into minetest-mods:master Nov 16, 2023
1 check passed
@OgelGames
Copy link
Contributor

Looks like this is missing code to preserve the anvil's shared state, as is done when digging the anvil:

anvil/init.lua

Lines 238 to 245 in cafef4e

preserve_metadata = function(pos, oldnode, oldmeta, drops)
if next(drops) and tonumber(oldmeta.shared) == 1 then
local meta = drops[next(drops)]:get_meta()
meta:set_int("shared", 1)
meta:set_string("description", S("Shared anvil"))
end
return drops
end,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants