mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-02-25 07:11:02 +01:00
[plantlife_modpack] Update
This commit is contained in:
parent
90af647d5a
commit
ab24dc7869
@ -61,14 +61,14 @@ minetest.register_abm({
|
|||||||
|
|
||||||
-- Spawning apples
|
-- Spawning apples
|
||||||
-- Limit mass changes after block has not been loaded for some time:
|
-- Limit mass changes after block has not been loaded for some time:
|
||||||
-- spawn apples with 10% chance, but with 10 times higher frequency
|
-- spawn apples with 25% chance, but with 4 times higher frequency
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = { nature.blossom_node },
|
nodenames = { nature.blossom_node },
|
||||||
interval = nature.blossom_delay / 10,
|
interval = nature.apple_delay / 4,
|
||||||
chance = nature.apple_chance,
|
chance = nature.apple_chance,
|
||||||
|
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
if math.random(10) == 0 and nature.dtime < 0.2 and not minetest.find_node_near(pos, nature.apple_spread, { "default:apple" }) then
|
if math.random(4) == 1 and nature.dtime < 0.2 and not minetest.find_node_near(pos, nature.apple_spread, { "default:apple" }) then
|
||||||
spawn_apple_under(pos)
|
spawn_apple_under(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -23,6 +23,7 @@ end
|
|||||||
nature.leaves_blossom_chance = 15
|
nature.leaves_blossom_chance = 15
|
||||||
nature.blossom_leaves_chance = 5
|
nature.blossom_leaves_chance = 5
|
||||||
nature.blossom_delay = 3600
|
nature.blossom_delay = 3600
|
||||||
|
nature.apple_delay = 3600
|
||||||
nature.apple_chance = 10
|
nature.apple_chance = 10
|
||||||
nature.apple_spread = 2
|
nature.apple_spread = 2
|
||||||
|
|
||||||
|
@ -327,35 +327,40 @@ for i in pairs(TRuNKS) do
|
|||||||
local TRuNK = TRuNKS[i][2]
|
local TRuNK = TRuNKS[i][2]
|
||||||
if minetest.get_modpath(MoD) ~= nil then
|
if minetest.get_modpath(MoD) ~= nil then
|
||||||
|
|
||||||
local des = minetest.registered_nodes[MoD..":"..TRuNK].description
|
local node = minetest.registered_nodes[MoD..":"..TRuNK]
|
||||||
|
if node then
|
||||||
|
local des = node.description
|
||||||
|
|
||||||
minetest.register_node("trunks:"..TRuNK.."root", {
|
minetest.register_node("trunks:"..TRuNK.."root", {
|
||||||
description = des.." Root",
|
description = des.." Root",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
tiles = {
|
tiles = {
|
||||||
--[[top]] MoD.."_"..TRuNK..".png",
|
--[[top]] MoD.."_"..TRuNK..".png",
|
||||||
--[[bottom]] MoD.."_"..TRuNK..".png",
|
--[[bottom]] MoD.."_"..TRuNK..".png",
|
||||||
--[[right]] MoD.."_"..TRuNK..".png^trunks_root_mask.png^[makealpha:0,0,0",
|
--[[right]] MoD.."_"..TRuNK..".png^trunks_root_mask.png^[makealpha:0,0,0",
|
||||||
--[[left]] MoD.."_"..TRuNK..".png^trunks_root_mask.png^[transformFX^[makealpha:0,0,0",
|
--[[left]] MoD.."_"..TRuNK..".png^trunks_root_mask.png^[transformFX^[makealpha:0,0,0",
|
||||||
--[[back]] MoD.."_"..TRuNK..".png",
|
--[[back]] MoD.."_"..TRuNK..".png",
|
||||||
--[[front]] MoD.."_"..TRuNK..".png"
|
--[[front]] MoD.."_"..TRuNK..".png"
|
||||||
},
|
},
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
selection_box = {type = "fixed", fixed = roots_cube},
|
selection_box = {type = "fixed", fixed = roots_cube},
|
||||||
node_box = {type = "fixed", fixed = roots_sheet},
|
node_box = {type = "fixed", fixed = roots_sheet},
|
||||||
groups = {
|
groups = {
|
||||||
tree_root=1,
|
tree_root=1,
|
||||||
snappy=1,
|
snappy=1,
|
||||||
choppy=2,
|
choppy=2,
|
||||||
oddly_breakable_by_hand=1,
|
oddly_breakable_by_hand=1,
|
||||||
flammable=2--,
|
flammable=2--,
|
||||||
--not_in_creative_inventory=1 -- atm in inv for testing
|
--not_in_creative_inventory=1 -- atm in inv for testing
|
||||||
},
|
},
|
||||||
--drop = "trunks:twig_1", -- not sure about this yet
|
--drop = "trunks:twig_1", -- not sure about this yet
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
else
|
||||||
|
print(string.format("[Trunks] warning: tree type '%s:%s' not found", MoD, TRuNK))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user