diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..f53ed5c --- /dev/null +++ b/README.txt @@ -0,0 +1,105 @@ +==================================================================================================== +[Mod] Grasses [dryplants] +---------------------------------------------------------------------------------------------------- +This mod adds different grasses to minetest and changes some default ones. +---------------------------------------------------------------------------------------------------- +You can configure this mod in settings.txt. +---------------------------------------------------------------------------------------------------- +If you want the different sizes of junglegrass to generate: +make shure you have a line starting with "mg_flags =" and "v6_jungles" in it in minetest.conf. +---------------------------------------------------------------------------------------------------- +You don't have to rename the mod folder (no matter how odd it may look). +---------------------------------------------------------------------------------------------------- +If you don't like some of the textures beginning with "default_": you can safely delete them. +==================================================================================================== + + + +==================================================================================================== +License of +dryplants_junglegrass_medium.png, +dryplants_junglegrass_short.png & +dryplants_junglegrass_shortest.png: +---------------------------------------------------------------------------------------------------- +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +http://creativecommons.org/licenses/by-sa/3.0/ +---------------------------------------------------------------------------------------------------- +These junglegrass textures are modified copies of the original one from the game's default set. +==================================================================================================== + + + +==================================================================================================== +License of any other textures and code: +---------------------------------------------------------------------------------------------------- +Do What the Fuck You Want to Public License (WTFPL) +http://www.wtfpl.net/about/ +==================================================================================================== + + + +==================================================================================================== +For authors of code see the different *.lua files. +==================================================================================================== + + + +==================================================================================================== +List of textures, their authors and licenses +---------------------------------------------------------------------------------------------------- +TEXTURE AUTHORS LICENSE +---------------------------------------------------------------------------------------------------- +default_grass.png Cisoun, Neuromancer WTFPL +default_grass_1.png VanessaE, Mossmanikin WTFPL +default_grass_2.png VanessaE, Mossmanikin WTFPL +default_grass_3.png VanessaE, Mossmanikin WTFPL +default_grass_4.png VanessaE, Mossmanikin, Neuromancer WTFPL +default_grass_5.png Neuromancer, Mossmanikin WTFPL +default_grass_side.png Cisoun, Neuromancer WTFPL +default_papyrus.png Neuromancer WTFPL +dryplants_grass.png Mossmanikin WTFPL +dryplants_grass_short.png Mossmanikin WTFPL +dryplants_grass_short_side.png Mossmanikin WTFPL +dryplants_hay.png Mossmanikin WTFPL +dryplants_juncus_02.png Neuromancer, Mossmanikin WTFPL +dryplants_juncus_03.png Neuromancer, Mossmanikin WTFPL +dryplants_juncus_inv.png Neuromancer, Mossmanikin WTFPL +dryplants_junglegrass_medium.png celeron55, VanessaE CC BY-SA 3.0 +dryplants_junglegrass_short.png celeron55, VanessaE CC BY-SA 3.0 +dryplants_junglegrass_shortest.png celeron55, VanessaE CC BY-SA 3.0 +dryplants_reed.png Mossmanikin WTFPL +dryplants_reed_wet.png Mossmanikin WTFPL +dryplants_reedmace.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_bottom.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_height_2.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_height_3.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_height_3_spikes.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_sapling.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_spikes.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_top.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_water.png Mossmanikin, Neuromancer WTFPL +dryplants_sickle.png Mossmanikin WTFPL +---------------------------------------------------------------------------------------------------- +default_grass_4_old.png VanessaE, Mossmanikin WTFPL +default_grass_5_old.png VanessaE, Mossmanikin WTFPL +dryplants_grass_short_old4.png Mossmanikin WTFPL +dryplants_juncus_02_left_old.png Neuromancer, Mossmanikin WTFPL +dryplants_juncus_02_right_old.png Neuromancer, Mossmanikin WTFPL +dryplants_juncus_03_left_old.png Neuromancer, Mossmanikin WTFPL +dryplants_juncus_03_right_old.png Neuromancer, Mossmanikin WTFPL +dryplants_reedmace_bottom_left_old2.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_bottom_old5.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_bottom_right_old2.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_left_old2.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_old9.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_right_old2.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_sapling_old.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_spikes_old3.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_top_left_old2.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_top_old4.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_top_right_old2.png Mossmanikin, Neuromancer WTFPL +dryplants_reedmace_water_old2.png Mossmanikin, Neuromancer WTFPL +---------------------------------------------------------------------------------------------------- +In case there's something wrong with this list: don't hesitate to post what's wrong @ +https://forum.minetest.net/viewtopic.php?id=7143 +==================================================================================================== \ No newline at end of file diff --git a/dryplants/init.lua b/dryplants/init.lua index 4ea3913..d0133c6 100644 --- a/dryplants/init.lua +++ b/dryplants/init.lua @@ -1,10 +1,11 @@ ----------------------------------------------------------------------------------------------- local title = "Grasses" -- former "Dry plants" -local version = "0.1.6" +local version = "0.1.8" local mname = "dryplants" ----------------------------------------------------------------------------------------------- -- by Mossmanikin -- textures & ideas partly by Neuromancer +-- original code & textures for jungle grass by VanessaE -- License (everything): WTFPL -- Contains code from: default, farming @@ -27,6 +28,13 @@ if EXTRA_TALL_GRASS_GENERATES == true then dofile(minetest.get_modpath("dryplants").."/moregrass.lua") end --dofile(minetest.get_modpath("dryplants").."/meadowvariation.lua") +if JUNGLEGRASS_GENERATES == true then +dofile(minetest.get_modpath("dryplants").."/junglegrass.lua") +--else +--minetest.register_alias("junglegrass:shortest", "air") +--minetest.register_alias("junglegrass:short", "air") +--minetest.register_alias("junglegrass:medium", "air") +end ----------------------------------------------------------------------------------------------- -- Sickle diff --git a/dryplants/junglegrass.lua b/dryplants/junglegrass.lua new file mode 100644 index 0000000..f0d9d64 --- /dev/null +++ b/dryplants/junglegrass.lua @@ -0,0 +1,167 @@ +-- Code by VanessaE and Mossmanikin (and maybe some of Ironzorg's Flowers mod code left) +-- The different sizes of junglegrass used to be part of VanessaE's Plantlife modpack/Junglegrass mod + +-- For compatibility with older stuff +minetest.register_alias("junglegrass:shortest","dryplants:junglegrass_shortest") +minetest.register_alias("junglegrass:short" ,"dryplants:junglegrass_short" ) +minetest.register_alias("junglegrass:medium" ,"dryplants:junglegrass_medium" ) + +local SPAWN_DELAY = 1000 +local SPAWN_CHANCE = 200 +local GROW_DELAY = 500 +local GROW_CHANCE = 30 +local junglegrass_seed_diff = 329 + +local grasses_list = { + {"dryplants:junglegrass_shortest", "dryplants:junglegrass_short" , 1 }, + {"dryplants:junglegrass_short" , "dryplants:junglegrass_medium", 2 }, + {"dryplants:junglegrass_medium" , "default:junglegrass" , 3 }, + {"default:junglegrass" , nil , 4 } +} + +minetest.register_node('dryplants:junglegrass_medium', { + description = "Jungle Grass (medium height)", + drawtype = 'plantlike', + tile_images = { 'dryplants_junglegrass_medium.png' }, + inventory_image = 'dryplants_junglegrass_medium.png', + wield_image = 'dryplants_junglegrass_medium.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + groups = { snappy = 3, flammable=2, junglegrass=1, flora=1 }, + sounds = default.node_sound_leaves_defaults(), + drop = 'default:junglegrass', + + selection_box = { + type = "fixed", + fixed = {-0.4, -0.5, -0.4, 0.4, 0.5, 0.4}, + }, + buildable_to = true, +}) + +minetest.register_node('dryplants:junglegrass_short', { + description = "Jungle Grass (short)", + drawtype = 'plantlike', + tile_images = { 'dryplants_junglegrass_short.png' }, + inventory_image = 'dryplants_junglegrass_short.png', + wield_image = 'dryplants_junglegrass_short.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + groups = { snappy = 3, flammable=2, junglegrass=1, flora=1 }, + sounds = default.node_sound_leaves_defaults(), + drop = 'default:junglegrass', + selection_box = { + type = "fixed", + fixed = {-0.4, -0.5, -0.4, 0.4, 0.3, 0.4}, + }, + buildable_to = true, +}) + +minetest.register_node('dryplants:junglegrass_shortest', { + description = "Jungle Grass (very short)", + drawtype = 'plantlike', + tile_images = { 'dryplants_junglegrass_shortest.png' }, + inventory_image = 'dryplants_junglegrass_shortest.png', + wield_image = 'dryplants_junglegrass_shortest.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + groups = { snappy = 3, flammable=2, junglegrass=1, flora=1 }, + sounds = default.node_sound_leaves_defaults(), + drop = 'default:junglegrass', + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}, + }, + buildable_to = true, +}) + +if JUNGLEGRASS_SPAWNING == true then -- see settings.txt +plantslib:spawn_on_surfaces({ + spawn_delay = SPAWN_DELAY, + spawn_plants = {"dryplants:junglegrass_shortest"}, + avoid_radius = 4, + spawn_chance = SPAWN_CHANCE, + spawn_surfaces = {"default:dirt_with_grass", "default:cactus", "default:papyrus"}, + avoid_nodes = {"group:junglegrass", "default:junglegrass", "default:dry_shrub"}, + seed_diff = junglegrass_seed_diff, + light_min = 5 +}) + +plantslib:spawn_on_surfaces({ + spawn_delay = SPAWN_DELAY, + spawn_plants = {"dryplants:junglegrass_shortest"}, + avoid_radius = 4, + spawn_chance = SPAWN_CHANCE*2, + spawn_surfaces = {"default:sand"}, + avoid_nodes = {"group:junglegrass", "default:junglegrass", "default:dry_shrub"}, + seed_diff = junglegrass_seed_diff, + light_min = 5 +}) + +plantslib:spawn_on_surfaces({ + spawn_delay = SPAWN_DELAY, + spawn_plants = {"dryplants:junglegrass_shortest"}, + avoid_radius = 4, + spawn_chance = SPAWN_CHANCE*5, + spawn_surfaces = {"default:desert_sand"}, + avoid_nodes = {"group:junglegrass", "default:junglegrass", "default:dry_shrub"}, + seed_diff = junglegrass_seed_diff, + light_min = 5 +}) +end + + +abstract_dryplants.junglegrass = function(pos) + for i in pairs(grasses_list) do + local SiZe = math.random(1,4) + local GRaSS = grasses_list[i][1] + local NR = grasses_list[i][3] + local right_here = {x=pos.x, y=pos.y+1, z=pos.z} + local node_here = minetest.get_node(right_here) + if minetest.registered_nodes[node_here.name].buildable_to -- instead of check_air = true, + and SiZe == NR + and NR ~= 4 then + minetest.add_node(right_here, {name=GRaSS}) + end + end +end + +plantslib:register_generate_plant({ + surface = { + "default:dirt_with_grass", + "default:sand", + "default:desert_sand" + }, + max_count = JUNGLEGRASS_PER_MAPBLOCK, + rarity = 101 - JUNGLEGRASS_RARITY, + seed_diff = junglegrass_seed_diff, + min_elevation = 1, -- above sea level + max_elevation = 40, + near_nodes = {"default:jungletree", "default:junglegrass"}, + near_nodes_size = 3, + near_nodes_vertical = 2, + near_nodes_count = 1, + plantlife_limit = -0.9, + check_air = false, + }, + "abstract_dryplants.junglegrass" +) + +-- add junglegrass on cacti? + +-- todo: farming + +for i in ipairs(grasses_list) do + plantslib:grow_plants({ + grow_delay = GROW_DELAY, + grow_chance = GROW_CHANCE/2, + grow_plant = grasses_list[i][1], + grow_result = grasses_list[i][2], + dry_early_node = "default:desert_sand", + grow_nodes = {"default:dirt_with_grass", "default:sand", "default:desert_sand"} + }) +end + +print("[Junglegrass] Loaded.") diff --git a/dryplants/settings.txt b/dryplants/settings.txt index 3882b94..791f029 100644 --- a/dryplants/settings.txt +++ b/dryplants/settings.txt @@ -1,7 +1,24 @@ +-- In case you don't wanna have errors: + +-- Only change what's behind a "=" (or "--"). +-- Don't use caps (behind a "="). + +-- If there's a "false" (behind a "=") you can change it to "true" (and the other way around). +-- Spelling is important. +-- If "true" or "false" is necessary as setting, everything(!) which is not spelled "true" will be read as if it were "false" (even "1", "True"...) + +-- If you wanna comment something (for example to remember the default value), you can do this by putting "--" in front of the comment. +-- You can put "--" at the end of a line with "=" in it, or at the beginning of an empty/new line (minetest will ignore what's behind it then). +-- But don't put "--" in front of a line with "=" in it (or else minetest will ignore the setting and you might get an error). + +-- If something is still unclear, don't hesitate to post your question @ https://forum.minetest.net/viewtopic.php?id=7143 + + -- Here you can enable/disable the different plants REEDMACE_GENERATES = true SMALL_JUNCUS_GENERATES = true EXTRA_TALL_GRASS_GENERATES = true +JUNGLEGRASS_GENERATES = true @@ -49,4 +66,10 @@ REED_WILL_DRY = false -- wet reed nodes will become dry reed nodes REED_DRYING_TIME = 3600 -- seconds AUTO_ROOF_CORNER = true - + + + +-- Jungle Grass settings +JUNGLEGRASS_PER_MAPBLOCK = 4800 -- plants per 80x80x80 nodes (absolute maximum number) +JUNGLEGRASS_RARITY = 58 -- percent +JUNGLEGRASS_SPAWNING = false -- jungle grass grows after(!) map generation diff --git a/dryplants/textures/dryplants_junglegrass_medium.png b/dryplants/textures/dryplants_junglegrass_medium.png new file mode 100644 index 0000000..6d655df Binary files /dev/null and b/dryplants/textures/dryplants_junglegrass_medium.png differ diff --git a/dryplants/textures/dryplants_junglegrass_short.png b/dryplants/textures/dryplants_junglegrass_short.png new file mode 100644 index 0000000..83f1122 Binary files /dev/null and b/dryplants/textures/dryplants_junglegrass_short.png differ diff --git a/dryplants/textures/dryplants_junglegrass_shortest.png b/dryplants/textures/dryplants_junglegrass_shortest.png new file mode 100644 index 0000000..3feadff Binary files /dev/null and b/dryplants/textures/dryplants_junglegrass_shortest.png differ diff --git a/dryplants/textures/not_in_use/big_pic_8.png b/dryplants/textures/not_in_use/big_pic_8.png deleted file mode 100644 index c39a013..0000000 Binary files a/dryplants/textures/not_in_use/big_pic_8.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/big_pic_9.png b/dryplants/textures/not_in_use/big_pic_9.png deleted file mode 100644 index 2779783..0000000 Binary files a/dryplants/textures/not_in_use/big_pic_9.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/default_grass_5y.png b/dryplants/textures/not_in_use/default_grass_5y.png deleted file mode 100644 index ae8fcf4..0000000 Binary files a/dryplants/textures/not_in_use/default_grass_5y.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/default_papyrus16.png b/dryplants/textures/not_in_use/default_papyrus16.png deleted file mode 100644 index 90d8111..0000000 Binary files a/dryplants/textures/not_in_use/default_papyrus16.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/default_papyrus16b.png b/dryplants/textures/not_in_use/default_papyrus16b.png deleted file mode 100644 index a70d312..0000000 Binary files a/dryplants/textures/not_in_use/default_papyrus16b.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/default_papyrus16m.png b/dryplants/textures/not_in_use/default_papyrus16m.png deleted file mode 100644 index dd73d0e..0000000 Binary files a/dryplants/textures/not_in_use/default_papyrus16m.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/default_papyrus32.png b/dryplants/textures/not_in_use/default_papyrus32.png deleted file mode 100644 index 1585f48..0000000 Binary files a/dryplants/textures/not_in_use/default_papyrus32.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/default_papyrus32m.png b/dryplants/textures/not_in_use/default_papyrus32m.png deleted file mode 100644 index 0bda584..0000000 Binary files a/dryplants/textures/not_in_use/default_papyrus32m.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/dryplants_cattailsG_m2.png b/dryplants/textures/not_in_use/dryplants_cattailsG_m2.png deleted file mode 100644 index 5af4689..0000000 Binary files a/dryplants/textures/not_in_use/dryplants_cattailsG_m2.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/dryplants_juncus_02_left.png b/dryplants/textures/not_in_use/dryplants_juncus_02_left.png deleted file mode 100644 index 8b23c7a..0000000 Binary files a/dryplants/textures/not_in_use/dryplants_juncus_02_left.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/dryplants_juncus_02_right.png b/dryplants/textures/not_in_use/dryplants_juncus_02_right.png deleted file mode 100644 index 0ffa002..0000000 Binary files a/dryplants/textures/not_in_use/dryplants_juncus_02_right.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/dryplants_juncus_02_whole2.png b/dryplants/textures/not_in_use/dryplants_juncus_02_whole2.png deleted file mode 100644 index 7708b49..0000000 Binary files a/dryplants/textures/not_in_use/dryplants_juncus_02_whole2.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/dryplants_juncus_03_left.png b/dryplants/textures/not_in_use/dryplants_juncus_03_left.png deleted file mode 100644 index 9df8724..0000000 Binary files a/dryplants/textures/not_in_use/dryplants_juncus_03_left.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/dryplants_juncus_03_right.png b/dryplants/textures/not_in_use/dryplants_juncus_03_right.png deleted file mode 100644 index d43af2e..0000000 Binary files a/dryplants/textures/not_in_use/dryplants_juncus_03_right.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/dryplants_juncus_03_whole2.png b/dryplants/textures/not_in_use/dryplants_juncus_03_whole2.png deleted file mode 100644 index e7af090..0000000 Binary files a/dryplants/textures/not_in_use/dryplants_juncus_03_whole2.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/dryplants_reedmace_01.png b/dryplants/textures/not_in_use/dryplants_reedmace_01.png deleted file mode 100644 index c2b1546..0000000 Binary files a/dryplants/textures/not_in_use/dryplants_reedmace_01.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/dryplants_reedmace_02.png b/dryplants/textures/not_in_use/dryplants_reedmace_02.png deleted file mode 100644 index 8380c20..0000000 Binary files a/dryplants/textures/not_in_use/dryplants_reedmace_02.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/dryplants_reedmace_03.png b/dryplants/textures/not_in_use/dryplants_reedmace_03.png deleted file mode 100644 index 0ee837d..0000000 Binary files a/dryplants/textures/not_in_use/dryplants_reedmace_03.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/dryplants_reedmace_04.png b/dryplants/textures/not_in_use/dryplants_reedmace_04.png deleted file mode 100644 index 800cb96..0000000 Binary files a/dryplants/textures/not_in_use/dryplants_reedmace_04.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/reedmace2.png b/dryplants/textures/not_in_use/reedmace2.png deleted file mode 100644 index 2450cea..0000000 Binary files a/dryplants/textures/not_in_use/reedmace2.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/reedmace3.png b/dryplants/textures/not_in_use/reedmace3.png deleted file mode 100644 index 395a110..0000000 Binary files a/dryplants/textures/not_in_use/reedmace3.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/reedmace4.png b/dryplants/textures/not_in_use/reedmace4.png deleted file mode 100644 index 02624ff..0000000 Binary files a/dryplants/textures/not_in_use/reedmace4.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/reedtest.png b/dryplants/textures/not_in_use/reedtest.png deleted file mode 100644 index 34a7a05..0000000 Binary files a/dryplants/textures/not_in_use/reedtest.png and /dev/null differ diff --git a/dryplants/textures/not_in_use/texturing.png b/dryplants/textures/not_in_use/texturing.png deleted file mode 100644 index 8526434..0000000 Binary files a/dryplants/textures/not_in_use/texturing.png and /dev/null differ diff --git a/dryplants/textures/old/dryplants_grass_short_old3.png b/dryplants/textures/old/dryplants_grass_short_old3.png deleted file mode 100644 index f6f6c5b..0000000 Binary files a/dryplants/textures/old/dryplants_grass_short_old3.png and /dev/null differ diff --git a/modpack.txt b/modpack.txt index e69de29..a16c573 100644 --- a/modpack.txt +++ b/modpack.txt @@ -0,0 +1,7 @@ +The presence of this file indicates that the current folder is a modpack. + + +You don't have to rename this folder. +But you can rename it as long as none of the subfolders (or any other mods you use) have the chosen name and you don't use illegal characters. + +In this particular case you could for example, if you like, rename it to "Grasses" (without ""). \ No newline at end of file