xeranas wrote:Probably mods could override current behavior if "fix" needed sooner.
Linuxdirk wrote:xeranas wrote:Probably mods could override current behavior if "fix" needed sooner.
But will it really be an engine change if simple mods with the limited API can fix that bug?
TheReaperKing wrote:What if you just restricted the ability for torches to be put in/under water at all? if block = water then torchplacement = NOPE :)
ErrorNull wrote:TheReaperKing wrote:What if you just restricted the ability for torches to be put in/under water at all? if block = water then torchplacement = NOPE :)
that does seem like a logical straight-forward solution. I'm still a noob at lua and modding minetest. Anyone out there know if it's possible to simply restrict torches from even being placed in water?
on_place = function(itemstack, placer, pointed_thing)
local node = minetest.get_node_or_nil(pointed_thing.above)
local unsupported_nodes = {"default:water_source", "default:water_flowing"}
if node ~= nil then
for i=1, #unsupported_nodes do
if node.name == unsupported_nodes[i] then return end
end
end
return minetest.item_place(itemstack, placer, pointed_thing, param2)
end,
blackjack wrote:It's not only the torches thing ...
If you place a door under water, you'll have two blocks of air to breathe!
Restricting the torches placement would be a 5% solution :-/
xeranas wrote:Code below can be added on torch node definition which is located at "default" mod at path mods/default/nodes.lua and starts with minetest.register_node("default:torch" .Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
local unsupported_nodes = {"default:water_source", "default:water_flowing"}
Users browsing this forum: No registered users and 6 guests