placing torches under water
- ErrorNull
- Member
- Posts: 270
- Joined: Thu Mar 03, 2016 00:43
- GitHub: ErrorNull0
placing torches under water
not sure if this was already reported and already being worked on.. but i noticed i can place torches under water onto blocks and it would create an air pocket... thus allowing player to breath. is this intentional or will be corrected? i admit it's a slick way to "cheat" and explore unlimited depths underwater... but it detracts from the realism. I'd rather not be able to place torches under water at all.
Re: placing torches under water
There is discusion about making objects like torches floodable it would fix current behavior but seems need some change on engine side. Probably mods could override current behavior if "fix" needed sooner.
- maikerumine
- Member
- Posts: 1420
- Joined: Mon Aug 04, 2014 14:27
- GitHub: maikerumine
- In-game: maikerumine
Re: placing torches under water
IIRC There is a dissolvable torch in the stampy sub game, works like a charm. Also unternull subgame.
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959
- ErrorNull
- Member
- Posts: 270
- Joined: Thu Mar 03, 2016 00:43
- GitHub: ErrorNull0
Re: placing torches under water
ah ok. thanks for the info. I'll check out that discussion xeranas as well as those subgames maikerumine. much appreciated.
- TheReaperKing
- Member
- Posts: 531
- Joined: Sun Nov 22, 2015 21:36
- Contact:
Re: placing torches under water
What if you just restricted the ability for torches to be put in/under water at all? if block = water then torchplacement = NOPE :)
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
- Linuxdirk
- Member
- Posts: 3216
- Joined: Wed Sep 17, 2014 11:21
- In-game: Linuxdirk
- Location: Germany
- Contact:
Re: placing torches under water
But will it really be an engine change if simple mods with the limited API can fix that bug?xeranas wrote:Probably mods could override current behavior if "fix" needed sooner.
Re: placing torches under water
Engine change needs for global (not only torches) or/and performance wise fix. Mods still can workaround logic by ABM checks, placement restriction and etc.Linuxdirk wrote:But will it really be an engine change if simple mods with the limited API can fix that bug?xeranas wrote:Probably mods could override current behavior if "fix" needed sooner.
- ErrorNull
- Member
- Posts: 270
- Joined: Thu Mar 03, 2016 00:43
- GitHub: ErrorNull0
Re: placing torches under water
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?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 :)
Re: placing torches under water
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 :-/
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 :-/
Best regards
blackjack
blackjack
Re: placing torches under water
Just for learning (not very practical). 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" . If unsure search for on_place usage examples at mintest_game repo.ErrorNull wrote: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?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 :)
Code: Select all
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,
This should be different topic. I'ts unclear to me how doors (or similar objects) should work underwater regardless of "air to breathe" question (and solution most likely would be completely different from torches). Mentioned pull request/discusion does not address this question.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 :-/
- ErrorNull
- Member
- Posts: 270
- Joined: Thu Mar 03, 2016 00:43
- GitHub: ErrorNull0
Re: placing torches under water
Ah so the plot thickens. So am I connecting the dots correctly here (since I haven't actually tested it) to presume that any item that is not a full cubical node will have air fill out the rest of the node when placed in water? Like torches, doors, fences, etc? If that's the case then definitely agree how there should be an engine update to restrict the placement of non-cubical nodes in water from the beginning. That would be a much more efficient solution than shirking the fix to a mod. But as a temp solution I'd take it. Thanks for the code example. I'll experiment with it..
- kaadmy
- Member
- Posts: 706
- Joined: Thu Aug 27, 2015 23:07
- GitHub: kaadmy
- IRC: KaadmY
- In-game: KaadmY kaadmy NeD
Re: placing torches under water
@ErrorNull then what happens to underwater plants, etc?
- jan6
- Member
- Posts: 64
- Joined: Wed Dec 02, 2015 17:58
- GitHub: jan69
- IRC: jan6
- In-game: jan6
- Location: Estonia
Re: placing torches under water
I think there should be an option for max realism, but I personally really like the ability to build underwater without drowning.
Maybe there should be a group that defines if a node creates air pocket or not.
Maybe there should be a group that defines if a node creates air pocket or not.
I know everything, exept what I know...
I have a secret..it's so secret even I don't know what it is
I have a secret..it's so secret even I don't know what it is
Re: placing torches under water
You can also add lava. Same behavior as waterxeranas 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" .
Code: Select all
local unsupported_nodes = {"default:water_source", "default:water_flowing"}
- ErrorNull
- Member
- Posts: 270
- Joined: Thu Mar 03, 2016 00:43
- GitHub: ErrorNull0
Re: placing torches under water
thanks xeranas - i tried the code and worked as expected. i also included lava as well to the code (@burli). for now it's a workable temporary way. I'll keep my hopes up for a more elegant solution.
Who is online
Users browsing this forum: No registered users and 7 guests