Skip to content

Commit

Permalink
don't drop mime glue items; remove old falling node glue entities
Browse files Browse the repository at this point in the history
  • Loading branch information
fluxionary committed Oct 26, 2022
1 parent 8c70cf6 commit b72e079
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions core/nodes.lua
Expand Up @@ -44,6 +44,9 @@ minetest.register_node("mobs_mime:glue", {
drowning = 1,
liquid_viscosity = 7,
liquid_renewable = false,
drop = "",
on_drop = function() end,
on_blast = function() end,

on_construct = function(pos)
minetest.get_node_timer(pos):start(mobs_mime.glueNodeTimeout)
Expand Down Expand Up @@ -97,6 +100,9 @@ minetest.register_node("mobs_mime:glue_flowing", {
drowning = 1,
liquid_viscosity = 7,
liquid_renewable = false,
drop = "",
on_drop = function() end,
on_blast = function() end,

on_construct = function(pos)
minetest.get_node_timer(pos):start(mobs_mime.glueNodeTimeout)
Expand All @@ -107,3 +113,13 @@ minetest.register_node("mobs_mime:glue_flowing", {
return true
end
})

local falling_node_def = minetest.registered_entities["__builtin:falling_node"]
local old_falling_node_on_activate = falling_node_def.on_activate

function falling_node_def.on_activate(self, staticdata)
old_falling_node_on_activate(self, staticdata)
if self.object and (self.node.name == "mobs_mime:glue" or self.node.name == "mobs_mime:glue_flowing") then
self.object:remove()
end
end

0 comments on commit b72e079

Please sign in to comment.