Grasses 0.1.8 - Jungle Grass

Added VanessaE's different sizes of junglegrass
Changed some of the junglegrass code (spawning)
README.txt
master
Mossmanikin 2013-12-24 18:42:03 +01:00
parent 016df593e0
commit fa2bf0434c
33 changed files with 312 additions and 2 deletions

105
README.txt Normal file
View File

@ -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
====================================================================================================

View File

@ -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

167
dryplants/junglegrass.lua Normal file
View File

@ -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.")

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 910 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 823 B

View File

@ -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 "").