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

Allow flooding to cause item drops #4130

Closed
wants to merge 1 commit into from

Conversation

cyisfor
Copy link

@cyisfor cyisfor commented May 15, 2016

Non-air nodes can be defined as floodable, and now they'll drop their contents rather than just being replaced with air.

Non-air nodes can be defined as floodable, and now they'll drop their contents rather than just being replaced with air.
@PilzAdam
Copy link
Contributor

AFAIK it's intentional that items are not dropped if they are flooded by water.

@est31
Copy link
Contributor

est31 commented May 15, 2016

IMO the engine should allow for whatever mods want, even for really bad ideas like letting liquids drop plants. Its a griefer's wet dream...

@Thomas--S
Copy link
Contributor

I suggest to make the behaviour configurable.

@paramat
Copy link
Contributor

paramat commented May 15, 2016

Yes 'floodable' is to allow liquid to flow into vacuum, alien atmosphere, gas or any airlike nodes, which should not be dropped.
There is some discussion about if or how to implement optional drops, but i am not keen on making liquid drop nodes as items, see minetest/minetest_game#829 for my reasons.
If it is done it seems best to have an 'on_flood' callback, but i'm unconvinced there's enough need to justify adding this callback. Torches seems the only acceptable use.
👎

@PilzAdam
Copy link
Contributor

@est31 maybe change the floodable field to allow specifying that nodes should be dropped when flooded?

@sofar
Copy link
Contributor

sofar commented May 16, 2016

I don't think it can be as simple as this anyway.

If there is an on_flood() callback, at least you can pass the liquid as a parameter, so that the callback function can decide whether to have the node destroyed (by e.g. lava) or dropped (by e.g. water), or maybe something else (enable a generator of some sorts, or heat a furnace, etc.).

I'm somewhat positive about the concept, but I think this is too simple.

@tenplus1
Copy link
Contributor

tenplus1 commented May 20, 2016

@sofar - So an example for something like lava source would be:

on_flood = function(pos, liquidnode)
    if minetest.get_item_group(liquidnode.name, "water") > 0 then
        minetest.set_node(pos, {name = "default:obsidian"}
    end
end,

... thus saving on using an Abm to do the same action.

@paramat
Copy link
Contributor

paramat commented May 20, 2016

^ Good idea.

@sofar
Copy link
Contributor

sofar commented May 20, 2016

Yes, something like that is what I had in mind.

@sofar
Copy link
Contributor

sofar commented May 22, 2016

👎 I don't feel this is right, at all, and would be much more interested in seeing an on_flood() callback implementation as discussed above.

@paramat paramat added Won't add The feature request was rejected and will not be added. @ Server / Client / Env. labels May 23, 2016
@paramat
Copy link
Contributor

paramat commented May 23, 2016

There is general dev agreement that an on_flood callback is the way to do this.

@paramat paramat closed this May 23, 2016
@sofar sofar mentioned this pull request Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Server / Client / Env. Won't add The feature request was rejected and will not be added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants