Compare commits

...

7 Commits

Author SHA1 Message Date
D00Med ffc1b1921d
Merge pull request #8 from sys4-fr/master
Some fixes and improvements
2021-02-27 06:00:36 +10:00
sys4 d4e6b9c3a5 Fix the use of deprecated functions for Minetest 5.4
* Remove 'use_texture_alpha = true' not needed and deprecated
* Replace 'minetest.get_mapgen_params().mgname' by
  'minetest.get_mapgen_setting("mg_name")'
2021-02-26 14:30:20 +01:00
sys4 5e8cd73393 Merge remote-tracking branch 'upstream/master' into github 2021-02-26 12:52:52 +01:00
D00Med d237c1dde2
Merge pull request #7 from fluxionary/spelling_fix
fix spelling of attached
2019-09-23 06:55:37 +10:00
flux 4547d78515 fix spelling of attached 2019-09-22 17:52:25 +00:00
sys4-fr c952b13adc Fix spawn of some plants 2018-03-18 14:16:35 +01:00
sys4-fr 8e0679c70a Fix spawn of moonflower 2018-03-18 03:40:22 +01:00
2 changed files with 93 additions and 46 deletions

View File

@ -6,4 +6,4 @@ Changed in V1.2:
>smaller textures
Changed in V1.3:
>added all plants to the group attatched_node
>added all plants to the group attached_node

137
init.lua
View File

