tidy code, add poppy

This commit is contained in:
tenplus1 2024-08-20 08:37:40 +01:00
parent fefaf3ec41
commit 468a818d94
5 changed files with 155 additions and 198 deletions

127
decor.lua
View File

@ -263,10 +263,11 @@ register_decoration(ethereal.sakura, {
-- marram grass
register_decoration(ethereal.sandclay, {
register_decoration(1, {
place_on = {"default:sand"},
fill_ratio = 0.25,
biomes = {"sandclay"},
y_min = 3, y_max = 5,
biomes = {"coniferous_forest_ocean", "grassland_ocean"},
decoration = {"default:marram_grass_1", "default:marram_grass_2",
"default:marram_grass_3"}})
@ -692,3 +693,125 @@ end
add_illumishroom(-1000, -30, "ethereal:illumishroom")
add_illumishroom(-2000, -1000, "ethereal:illumishroom2")
add_illumishroom(-3000, -2000, "ethereal:illumishroom3")
--= Register Biome Decoration Using Plants Mega Pack Lite if Xanadu found
if minetest.get_modpath("xanadu") then
--= Desert Biome
-- Cactus
register_decoration(1, {
place_on = {"default:desert_sand", "default:sandstone"},
sidelen = 16, fill_ratio = 0.005,
biomes = {"desert", "sandstone"},
decoration = {"xanadu:cactus_echinocereus", "xanadu:cactus_matucana",
"xanadu:cactus_baseball", "xanadu:cactus_golden"}})
-- Desert Plants
register_decoration(1, {
place_on = {"default:desert_sand", "default:sandstone", "default:sand"},
sidelen = 16, fill_ratio = 0.004,
biomes = {"desert", "sandstone"},
decoration = {"xanadu:desert_kangaroo", "xanadu:desert_brittle",
"xanadu:desert_ocotillo", "xanadu:desert_whitesage"}})
--= Prairie Biome
-- Grass
register_decoration(1, {
place_on = {"ethereal:prairie_dirt", "default:dirt_with_grass"},
sidelen = 16, fill_ratio = 0.005,
biomes = {"prairie", "deciduous_forest", "grassytwo"},
decoration = {"xanadu:grass_prairie", "xanadu:grass_cord",
"xanadu:grass_wheatgrass", "xanadu:desert_whitesage"}})
-- Flowers
register_decoration(1, {
place_on = {"ethereal:prairie_dirt", "default:dirt_with_grass",
"ethereal:grove_dirt", "ethereal:bamboo_dirt"},
sidelen = 16, fill_ratio = 0.005,
biomes = {"prairie", "deciduous_forest", "grassytwo", "bamboo"},
decoration = {"xanadu:flower_jacobsladder", "xanadu:flower_thistle",
"xanadu:flower_wildcarrot"}})
register_decoration(1, {
place_on = {"ethereal:prairie_dirt", "default:dirt_with_grass",
"ethereal:grove_dirt"},
sidelen = 16, fill_ratio = 0.005,
biomes = {"prairie", "deciduous_forest", "grassytwo", "grove"},
decoration = {"xanadu:flower_delphinium", "xanadu:flower_celosia",
"xanadu:flower_daisy", "xanadu:flower_bluerose"}})
-- Shrubs
register_decoration(1, {
place_on = {"ethereal:prairie_dirt", "default:dirt_with_grass",
"ethereal:grove_dirt", "ethereal:jungle_grass", "ethereal:gray_dirt",
"default:dirt_with_rainforest_litter"},
sidelen = 16, fill_ratio = 0.005,
biomes = {"prairie", "deciduous_forest", "grassytwo", "grove", "junglee",
"grayness", "jumble"},
decoration = {"xanadu:shrub_kerria", "xanadu:shrub_spicebush"}})
--= Jungle Biome
register_decoration(1, {
place_on = {"default:dirt_with_grass", "default:dirt_with_rainforest_litter"},
sidelen = 16, fill_ratio = 0.007,
biomes = {"junglee", "jumble"},
decoration = {"xanadu:rainforest_guzmania", "xanadu:rainforest_devil",
"xanadu:rainforest_lazarus", "xanadu:rainforest_lollipop",
"xanadu:mushroom_woolly"}})
--= Cold Biomes
register_decoration(1, {
place_on = {"default:dirt_with_snow", "ethereal:gray_dirt"},
sidelen = 16, fill_ratio = 0.005,
biomes = {"coniferous_forest", "taiga", "grayness"},
decoration = {"xanadu:mountain_edelweiss", "xanadu:mountain_armeria",
"xanadu:mountain_bellflower", "xanadu:mountain_willowherb",
"xanadu:mountain_bistort"}})
--= Mushroom Biome
register_decoration(1, {
place_on = {"ethereal:mushroom_dirt"},
sidelen = 16, fill_ratio = 0.005,
biomes = {"mushroom"},
decoration = {"xanadu:mushroom_powderpuff", "xanadu:mushroom_chanterelle",
"xanadu:mushroom_parasol"}})
--= Lakeside
register_decoration(1, {
place_on = {"default:sand", "default:dirt_with_grass"},
sidelen = 16, fill_ratio = 0.015,
biomes = {"deciduous_forest_ocean", "grassy", "grassytwo", "jumble",
"swamp"},
decoration = {"xanadu:wetlands_cattails", "xanadu:wetlands_pickerel",
"xanadu:wetlands_mannagrass", "xanadu:wetlands_turtle"},
spawn_by = "default:water_source", num_spawn_by = 1})
--= Harsh Biomes
register_decoration(1, {
place_on = {"ethereal:mushroom_dirt", "default:dirt_with_grass",
"ethereal:gray_dirt", "ethereal:dirt_with_snow", "ethereal:prairie_dirt",
"ethereal:grove_dirt", "ethereal:dry_dirt", "ethereal:fiery_dirt",
"default:sand", "default:desert_sand", "ethereal:bamboo_dirt",
"default:dirt_with_rainforest_litter"},
sidelen = 16, fill_ratio = 0.004,
biomes = {"mushroom", "prairie", "grayness", "plains", "desert", "junglee",
"deciduous_forest", "grassytwo", "jumble", "coniferous_forest", "taiga",
"fiery", "mesa", "bamboo"},
decoration = {"xanadu:spooky_thornbush", "xanadu:spooky_baneberry"}})
end
--= Poppy's growing in Clearing Biome in memory of RealBadAngel
register_decoration(1, {
place_on = {"default:dirt_with_grass"},
sidelen = 16, fill_ratio = 0.004,
biomes = {"grassland"},
decoration = {"xanadu:poppy"}})

View File

@ -8,7 +8,7 @@
-- global
ethereal = {version = "20240816"}
ethereal = {version = "20240820"}
-- setting helper
@ -166,10 +166,4 @@ else -- or return to where it came from
minetest.register_alias("ethereal:bonemeal", "default:dirt")
end
-- Xanadu specific decoration
if minetest.get_modpath("xanadu") then
dofile(path .. "/plantpack.lua")
end
print ("[MOD] Ethereal loaded")

View File

@ -329,3 +329,32 @@ end
add_shroom("red", "Red", "")
add_shroom("green", "Green", "2")
add_shroom("cyan", "Cyan", "3")
-- poppy
if not minetest.get_modpath("xanadu") then
minetest.register_node(":xanadu:poppy", {
description = S("Poppy"),
tiles = {"ethereal_poppy.png"},
inventory_image = "ethereal_poppy.png",
wield_image = "ethereal_poppy.png",
sunlight_propagates = true,
buildable_to = true,
waving = 1,
drawtype = "plantlike",
paramtype = "light",
walkable = false,
groups = {flower = 1, flora = 1, snappy = 3, attached_node = 1, flammable = 3},
selection_box = {
type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
},
sounds = default.node_sound_leaves_defaults(),
})
-- craft dye from plant
minetest.register_craft({
output = "dye:red 4",
recipe = {{"xanadu:poppy"}}
})
end

View File

@ -1,189 +0,0 @@
--= Register Biome Decoration Using Plants Mega Pack Lite
--= Desert Biome
-- Cactus
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:desert_sand", "default:sandstone"},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"desert", "sandstone"},
decoration = {
"xanadu:cactus_echinocereus", "xanadu:cactus_matucana",
"xanadu:cactus_baseball", "xanadu:cactus_golden"
}
})
-- Desert Plants
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:desert_sand", "default:sandstone", "default:sand"},
sidelen = 16,
fill_ratio = 0.004,
biomes = {"desert", "sandstone"},
decoration = {
"xanadu:desert_kangaroo", "xanadu:desert_brittle",
"xanadu:desert_ocotillo", "xanadu:desert_whitesage"
}
})
--= Prairie Biome
-- Grass
minetest.register_decoration({
deco_type = "simple",
place_on = {"ethereal:prairie_dirt", "default:dirt_with_grass"},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"prairie", "deciduous_forest", "grassytwo"},
decoration = {
"xanadu:grass_prairie", "xanadu:grass_cord",
"xanadu:grass_wheatgrass", "xanadu:desert_whitesage"
}
})
-- Flowers
minetest.register_decoration({
deco_type = "simple",
place_on = {
"ethereal:prairie_dirt", "default:dirt_with_grass",
"ethereal:grove_dirt", "ethereal:bamboo_dirt"
},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"prairie", "deciduous_forest", "grassytwo", "bamboo"},
decoration = {
"xanadu:flower_jacobsladder", "xanadu:flower_thistle",
"xanadu:flower_wildcarrot"
}
})
minetest.register_decoration({
deco_type = "simple",
place_on = {
"ethereal:prairie_dirt", "default:dirt_with_grass",
"ethereal:grove_dirt"
},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"prairie", "deciduous_forest", "grassytwo", "grove"},
decoration = {
"xanadu:flower_delphinium", "xanadu:flower_celosia",
"xanadu:flower_daisy", "xanadu:flower_bluerose"
}
})
-- Shrubs
minetest.register_decoration({
deco_type = "simple",
place_on = {
"ethereal:prairie_dirt", "default:dirt_with_grass",
"ethereal:grove_dirt", "ethereal:jungle_grass",
"ethereal:gray_dirt", "default:dirt_with_rainforest_litter"
},
sidelen = 16,
fill_ratio = 0.005,
biomes = {
"prairie", "deciduous_forest", "grassytwo", "grove", "junglee",
"grayness", "jumble"
},
decoration = {"xanadu:shrub_kerria", "xanadu:shrub_spicebush"}
})
--= Jungle Biome
minetest.register_decoration({
deco_type = "simple",
place_on = {
"default:dirt_with_grass", "default:dirt_with_rainforest_litter"
},
sidelen = 16,
fill_ratio = 0.007,
biomes = {"junglee", "jumble"},
decoration = {
"xanadu:rainforest_guzmania", "xanadu:rainforest_devil",
"xanadu:rainforest_lazarus", "xanadu:rainforest_lollipop",
"xanadu:mushroom_woolly"
}
})
--= Cold Biomes
minetest.register_decoration({
deco_type = "simple",
place_on = {
"default:dirt_with_snow", "ethereal:gray_dirt"
},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"coniferous_forest", "taiga", "grayness"},
decoration = {
"xanadu:mountain_edelweiss", "xanadu:mountain_armeria",
"xanadu:mountain_bellflower", "xanadu:mountain_willowherb",
"xanadu:mountain_bistort"
}
})
--= Mushroom Biome
minetest.register_decoration({
deco_type = "simple",
place_on = {"ethereal:mushroom_dirt"},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"mushroom"},
decoration = {
"xanadu:mushroom_powderpuff", "xanadu:mushroom_chanterelle",
"xanadu:mushroom_parasol"
}
})
--= Lakeside
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:sand", "default:dirt_with_grass"},
sidelen = 16,
fill_ratio = 0.015,
biomes = {
"sandclay", "deciduous_forest_ocean", "grassy", "grassytwo", "jumble", "swamp"},
decoration = {
"xanadu:wetlands_cattails", "xanadu:wetlands_pickerel",
"xanadu:wetlands_mannagrass", "xanadu:wetlands_turtle"
},
spawn_by = "default:water_source",
num_spawn_by = 1
})
--= Harsh Biomes
minetest.register_decoration({
deco_type = "simple",
place_on = {
"ethereal:mushroom_dirt", "default:dirt_with_grass", "ethereal:gray_dirt",
"ethereal:dirt_with_snow", "ethereal:prairie_dirt", "ethereal:grove_dirt",
"ethereal:dry_dirt", "ethereal:fiery_dirt", "default:sand", "default:desert_sand",
"ethereal:bamboo_dirt", "default:dirt_with_rainforest_litter"
},
sidelen = 16,
fill_ratio = 0.004,
biomes = {
"mushroom", "prairie", "grayness", "plains", "desert",
"junglee", "deciduous_forest", "grassytwo", "jumble", "coniferous_forest",
"taiga", "fiery", "mesa", "bamboo"
},
decoration = {"xanadu:spooky_thornbush", "xanadu:spooky_baneberry"}
})
--= Poppy's growing in Clearing Biome in memory of RealBadAngel
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
fill_ratio = 0.004,
biomes = {"grassland"},
decoration = {"xanadu:poppy"}
})

BIN
textures/ethereal_poppy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B