diff --git a/along_shore/along_shore_settings.txt b/along_shore/along_shore_settings.txt new file mode 100644 index 0000000..e4562c0 --- /dev/null +++ b/along_shore/along_shore_settings.txt @@ -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 %) + + + + + diff --git a/along_shore/depends.txt b/along_shore/depends.txt new file mode 100644 index 0000000..e27a0d0 --- /dev/null +++ b/along_shore/depends.txt @@ -0,0 +1,3 @@ +default +plants_lib +flowers_plus? \ No newline at end of file diff --git a/along_shore/generating.lua b/along_shore/generating.lua new file mode 100644 index 0000000..dc5856a --- /dev/null +++ b/along_shore/generating.lua @@ -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" +) \ No newline at end of file diff --git a/along_shore/init.lua b/along_shore/init.lua new file mode 100644 index 0000000..8fe0a1c --- /dev/null +++ b/along_shore/init.lua @@ -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...") +----------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/along_shore/nodes.lua b/along_shore/nodes.lua new file mode 100644 index 0000000..adbc827 --- /dev/null +++ b/along_shore/nodes.lua @@ -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 \ No newline at end of file diff --git a/along_shore/textures/along_shore_empty.png b/along_shore/textures/along_shore_empty.png new file mode 100644 index 0000000..c682453 Binary files /dev/null and b/along_shore/textures/along_shore_empty.png differ diff --git a/trunks/textures/old & unused/lillypad3Flower16x.png b/along_shore/textures/along_shore_lilypads_1.png similarity index 100% rename from trunks/textures/old & unused/lillypad3Flower16x.png rename to along_shore/textures/along_shore_lilypads_1.png diff --git a/trunks/textures/old & unused/lillyPad5x16.png b/along_shore/textures/along_shore_lilypads_2.png similarity index 100% rename from trunks/textures/old & unused/lillyPad5x16.png rename to along_shore/textures/along_shore_lilypads_2.png diff --git a/trunks/textures/old & unused/LillyPad3x16.png b/along_shore/textures/along_shore_lilypads_3.png similarity index 100% rename from trunks/textures/old & unused/LillyPad3x16.png rename to along_shore/textures/along_shore_lilypads_3.png diff --git a/trunks/textures/trunks_lilypad_2.png b/along_shore/textures/along_shore_lilypads_4.png similarity index 100% rename from trunks/textures/trunks_lilypad_2.png rename to along_shore/textures/along_shore_lilypads_4.png diff --git a/trunks/textures/old & unused/pondscum16xc.png b/along_shore/textures/along_shore_pondscum_1.png similarity index 100% rename from trunks/textures/old & unused/pondscum16xc.png rename to along_shore/textures/along_shore_pondscum_1.png diff --git a/along_shore/textures/credit_textures.txt b/along_shore/textures/credit_textures.txt new file mode 100644 index 0000000..96c28a5 --- /dev/null +++ b/along_shore/textures/credit_textures.txt @@ -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 +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/trunks/textures/trunks_lilypad_3.png b/along_shore/textures/old & unused/LillyPad3x16.png similarity index 100% rename from trunks/textures/trunks_lilypad_3.png rename to along_shore/textures/old & unused/LillyPad3x16.png diff --git a/trunks/textures/old & unused/MultiLilly16x.png b/along_shore/textures/old & unused/MultiLilly16x.png similarity index 100% rename from trunks/textures/old & unused/MultiLilly16x.png rename to along_shore/textures/old & unused/MultiLilly16x.png diff --git a/trunks/textures/trunks_lilypad_4.png b/along_shore/textures/old & unused/lillyPad5x16.png similarity index 100% rename from trunks/textures/trunks_lilypad_4.png rename to along_shore/textures/old & unused/lillyPad5x16.png diff --git a/trunks/textures/trunks_lilypad_1.png b/along_shore/textures/old & unused/lillypad3Flower16x.png similarity index 100% rename from trunks/textures/trunks_lilypad_1.png rename to along_shore/textures/old & unused/lillypad3Flower16x.png diff --git a/along_shore/textures/old & unused/pondscum16xc.png b/along_shore/textures/old & unused/pondscum16xc.png new file mode 100644 index 0000000..18b1879 Binary files /dev/null and b/along_shore/textures/old & unused/pondscum16xc.png differ diff --git a/trunks/lilypad.lua b/trunks/lilypad.lua deleted file mode 100644 index 3fbd694..0000000 --- a/trunks/lilypad.lua +++ /dev/null @@ -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" -) diff --git a/trunks/textures/credit_textures.txt b/trunks/textures/credit_textures.txt index 4f92337..b3893d5 100644 --- a/trunks/textures/credit_textures.txt +++ b/trunks/textures/credit_textures.txt @@ -23,9 +23,7 @@ FOLDER TEXTURE AUTHORS trunks_twigs_top.png Mossmanikin ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ../trunks/textures/old & unused comboSticks.png Mossmanikin, Neuromancer - comboSticks_2.png Mossmanikin, Neuromancer - MultiLilly16x.png Neuromancer - pondscum16xc.png Neuromancer + comboSticks_2.png Mossmanikin, Neuromancer trunks_twig_1e.png Mossmanikin, Neuromancer trunks_twig_1n.png Mossmanikin, Neuromancer trunks_twig_2n.png Mossmanikin, Neuromancer