Moved & renamed lilypad , supports flowers_plus
|
@ -0,0 +1,15 @@
|
|||
-- Settings for generation of stuff (at map-generation time)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Lilypads_Max_Count = 320 -- absolute maximum number in an area of 80x80x80 nodes
|
||||
|
||||
|
||||
Lilypads_Rarity = 33 -- larger values make lillypads more rare (100 means chance of 0 %)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
default
|
||||
plants_lib
|
||||
flowers_plus?
|
|
@ -0,0 +1,49 @@
|
|||
-----------------------------------------------------------------------------------------------
|
||||
-- LiLy PaDS
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
abstract_along_shore.grow_lilypad = function(pos)
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local lily_type = math.random(1,3)
|
||||
if lily_type == 1 then
|
||||
minetest.add_node(right_here, {name="along_shore:lilypads_"..math.random(1,3), param2=math.random(0,3)})
|
||||
end
|
||||
if lily_type == 2 then
|
||||
if minetest.get_modpath("flowers_plus") ~= nil then
|
||||
local LiLy_PaDS = {
|
||||
{1,"flowers:waterlily"},
|
||||
{2,"flowers:waterlily_225"},
|
||||
{3,"flowers:waterlily_45"},
|
||||
{4,"flowers:waterlily_675"}
|
||||
}
|
||||
for i in pairs(LiLy_PaDS) do
|
||||
local NR = LiLy_PaDS[i][1]
|
||||
local PaD = LiLy_PaDS[i][2]
|
||||
local chance = math.random(1, 4)
|
||||
if chance == NR then
|
||||
minetest.add_node(right_here, {name=PaD, param2=math.random(0,3)})
|
||||
end
|
||||
end
|
||||
else
|
||||
minetest.add_node(right_here, {name="along_shore:lilypads_"..math.random(1,4), param2=math.random(0,3)})
|
||||
end
|
||||
end
|
||||
if lily_type == 3 then
|
||||
minetest.add_node(right_here, {name="along_shore:pondscum_1", param2=1})
|
||||
end
|
||||
end
|
||||
|
||||
plantslib:register_generate_plant({
|
||||
surface = {"default:water_source"},
|
||||
max_count = Lilypads_Max_Count,
|
||||
rarity = Lilypads_Rarity,
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
near_nodes = {"default:dirt_with_grass"},
|
||||
near_nodes_size = 4,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
"abstract_along_shore.grow_lilypad"
|
||||
)
|
|
@ -0,0 +1,15 @@
|
|||
-----------------------------------------------------------------------------------------------
|
||||
local title = "Along the Shore"
|
||||
local version = "0.0.2"
|
||||
local mname = "along_shore"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
abstract_along_shore = {}
|
||||
|
||||
dofile(minetest.get_modpath("along_shore").."/along_shore_settings.txt")
|
||||
dofile(minetest.get_modpath("along_shore").."/generating.lua")
|
||||
dofile(minetest.get_modpath("along_shore").."/nodes.lua")
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
|
||||
-----------------------------------------------------------------------------------------------
|
|
@ -0,0 +1,80 @@
|
|||
local quite_flat = {-1/2, -1/2, -1/2, 1/2, -7/16, 1/2}
|
||||
local super_flat = {-1/2, -1/2, -1/2, 1/2, -15/32--[[<-flickers if smaller]], 1/2}
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- LiLy PaDS
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_alias("trunks:lilypad", "along_shore:lilypad_1")
|
||||
local LiLy_PaDS = { {1}, {2}, {3}, {4} }
|
||||
|
||||
for i in pairs(LiLy_PaDS) do
|
||||
local NR = LiLy_PaDS[i][1]
|
||||
local iNV = NR - 1
|
||||
|
||||
minetest.register_alias("trunks:lilypad_"..NR, "along_shore:lilypad_"..NR)
|
||||
|
||||
minetest.register_node("along_shore:lilypads_"..NR, {
|
||||
description = "Lily Pad",
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"along_shore_lilypads_"..NR..".png",
|
||||
"along_shore_lilypads_"..NR..".png^[transformFY", -- mirror
|
||||
"along_shore_empty.png"
|
||||
},
|
||||
inventory_image = "along_shore_lilypads_"..NR..".png",
|
||||
wield_image = "along_shore_lilypads_"..NR..".png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
buildable_to = true,
|
||||
walkable = false,
|
||||
node_box = {type = "fixed", fixed = super_flat},
|
||||
selection_box = {type = "fixed", fixed = quite_flat},
|
||||
groups = {dig_immediate=3,not_in_creative_inventory=iNV},
|
||||
drop = "along_shore:lilypads_1",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
liquids_pointable = true,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pt = pointed_thing
|
||||
local direction = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
if minetest.get_node(pt.above).name=="air" then
|
||||
minetest.set_node(pt.above, {name="along_shore:lilypads_"..math.random(1,3), param2=direction})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- PoND SCuM
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local PoND_SCuM = { {1} }
|
||||
|
||||
for i in pairs(PoND_SCuM) do
|
||||
local NR = PoND_SCuM[i][1]
|
||||
local iNV = NR - 1
|
||||
minetest.register_node("along_shore:pondscum_"..NR, {
|
||||
description = "Pond Scum",
|
||||
drawtype = "signlike", -- idea here is: you can smack it against a wall and it stays there
|
||||
tiles = {
|
||||
"along_shore_pondscum_"..NR..".png",
|
||||
"along_shore_pondscum_"..NR..".png^[transformFY", -- mirror
|
||||
"along_shore_empty.png"
|
||||
},
|
||||
inventory_image = "along_shore_pondscum_"..NR..".png",
|
||||
wield_image = "along_shore_pondscum_"..NR..".png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
buildable_to = true,
|
||||
walkable = false,
|
||||
selection_box = {type = "wallmounted"},
|
||||
groups = {dig_immediate=2,not_in_creative_inventory=iNV},
|
||||
drop = "along_shore:pondscum_1",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
liquids_pointable = true,
|
||||
})
|
||||
end
|
After Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 556 B After Width: | Height: | Size: 556 B |
Before Width: | Height: | Size: 460 B After Width: | Height: | Size: 460 B |
Before Width: | Height: | Size: 589 B After Width: | Height: | Size: 589 B |
Before Width: | Height: | Size: 460 B After Width: | Height: | Size: 460 B |
Before Width: | Height: | Size: 703 B After Width: | Height: | Size: 703 B |
|
@ -0,0 +1,20 @@
|
|||
-------------------------------------------------------------
|
||||
Credit for textures of "along_shore"
|
||||
-------------------------------------------------------------
|
||||
(If more than one author is listed the names are in alphabetical order)
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
FOLDER TEXTURE AUTHORS
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
../along_shore/textures (along_shore_empty.png) (Mossmanikin)
|
||||
along_shore_lilypads_1.png Neuromancer
|
||||
along_shore_lilypads_2.png Neuromancer
|
||||
along_shore_lilypads_3.png Neuromancer
|
||||
along_shore_lilypads_4.png Neuromancer
|
||||
along_shore_pondscum_1.png Neuromancer
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
../along_shore/textures/old & unused lillypad3Flower16x.png Neuromancer
|
||||
LillyPad3x16.png Neuromancer
|
||||
lillyPad5x16.png Neuromancer
|
||||
MultiLilly16x.png Neuromancer
|
||||
pondscum16xc.png Neuromancer
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
Before Width: | Height: | Size: 589 B After Width: | Height: | Size: 589 B |
Before Width: | Height: | Size: 462 B After Width: | Height: | Size: 462 B |
Before Width: | Height: | Size: 460 B After Width: | Height: | Size: 460 B |
Before Width: | Height: | Size: 556 B After Width: | Height: | Size: 556 B |
After Width: | Height: | Size: 703 B |
|
@ -1,65 +0,0 @@
|
|||
minetest.register_alias("trunks:lilypad", "trunks:lilypad_1")
|
||||
|
||||
local flat_stick = {-1/2, -1/2, -1/2, 1/2, -7/16, 1/2}
|
||||
local NoDe = { {1}, {2}, {3}, {4} }
|
||||
|
||||
for i in pairs(NoDe) do
|
||||
local NR = NoDe[i][1]
|
||||
local iNV = NR - 1
|
||||
minetest.register_node("trunks:lilypad_"..NR, {
|
||||
description = "LilyPad",
|
||||
inventory_image = "trunks_lilypad_"..NR..".png",
|
||||
wield_image = "trunks_lilypad_"..NR..".png",
|
||||
drawtype = "nodebox",
|
||||
tiles = { "trunks_lilypad_"..NR..".png" },
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
buildable_to = true,
|
||||
node_box = {type = "fixed", fixed = flat_stick},
|
||||
groups = {
|
||||
dig_immediate=3, -- almost literally immediate, like just picking up
|
||||
attached_node=1,
|
||||
not_in_creative_inventory=iNV
|
||||
},
|
||||
drop = "trunks:lilypad_1",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
liquids_pointable = true,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pt = pointed_thing
|
||||
local direction = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
if minetest.get_node(pt.above).name=="air" then
|
||||
minetest.set_node(pt.above, {name="trunks:lilypad_"..math.random(1,3), param2=direction})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- LilyPads
|
||||
-----------------------------------------------------------------------------------------------
|
||||
abstract_trunks.place_lilypad = function(pos)
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
minetest.add_node(right_here, {name="trunks:lilypad_"..math.random(1,3), param2=math.random(0,3)})
|
||||
end
|
||||
|
||||
plantslib:register_generate_plant({
|
||||
surface = {"default:water_source"},
|
||||
max_count = Twigs_on_water_Max_Count,
|
||||
rarity = Twigs_on_water_Rarity,
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
near_nodes = {"default:dirt_with_grass"},
|
||||
near_nodes_size = 3,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
"abstract_trunks.place_lilypad"
|
||||
)
|
|
@ -24,8 +24,6 @@ FOLDER TEXTURE AUTHORS
|
|||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
../trunks/textures/old & unused comboSticks.png Mossmanikin, Neuromancer
|
||||
comboSticks_2.png Mossmanikin, Neuromancer
|
||||
MultiLilly16x.png Neuromancer
|
||||
pondscum16xc.png Neuromancer
|
||||
trunks_twig_1e.png Mossmanikin, Neuromancer
|
||||
trunks_twig_1n.png Mossmanikin, Neuromancer
|
||||
trunks_twig_2n.png Mossmanikin, Neuromancer
|
||||
|
|