remove dig prediction from (most) nodes as an extra anti-glitch measure
parent
fe884a4523
commit
01a0376f7d
1
init.lua
1
init.lua
|
@ -53,6 +53,7 @@ dofile(bls.modpath .. "/node_inventory_protection.lua")
|
|||
dofile(bls.modpath .. "/old_mod_cleanup.lua")
|
||||
dofile(bls.modpath .. "/text_entry_logging.lua")
|
||||
dofile(bls.modpath .. "/tnt.lua")
|
||||
dofile(bls.modpath .. "/no_prediction.lua")
|
||||
dofile(bls.modpath .. "/oregen.lua")
|
||||
dofile(bls.modpath .. "/orienteering.lua")
|
||||
dofile(bls.modpath .. "/remove_smartrenting.lua")
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
-- remove dig prediction from any node that isn't doing something custom
|
||||
-- prevents some forms of glitching-through-walls
|
||||
-- might be annoying w/ lag though; need to test.
|
||||
local function add_no_prediction()
|
||||
for itemstring, def in pairs(minetest.registered_nodes) do
|
||||
if def.node_dig_prediction == "air" or not def.node_dig_prediction then
|
||||
minetest.override_item(itemstring, {
|
||||
node_dig_prediction = ""
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_on_mods_loaded(add_no_prediction)
|
Loading…
Reference in New Issue