@ -14,12 +14,13 @@ minetest.register_node("moreplants:tallgrass", {
inventory_image = "moreplants_longgrass.png",
visual_scale = 1.4,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}
},
walkable = false,
waving = 1,
})
minetest.register_node("moreplants:aliengrass", {
@ -33,7 +34,7 @@ minetest.register_node("moreplants:aliengrass", {
inventory_image = "moreplants_aliengrass.png",
visual_scale = 1.54,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}
@ -54,12 +55,13 @@ minetest.register_node("moreplants:bulrush", {
inventory_image = "moreplants_bullrush.png",
visual_scale = 1.3,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}
},
walkable = false,
waving = 1,
})
minetest.register_node("moreplants:bigfern", {
@ -73,12 +75,13 @@ minetest.register_node("moreplants:bigfern", {
inventory_image = "moreplants_bigfern.png",
visual_scale = 1.5,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}
},
walkable = false,
waving = 1,
})
minetest.register_node("moreplants:umbrella", {
@ -92,12 +95,13 @@ minetest.register_node("moreplants:umbrella", {
inventory_image = "moreplants_umbrella.png",
visual_scale = 2,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 3, 0.3}
},
walkable = true,
waving = 1,
})
minetest.register_node("moreplants:bigflower", {
@ -111,12 +115,13 @@ minetest.register_node("moreplants:bigflower", {
inventory_image = "moreplants_bigflower.png",
visual_scale = 1.2,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flower=1},
groups = {snappy=3, flammable=1, attached_node=1, flower=1},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}
},
walkable = false,
waving = 1,
})
minetest.register_node("moreplants:medflower", {
@ -130,13 +135,14 @@ minetest.register_node("moreplants:medflower", {
inventory_image = "moreplants_medflower.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flower=1},
groups = {snappy=3, flammable=1, attached_node=1, flower=1},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}
},
on_use = minetest.item_eat(1),
walkable = false,
waving = 1,
})
@ -151,12 +157,13 @@ minetest.register_node("moreplants:weed", {
inventory_image = "moreplants_weed.png",
visual_scale = 1.1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}
},
walkable = false,
waving = 1,
})
minetest.register_node("moreplants:stoneweed", {
@ -170,12 +177,13 @@ minetest.register_node("moreplants:stoneweed", {
inventory_image = "moreplants_stoneplant.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
},
walkable = false,
waving = 1,
})
minetest.register_node("moreplants:spikefern", {
@ -189,12 +197,13 @@ minetest.register_node("moreplants:spikefern", {
inventory_image = "moreplants_spikefern.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
},
walkable = false,
waving = 1,
})
minetest.register_node("moreplants:bluespike", {
@ -208,12 +217,13 @@ minetest.register_node("moreplants:bluespike", {
inventory_image = "moreplants_bluespike.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
},
walkable = false,
waving = 1,
})
minetest.register_node("moreplants:blueflower", {
@ -227,12 +237,13 @@ minetest.register_node("moreplants:blueflower", {
inventory_image = "moreplants_blueflower.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flower=1},
groups = {snappy=3, flammable=1, attached_node=1, flower=1},
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
},
walkable = false,
waving = 1,
})
minetest.register_node("moreplants:eyeweed", {
@ -246,13 +257,14 @@ minetest.register_node("moreplants:eyeweed", {
inventory_image = "moreplants_eyeweed.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
drop = "moreplants:eye",
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
},
walkable = false,
waving = 1,
})
minetest.register_node("moreplants:fern", {
@ -266,12 +278,13 @@ minetest.register_node("moreplants:fern", {
inventory_image = "moreplants_fern.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
},
walkable = false,
waving = 1,
})
minetest.register_node("moreplants:bush", {
@ -285,12 +298,13 @@ minetest.register_node("moreplants:bush", {
inventory_image = "moreplants_bush.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
},
walkable = false,
waving = 1,
})
minetest.register_node("moreplants:cactus", {
@ -304,7 +318,7 @@ minetest.register_node("moreplants:cactus", {
inventory_image = "moreplants_cactus.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
@ -324,7 +338,7 @@ minetest.register_node("moreplants:firefung", {
inventory_image = "moreplants_firemush.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, igniter=1, hot=3, attatched_node=1, flora=1},
groups = {snappy=3, igniter=1, hot=3, attached_node=1, flora=1},
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
@ -343,7 +357,7 @@ minetest.register_node("moreplants:bluemush", {
inventory_image = "moreplants_bluemush.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
@ -364,7 +378,7 @@ minetest.register_node("moreplants:caveflower", {
visual_scale = 1,
light_source = 5,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flower=1},
groups = {snappy=3, flammable=1, attached_node=1, flower=1},
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
@ -383,12 +397,13 @@ minetest.register_node("moreplants:moonflower", {
inventory_image = "moreplants_moonflower.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flower=1},
groups = {snappy=3, flammable=1, attached_node=1, flower=1},
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
},
walkable = false,
waving = 1,
})
minetest.register_node("moreplants:fireflower", {
@ -402,12 +417,13 @@ minetest.register_node("moreplants:fireflower", {
inventory_image = "moreplants_fireflower.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flower=1},
groups = {snappy=3, flammable=1, attached_node=1, flower=1},
selection_box = {
type = "fixed",
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
},
walkable = false,
waving = 1,
})
minetest.register_node("moreplants:deadweed", {
@ -415,14 +431,14 @@ minetest.register_node("moreplants:deadweed", {
drawtype = "plantlike",
tiles = {"moreplants_deadweed.png"},
paramtype = "light",
light_source = 5,
light_source = 2,
is_ground_content = false,
buildable_to = true,
sunlight_propagates = true,
inventory_image = "moreplants_deadweed.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
selection_box = {
type = "fixed",
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
@ -435,19 +451,20 @@ minetest.register_node("moreplants:taigabush", {
drawtype = "plantlike",
tiles = {"moreplants_tundrabush.png"},
paramtype = "light",
light_source = 5,
light_source = 2,
is_ground_content = false,
buildable_to = true,
sunlight_propagates = true,
inventory_image = "moreplants_tundrabush.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
selection_box = {
type = "fixed",
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
},
walkable = false,
waving = 1,
})
minetest.register_node("moreplants:glowfung", {
@ -458,7 +475,7 @@ minetest.register_node("moreplants:glowfung", {
is_ground_content = false,
buildable_to = true,
sunlight_propagates = true,
light_source = 20,
light_source = default.LIGHT_MAX-2,
legacy_wallmounted = true,
selection_box = {
type = "wallmounted",
@ -471,7 +488,7 @@ minetest.register_node("moreplants:glowfung", {
inventory_image = "moreplants_glowfung.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
walkable = false,
})
@ -486,12 +503,13 @@ minetest.register_node("moreplants:jungleflower", {
inventory_image = "moreplants_jungleflower1.png",
visual_scale = 1.1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flower=1},
groups = {snappy=3, flammable=1, attached_node=1, flower=1},
selection_box = {
type = "fixed",
fixed = {-0.4, -0.5, -0.4, 0.4, 0.4, 0.4}
},
walkable = false,
waving = 1,
})
minetest.register_node("moreplants:mushroom", {
@ -517,7 +535,7 @@ minetest.register_node("moreplants:mushroom", {
{-0.125, -0.1875, -0.125, 0.125, -0.125, 0.125}, -- NodeBox3
}
},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
light_source=2,
})
@ -532,7 +550,7 @@ minetest.register_node("moreplants:curly", {
inventory_image = "moreplants_curly.png",
visual_scale = 1.1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
drop = "moreplants:curlyfruit",
selection_box = {
type = "fixed",
@ -552,7 +570,7 @@ minetest.register_node("moreplants:clover", {
"moreplants_clover.png",
"moreplants_clover.png"
},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
is_ground_content=true,
buildable_to = true,
sunlight_propagates = true,
@ -563,6 +581,7 @@ minetest.register_node("moreplants:clover", {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.1, 0.5}
},
waving = 1,
})
minetest.register_node("moreplants:groundfung", {
@ -576,7 +595,7 @@ minetest.register_node("moreplants:groundfung", {
"moreplants_groundfung.png",
"moreplants_groundfung.png"
},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
is_ground_content=true,
buildable_to = true,
walkable = false,
@ -617,7 +636,6 @@ minetest.register_node("moreplants:palmleaves2", {
visual_scale = 2.5,
tiles = {"moreplants_palmleaves2.png"},
inventory_image = "moreplants_palmleaves2.png",
use_texture_alpha = true,
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = false,
@ -628,6 +646,7 @@ minetest.register_node("moreplants:palmleaves2", {
fixed = {-0.3, -0.5, -0.3, 0.3, -0.2, 0.3}
},
groups = {cracky=3,dig_immediate=3},
waving = 1,
})
minetest.register_node("moreplants:palmleaves1", {
@ -636,7 +655,6 @@ minetest.register_node("moreplants:palmleaves1", {
visual_scale = 4.0,
tiles = {"moreplants_palmleaves.png"},
inventory_image = "moreplants_palmleaves.png",
use_texture_alpha = true,
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = false,
@ -694,10 +712,13 @@ minetest.register_decoration({
})
minetest.register_decoration({
deco_type = "simple",
place_on = "default:dirt_with_grass",
place_on = {"default:dirt_with_grass", "default:sand"},
sidelen = 16,
fill_ratio = 0.01,
biomes = {"stone_grassland", "sandstone_grassland"},
biomes = {"deciduous_forest_shore",
"grassland",
"grassland_dunes",
"coniferous_forest_dunes"},
decoration = "moreplants:tallgrass",
height = 1,
})
@ -730,7 +751,11 @@ minetest.register_decoration({
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_rainforest_litter", "default:dirt_with_grass"},
place_on = {
"default:dirt_with_rainforest_litter",
"default:dirt_with_grass",
"default:dirt_with_coniferous_litter",
},
sidelen = 16,
fill_ratio = 0.01,
biomes = {"rainforest", "coniferous_forest"},
@ -760,18 +785,19 @@ minetest.register_decoration({
place_on = "default:sand",
sidelen = 16,
fill_ratio = 0.01,
biomes = {"stone_grassland_ocean", "deciduous_forest_ocean"},
biomes = {"grassland_ocean", "deciduous_forest_ocean"},
decoration = "moreplants:bulrush",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = "default:water_source",
place_on = {"default:dirt"},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"stone_grassland_ocean", "deciduous_forest_ocean"},
biomes = {"rainforest_swamp", "deciduous_forest_shore"},
decoration = "moreplants:aliengrass",
height = 1,
place_offset_y = 1,
})
minetest.register_decoration({
deco_type = "simple",
@ -787,6 +813,7 @@ minetest.register_decoration({
place_on = "default:stone",
sidelen = 16,
fill_ratio = 0.001,
biomes = {"tundra"},
decoration = "moreplants:stoneweed",
height = 1,
})
@ -819,7 +846,7 @@ minetest.register_decoration({
})
minetest.register_decoration({
deco_type = "simple",
place_on = "default:snow_block",
place_on = "default:stone",
sidelen = 16,
fill_ratio = 0.005,
biomes = {"tundra"},
@ -855,7 +882,7 @@ minetest.register_decoration({
})
minetest.register_decoration({
deco_type = "simple",
place_on = "default:dirt_with_grass",
place_on = {"default:dirt_with_grass", "default:dirt_with_coniferous_litter"},
sidelen = 16,
fill_ratio = 0.02,
biomes = {"coniferous_forest"},
@ -864,7 +891,7 @@ minetest.register_decoration({
})
minetest.register_decoration({
deco_type = "simple",
place_on = "default:dirt_with_grass",
place_on = {"default:dirt_with_grass", "default:dirt_with_coniferous_litter"},
sidelen = 26,
fill_ratio = 0.02,
biomes = {"coniferous_forest"},
@ -873,13 +900,22 @@ minetest.register_decoration({
})
minetest.register_decoration({
deco_type = "simple",
place_on = "default:dirt_with_grass",
place_on = {"default:dirt_with_grass", "default:dirt_with_coniferous_litter"},
sidelen = 26,
fill_ratio = 0.02,
biomes = {"coniferous_forest"},
decoration = "moreplants:fern",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_coniferous_litter"},
sidelen = 26,
fill_ratio = 0.002,
biomes = {"coniferous_forest", "taiga"},
decoration = "moreplants:bluespike",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = "default:dirt_with_grass",
@ -889,6 +925,16 @@ minetest.register_decoration({
decoration = "moreplants:mushroom",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = "default:dirt_with_grass",
sidelen = 16,
fill_ratio = 0.01,
biomes = {"deciduous_forest","grassland"},
decoration = "moreplants:clover",
height = 1,
})
-- minetest.register_decoration({
-- deco_type = "simple",
-- place_on = "air",
@ -901,7 +947,8 @@ minetest.register_decoration({
-- })
end
if minetest.get_mapgen_params().mgname ~= "v6" or minetest.get_mapgen_params().mgname ~= "singlenode" then
local mgname = minetest.get_mapgen_setting("mg_name")
if mgname ~= "v6" and mgname ~= "singlenode" then
moreplants.mapgen()
end