tweaked a few vars
This commit is contained in:
parent
311f0f5f31
commit
1c057e286f
@ -4,10 +4,10 @@ edited by TenPlus1
|
|||||||
|
|
||||||
Features:
|
Features:
|
||||||
- Items are destroyed by lava
|
- Items are destroyed by lava
|
||||||
- Items are moved along by flowing water (new routine)
|
- Items are pushed along by flowing water (thanks to QwertyMine3)
|
||||||
- Items are removed after 900 seconds or the time that is specified by
|
- Items are removed after 900 seconds or the time that is specified by
|
||||||
remove_items in minetest.conf (-1 disables it)
|
remove_items in minetest.conf (-1 disables it)
|
||||||
- Particle effects added
|
- Particle effects added
|
||||||
- Dropped items keep moving when on ice
|
- Dropped items keep sliding when on ice
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
|
10
init.lua
10
init.lua
@ -374,8 +374,7 @@ core.register_entity(":__builtin:item", {
|
|||||||
local def = core.registered_nodes[node.name]
|
local def = core.registered_nodes[node.name]
|
||||||
|
|
||||||
-- item inside block, move to vacant space
|
-- item inside block, move to vacant space
|
||||||
if def.liquidtype ~= "source"
|
if not def.liquid
|
||||||
and def.liquidtype ~= "flowing"
|
|
||||||
and node.name ~= "air"
|
and node.name ~= "air"
|
||||||
and def.drawtype == "normal" then
|
and def.drawtype == "normal" then
|
||||||
|
|
||||||
@ -426,11 +425,12 @@ core.register_entity(":__builtin:item", {
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Ignore is walkable -> stop until the block loaded
|
-- Ignore is walkable -> stop until the block loaded
|
||||||
local entity_fall = (def and not def.walkable)
|
local entity_fall = not def.walkable
|
||||||
|
|
||||||
if self.physical_state == entity_fall then
|
if self.physical_state == entity_fall then
|
||||||
|
|
||||||
-- This stops pushing items where water causes them to flow from stationary
|
-- This stops pushing items where water caused them
|
||||||
|
-- to continue flowing from stationary
|
||||||
if not entity_fall then
|
if not entity_fall then
|
||||||
self.object:setvelocity({x = 0, y = 0, z = 0})
|
self.object:setvelocity({x = 0, y = 0, z = 0})
|
||||||
end
|
end
|
||||||
@ -443,7 +443,7 @@ core.register_entity(":__builtin:item", {
|
|||||||
|
|
||||||
local objects = core.get_objects_inside_radius(pos, 0.8)
|
local objects = core.get_objects_inside_radius(pos, 0.8)
|
||||||
|
|
||||||
for k, object in pairs(objects) do
|
for k, object in ipairs(objects) do
|
||||||
|
|
||||||
local entity = object:get_luaentity()
|
local entity = object:get_luaentity()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user