Skip to content
Snippets Groups Projects
Commit 1f21dcd6 authored by Milan's avatar Milan
Browse files

add vipworld modpack

parent 6e35aebc
No related branches found
No related tags found
No related merge requests found
Pipeline #1032 canceled
Showing
with 534 additions and 0 deletions
mods/vipworld/darkage/textures/darkage_slate_side.png

546 B

mods/vipworld/darkage/textures/darkage_slate_tale.png

250 B

mods/vipworld/darkage/textures/darkage_slate_tile.png

301 B

mods/vipworld/darkage/textures/darkage_stone_brick.png

494 B

mods/vipworld/darkage/textures/darkage_straw.png

758 B

mods/vipworld/darkage/textures/darkage_straw_bale.png

747 B

mods/vipworld/darkage/textures/darkage_tuff.png

726 B

mods/vipworld/darkage/textures/darkage_tuff_bricks.png

938 B

mods/vipworld/darkage/textures/darkage_tuff_rubble.png

999 B

mods/vipworld/darkage/textures/darkage_wood_bars.png

597 B

mods/vipworld/darkage/textures/darkage_wood_frame.png

730 B

mods/vipworld/darkage/textures/darkage_wood_grille.png

571 B

local node_box = {
type = "connected",
fixed = {{-1/4, -1/2, -1/4, 1/4, 1/2, 1/4}},
-- connect_bottom =
connect_front = {{-3/16, -1/2, -1/2, 3/16, 3/8, -1/4}},
connect_left = {{-1/2, -1/2, -3/16, -1/4, 3/8, 3/16}},
connect_back = {{-3/16, -1/2, 1/4, 3/16, 3/8, 1/2}},
connect_right = {{ 1/4, -1/2, -3/16, 1/2, 3/8, 3/16}},
}
local register_wall = function(base_node)
local name = base_node .. "_wall"
local ndef = minetest.registered_nodes[base_node]
local groups = ndef.groups
groups["wall"] = 1
-- inventory node, and pole-type wall start item
minetest.register_node(name, {
description = ndef.description .. " Wall",
drawtype = "nodebox",
node_box = node_box,
connects_to = {base_node,"group:wall"},
paramtype = "light",
is_ground_content = false,
tiles = ndef.tiles,
walkable = true,
groups = groups,
sounds = ndef.sounds,
})
end
register_wall("darkage:basalt_cobble")
register_wall("darkage:ors_brick")
register_wall("darkage:stone_brick")
register_wall("darkage:slate_cobble")
register_wall("darkage:tuff_bricks")
register_wall("darkage:old_tuff_bricks")
register_wall("darkage:rhyolitic_tuff_bricks")
default
-----------------------------------------------------------------------------------------------
-- Ferns - Fern 0.1.0
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- Contains code from: biome_lib
-- Looked at code from: default, flowers, painting, trees
-- Dependencies: biome_lib
-- Supports: dryplants, stoneage, sumpf
-----------------------------------------------------------------------------------------------
-- some inspiration from here
-- https://en.wikipedia.org/wiki/Athyrium_yokoscense
-- http://www.mygarden.net.au/gardening/athyrium-yokoscense/3900/1
-----------------------------------------------------------------------------------------------
-- support for i18n
-- Maintain backward compatibilty
-- minetest-0.5: Begin
local default_ferns = minetest.registered_items["default:fern_1"] or false
if default_ferns then
minetest.register_alias("ferns:fern_03", "default:fern_3")
minetest.register_alias("ferns:fern_02", "default:fern_2")
minetest.register_alias("ferns:fern_01", "default:fern_1")
end
-- minetest-0.5: End
minetest.register_alias("archaeplantae:fern", "ferns:fern_03")
minetest.register_alias("archaeplantae:fern_mid", "ferns:fern_02")
minetest.register_alias("archaeplantae:fern_small", "ferns:fern_01")
minetest.register_alias("ferns:fern_04", "ferns:fern_02") -- for placing
local nodenames = {}
local function create_nodes()
local images = { "ferns_fern.png", "ferns_fern_mid.png", "ferns_fern_big.png" }
local vscales = { 1, math.sqrt(8), math.sqrt(11) }
local descs = { "Lady-fern (Athyrium)", nil, nil }
for i = 1, 3 do
local node_on_place = nil
if i == 1 then
node_on_place = function(itemstack, placer, pointed_thing)
-- place a random fern
local stack = ItemStack("ferns:fern_0"..math.random(1,4))
local ret = minetest.item_place(stack, placer, pointed_thing)
return ItemStack("ferns:fern_01 "..itemstack:get_count()-(1-ret:get_count())) -- TODO FIXME?
end
end
nodenames[i] = "ferns:fern_"..string.format("%02d", i)
minetest.register_node(nodenames[i], {
description = descs[i] or ("Lady-fern (Athyrium)".." " .. string.format("%02d", i)),
inventory_image = "ferns_fern.png",
drawtype = "plantlike",
visual_scale = vscales[i],
paramtype = "light",
tiles = { images[i] },
walkable = false,
buildable_to = true,
groups = {snappy=3,flammable=2,attached_node=1,not_in_creative_inventory=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
},
drop = "ferns:fern_01",
on_place = node_on_place
})
end
end
-----------------------------------------------------------------------------------------------
-- Init
-----------------------------------------------------------------------------------------------
if default_ferns then
for i = 1, 3 do
nodenames[i] = "ferns:fern_"..string.format("%02d", i)
end
else
create_nodes()
end
-----------------------------------------------------------------------------------------------
-- Ferns - Giant Tree Fern 0.1.1
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- Contains code from: biome_lib
-- Looked at code from: 4seasons, default
-- Supports: vines
-----------------------------------------------------------------------------------------------
-- lot of code, lot to load
abstract_ferns.grow_giant_tree_fern = function(pos)
local pos_aux = {x = pos.x, y = pos.y + 1, z = pos.z}
local name = minetest.get_node(pos_aux).name
if name ~= "air" and name ~= "ferns:sapling_giant_tree_fern"
and name ~= "default:junglegrass" then
return
end
local size = math.random(12,16) -- min of range must be >= 4
local leafchecks = {
{
direction = 3,
positions = {
{x = pos.x + 1, y = pos.y + size - 1, z = pos.z },
{x = pos.x + 2, y = pos.y + size , z = pos.z },
{x = pos.x + 3, y = pos.y + size - 1, z = pos.z },
{x = pos.x + 4, y = pos.y + size - 2, z = pos.z }
}
},
{
direction = 1,
positions = {
{x = pos.x - 1, y = pos.y + size - 1, z = pos.z },
{x = pos.x - 2, y = pos.y + size, z = pos.z },
{x = pos.x - 3, y = pos.y + size - 1, z = pos.z },
{x = pos.x - 4, y = pos.y + size - 2, z = pos.z }
}
},
{
direction = 2,
positions = {
{x = pos.x , y = pos.y + size - 1, z = pos.z + 1},
{x = pos.x , y = pos.y + size , z = pos.z + 2},
{x = pos.x , y = pos.y + size - 1, z = pos.z + 3},
{x = pos.x , y = pos.y + size - 2, z = pos.z + 4}
}
},
{
direction = 0,
positions = {
{x = pos.x , y = pos.y + size - 1, z = pos.z - 1},
{x = pos.x , y = pos.y + size , z = pos.z - 2},
{x = pos.x , y = pos.y + size - 1, z = pos.z - 3},
{x = pos.x , y = pos.y + size - 2, z = pos.z - 4}
}
}
}
local brk = false
for i = 1, size-3 do
pos_aux.y = pos.y + i
local name = minetest.get_node(pos_aux).name
if not (name == "air" or (i == 1 and name == "ferns:sapling_giant_tree_fern")) then
brk = true
break
end
minetest.swap_node({x = pos.x, y = pos.y + i, z = pos.z}, {name="ferns:fern_trunk_big"})
end
if not brk then
minetest.swap_node({x = pos.x, y = pos.y + size-2, z = pos.z}, {name="ferns:fern_trunk_big_top"})
minetest.swap_node({x = pos.x, y = pos.y + size-1, z = pos.z}, {name="ferns:tree_fern_leaves_giant"})
-- all the checking for air below is to prevent some ugly bugs (incomplete trunks of neighbouring trees), it's a bit slower, but worth the result
-- assert(#leafchecks == 4)
for i = 1, 4 do
local positions = leafchecks[i].positions
local rot = leafchecks[i].direction
local endpos = 4 -- If the loop below adds all intermediate leaves then the "terminating" leaf will be at positions[4]
-- assert(#positions == 4)
-- add leaves so long as the destination nodes are air
for j = 1, 3 do
if minetest.get_node(positions[j]).name == "air" then
minetest.swap_node(positions[j], {name="ferns:tree_fern_leave_big"})
else
endpos = j
break
end
end
-- add the terminating leaf if required and possible
if endpos == 4 and minetest.get_node(positions[endpos]).name == "air" then
minetest.swap_node(positions[endpos], {name="ferns:tree_fern_leave_big_end", param2=rot})
end
end
end
end
-----------------------------------------------------------------------------------------------
-- GIANT TREE FERN LEAVES
-----------------------------------------------------------------------------------------------
minetest.register_node("ferns:tree_fern_leaves_giant", {
description = "Tree Fern Crown (Dicksonia)",
drawtype = "plantlike",
visual_scale = math.sqrt(11),
wield_scale = {x=0.175, y=0.175, z=0.175},
paramtype = "light",
tiles = {"ferns_fern_tree_giant.png"},
inventory_image = "ferns_fern_tree.png",
walkable = false,
groups = {
snappy=3,
flammable=2,
attached_node=1,
not_in_creative_inventory=1
},
drop = {
max_items = 2,
items = {
{
-- occasionally, drop a second sapling instead of leaves
-- (extra saplings can also be obtained by replanting and
-- reharvesting leaves)
items = {"ferns:sapling_giant_tree_fern"},
rarity = 10,
},
{
items = {"ferns:sapling_giant_tree_fern"},
},
{
items = {"ferns:tree_fern_leaves_giant"},
}
}
},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
},
})
-----------------------------------------------------------------------------------------------
-- GIANT TREE FERN LEAVE PART
-----------------------------------------------------------------------------------------------
minetest.register_node("ferns:tree_fern_leave_big", {
description = "Giant Tree Fern Leaves",
drawtype = "raillike",
paramtype = "light",
tiles = {
"ferns_tree_fern_leave_big.png",
},
walkable = false,
groups = {
snappy=3,
flammable=2,
attached_node=1,
not_in_creative_inventory=1
},
drop = "",
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- GIANT TREE FERN LEAVE END
-----------------------------------------------------------------------------------------------
minetest.register_node("ferns:tree_fern_leave_big_end", {
description = "Giant Tree Fern Leave End",
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = { "ferns_tree_fern_leave_big_end.png" },
walkable = false,
node_box = {
type = "fixed",
-- {left, bottom, front, right, top, back }
fixed = {-1/2, -1/2, 1/2, 1/2, 33/64, 1/2},
},
selection_box = {
type = "fixed",
fixed = {-1/2, -1/2, 1/2, 1/2, 33/64, 1/2},
},
groups = {
snappy=3,
flammable=2,
attached_node=1,
not_in_creative_inventory=1
},
drop = "",
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- GIANT TREE FERN TRUNK TOP
-----------------------------------------------------------------------------------------------
minetest.register_node("ferns:fern_trunk_big_top", {
description = "Giant Fern Trunk",
drawtype = "nodebox",
paramtype = "light",
tiles = {
"ferns_fern_trunk_big_top.png^ferns_tree_fern_leave_big_cross.png",
"ferns_fern_trunk_big_top.png^ferns_tree_fern_leave_big_cross.png",
"ferns_fern_trunk_big.png"
},
node_box = {
type = "fixed",
-- {left, bottom, front, right, top, back }
fixed = {
{-1/2, 33/64, -1/2, 1/2, 33/64, 1/2},
{-1/4, -1/2, -1/4, 1/4, 1/2, 1/4},
}
},
selection_box = {
type = "fixed",
fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4},
},
groups = {
tree=1,
choppy=2,
oddly_breakable_by_hand=2,
flammable=3,
wood=1,
not_in_creative_inventory=1,
leafdecay=3 -- to support vines
},
drop = "ferns:fern_trunk_big",
sounds = default.node_sound_wood_defaults(),
})
-----------------------------------------------------------------------------------------------
-- GIANT TREE FERN TRUNK
-----------------------------------------------------------------------------------------------
minetest.register_node("ferns:fern_trunk_big", {
description = "Giant Fern Trunk",
drawtype = "nodebox",
paramtype = "light",
tiles = {
"ferns_fern_trunk_big_top.png",
"ferns_fern_trunk_big_top.png",
"ferns_fern_trunk_big.png"
},
node_box = {
type = "fixed",
fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4},
},
selection_box = {
type = "fixed",
fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4},
},
groups = {tree=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
sounds = default.node_sound_wood_defaults(),
after_destruct = function(pos,oldnode)
local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
if node.name == "ferns:fern_trunk_big" or node.name == "ferns:fern_trunk_big_top" then
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
minetest.add_item(pos,"ferns:fern_trunk_big")
end
end,
})
-----------------------------------------------------------------------------------------------
-- GIANT TREE FERN SAPLING
-----------------------------------------------------------------------------------------------
minetest.register_node("ferns:sapling_giant_tree_fern", {
description = "Giant Tree Fern Sapling",
drawtype = "plantlike",
paramtype = "light",
tiles = {"ferns_sapling_tree_fern_giant.png"},
inventory_image = "ferns_sapling_tree_fern_giant.png",
walkable = false,
groups = {snappy=3,flammable=2,flora=1,attached_node=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
},
})
-----------------------------------------------------------------------------------------------
-- Archae Plantae - Horsetail 0.0.5
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- Contains code from: biome_lib
-- Looked at code from: default, flowers, trees
-- Dependencies: biome_lib
-- Supports: dryplants, stoneage, sumpf
-----------------------------------------------------------------------------------------------
-- support for i18n
-----------------------------------------------------------------------------------------------
-- HORSETAIL (EQUISETUM)
-----------------------------------------------------------------------------------------------
local node_names = {}
local function create_nodes()
local selection_boxes = {
{ -0.15, -1/2, -0.15, 0.15, -1/16, 0.15 },
{ -0.15, -1/2, -0.15, 0.15, 1/16, 0.15 },
{ -0.15, -1/2, -0.15, 0.15, 4/16, 0.15 },
{ -0.15, -1/2, -0.15, 0.15, 7/16, 0.15 },
}
for i = 1, 4 do
local node_name = "ferns:horsetail_" .. string.format("%02d", i)
local node_img = "ferns_horsetail_" .. string.format("%02d", i) .. ".png"
local node_desc
local node_on_use = nil
local node_drop = "ferns:horsetail_04"
if i == 1 then
node_desc = "Young Horsetail (Equisetum)"
node_on_use = minetest.item_eat(1) -- young ones edible https://en.wikipedia.org/wiki/Equisetum
node_drop = node_name
elseif i == 4 then
node_desc = "Horsetail (Equisetum)"
else
node_desc = "Horsetail (Equisetum)".." ".. string.format("%02d", i)
end
node_names[i] = node_name
minetest.register_node(node_name, {
description = node_desc,
drawtype = "plantlike",
paramtype = "light",
tiles = { node_img },
inventory_image = node_img,
walkable = false,
buildable_to = true,
groups = {snappy=3,flammable=2,attached_node=1,horsetail=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = selection_boxes[i],
},
on_use = node_on_use,
drop = node_drop,
})
end
end
-----------------------------------------------------------------------------------------------
-- Init
-----------------------------------------------------------------------------------------------
create_nodes()
-----------------------------------------------------------------------------------------------
local title = "Ferns" -- former "Archae Plantae"
local version = "0.2.1"
local mname = "ferns" -- former "archaeplantae"
-----------------------------------------------------------------------------------------------
-- (by Mossmanikin)
-----------------------------------------------------------------------------------------------
abstract_ferns = {}
-- support for i18n
dofile(minetest.get_modpath("ferns").."/fern.lua")
dofile(minetest.get_modpath("ferns").."/horsetail.lua")
dofile(minetest.get_modpath("ferns").."/treefern.lua")
dofile(minetest.get_modpath("ferns").."/gianttreefern.lua")
-- 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=6921
abstract_ferns.config = {}
-- Which plants should generate/spawn?
abstract_ferns.config.enable_lady_fern = true
abstract_ferns.config.enable_horsetails = true
abstract_ferns.config.enable_treefern = true
abstract_ferns.config.enable_giant_treefern = true
-- Where should they generate/spawn? (if they generate/spawn)
--
-- Lady-Fern
abstract_ferns.config.lady_ferns_near_tree = true
abstract_ferns.config.lady_ferns_near_rock = true
abstract_ferns.config.lady_ferns_near_ores = true -- if there's a bunch of ferns there's ores nearby, this one causes a huge fps drop
abstract_ferns.config.lady_ferns_in_groups = false -- this one is meant as a replacement of Ferns_near_Ores: ferns tend to generate in groups, less fps drop, no hint for nearby ores
--
-- Horsetails
abstract_ferns.config.enable_horsetails_spawning = false -- horsetails will grow in already explored areas, over time, near water or gravel
abstract_ferns.config.enable_horsetails_on_grass = true -- on dirt with grass and swamp (sumpf mod)
abstract_ferns.config.enable_horsetails_on_stones = true -- on gravel, mossy cobble and silex (stoneage mod)
--
-- Tree_Fern
abstract_ferns.config.enable_treeferns_in_jungle = true
abstract_ferns.config.enable_treeferns_in_oases = true -- for oases and tropical beaches
--
-- Giant_Tree_Fern
abstract_ferns.config.enable_giant_treeferns_in_jungle = true
abstract_ferns.config.enable_giant_treeferns_in_oases = true -- for oases and tropical beaches
mods/vipworld/ferns/textures/ferns_5.png

550 B

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment