add builtin_item.source_flow setting.
This commit is contained in:
parent
7e3e80f4ee
commit
1e553be74c
4
init.lua
4
init.lua
@ -17,6 +17,7 @@ end
|
|||||||
local time_to_live = tonumber(core.settings:get("item_entity_ttl")) or 900
|
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 gravity = tonumber(core.settings:get("movement_gravity")) or 9.81
|
||||||
local destroy_item = core.settings:get_bool("destroy_item") ~= false
|
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
|
-- localize some math functions
|
||||||
@ -418,7 +419,8 @@ core.register_entity(":__builtin:item", {
|
|||||||
step_water_physics = function(self)
|
step_water_physics = function(self)
|
||||||
|
|
||||||
self.waterflow_state = self.def_inside and
|
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
|
if self.waterflow_state then
|
||||||
|
|
||||||
|
@ -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
|
# type. By default they can do this even on a slippery floor, like
|
||||||
# ice, but this setting allows disabling that.
|
# ice, but this setting allows disabling that.
|
||||||
builtin_item.items_collect_on_slippery (Collect items on slippery ground) bool true
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user