add builtin_item.source_flow setting.

This commit is contained in:
tenplus1 2024-11-09 08:11:12 +00:00
parent 7e3e80f4ee
commit 1e553be74c
2 changed files with 7 additions and 1 deletions

View File

@ -17,6 +17,7 @@ end
local time_to_live = tonumber(core.settings:get("item_entity_ttl")) or 900
local gravity = tonumber(core.settings:get("movement_gravity")) or 9.81
local destroy_item = core.settings:get_bool("destroy_item") ~= false
local source_flow = core.settings:get_bool("builtin_item.source_flow")
-- localize some math functions
@ -418,7 +419,8 @@ core.register_entity(":__builtin:item", {
step_water_physics = function(self)
self.waterflow_state = self.def_inside and
self.def_inside.liquidtype == "flowing"
(self.def_inside.liquidtype == "flowing" or (source_flow and
self.def_inside.liquidtype == "source"))
if self.waterflow_state then

View File

@ -38,3 +38,7 @@ air_drag (Horizontal drag of air on falling items) float 0.4
# type. By default they can do this even on a slippery floor, like
# ice, but this setting allows disabling that.
builtin_item.items_collect_on_slippery (Collect items on slippery ground) bool true
# Allow dropped items to be pushed when inside of source nodes,
# False by default but can be enabled.
builtin_item.source_flow (Allow water source to push items) bool false