Continue major code restructuring
- Move things into feature-specific files - Separate files into layers lexically - Consistently variablize modname
This commit is contained in:
parent
03199f67ff
commit
7b82325637
12
bamboo.lua
12
bamboo.lua
@ -22,7 +22,7 @@ minetest.register_node(modname .. ":bamboo_pole", {
|
||||
description = "Bamboo",
|
||||
drawtype = "nodebox",
|
||||
node_box = bamboo_nodebox,
|
||||
tiles = {"nc_nature_bamboo.png^[colorize:peru:100"},
|
||||
tiles = {modname .. "_bamboo.png^[colorize:peru:100"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
@ -41,7 +41,7 @@ minetest.register_node(modname .. ":bamboo_living", {
|
||||
description = "Living Bamboo",
|
||||
drawtype = "nodebox",
|
||||
node_box = bamboo_nodebox,
|
||||
tiles = {"nc_nature_bamboo.png"},
|
||||
tiles = {modname .. "_bamboo.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {
|
||||
@ -56,7 +56,7 @@ minetest.register_node(modname .. ":bamboo_living", {
|
||||
drop = modname .. ":bamboo_pole"
|
||||
})
|
||||
|
||||
minetest.register_alias_force("nc_nature:bamboo", "nc_nature:bamboo_living")
|
||||
minetest.register_alias_force(modname .. ":bamboo", modname .. ":bamboo_living")
|
||||
|
||||
nodecore.register_aism({
|
||||
label = "bamboo convert",
|
||||
@ -73,14 +73,14 @@ nodecore.register_aism({
|
||||
-- MAPGEN
|
||||
|
||||
minetest.register_decoration({
|
||||
label = "nc_nature:bamboo_living",
|
||||
label = modname .. ":bamboo_living",
|
||||
deco_type = "simple",
|
||||
place_on = {"group:soil", "nc_terrain:sand"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.1,
|
||||
y_max = 200,
|
||||
y_min = 1,
|
||||
decoration = "nc_nature:bamboo_living",
|
||||
decoration = modname .. ":bamboo_living",
|
||||
height = 1,
|
||||
height_max = 12,
|
||||
biomes = {"thicket", "floodland"}
|
||||
@ -90,7 +90,7 @@ nodecore.register_craft({
|
||||
label = "split bamboo into staves",
|
||||
action = "pummel",
|
||||
toolgroups = {choppy = 1},
|
||||
nodes = {{match = "nc_nature:bamboo_pole", replace = "air"}},
|
||||
nodes = {{match = modname .. ":bamboo_pole", replace = "air"}},
|
||||
items = {{name = "nc_woodwork:staff", count = 2, scatter = 2}},
|
||||
itemscatter = 2
|
||||
})
|
||||
|
14
biomes.lua
14
biomes.lua
@ -3,6 +3,8 @@ local minetest
|
||||
= minetest
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
----------------------------------------
|
||||
---------------GRASSLAND----------------
|
||||
minetest.register_biome({
|
||||
@ -14,7 +16,7 @@ minetest.register_biome({
|
||||
node_riverbed = "nc_terrain:sand",
|
||||
depth_riverbed = 1,
|
||||
node_dungeon = "nc_concrete:adobe",
|
||||
node_dungeon_alt = "nc_nature:mossy_dirt",
|
||||
node_dungeon_alt = modname .. ":mossy_dirt",
|
||||
y_min = 1,
|
||||
y_max = 31000,
|
||||
vertical_blend = 16,
|
||||
@ -34,7 +36,7 @@ minetest.register_biome({
|
||||
node_riverbed = "nc_terrain:sand",
|
||||
depth_riverbed = 4,
|
||||
node_dungeon = "nc_stonework:bricks",
|
||||
node_dungeon_alt = "nc_nature:mossy_bricks",
|
||||
node_dungeon_alt = modname .. ":mossy_bricks",
|
||||
y_min = 0,
|
||||
y_max = 2,
|
||||
vertical_blend = 2,
|
||||
@ -54,7 +56,7 @@ minetest.register_biome({
|
||||
node_riverbed = "nc_terrain:sand",
|
||||
depth_riverbed = 2,
|
||||
node_dungeon = "nc_concrete:adobe",
|
||||
node_dungeon_alt = "nc_nature:mossy_dirt",
|
||||
node_dungeon_alt = modname .. ":mossy_dirt",
|
||||
y_min = 2,
|
||||
y_max = 48,
|
||||
vertical_blend = 4,
|
||||
@ -74,7 +76,7 @@ minetest.register_biome({
|
||||
node_riverbed = "nc_terrain:sand",
|
||||
depth_riverbed = 2,
|
||||
node_dungeon = "nc_stonework:bricks_bonded",
|
||||
node_dungeon_alt = "nc_nature:mossy_bricks_bonded",
|
||||
node_dungeon_alt = modname .. ":mossy_bricks_bonded",
|
||||
y_min = 2,
|
||||
y_max = 250,
|
||||
vertical_blend = 16,
|
||||
@ -94,7 +96,7 @@ minetest.register_biome({
|
||||
node_riverbed = "nc_terrain:gravel",
|
||||
depth_riverbed = 2,
|
||||
node_dungeon = "nc_stonework:bricks_bonded",
|
||||
node_dungeon_alt = "nc_nature:mossy_bricks_bonded",
|
||||
node_dungeon_alt = modname .. ":mossy_bricks_bonded",
|
||||
y_min = 4,
|
||||
y_max = 200,
|
||||
vertical_blend = 16,
|
||||
@ -114,7 +116,7 @@ minetest.register_biome({
|
||||
node_riverbed = "nc_terrain:gravel",
|
||||
depth_riverbed = 2,
|
||||
node_dungeon = "nc_stonework:bricks_bonded",
|
||||
node_dungeon_alt = "nc_nature:mossy_bricks_bonded",
|
||||
node_dungeon_alt = modname .. ":mossy_bricks_bonded",
|
||||
y_min = 6,
|
||||
y_max = 150,
|
||||
vertical_blend = 16,
|
||||
|
@ -7,25 +7,33 @@ local math_random
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
local function fertile(pos, air)
|
||||
local below = {x = pos.x, y = pos.y - 1, z = pos.z}
|
||||
local bnode = minetest.get_node(below)
|
||||
if minetest.get_item_group(bnode.name, "soil") < 1 then return end
|
||||
if #nodecore.find_nodes_around(pos, "group:moist", 2) < 1 then return end
|
||||
if not air then return true end
|
||||
local node = minetest.get_node(pos)
|
||||
local def = (node.name ~= "ignore") and minetest.registered_nodes[node.name] or {}
|
||||
return def.air_equivalent
|
||||
end
|
||||
|
||||
nodecore.register_limited_abm({
|
||||
label = "shrubs spreading",
|
||||
nodenames = {modname .. ":shrub"},
|
||||
-- neighbors = {"air"},
|
||||
label = "nature standard spreading",
|
||||
nodenames = {"group:" .. modname .. "_spread"},
|
||||
interval = 120,
|
||||
chance = 20,
|
||||
action = function(pos)
|
||||
local gro = {x = pos.x + math_random(-1, 1), y = pos.y + math_random(-1, 1), z = pos.z + math_random(-1, 1)}
|
||||
local grodown = {x = gro.x, y = gro.y - 1, z = gro.z}
|
||||
local num = minetest.find_nodes_in_area(
|
||||
{x = pos.x + 1, y = pos.y - 1, z = pos.z + 1},
|
||||
{x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
|
||||
{"nc_tree:humus", "nc_terrain:dirt"})
|
||||
if minetest.get_node(gro).name ~= "air" then return end
|
||||
if minetest.get_node(grodown).name ~= {"nc_tree:humus", "nc_terrain:dirt"} then return end
|
||||
if #num > 0 then
|
||||
nodecore.set_node(gro, {name = modname .. ":shrub"})
|
||||
end
|
||||
end,
|
||||
action = function(pos, node)
|
||||
if not fertile(pos) then return end
|
||||
local gro = {
|
||||
x = pos.x + math_random(-1, 1),
|
||||
y = pos.y + math_random(-1, 1),
|
||||
z = pos.z + math_random(-1, 1)
|
||||
}
|
||||
if not fertile(gro, true) then return end
|
||||
if #nodecore.find_nodes_around(pos, node.name, 4) >= 20 then return end
|
||||
return nodecore.set_loud(gro, node)
|
||||
end
|
||||
})
|
||||
|
||||
nodecore.register_limited_abm({
|
||||
@ -49,27 +57,6 @@ nodecore.register_limited_abm({
|
||||
end,
|
||||
})
|
||||
|
||||
nodecore.register_limited_abm({
|
||||
label = "thornbriar spreading",
|
||||
nodenames = {modname .. ":thornbriar"},
|
||||
-- neighbors = {"air"},
|
||||
interval = 120,
|
||||
chance = 20,
|
||||
action = function(pos)
|
||||
local gro = {x = pos.x + math_random(-1, 1), y = pos.y + math_random(-1, 1), z = pos.z + math_random(-1, 1)}
|
||||
local grodown = {x = gro.x, y = gro.y - 1, z = gro.z}
|
||||
local num = minetest.find_nodes_in_area(
|
||||
{x = pos.x + 1, y = pos.y - 1, z = pos.z + 1},
|
||||
{x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
|
||||
{"nc_tree:humus", "nc_terrain:dirt"})
|
||||
if minetest.get_node(gro).name ~= "air" then return end
|
||||
if minetest.get_node(grodown).name ~= {"nc_tree:humus", "nc_terrain:dirt"} then return end
|
||||
if #num > 0 and pos.y < 50 then
|
||||
nodecore.set_node(gro, {name = modname .. ":thornbriar"})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
nodecore.register_limited_abm({
|
||||
label = "lilypads spreading",
|
||||
nodenames = {modname .. ":lilypad"},
|
||||
|
54
decor.lua
54
decor.lua
@ -5,37 +5,6 @@ local minetest
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
----------------------------------------
|
||||
---------------SHRUB----------------
|
||||
minetest.register_decoration({
|
||||
label = {modname .. ":shrub"},
|
||||
deco_type = "simple",
|
||||
place_on = {"group:soil"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.01,
|
||||
biomes = {"unknown", "forest", "thicket"},
|
||||
y_max = 200,
|
||||
y_min = -20,
|
||||
decoration = {modname .. ":shrub"},
|
||||
})
|
||||
|
||||
----------------------------------------
|
||||
---------------THORNBRIAR---------------
|
||||
|
||||
minetest.register_decoration({
|
||||
label = {modname .. ":thornbriar"},
|
||||
deco_type = "simple",
|
||||
place_on = {"group:soil"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.4,
|
||||
biomes = {"thicket"},
|
||||
y_max = 200,
|
||||
y_min = -20,
|
||||
height = 1,
|
||||
-- height_max = 3,
|
||||
decoration = {modname .. ":thornbriar"},
|
||||
})
|
||||
|
||||
----------------------------------------
|
||||
------------------FERN------------------
|
||||
minetest.register_decoration({
|
||||
@ -67,7 +36,7 @@ minetest.register_decoration({
|
||||
},
|
||||
y_max = 0,
|
||||
y_min = 0,
|
||||
decoration = "nc_nature:lilypad",
|
||||
decoration = modname .. ":lilypad",
|
||||
param2 = 0,
|
||||
param2_max = 3,
|
||||
place_offset_y = 1,
|
||||
@ -104,24 +73,3 @@ mushroom_decoration("mushroom_glow", -400, 1, 0.11, 0.2, 94,
|
||||
mushroom_decoration("mushroom_lux", -1000, -100, 0.72, 0.1, 69,
|
||||
{"group:soil", "group:crumbly", "group:cobble"}, {""})
|
||||
-----------------------------------------------------------------------------------
|
||||
|
||||
----------------------------------------
|
||||
---------------STARFLOWER---------------
|
||||
minetest.register_decoration({
|
||||
label = {modname .. ":starflower"},
|
||||
deco_type = "simple",
|
||||
place_on = {"group:soil"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.02,
|
||||
-- noise_params = {
|
||||
-- offset = -0.7,
|
||||
-- scale = 0.7,
|
||||
-- spread = {x = 250, y = 25, z = 250},
|
||||
-- seed = 777,
|
||||
-- octaves = 1,
|
||||
-- persist = 0.7
|
||||
-- },
|
||||
y_max = 31000,
|
||||
y_min = 200,
|
||||
decoration = {modname .. ":starflower"},
|
||||
})
|
||||
|
@ -5,6 +5,8 @@ local math_random
|
||||
= math.random
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- NODE DEFINITIONS
|
||||
|
||||
@ -23,7 +25,7 @@ local function register_mossy(subname, fromname)
|
||||
local tiles = {}
|
||||
for k, v in pairs(olddef.tiles) do
|
||||
if type(v) == "string" then
|
||||
v = v .. "^nc_nature_mossy.png"
|
||||
v = v .. "^" .. modname .. "_mossy.png"
|
||||
end
|
||||
tiles[k] = v
|
||||
end
|
||||
@ -31,7 +33,7 @@ local function register_mossy(subname, fromname)
|
||||
for k, v in pairs(olddef.groups) do
|
||||
if not diggroups[k] then groups[k] = v end
|
||||
end
|
||||
minetest.register_node("nc_nature:mossy_" .. subname, {
|
||||
minetest.register_node(modname .. ":mossy_" .. subname, {
|
||||
nc_nature_mossy_of = fromname,
|
||||
description = "Mossy " .. olddef.description,
|
||||
tiles = tiles,
|
||||
@ -42,7 +44,7 @@ local function register_mossy(subname, fromname)
|
||||
end
|
||||
register_mossy("cobble", "nc_terrain:cobble")
|
||||
register_mossy("stone", "nc_terrain:stone")
|
||||
register_mossy("thatch", "nc_nature:thatch")
|
||||
register_mossy("thatch", modname .. ":thatch")
|
||||
register_mossy("trunk", "nc_tree:tree")
|
||||
register_mossy("dirt", "nc_terrain:dirt")
|
||||
register_mossy("bricks", "nc_stonework:bricks")
|
81
flora_shrub.lua
Normal file
81
flora_shrub.lua
Normal file
@ -0,0 +1,81 @@
|
||||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local minetest, nodecore
|
||||
= minetest, nodecore
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
minetest.register_node(modname .. ":shrub", {
|
||||
description = ("Shrub"),
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {modname .. "_shrub.png"},
|
||||
paramtype = "light",
|
||||
air_pass = true,
|
||||
sunlight_propagates = true,
|
||||
walkable = true,
|
||||
buildable_to = false,
|
||||
silktouch = false,
|
||||
groups = {
|
||||
snappy = 1,
|
||||
flora = 1,
|
||||
flammable = 3,
|
||||
green = 1,
|
||||
leafy = 1,
|
||||
shrub = 1
|
||||
},
|
||||
alternate_loose = {
|
||||
tiles = {modname .. "_shrub.png^nc_api_loose.png"},
|
||||
walkable = false,
|
||||
groups = {
|
||||
snappy = 1,
|
||||
leafy = 1,
|
||||
flammable = 1,
|
||||
falling_repose = 1,
|
||||
green = 1,
|
||||
stack_as_node = 1,
|
||||
shrub = 1,
|
||||
decay_to_fibers = 1,
|
||||
[modname .. "_spread"] = 1
|
||||
}
|
||||
},
|
||||
no_repack = true,
|
||||
sounds = nodecore.sounds("nc_terrain_swishy")
|
||||
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
label = {modname .. ":shrub"},
|
||||
deco_type = "simple",
|
||||
place_on = {"group:soil"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.01,
|
||||
biomes = {"unknown", "forest", "thicket"},
|
||||
y_max = 200,
|
||||
y_min = -20,
|
||||
decoration = {modname .. ":shrub"},
|
||||
})
|
||||
|
||||
nodecore.register_limited_abm({
|
||||
label = "Shrub Rerooting",
|
||||
nodenames = {modname .. ":shrub_loose"},
|
||||
neighbors = {"group:soil"},
|
||||
interval = 2,
|
||||
chance = 10,
|
||||
action = function(pos)
|
||||
nodecore.set_loud(pos, {name = modname .. ":shrub"})
|
||||
end
|
||||
})
|
||||
|
||||
nodecore.register_craft({
|
||||
label = "break shrub into fibers",
|
||||
action = "pummel",
|
||||
toolgroups = {choppy = 2},
|
||||
nodes = {
|
||||
{match = modname .. ":shrub_loose", replace = "air"}
|
||||
},
|
||||
items = {
|
||||
{name = modname .. ":plant_fibers", count = 4, scatter = 3}
|
||||
},
|
||||
itemscatter = 3
|
||||
})
|
52
flora_starflower.lua
Normal file
52
flora_starflower.lua
Normal file
@ -0,0 +1,52 @@
|
||||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local minetest, nodecore
|
||||
= minetest, nodecore
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
minetest.register_node(modname .. ":starflower", {
|
||||
description = "Starflower",
|
||||
drawtype = 'plantlike',
|
||||
waving = 1,
|
||||
tiles = {modname .. "_starflower.png"},
|
||||
wield_image = modname .. "_starflower.png",
|
||||
inventory_image = modname .. "_starflower.png",
|
||||
sunlight_propagates = true,
|
||||
paramtype = 'light',
|
||||
light_source = 7,
|
||||
walkable = false,
|
||||
groups = {
|
||||
snappy = 1,
|
||||
flora = 1,
|
||||
flammable = 1,
|
||||
attached_node = 1,
|
||||
decay_to_fibers = 1,
|
||||
[modname .. "_spread"] = 1
|
||||
},
|
||||
sounds = nodecore.sounds("nc_terrain_swishy"),
|
||||
buildable_to = true,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6/16, -0.5, -6/16, 6/16, 4/16, 6/16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
label = {modname .. ":starflower"},
|
||||
deco_type = "simple",
|
||||
place_on = {"group:soil"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.02,
|
||||
noise_params = {
|
||||
offset = -0.001 + 0.005 * 0.0005,
|
||||
scale = 0.001,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 1572,
|
||||
octaves = 3,
|
||||
persist = 0.7
|
||||
},
|
||||
y_max = 31000,
|
||||
y_min = 200,
|
||||
decoration = {modname .. ":starflower"},
|
||||
})
|
47
flora_thornbriar.lua
Normal file
47
flora_thornbriar.lua
Normal file
@ -0,0 +1,47 @@
|
||||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local minetest, nodecore
|
||||
= minetest, nodecore
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
minetest.register_node(modname .. ":thornbriar", {
|
||||
description = ("Thornbriar"),
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {modname .. "_thornbriar.png"},
|
||||
inventory_image = modname .. "_thornbriar.png",
|
||||
wield_image = modname .. "_thornbriar.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = false,
|
||||
silktouch = false,
|
||||
damage_per_second = 1,
|
||||
groups = {
|
||||
snappy = 1,
|
||||
flora = 1,
|
||||
flammable = 2,
|
||||
attached_node = 1,
|
||||
[modname .. "_spread"] = 1
|
||||
},
|
||||
drop = modname .. ":plant_fibers",
|
||||
sounds = nodecore.sounds("nc_terrain_swishy"),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6/16, -0.5, -6/16, 6/16, 4/16, 6/16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
label = {modname .. ":thornbriar"},
|
||||
deco_type = "simple",
|
||||
place_on = {"group:soil"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.4,
|
||||
biomes = {"thicket"},
|
||||
y_max = 200,
|
||||
y_min = -20,
|
||||
height = 1,
|
||||
decoration = {modname .. ":thornbriar"},
|
||||
})
|
12
fungi.lua
12
fungi.lua
@ -8,7 +8,7 @@ local modname = minetest.get_current_modname()
|
||||
----------------------------------------
|
||||
---------------MUSHROOMS----------------
|
||||
|
||||
minetest.register_node("nc_nature:mushroom", {
|
||||
minetest.register_node(modname .. ":mushroom", {
|
||||
description = "Mushroom",
|
||||
drawtype = 'plantlike',
|
||||
waving = 1,
|
||||
@ -20,7 +20,7 @@ minetest.register_node("nc_nature:mushroom", {
|
||||
groups = {snappy = 1, fungi = 2, flammable = 1, attached_node = 1, decay_to_fibers = 1},
|
||||
sounds = nodecore.sounds("nc_terrain_swishy"),
|
||||
buildable_to = true,
|
||||
-- drop = "nc_nature:plant_fibers",
|
||||
-- drop = modname ..":plant_fibers",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6/16, -0.5, -6/16, 6/16, 4/16, 6/16},
|
||||
@ -28,7 +28,7 @@ minetest.register_node("nc_nature:mushroom", {
|
||||
|
||||
})
|
||||
|
||||
minetest.register_node("nc_nature:mushroom_glow", {
|
||||
minetest.register_node(modname .. ":mushroom_glow", {
|
||||
description = "Glowing Mushroom",
|
||||
drawtype = 'plantlike',
|
||||
waving = 1,
|
||||
@ -41,14 +41,14 @@ minetest.register_node("nc_nature:mushroom_glow", {
|
||||
groups = {snappy = 1, fungi = 2, flammable = 1, attached_node = 1, decay_to_fibers = 1},
|
||||
sounds = nodecore.sounds("nc_terrain_swishy"),
|
||||
buildable_to = true,
|
||||
-- drop = "nc_nature:plant_fibers",
|
||||
-- drop = modname ..":plant_fibers",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6/16, -0.5, -6/16, 6/16, 4/16, 6/16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("nc_nature:mushroom_lux", {
|
||||
minetest.register_node(modname .. ":mushroom_lux", {
|
||||
description = "Luxaeterna",
|
||||
drawtype = 'plantlike',
|
||||
waving = 1,
|
||||
@ -61,7 +61,7 @@ minetest.register_node("nc_nature:mushroom_lux", {
|
||||
groups = {snappy = 1, fungi = 1, flammable = 1, attached_node = 1, decay_to_fibers = 1},
|
||||
sounds = nodecore.sounds("nc_terrain_swishy"),
|
||||
buildable_to = true,
|
||||
-- drop = "nc_nature:plant_fibers",
|
||||
-- drop = modname ..":plant_fibers",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6/16, -0.5, -6/16, 6/16, 4/16, 6/16},
|
||||
|
16
init.lua
16
init.lua
@ -13,9 +13,13 @@ include("fungi")
|
||||
include("decor")
|
||||
include("cultivate")
|
||||
|
||||
include("fiber")
|
||||
include("thatch")
|
||||
include("grass")
|
||||
include("flower")
|
||||
include("reed")
|
||||
include("mossy")
|
||||
include("item_fiber")
|
||||
include("item_thatch")
|
||||
|
||||
include("flora_flower")
|
||||
include("flora_grass")
|
||||
include("flora_mossy")
|
||||
include("flora_reed")
|
||||
include("flora_shrub")
|
||||
include("flora_starflower")
|
||||
include("flora_thornbriar")
|
||||
|
@ -7,7 +7,7 @@ local modname = minetest.get_current_modname()
|
||||
|
||||
minetest.register_node(modname .. ":thatch", {
|
||||
description = "Thatch",
|
||||
tiles = {"nc_nature_thatch.png"},
|
||||
tiles = {modname .. "_thatch.png"},
|
||||
groups = {
|
||||
choppy = 2,
|
||||
flammable = 2,
|
@ -11,9 +11,9 @@ minetest.register_node(modname .. ":decayed_log", {
|
||||
description = "Decayed Log",
|
||||
drawtype = "normal",
|
||||
tiles = {
|
||||
"nc_nature_decayed_log_top.png",
|
||||
"nc_nature_decayed_log_top.png",
|
||||
"nc_nature_decayed_log_side.png"
|
||||
modname .. "_decayed_log_top.png",
|
||||
modname .. "_decayed_log_top.png",
|
||||
modname .. "_decayed_log_side.png"
|
||||
},
|
||||
groups = {
|
||||
choppy = 2,
|
||||
@ -25,7 +25,7 @@ minetest.register_node(modname .. ":decayed_log", {
|
||||
sounds = nodecore.sounds("nc_tree_woody"),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node,
|
||||
drop = "nc_nature:decayed_log"
|
||||
drop = modname .. ":decayed_log"
|
||||
})
|
||||
|
||||
-----Decayed Log To Peat-----
|
||||
|
124
plants.lua
124
plants.lua
@ -5,96 +5,6 @@ local minetest, nodecore
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
----------------------------------------
|
||||
-----------------SHRUB------------------
|
||||
minetest.register_node("nc_nature:shrub", {
|
||||
description = ("Shrub"),
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {"nc_nature_shrub.png"},
|
||||
paramtype = "light",
|
||||
air_pass = true,
|
||||
sunlight_propagates = true,
|
||||
walkable = true,
|
||||
buildable_to = false,
|
||||
silktouch = false,
|
||||
groups = {
|
||||
snappy = 1,
|
||||
flora = 1,
|
||||
flammable = 3,
|
||||
green = 1,
|
||||
leafy = 1,
|
||||
shrub = 1
|
||||
},
|
||||
alternate_loose = {
|
||||
tiles = {modname .. "_shrub.png^nc_api_loose.png"},
|
||||
walkable = false,
|
||||
groups = {
|
||||
snappy = 1,
|
||||
leafy = 1,
|
||||
flammable = 1,
|
||||
falling_repose = 1,
|
||||
green = 1,
|
||||
stack_as_node = 1,
|
||||
shrub = 1,
|
||||
decay_to_fibers = 1
|
||||
}
|
||||
},
|
||||
no_repack = true,
|
||||
sounds = nodecore.sounds("nc_terrain_swishy")
|
||||
|
||||
})
|
||||
|
||||
-----Shrub Rerooting-----
|
||||
nodecore.register_limited_abm({
|
||||
label = "Shrub Rerooting",
|
||||
nodenames = {modname .. ":shrub_loose"},
|
||||
neighbors = {"group:soil"},
|
||||
interval = 2,
|
||||
chance = 10,
|
||||
action = function(pos)
|
||||
nodecore.set_loud(pos, {name = modname .. ":shrub"})
|
||||
end
|
||||
})
|
||||
|
||||
-----Recycling Shrub-----
|
||||
nodecore.register_craft({
|
||||
label = "break shrub into fibers",
|
||||
action = "pummel",
|
||||
toolgroups = {choppy = 2},
|
||||
nodes = {
|
||||
{match = "nc_nature:shrub_loose", replace = "air"}
|
||||
},
|
||||
items = {
|
||||
{name = "nc_nature:plant_fibers", count = 4, scatter = 3}
|
||||
},
|
||||
itemscatter = 3
|
||||
})
|
||||
|
||||
----------------------------------------
|
||||
----------------THORNBRIAR--------------
|
||||
minetest.register_node("nc_nature:thornbriar", {
|
||||
description = ("Thornbriar"),
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {"nc_nature_thornbriar.png"},
|
||||
inventory_image = "nc_nature_thornbriar.png",
|
||||
wield_image = "nc_nature_thornbriar.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = false,
|
||||
silktouch = false,
|
||||
damage_per_second = 1,
|
||||
groups = {snappy = 1, flora = 1, flammable = 2, attached_node = 1},
|
||||
drop = "nc_nature:plant_fibers",
|
||||
sounds = nodecore.sounds("nc_terrain_swishy"),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6/16, -0.5, -6/16, 6/16, 4/16, 6/16},
|
||||
},
|
||||
})
|
||||
|
||||
----------------------------------------
|
||||
------------------FERN------------------
|
||||
minetest.register_node(modname .. ":fern", {
|
||||
@ -102,7 +12,7 @@ minetest.register_node(modname .. ":fern", {
|
||||
drawtype = 'plantlike',
|
||||
waving = 1,
|
||||
tiles = {modname .. "_fern.png"},
|
||||
inventory_image = "nc_nature_fern.png",
|
||||
inventory_image = modname .. "_fern.png",
|
||||
wield_image = modname .. "_fern.png",
|
||||
sunlight_propagates = true,
|
||||
paramtype = 'light',
|
||||
@ -111,7 +21,7 @@ minetest.register_node(modname .. ":fern", {
|
||||
groups = {snappy = 1, flora = 1, flammable = 2, attached_node = 1, decay_to_fibers = 1},
|
||||
sounds = nodecore.sounds("nc_terrain_swishy"),
|
||||
buildable_to = true,
|
||||
-- drop = "nc_nature:plant_fibers",
|
||||
-- drop = modname ..":plant_fibers",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6/16, -0.5, -6/16, 6/16, 4/16, 6/16},
|
||||
@ -125,9 +35,9 @@ minetest.register_node(modname .. ":lilypad", {
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"nc_nature_lilypad.png", "nc_nature_lilypad_bottom.png"},
|
||||
inventory_image = "nc_nature_lilypad.png",
|
||||
wield_image = "nc_nature_lilypad.png",
|
||||
tiles = {modname .. "_lilypad.png", modname .. "_lilypad_bottom.png"},
|
||||
inventory_image = modname .. "_lilypad.png",
|
||||
wield_image = modname .. "_lilypad.png",
|
||||
liquids_pointable = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
@ -144,27 +54,5 @@ minetest.register_node(modname .. ":lilypad", {
|
||||
type = "fixed",
|
||||
fixed = {-7/16, -0.5, -7/16, 7/16, -15/32, 7/16}
|
||||
},
|
||||
drop = "nc_nature:plant_fibers"
|
||||
})
|
||||
|
||||
----------------------------------------
|
||||
---------------STARFLOWER---------------
|
||||
minetest.register_node(modname .. ":starflower", {
|
||||
description = "Starflower",
|
||||
drawtype = 'plantlike',
|
||||
waving = 1,
|
||||
tiles = {modname .. "_starflower.png"},
|
||||
wield_image = modname .. "_starflower.png",
|
||||
inventory_image = modname .. "_starflower.png",
|
||||
sunlight_propagates = true,
|
||||
paramtype = 'light',
|
||||
light_source = 7,
|
||||
walkable = false,
|
||||
groups = {snappy = 1, flora = 1, flammable = 1, attached_node = 1, decay_to_fibers = 1},
|
||||
sounds = nodecore.sounds("nc_terrain_swishy"),
|
||||
buildable_to = true,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6/16, -0.5, -6/16, 6/16, 4/16, 6/16},
|
||||
},
|
||||
drop = modname .. ":plant_fibers"
|
||||
})
|
||||
|
@ -1,8 +1,10 @@
|
||||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local nodecore
|
||||
= nodecore
|
||||
local minetest, nodecore
|
||||
= minetest, nodecore
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
----------------------------------------
|
||||
--------------Fallen Logs---------------
|
||||
local fallen = {
|
||||
@ -20,7 +22,7 @@ nodecore.deadwood_params = {
|
||||
nodecore.deadwood_schematic = nodecore.ezschematic(
|
||||
{
|
||||
["."] = {name = "air", prob = 0},
|
||||
f = {name = "nc_nature:decayed_log", param2 = 7, prob = 255},
|
||||
f = {name = modname .. ":decayed_log", param2 = 7, prob = 255},
|
||||
},
|
||||
{
|
||||
fallen,
|
||||
@ -84,7 +86,7 @@ nodecore.boulder_schematic = nodecore.ezschematic(
|
||||
["."] = {name = "air", prob = 0},
|
||||
s = {name = "nc_terrain:stone", prob = 255},
|
||||
c = {name = "nc_terrain:cobble", prob = 160},
|
||||
m = {name = "nc_nature:mossy_stone", prob = 255},
|
||||
m = {name = modname .. ":mossy_stone", prob = 255},
|
||||
o = {name = "nc_lode:ore", prob = 255},
|
||||
},
|
||||
{
|
||||
@ -560,7 +562,7 @@ nodecore.antiquetree_schematic = nodecore.ezschematic(
|
||||
q = {name = "nc_tree:root", prob = 75, force_place = true},
|
||||
t = {name = "nc_tree:tree", prob = 255, force_place = true},
|
||||
v = {name = "nc_tree:tree", prob = 160, force_place = true},
|
||||
-- h = {name = "nc_nature:branch", prob = 200},
|
||||
-- h = {name = modname ..":branch", prob = 200},
|
||||
b = {name = "nc_tree:leaves", param2 = 2, prob = 255},
|
||||
e = {name = "nc_tree:leaves", param2 = 1, prob = 255},
|
||||
l = {name = "nc_tree:leaves", prob = 255},
|
||||
|
Loading…
x
Reference in New Issue
Block a user