Release: Balancing Update
This commit is contained in:
parent
b5678b6e41
commit
82bc10d94b
14
CHANGELOG.md
14
CHANGELOG.md
@ -1,5 +1,19 @@
|
||||
# Changelog
|
||||
|
||||
# [Aug 4th - Aug 7th 2024] Update: Balancing Update
|
||||
|
||||
- Try to balance the game
|
||||
- Added axes
|
||||
- Removed obsidian mounds
|
||||
- Make snowman towers more rare
|
||||
- Removed saplings
|
||||
- Use `cracky`, `choppy`, etc. groups instead of `block`
|
||||
- Lootboxes now have to be dug instead of right-clicked.
|
||||
- Drowning deals more damage
|
||||
- Explosions deal more damage
|
||||
- Revamped ore API
|
||||
- Removed the following ores: Rubies, Quartz, and Lapis Lazuli
|
||||
|
||||
# [Aug 3rd 2024] Unnamed Minor Update
|
||||
|
||||
- Adjust biomes a bit
|
||||
|
@ -1,51 +1,51 @@
|
||||
minetest.register_abm({
|
||||
label = "Sponge Loop",
|
||||
nodenames = {"pyutest_core:sponge"},
|
||||
neighbors = {"group:liquid"},
|
||||
interval = 0,
|
||||
chance = 1,
|
||||
action = function (pos)
|
||||
local range = 4
|
||||
label = "Sponge Loop",
|
||||
nodenames = {"pyutest_core:sponge"},
|
||||
neighbors = {"group:liquid"},
|
||||
interval = 0,
|
||||
chance = 1,
|
||||
action = function (pos)
|
||||
local range = 4
|
||||
|
||||
local function replace(npos)
|
||||
local node = minetest.get_node(npos)
|
||||
if node.name == "air" then return end
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
local function replace(npos)
|
||||
local node = minetest.get_node(npos)
|
||||
if node.name == "air" then return end
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
|
||||
if def.groups["liquid"] == 1 then
|
||||
minetest.remove_node(npos)
|
||||
end
|
||||
end
|
||||
if def.groups["liquid"] == 1 then
|
||||
minetest.remove_node(npos)
|
||||
end
|
||||
end
|
||||
|
||||
PyuTestCore.dorange(pos, range, function(p)
|
||||
replace(p)
|
||||
end)
|
||||
end
|
||||
PyuTestCore.dorange(pos, range, function(p)
|
||||
replace(p)
|
||||
end)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Contagious Acid Spread",
|
||||
nodenames = {"group:acid_vulnerable"},
|
||||
neighbors = {"pyutest_core:contagious_acid"},
|
||||
interval = 3.4,
|
||||
chance = 3.7,
|
||||
catchup = true,
|
||||
action = function (pos)
|
||||
minetest.set_node(pos, {
|
||||
name = "pyutest_core:contagious_acid"
|
||||
})
|
||||
end
|
||||
label = "Contagious Acid Spread",
|
||||
nodenames = {"group:acid_vulnerable"},
|
||||
neighbors = {"pyutest_core:contagious_acid"},
|
||||
interval = 3.4,
|
||||
chance = 3.7,
|
||||
catchup = true,
|
||||
action = function (pos)
|
||||
minetest.set_node(pos, {
|
||||
name = "pyutest_core:contagious_acid"
|
||||
})
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Fire Spread",
|
||||
nodenames = {"group:flammable"},
|
||||
neighbors = {"pyutest_core:fire"},
|
||||
interval = 1,
|
||||
chance = 4,
|
||||
action = function (pos)
|
||||
minetest.set_node(pos, {
|
||||
name = "pyutest_core:fire"
|
||||
})
|
||||
end
|
||||
label = "Fire Spread",
|
||||
nodenames = {"group:flammable"},
|
||||
neighbors = {"pyutest_core:fire"},
|
||||
interval = 1,
|
||||
chance = 4,
|
||||
action = function (pos)
|
||||
minetest.set_node(pos, {
|
||||
name = "pyutest_core:fire"
|
||||
})
|
||||
end
|
||||
})
|
||||
|
@ -11,14 +11,17 @@ PyuTestCore.make_node = function(name, desc, groups, tiles, extra_conf)
|
||||
local conf = {
|
||||
description = Translate(desc),
|
||||
tiles = tiles,
|
||||
groups = groups,
|
||||
sounds = PyuTestCore.make_node_sounds()
|
||||
groups = PyuTestCore.util.tableconcat(groups, {
|
||||
block = 1
|
||||
}),
|
||||
}
|
||||
|
||||
if extra_conf ~= nil then
|
||||
for k, v in pairs(extra_conf) do
|
||||
conf[k] = v
|
||||
end
|
||||
|
||||
conf["sounds"] = PyuTestCore.make_node_sounds(extra_conf.sounds)
|
||||
end
|
||||
|
||||
minetest.register_node(name, conf)
|
||||
@ -48,10 +51,8 @@ PyuTestCore.node_boxes = {
|
||||
PyuTestCore.building_blocks = {}
|
||||
|
||||
PyuTestCore.make_building_blocks = function (name, desc, tex, colortint, cgroups, extra_conf)
|
||||
local groups = PyuTestCore.util.tablecopy(cgroups) or {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_NORMAL
|
||||
}
|
||||
groups["block"] = groups["block"] or PyuTestCore.BLOCK_BREAKABLE_NORMAL
|
||||
local groups = PyuTestCore.util.tablecopy(cgroups) or {}
|
||||
groups["block"] = 1
|
||||
|
||||
local econf = extra_conf or {}
|
||||
econf["is_ground_content"] = econf["is_ground_content"] or true
|
||||
@ -65,283 +66,260 @@ PyuTestCore.make_building_blocks = function (name, desc, tex, colortint, cgroups
|
||||
local id_fence = name.."_fence"
|
||||
|
||||
table.insert(PyuTestCore.building_blocks, {
|
||||
name = name,
|
||||
desc = desc,
|
||||
tiles = tex,
|
||||
groups = groups,
|
||||
econf = econf
|
||||
name = name,
|
||||
desc = desc,
|
||||
tiles = tex,
|
||||
groups = groups,
|
||||
econf = econf
|
||||
})
|
||||
|
||||
minetest.register_node(id_block, PyuTestCore.util.tableconcat({
|
||||
description = Translate(desc.." Block"),
|
||||
tiles = tex,
|
||||
groups = PyuTestCore.util.tableconcat(groups, {
|
||||
solid = 1
|
||||
}),
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
description = Translate(desc.." Block"),
|
||||
tiles = tex,
|
||||
groups = PyuTestCore.util.tableconcat(groups, {
|
||||
solid = 1
|
||||
}),
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
}, econf))
|
||||
|
||||
minetest.register_node(id_carpet, PyuTestCore.util.tableconcat({
|
||||
description = Translate(desc .. " Carpet"),
|
||||
tiles = tex,
|
||||
groups = PyuTestCore.util.tableconcat(PyuTestCore.util.tablecopy(groups), {
|
||||
attached_node = 3
|
||||
}),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = PyuTestCore.node_boxes.CARPET,
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
description = Translate(desc .. " Carpet"),
|
||||
tiles = tex,
|
||||
groups = PyuTestCore.util.tableconcat(PyuTestCore.util.tablecopy(groups), {
|
||||
attached_node = 1
|
||||
}),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = PyuTestCore.node_boxes.CARPET,
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
buildable_to = true
|
||||
}, econf))
|
||||
|
||||
minetest.register_node(id_slab, PyuTestCore.util.tableconcat({
|
||||
description = Translate(desc.." Slab"),
|
||||
tiles = tex,
|
||||
groups = groups,
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = PyuTestCore.node_boxes.SLAB,
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
description = Translate(desc.." Slab"),
|
||||
tiles = tex,
|
||||
groups = groups,
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = PyuTestCore.node_boxes.SLAB,
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
}, econf))
|
||||
|
||||
minetest.register_node(id_pillar, PyuTestCore.util.tableconcat({
|
||||
description = Translate(desc.." Pillar"),
|
||||
tiles = tex,
|
||||
groups = groups,
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = PyuTestCore.node_boxes.PILLAR,
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
description = Translate(desc.." Pillar"),
|
||||
tiles = tex,
|
||||
groups = groups,
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = PyuTestCore.node_boxes.PILLAR,
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
}, econf))
|
||||
|
||||
minetest.register_node(id_stairs, PyuTestCore.util.tableconcat({
|
||||
description = Translate(desc.." Stairs"),
|
||||
tiles = tex,
|
||||
groups = groups,
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = PyuTestCore.node_boxes.STAIRS,
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
description = Translate(desc.." Stairs"),
|
||||
tiles = tex,
|
||||
groups = groups,
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = PyuTestCore.node_boxes.STAIRS,
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
}, econf))
|
||||
|
||||
minetest.register_node(id_fence, PyuTestCore.util.tableconcat({
|
||||
description = Translate(desc.." Fence"),
|
||||
tiles = tex,
|
||||
groups = groups,
|
||||
drawtype = "fencelike",
|
||||
paramtype = "light",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.5, 0.25}
|
||||
},
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
description = Translate(desc.." Fence"),
|
||||
tiles = tex,
|
||||
groups = groups,
|
||||
drawtype = "fencelike",
|
||||
paramtype = "light",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.5, 0.25}
|
||||
},
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
}, econf))
|
||||
|
||||
minetest.register_craft({
|
||||
output = id_carpet .. " 2",
|
||||
recipe = {
|
||||
{id_block, id_block}
|
||||
}
|
||||
output = id_carpet .. " 2",
|
||||
recipe = {
|
||||
{id_block, id_block}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = id_slab .. " 3",
|
||||
recipe = {
|
||||
{id_block, id_block, id_block}
|
||||
}
|
||||
output = id_slab .. " 3",
|
||||
recipe = {
|
||||
{id_block, id_block, id_block}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = id_pillar .. " 3",
|
||||
recipe = {
|
||||
{id_block},
|
||||
{id_block},
|
||||
{id_block}
|
||||
}
|
||||
output = id_pillar .. " 3",
|
||||
recipe = {
|
||||
{id_block},
|
||||
{id_block},
|
||||
{id_block}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = id_stairs .. " 4",
|
||||
recipe = {
|
||||
{id_block, "", ""},
|
||||
{id_block, id_block, ""},
|
||||
{id_block, id_block, id_block}
|
||||
}
|
||||
output = id_stairs .. " 4",
|
||||
recipe = {
|
||||
{id_block, "", ""},
|
||||
{id_block, id_block, ""},
|
||||
{id_block, id_block, id_block}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = id_fence .. " 4",
|
||||
recipe = {
|
||||
{id_block, "pyutest_core:stick", id_block},
|
||||
{id_block, "pyutest_core:stick", id_block}
|
||||
}
|
||||
minetest.register_craft({
|
||||
output = id_fence .. " 4",
|
||||
recipe = {
|
||||
{id_block, "pyutest_core:stick", id_block},
|
||||
{id_block, "pyutest_core:stick", id_block}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:grass", "Grass", {
|
||||
"pyutest-grass.png"
|
||||
"pyutest-grass.png"
|
||||
}, nil, {
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
grass = 1
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
grass = 1,
|
||||
crumbly = PyuTestCore.BLOCK_FAST
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:dark_grass", "Dark Grass", {
|
||||
"pyutest-dark-grass.png"
|
||||
"pyutest-dark-grass.png"
|
||||
}, nil, {
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
grass = 1
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
grass = 1,
|
||||
crumbly = PyuTestCore.BLOCK_FAST
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:swampy_grass", "Swampy Grass", {
|
||||
"pyutest-swampy-grass.png"
|
||||
"pyutest-swampy-grass.png"
|
||||
}, nil, {
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
sugarcane_spawn_on = 1,
|
||||
grass = 1
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
sugarcane_spawn_on = 1,
|
||||
grass = 1,
|
||||
crumbly = PyuTestCore.BLOCK_FAST
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:savanna_grass", "Savanna Grass", {
|
||||
"pyutest-savanna-grass.png"
|
||||
"pyutest-savanna-grass.png"
|
||||
}, nil, {
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
sugarcane_spawn_on = 1,
|
||||
grass = 1
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
sugarcane_spawn_on = 1,
|
||||
grass = 1,
|
||||
crumbly = PyuTestCore.BLOCK_FAST
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:aspen_grass", "Aspen Grass", {
|
||||
"pyutest-aspen-grass.png"
|
||||
"pyutest-aspen-grass.png"
|
||||
}, nil, {
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
grass = 1
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
grass = 1,
|
||||
crumbly = PyuTestCore.BLOCK_FAST
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:jungle_grass", "Jungle Grass", {
|
||||
"pyutest-jungle-grass.png"
|
||||
"pyutest-jungle-grass.png"
|
||||
}, nil, {
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
grass = 1
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
grass = 1,
|
||||
crumbly = PyuTestCore.BLOCK_FAST
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:dirt", "Dirt", {"pyutest-dirt.png"}, nil, {
|
||||
ground = 1,
|
||||
acid_vulnerable = 1
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
crumbly = PyuTestCore.BLOCK_FAST
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:podzol", "Podzol", {"pyutest-podzol.png"}, nil, {
|
||||
ground = 1,
|
||||
acid_vulnerable = 1
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
crumbly = PyuTestCore.BLOCK_FAST
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:stone", "Stone", {"pyutest-stone.png"}, nil, {
|
||||
ground = 1,
|
||||
stone = 1,
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE,
|
||||
}, {is_ground_content = false})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:snow", "Snow", {"pyutest-snow.png"}, nil, {
|
||||
ground = 1,
|
||||
acid_vulnerable = 1
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
crumbly = PyuTestCore.BLOCK_FAST
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:sand", "Sand", {"pyutest-sand.png"}, nil, {
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
falling_node = 1,
|
||||
sugarcane_spawn_on = 1
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
falling_node = 1,
|
||||
sugarcane_spawn_on = 1,
|
||||
crumbly = PyuTestCore.BLOCK_FAST
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:sandstone", "Sandstone", {"pyutest-sandstone.png"}, nil, {
|
||||
ground = 1,
|
||||
acid_vulnerable = 1
|
||||
}, {is_ground_content = false})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:ice", "Ice", {"pyutest-ice.png"}, nil, {
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
slippery = 4
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:mushroom", "Mushroom", {"pyutest-mushroom.png"}, nil, {
|
||||
flammable = 1
|
||||
}, {is_ground_content = false})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:mushroom_stem", "Mushroom Stem", {"pyutest-mushroom-stem.png"}, nil, {
|
||||
flammable = 1
|
||||
}, {is_ground_content = false})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:purple_mushroom", "Purple Mushroom", {
|
||||
"pyutest-purple-mushroom.png"
|
||||
}, nil, {
|
||||
flammable = 1
|
||||
}, {is_ground_content = false})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:mycelium", "Mycelium", {
|
||||
"pyutest-mycelium.png"
|
||||
}, nil, {ground = 1})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:molten_rock", "Molten Rock", {"pyutest-molten-rock.png"}, nil, {
|
||||
ground = 1,
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
|
||||
}, {is_ground_content = false})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:basalt", "Basalt", {"pyutest-basalt.png"}, nil, {
|
||||
ground = 1,
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
|
||||
}, {is_ground_content = false})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:obsidian", "Obsidian", {"pyutest-obsidian.png"}, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_VERYLONG
|
||||
}, {is_ground_content = false})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:haybale", "Haybale", {
|
||||
"pyutest-haybale-top-bottom.png",
|
||||
"pyutest-haybale-top-bottom.png",
|
||||
"pyutest-haybale.png"
|
||||
}, nil)
|
||||
|
||||
-- keeping old ID for backwards compatibility
|
||||
PyuTestCore.make_building_blocks("pyutest_core:crying_obsidian", "Enchanted Obsidian", {
|
||||
"pyutest-enchanted-obsidian.png"
|
||||
"pyutest-mycelium.png"
|
||||
}, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_VERYLONG
|
||||
}, {
|
||||
is_ground_content = false
|
||||
ground = 1,
|
||||
crumbly = PyuTestCore.BLOCK_FAST
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:brick", "Brick", {"pyutest-bricks.png"}, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
|
||||
}, {
|
||||
is_ground_content = false
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:stone_bricks", "Stone Bricks", {"pyutest-stone-bricks.png"}, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
|
||||
}, {
|
||||
is_ground_content = false
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:slime", "Slime", {"pyutest-slime.png"}, nil, {bouncy = 85})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:clay", "Clay", {"pyutest-clay-block.png"}, nil, {
|
||||
acid_vulnerable = 1
|
||||
acid_vulnerable = 1,
|
||||
crumbly = PyuTestCore.BLOCK_FAST
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:gravel", "Gravel", {"pyutest-gravel.png"}, nil, {
|
||||
falling_node = 1,
|
||||
acid_vulnerable = 1
|
||||
falling_node = 1,
|
||||
acid_vulnerable = 1,
|
||||
crumbly = PyuTestCore.BLOCK_FAST
|
||||
})
|
||||
|
||||
-- Cracky
|
||||
PyuTestCore.make_building_blocks("pyutest_core:stone", "Stone", {"pyutest-stone.png"}, nil, {
|
||||
ground = 1,
|
||||
stone = 1,
|
||||
cracky = PyuTestCore.BLOCK_NORMAL,
|
||||
level = 1
|
||||
}, {is_ground_content = false})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:sandstone", "Sandstone", {"pyutest-sandstone.png"}, nil, {
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
cracky = PyuTestCore.BLOCK_FAST,
|
||||
}, {is_ground_content = false})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:ice", "Ice", {"pyutest-ice.png"}, nil, {
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
slippery = 4,
|
||||
cracky = PyuTestCore.BLOCK_FAST,
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:molten_rock", "Molten Rock", {"pyutest-molten-rock.png"}, nil, {
|
||||
ground = 1,
|
||||
cracky = PyuTestCore.BLOCK_FAST,
|
||||
}, {is_ground_content = false})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:basalt", "Basalt", {"pyutest-basalt.png"}, nil, {
|
||||
ground = 1,
|
||||
cracky = PyuTestCore.BLOCK_FAST,
|
||||
}, {is_ground_content = false})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:obsidian", "Obsidian", {"pyutest-obsidian.png"}, nil, {
|
||||
cracky = PyuTestCore.BLOCK_SLOW,
|
||||
}, {is_ground_content = false})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:crystal_lantern", "Crystal Lantern", {"pyutest-crystal-lantern.png"}, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
|
||||
cracky = PyuTestCore.BLOCK_FAST
|
||||
}, {
|
||||
light_source = minetest.LIGHT_MAX
|
||||
light_source = minetest.LIGHT_MAX
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:bone", "Bone", {
|
||||
@ -349,226 +327,219 @@ PyuTestCore.make_building_blocks("pyutest_core:bone", "Bone", {
|
||||
"pyutest-bone-block-top-bottom.png",
|
||||
"pyutest-bone-block.png"
|
||||
}, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
|
||||
cracky = PyuTestCore.BLOCK_FAST
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:light", "Light", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT,
|
||||
light = 1
|
||||
PyuTestCore.make_building_blocks("pyutest_core:enchanted_obsidian", "Enchanted Obsidian", {
|
||||
"pyutest-enchanted-obsidian.png"
|
||||
}, nil, {
|
||||
cracky = PyuTestCore.BLOCK_SLOW
|
||||
}, {
|
||||
"pyutest-light.png"
|
||||
}, {
|
||||
drawtype = "torchlike",
|
||||
walkable = false,
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
light_source = minetest.LIGHT_MAX
|
||||
is_ground_content = false
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:torch", "Torch", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT,
|
||||
light = 1,
|
||||
attached_node = 1
|
||||
PyuTestCore.make_building_blocks("pyutest_core:brick", "Brick", {"pyutest-bricks.png"}, nil, {
|
||||
cracky = PyuTestCore.BLOCK_NORMAL
|
||||
}, {
|
||||
"pyutest-torch.png",
|
||||
"pyutest-torch.png^[transform6",
|
||||
"pyutest-torch.png^[transform1"
|
||||
is_ground_content = false
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:stone_bricks", "Stone Bricks", {"pyutest-stone-bricks.png"}, nil, {
|
||||
cracky = PyuTestCore.BLOCK_SLOW
|
||||
}, {
|
||||
light_source = minetest.LIGHT_MAX,
|
||||
walkable = false,
|
||||
drawtype = "torchlike",
|
||||
paramtype = "light",
|
||||
inventory_image = "pyutest-torch.png",
|
||||
paramtype2 = "wallmounted",
|
||||
is_ground_content = false
|
||||
})
|
||||
|
||||
-- Choppy
|
||||
PyuTestCore.make_building_blocks("pyutest_core:mushroom", "Mushroom", {"pyutest-mushroom.png"}, nil, {
|
||||
flammable = 1,
|
||||
choppy = PyuTestCore.BLOCK_FAST
|
||||
}, {is_ground_content = false})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:mushroom_stem", "Mushroom Stem", {"pyutest-mushroom-stem.png"}, nil, {
|
||||
flammable = 1,
|
||||
choppy = PyuTestCore.BLOCK_FAST
|
||||
}, {is_ground_content = false})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:purple_mushroom", "Purple Mushroom", {
|
||||
"pyutest-purple-mushroom.png"
|
||||
}, nil, {
|
||||
flammable = 1,
|
||||
choppy = PyuTestCore.BLOCK_FAST
|
||||
}, {is_ground_content = false})
|
||||
|
||||
-- Breakable by hand
|
||||
PyuTestCore.make_building_blocks("pyutest_core:haybale", "Haybale", {
|
||||
"pyutest-haybale-top-bottom.png",
|
||||
"pyutest-haybale-top-bottom.png",
|
||||
"pyutest-haybale.png"
|
||||
}, nil, {
|
||||
oddly_breakable_by_hand = PyuTestCore.BLOCK_FAST
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:slime", "Slime", {"pyutest-slime.png"}, nil, {
|
||||
bouncy = 85,
|
||||
oddly_breakable_by_hand = PyuTestCore.BLOCK_FAST
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:sponge", "Sponge", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT
|
||||
oddly_breakable_by_hand = PyuTestCore.BLOCK_FAST
|
||||
}, {"pyutest-sponge.png"})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:glass", "Glass", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT
|
||||
}, {"pyutest-glass.png"}, {
|
||||
drawtype = "glasslike_framed",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true
|
||||
PyuTestCore.make_node("pyutest_core:light", "Light", {
|
||||
light = 1,
|
||||
dig_immediate = 1,
|
||||
oddly_breakable_by_hand = PyuTestCore.BLOCK_FAST
|
||||
}, {
|
||||
"pyutest-light.png"
|
||||
}, {
|
||||
drawtype = "torchlike",
|
||||
walkable = false,
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
light_source = minetest.LIGHT_MAX
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:tree_sapling", "Tree Sapling", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT,
|
||||
flammable = 1
|
||||
PyuTestCore.make_node("pyutest_core:torch", "Torch", {
|
||||
dig_immediate = 1,
|
||||
light = 1,
|
||||
attached_node = 1,
|
||||
oddly_breakable_by_hand = PyuTestCore.BLOCK_FAST
|
||||
}, {
|
||||
"pyutest-sapling.png"
|
||||
"pyutest-torch.png",
|
||||
"pyutest-torch.png^[transform6",
|
||||
"pyutest-torch.png^[transform1"
|
||||
}, {
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
waving = 1,
|
||||
buildable_to = true,
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
inventory_image = "pyutest-sapling.png",
|
||||
light_source = minetest.LIGHT_MAX,
|
||||
walkable = false,
|
||||
drawtype = "torchlike",
|
||||
paramtype = "light",
|
||||
inventory_image = "pyutest-torch.png",
|
||||
paramtype2 = "wallmounted",
|
||||
})
|
||||
|
||||
on_timer = function (pos)
|
||||
local trees = {
|
||||
"Tree",
|
||||
"Tree2",
|
||||
"BirchTree",
|
||||
"TallBirchTree",
|
||||
"VeryTallBirchTree",
|
||||
"SwampTree",
|
||||
"SavannaTree",
|
||||
"RedwoodTree",
|
||||
"AspenTree1",
|
||||
"AspenTree2",
|
||||
"SmallJungleTree",
|
||||
"JungleTree",
|
||||
"LargeJungleTree",
|
||||
"SnowyTree1",
|
||||
"SnowyTree2",
|
||||
"CherryTree",
|
||||
"OldGrowthTree",
|
||||
"TaigaTree"
|
||||
}
|
||||
|
||||
math.randomseed(os.time())
|
||||
local selected_tree = trees[math.random(#trees)]
|
||||
|
||||
minetest.remove_node(pos)
|
||||
pos.y = pos.y - 1
|
||||
minetest.place_schematic(pos, PyuTestCore.get_schem_path(selected_tree), "random", nil, false, "place_center_x, place_center_z")
|
||||
end,
|
||||
|
||||
on_rightclick = function (pos)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
math.randomseed(os.time())
|
||||
timer:start(math.random(18, 35))
|
||||
end
|
||||
PyuTestCore.make_node("pyutest_core:glass", "Glass", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT
|
||||
}, {"pyutest-glass.png"}, {
|
||||
drawtype = "glasslike_framed",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true
|
||||
})
|
||||
|
||||
-- FIXME: This has been in the game for a month, implement it already!
|
||||
PyuTestCore.make_node("pyutest_core:trapdoor", "Trapdoor", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_CHOPPY,
|
||||
flammable = 1
|
||||
choppy = PyuTestCore.BLOCK_NORMAL,
|
||||
flammable = 1
|
||||
}, {"pyutest-trapdoor.png"}, {
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.15, 0.5}
|
||||
}
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.15, 0.5}
|
||||
}
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:contagious_acid", "Contagious Acid", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE,
|
||||
solid_node = 1
|
||||
crumbly = PyuTestCore.BLOCK_NORMAL,
|
||||
solid_node = 1
|
||||
}, {"pyutest-acid.png"}, {})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:barrier", "Barrier", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_FOREVER
|
||||
}, {}, {
|
||||
drawtype = "airlike",
|
||||
walkable = true,
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
inventory_image = "pyutest-barrier.png",
|
||||
wield_image = "pyutest-barrier.png"
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:fire", "Fire", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT
|
||||
dig_immediate = 1
|
||||
}, {"pyutest-fire.png"}, {
|
||||
drawtype = "firelike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
damage_per_second = 2,
|
||||
light_source = 8,
|
||||
drop = "pyutest_core:ash 4"
|
||||
drawtype = "firelike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
damage_per_second = 2,
|
||||
light_source = 8,
|
||||
drop = "pyutest_core:ash 4"
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:tnt", "TNT", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT
|
||||
dig_immediate = 1,
|
||||
oddly_breakable_by_hand = PyuTestCore.BLOCK_FAST
|
||||
}, {
|
||||
"pyutest-tnt-top-bottom.png",
|
||||
"pyutest-tnt-top-bottom.png",
|
||||
"pyutest-tnt-side.png" -- Affects all other sides
|
||||
"pyutest-tnt-top-bottom.png",
|
||||
"pyutest-tnt-top-bottom.png",
|
||||
"pyutest-tnt-side.png" -- Affects all other sides
|
||||
}, {
|
||||
on_rightclick = function (pos, _, clicker)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
minetest.after(3, function()
|
||||
PyuTestCore.create_explosion(pos, 3, true, 3, clicker, true)
|
||||
end)
|
||||
end,
|
||||
on_rightclick = function (pos, _, clicker)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
minetest.after(3, function()
|
||||
PyuTestCore.create_explosion(pos, 3, true, 7, clicker, true)
|
||||
end)
|
||||
end,
|
||||
|
||||
on_timer = function (pos)
|
||||
PyuTestCore.create_explosion(pos, 3, true, 3)
|
||||
end
|
||||
on_timer = function (pos)
|
||||
PyuTestCore.create_explosion(pos, 3, true, 3)
|
||||
end
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:crate", "Crate", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_CHOPPY
|
||||
choppy = PyuTestCore.BLOCK_NORMAL
|
||||
}, {"pyutest-crate.png"}, {
|
||||
on_construct = function (pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inventory = meta:get_inventory()
|
||||
inventory:set_size("main", 8 * 4)
|
||||
end,
|
||||
on_construct = function (pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inventory = meta:get_inventory()
|
||||
inventory:set_size("main", 8 * 4)
|
||||
end,
|
||||
|
||||
can_dig = function (pos, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inventory = meta:get_inventory()
|
||||
local empty = inventory:is_empty("main")
|
||||
can_dig = function (pos, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inventory = meta:get_inventory()
|
||||
local empty = inventory:is_empty("main")
|
||||
|
||||
if not empty then
|
||||
minetest.chat_send_player(player:get_player_name(), "Cannot destroy crate, it's not empty!")
|
||||
end
|
||||
if not empty then
|
||||
minetest.chat_send_player(player:get_player_name(), "Cannot destroy crate, it's not empty!")
|
||||
end
|
||||
|
||||
return empty
|
||||
end,
|
||||
return empty
|
||||
end,
|
||||
|
||||
on_rightclick = function (pos, node, clicker)
|
||||
local spos = string.format("%d,%d,%d", pos.x, pos.y, pos.z)
|
||||
local formspec =
|
||||
"size[8,9]" ..
|
||||
"list[nodemeta:"..spos..";main;0,0;8,4;]" ..
|
||||
"list[current_player;main;0,5;8,4;]" ..
|
||||
"listring[nodemeta:"..spos..";main]" ..
|
||||
"listring[current_player;main]"
|
||||
minetest.show_formspec(clicker:get_player_name(), string.format("pyutest_core:crate_%d_%d_%d", pos.x, pos.y, pos.z), formspec)
|
||||
minetest.sound_play({name = "crate_open", gain = 1}, {pos = pos})
|
||||
end
|
||||
on_rightclick = function (pos, node, clicker)
|
||||
local spos = string.format("%d,%d,%d", pos.x, pos.y, pos.z)
|
||||
local formspec =
|
||||
"size[8,9]" ..
|
||||
"list[nodemeta:"..spos..";main;0,0;8,4;]" ..
|
||||
"list[current_player;main;0,5;8,4;]" ..
|
||||
"listring[nodemeta:"..spos..";main]" ..
|
||||
"listring[current_player;main]"
|
||||
minetest.show_formspec(clicker:get_player_name(), string.format("pyutest_core:crate_%d_%d_%d", pos.x, pos.y, pos.z), formspec)
|
||||
minetest.sound_play({name = "crate_open", gain = 1}, {pos = pos})
|
||||
end
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:workbench", "Workbench", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_CHOPPY
|
||||
choppy = PyuTestCore.BLOCK_NORMAL
|
||||
}, {
|
||||
"pyutest-workbench-top.png",
|
||||
"pyutest-workbench-bottom.png",
|
||||
"pyutest-workbench-sides.png"
|
||||
}, {
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
minetest.show_formspec(clicker:get_player_name(), "pyutest_core:workbench", table.concat({
|
||||
"size[8,9]",
|
||||
"list[current_player;craft;2.5,1;3,3;]",
|
||||
"list[current_player;main;0,5;8,4;]"
|
||||
}))
|
||||
end
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
minetest.show_formspec(clicker:get_player_name(), "pyutest_core:workbench", table.concat({
|
||||
"size[8,9]",
|
||||
"list[current_player;craft;2.5,1;3,3;]",
|
||||
"list[current_player;main;0,5;8,4;]"
|
||||
}))
|
||||
end
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:ladder", "Ladder", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_CHOPPY
|
||||
dig_immediate = 1
|
||||
}, {"pyutest-ladder.png"}, {
|
||||
drawtype = "signlike",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
buildable_to = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "wallmounted",
|
||||
selection_box = {
|
||||
type = "wallmounted"
|
||||
},
|
||||
inventory_image = "pyutest-ladder.png"
|
||||
drawtype = "signlike",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
buildable_to = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "wallmounted",
|
||||
selection_box = {
|
||||
type = "wallmounted"
|
||||
},
|
||||
inventory_image = "pyutest-ladder.png"
|
||||
})
|
||||
|
@ -1,20 +1,18 @@
|
||||
PyuTestCore.make_sword = function (nsname, desc, texture, damage, durability, atkspeed)
|
||||
PyuTestCore.make_tool(nsname, desc, {}, texture, {
|
||||
stack_max = 1,
|
||||
tool_capabilities = {
|
||||
groupcaps = {
|
||||
block = {
|
||||
uses = durability / 2
|
||||
}
|
||||
},
|
||||
punch_attack_uses = durability,
|
||||
damage_groups = {fleshy = damage},
|
||||
full_punch_interval = atkspeed or 1
|
||||
}
|
||||
PyuTestCore.make_tool(nsname, desc, {
|
||||
weapon = 1
|
||||
}, texture, {
|
||||
stack_max = 1,
|
||||
tool_capabilities = PyuTestCore.tool_caps({
|
||||
uses = durability / 2,
|
||||
attack_uses = durability,
|
||||
damage_groups = {fleshy = damage or 3},
|
||||
full_punch_interval = atkspeed or 1
|
||||
})
|
||||
})
|
||||
end
|
||||
|
||||
PyuTestCore.make_sword("pyutest_core:wooden_sword", "Wooden Sword", "pyutest-wooden-sword.png", 4, 200, 1.8)
|
||||
PyuTestCore.make_sword("pyutest_core:stone_sword", "Stone Sword", "pyutest-stone-sword.png", 5, 450, 1.5)
|
||||
PyuTestCore.make_sword("pyutest_core:iron_sword", "Iron Sword", "pyutest-iron-sword.png", 6, 750, 1.2)
|
||||
PyuTestCore.make_sword("pyutest_core:diamond_sword", "Diamond Sword", "pyutest-diamond-sword.png", 7, 1200, 0.8)
|
||||
PyuTestCore.make_sword("pyutest_core:wooden_sword", "Wooden Sword", "pyutest-wooden-sword.png", 4, 69, 1.1)
|
||||
PyuTestCore.make_sword("pyutest_core:stone_sword", "Stone Sword", "pyutest-stone-sword.png", 5, 274, 1.05)
|
||||
PyuTestCore.make_sword("pyutest_core:iron_sword", "Iron Sword", "pyutest-iron-sword.png", 6, 689, 0.8)
|
||||
PyuTestCore.make_sword("pyutest_core:diamond_sword", "Diamond Sword", "pyutest-diamond-sword.png", 7, 1345, 0.7)
|
||||
|
@ -1,225 +1,262 @@
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:stick 4",
|
||||
recipe = {
|
||||
{"group:wooden_planks"},
|
||||
{"group:wooden_planks"}
|
||||
}
|
||||
output = "pyutest_core:wooden_pickaxe 1",
|
||||
recipe = {
|
||||
{"group:wooden_planks", "group:wooden_planks", "group:wooden_planks"},
|
||||
{"", "pyutest_core:stick", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:wooden_pickaxe 1",
|
||||
recipe = {
|
||||
{"group:wooden_planks", "group:wooden_planks", "group:wooden_planks"},
|
||||
{"", "pyutest_core:stick", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
output = "pyutest_core:wooden_axe 1",
|
||||
recipe = {
|
||||
{"group:wooden_planks", "group:wooden_planks", ""},
|
||||
{"group:wooden_planks", "pyutest_core:stick", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:wooden_sword 1",
|
||||
recipe = {
|
||||
{"", "group:wooden_planks", ""},
|
||||
{"", "group:wooden_planks", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
output = "pyutest_core:wooden_sword 1",
|
||||
recipe = {
|
||||
{"", "group:wooden_planks", ""},
|
||||
{"", "group:wooden_planks", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:stone_pickaxe",
|
||||
recipe = {
|
||||
{"group:stone", "group:stone", "group:stone"},
|
||||
{"", "pyutest_core:stick", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:stone_axe",
|
||||
recipe = {
|
||||
{"group:stone", "group:stone", ""},
|
||||
{"group:stone", "pyutest_core:stick", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:stone_sword",
|
||||
recipe = {
|
||||
{"", "group:stone", ""},
|
||||
{"", "group:stone", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:iron_pickaxe",
|
||||
recipe = {
|
||||
{"pyutest_core:iron_ingot", "pyutest_core:iron_ingot", "pyutest_core:iron_ingot"},
|
||||
{"", "pyutest_core:stick", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:iron_axe",
|
||||
recipe = {
|
||||
{"pyutest_core:iron_ingot", "pyutest_core:iron_ingot", ""},
|
||||
{"pyutest_core:iron_ingot", "pyutest_core:stick", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:iron_sword",
|
||||
recipe = {
|
||||
{"pyutest_core:iron_ingot"},
|
||||
{"pyutest_core:iron_ingot"},
|
||||
{"pyutest_core:stick"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:diamond_pickaxe",
|
||||
recipe = {
|
||||
{"pyutest_core:diamond_shard", "pyutest_core:diamond_shard", "pyutest_core:diamond_shard"},
|
||||
{"", "pyutest_core:stick", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:diamond_axe",
|
||||
recipe = {
|
||||
{"pyutest_core:diamond_shard", "pyutest_core:diamond_shard", ""},
|
||||
{"pyutest_core:diamond_shard", "pyutest_core:stick", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:diamond_sword",
|
||||
recipe = {
|
||||
{"pyutest_core:diamond_shard"},
|
||||
{"pyutest_core:diamond_shard"},
|
||||
{"pyutest_core:stick"}
|
||||
}
|
||||
})
|
||||
|
||||
-- not tools
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:crate",
|
||||
recipe = {
|
||||
{"group:wooden_planks", "group:wooden_planks", "group:wooden_planks"},
|
||||
{"group:wooden_planks", "", "group:wooden_planks"},
|
||||
{"group:wooden_planks", "group:wooden_planks", "group:wooden_planks"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:brick_block 4",
|
||||
recipe = {
|
||||
{"pyutest_core:brick", "pyutest_core:brick"},
|
||||
{"pyutest_core:brick", "pyutest_core:brick"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:furnace",
|
||||
recipe = {
|
||||
{"group:stone", "group:stone", "group:stone"},
|
||||
{"group:stone", "", "group:stone"},
|
||||
{"group:stone", "group:stone", "group:stone"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:slime_block",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"pyutest_core:clay_block",
|
||||
"pyutest_core:swampy_grass_block"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:sugar 3",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"pyutest_core:sugarcane"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:clay_block 4",
|
||||
recipe = {
|
||||
{"pyutest_core:clay", "pyutest_core:clay"},
|
||||
{"pyutest_core:clay", "pyutest_core:clay"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:bone_block 4",
|
||||
recipe = {
|
||||
{"pyutest_core:bone", "pyutest_core:bone"},
|
||||
{"pyutest_core:bone", "pyutest_core:bone"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:stick 4",
|
||||
recipe = {
|
||||
{"group:wooden_planks"},
|
||||
{"group:wooden_planks"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:coin",
|
||||
recipe = {
|
||||
{"pyutest_core:gold_ingot", "pyutest_core:gold_ingot", "pyutest_core:gold_ingot"},
|
||||
{"pyutest_core:gold_ingot", "pyutest_core:gold_ingot", "pyutest_core:gold_ingot"},
|
||||
{"pyutest_core:gold_ingot", "pyutest_core:gold_ingot", "pyutest_core:gold_ingot"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:gold_ingot 9",
|
||||
recipe = {
|
||||
{"pyutest_core:coin"}
|
||||
}
|
||||
})
|
||||
|
||||
-- this recipe makes no sense, but who cares?
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:contagious_acid 3",
|
||||
recipe = {
|
||||
"pyutest_core:mushroom_block",
|
||||
"pyutest_core:mushroom_stem_block",
|
||||
"pyutest_core:dirt_block",
|
||||
"pyutest_core:swampy_grass_block"
|
||||
},
|
||||
type = "shapeless"
|
||||
output = "pyutest_core:contagious_acid 3",
|
||||
recipe = {
|
||||
"pyutest_core:mushroom_block",
|
||||
"pyutest_core:mushroom_stem_block",
|
||||
"pyutest_core:dirt_block",
|
||||
"pyutest_core:swampy_grass_block"
|
||||
},
|
||||
type = "shapeless"
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:light 4",
|
||||
recipe = {
|
||||
{"pyutest_core:torch", "pyutest_core:torch"},
|
||||
{"pyutest_core:torch", "pyutest_core:torch"}
|
||||
}
|
||||
output = "pyutest_core:light 4",
|
||||
recipe = {
|
||||
{"pyutest_core:torch", "pyutest_core:torch"},
|
||||
{"pyutest_core:torch", "pyutest_core:torch"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:tnt 3",
|
||||
recipe = {
|
||||
{"pyutest_core:sand_block", "pyutest_core:gunpowder"},
|
||||
{"pyutest_core:gunpowder", "pyutest_core:sand_block"}
|
||||
}
|
||||
output = "pyutest_core:tnt 3",
|
||||
recipe = {
|
||||
{"pyutest_core:sand_block", "pyutest_core:gunpowder"},
|
||||
{"pyutest_core:gunpowder", "pyutest_core:sand_block"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:torch 4",
|
||||
recipe = {
|
||||
{"pyutest_core:coal_lump"},
|
||||
{"pyutest_core:stick"}
|
||||
}
|
||||
output = "pyutest_core:torch 4",
|
||||
recipe = {
|
||||
{"pyutest_core:coal_lump"},
|
||||
{"pyutest_core:stick"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:coin 4",
|
||||
recipe = {
|
||||
{"pyutest_core:gold_ingot", "pyutest_core:gold_ingot", "pyutest_core:gold_ingot"},
|
||||
{"pyutest_core:gold_ingot", "pyutest_core:gold_ingot", "pyutest_core:gold_ingot"},
|
||||
{"pyutest_core:gold_ingot", "pyutest_core:gold_ingot", "pyutest_core:gold_ingot"}
|
||||
}
|
||||
output = "pyutest_core:wheat 4",
|
||||
recipe = {
|
||||
"pyutest_core:haybale_block"
|
||||
},
|
||||
type = "shapeless"
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:gold_ingot 9",
|
||||
recipe = {
|
||||
{"pyutest_core:coin"}
|
||||
}
|
||||
output = "pyutest_core:haybale_block",
|
||||
recipe = {
|
||||
{"pyutest_core:wheat", "pyutest_core:wheat"},
|
||||
{"pyutest_core:wheat", "pyutest_core:wheat"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:wheat 4",
|
||||
recipe = {
|
||||
"pyutest_core:haybale_block"
|
||||
},
|
||||
type = "shapeless"
|
||||
output = "pyutest_core:bread 3",
|
||||
recipe = {
|
||||
{"pyutest_core:wheat", "pyutest_core:wheat", "pyutest_core:wheat"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:haybale_block",
|
||||
recipe = {
|
||||
{"pyutest_core:wheat", "pyutest_core:wheat"},
|
||||
{"pyutest_core:wheat", "pyutest_core:wheat"}
|
||||
}
|
||||
type = "cooking",
|
||||
output = "pyutest_core:glass",
|
||||
recipe = "pyutest_core:sand_block"
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:bread 3",
|
||||
recipe = {
|
||||
{"pyutest_core:wheat", "pyutest_core:wheat", "pyutest_core:wheat"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:iron_pickaxe",
|
||||
recipe = {
|
||||
{"pyutest_core:iron_ingot", "pyutest_core:iron_ingot", "pyutest_core:iron_ingot"},
|
||||
{"", "pyutest_core:stick", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:iron_sword",
|
||||
recipe = {
|
||||
{"pyutest_core:iron_ingot"},
|
||||
{"pyutest_core:iron_ingot"},
|
||||
{"pyutest_core:stick"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:diamond_pickaxe",
|
||||
recipe = {
|
||||
{"pyutest_core:diamond_shard", "pyutest_core:diamond_shard", "pyutest_core:diamond_shard"},
|
||||
{"", "pyutest_core:stick", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:diamond_sword",
|
||||
recipe = {
|
||||
{"pyutest_core:diamond_shard"},
|
||||
{"pyutest_core:diamond_shard"},
|
||||
{"pyutest_core:stick"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:crate 2",
|
||||
recipe = {
|
||||
{"group:wooden_planks", "group:wooden_planks", "group:wooden_planks"},
|
||||
{"group:wooden_planks", "", "group:wooden_planks"},
|
||||
{"group:wooden_planks", "group:wooden_planks", "group:wooden_planks"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:stone_pickaxe",
|
||||
recipe = {
|
||||
{"pyutest_core:stone_block", "pyutest_core:stone_block", "pyutest_core:stone_block"},
|
||||
{"", "pyutest_core:stick", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:stone_sword",
|
||||
recipe = {
|
||||
{"", "pyutest_core:stone_block", ""},
|
||||
{"", "pyutest_core:stone_block", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:brick_block 4",
|
||||
recipe = {
|
||||
{"pyutest_core:brick", "pyutest_core:brick"},
|
||||
{"pyutest_core:brick", "pyutest_core:brick"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:furnace",
|
||||
recipe = {
|
||||
{"pyutest_core:stone_block", "pyutest_core:stone_block", "pyutest_core:stone_block"},
|
||||
{"pyutest_core:stone_block", "", "pyutest_core:stone_block"},
|
||||
{"pyutest_core:stone_block", "pyutest_core:stone_block", "pyutest_core:stone_block"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:slime_block",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"pyutest_core:clay_block",
|
||||
"pyutest_core:swampy_grass_block"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:sugar 3",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"pyutest_core:sugarcane"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:clay_block 4",
|
||||
recipe = {
|
||||
{"pyutest_core:clay", "pyutest_core:clay"},
|
||||
{"pyutest_core:clay", "pyutest_core:clay"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:bone_block 4",
|
||||
recipe = {
|
||||
{"pyutest_core:bone", "pyutest_core:bone"},
|
||||
{"pyutest_core:bone", "pyutest_core:bone"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "pyutest_core:glass",
|
||||
recipe = "pyutest_core:sand_block 5"
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "pyutest_core:brick",
|
||||
recipe = "pyutest_core:clay",
|
||||
type = "cooking",
|
||||
output = "pyutest_core:brick",
|
||||
recipe = "pyutest_core:clay",
|
||||
})
|
||||
|
@ -82,172 +82,172 @@ end
|
||||
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:copper_wire", "Copper Wire", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT
|
||||
}, {"wire.png"}, {
|
||||
drawtype = "signlike",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
color = "darkgoldenrod",
|
||||
walkable = false,
|
||||
inventory_image = "wire.png",
|
||||
paramtype2 = "wallmounted",
|
||||
selection_box = {
|
||||
type = "wallmounted"
|
||||
},
|
||||
drawtype = "signlike",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
color = "darkgoldenrod",
|
||||
walkable = false,
|
||||
inventory_image = "wire.png",
|
||||
paramtype2 = "wallmounted",
|
||||
selection_box = {
|
||||
type = "wallmounted"
|
||||
},
|
||||
|
||||
on_construct = function (pos)
|
||||
set_powered(pos, false)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(PyuTestCore.ELECTRICITY_UPDATE_TIME)
|
||||
end,
|
||||
on_construct = function (pos)
|
||||
set_powered(pos, false)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(PyuTestCore.ELECTRICITY_UPDATE_TIME)
|
||||
end,
|
||||
|
||||
on_timer = function (pos)
|
||||
if is_electrified(pos) then
|
||||
set_electrified(pos, true)
|
||||
else
|
||||
set_electrified(pos, false)
|
||||
end
|
||||
on_timer = function (pos)
|
||||
if is_electrified(pos) then
|
||||
set_electrified(pos, true)
|
||||
else
|
||||
set_electrified(pos, false)
|
||||
end
|
||||
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(PyuTestCore.ELECTRICITY_UPDATE_TIME)
|
||||
end
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(PyuTestCore.ELECTRICITY_UPDATE_TIME)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:copper_wire 16",
|
||||
recipe = {
|
||||
"pyutest_core:copper_ingot"
|
||||
},
|
||||
type = "shapeless"
|
||||
output = "pyutest_core:copper_wire 16",
|
||||
recipe = {
|
||||
"pyutest_core:copper_ingot"
|
||||
},
|
||||
type = "shapeless"
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:negator", "Negated Copper Wire", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT
|
||||
}, {"wire.png"}, {
|
||||
drawtype = "signlike",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
color = "yellowgreen",
|
||||
walkable = false,
|
||||
inventory_image = "wire.png",
|
||||
paramtype2 = "wallmounted",
|
||||
selection_box = {
|
||||
type = "wallmounted"
|
||||
},
|
||||
drawtype = "signlike",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
color = "yellowgreen",
|
||||
walkable = false,
|
||||
inventory_image = "wire.png",
|
||||
paramtype2 = "wallmounted",
|
||||
selection_box = {
|
||||
type = "wallmounted"
|
||||
},
|
||||
|
||||
on_construct = function (pos)
|
||||
set_negated(pos, true)
|
||||
set_powered(pos, false)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(PyuTestCore.ELECTRICITY_UPDATE_TIME)
|
||||
end,
|
||||
on_construct = function (pos)
|
||||
set_negated(pos, true)
|
||||
set_powered(pos, false)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(PyuTestCore.ELECTRICITY_UPDATE_TIME)
|
||||
end,
|
||||
|
||||
on_timer = function (pos)
|
||||
if is_electrified(pos) then
|
||||
set_electrified(pos, true)
|
||||
else
|
||||
set_electrified(pos, false)
|
||||
end
|
||||
on_timer = function (pos)
|
||||
if is_electrified(pos) then
|
||||
set_electrified(pos, true)
|
||||
else
|
||||
set_electrified(pos, false)
|
||||
end
|
||||
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(PyuTestCore.ELECTRICITY_UPDATE_TIME)
|
||||
end
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(PyuTestCore.ELECTRICITY_UPDATE_TIME)
|
||||
end
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:switch", "Switch", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_NORMAL
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_NORMAL
|
||||
}, {"device.png"}, {
|
||||
color = "dimgray",
|
||||
on_construct = function(pos)
|
||||
set_powered(pos, false)
|
||||
end,
|
||||
color = "dimgray",
|
||||
on_construct = function(pos)
|
||||
set_powered(pos, false)
|
||||
end,
|
||||
|
||||
on_rightclick = function(pos)
|
||||
set_powered(pos, not get_powered(pos))
|
||||
end
|
||||
on_rightclick = function(pos)
|
||||
set_powered(pos, not get_powered(pos))
|
||||
end
|
||||
})
|
||||
|
||||
PyuTestCore.make_device = function (name, desc, color, craftitem, action, setup, extra_conf)
|
||||
PyuTestCore.make_node(name.."_device", desc, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_NORMAL
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_NORMAL
|
||||
}, {"device.png"}, PyuTestCore.util.tableconcat({
|
||||
color = color,
|
||||
on_construct = function (pos)
|
||||
local s = setup or function (_) end
|
||||
s(pos)
|
||||
color = color,
|
||||
on_construct = function (pos)
|
||||
local s = setup or function (_) end
|
||||
s(pos)
|
||||
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(PyuTestCore.ELECTRICITY_UPDATE_TIME)
|
||||
end,
|
||||
on_timer = function (pos)
|
||||
if is_electrified(pos, true) then
|
||||
action(true, pos)
|
||||
else
|
||||
action(false, pos)
|
||||
end
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(PyuTestCore.ELECTRICITY_UPDATE_TIME)
|
||||
end,
|
||||
on_timer = function (pos)
|
||||
if is_electrified(pos, true) then
|
||||
action(true, pos)
|
||||
else
|
||||
action(false, pos)
|
||||
end
|
||||
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(PyuTestCore.ELECTRICITY_UPDATE_TIME)
|
||||
end
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(PyuTestCore.ELECTRICITY_UPDATE_TIME)
|
||||
end
|
||||
}, extra_conf or {}))
|
||||
|
||||
minetest.register_craft({
|
||||
output = name.."_device 4",
|
||||
recipe = {
|
||||
{"pyutest_core:copper_ingot", "pyutest_core:copper_ingot", "pyutest_core:copper_ingot"},
|
||||
{"pyutest_core:copper_ingot", craftitem, "pyutest_core:copper_ingot"},
|
||||
{"pyutest_core:copper_ingot", "pyutest_core:copper_ingot", "pyutest_core:copper_ingot"}
|
||||
}
|
||||
output = name.."_device 4",
|
||||
recipe = {
|
||||
{"pyutest_core:copper_ingot", "pyutest_core:copper_ingot", "pyutest_core:copper_ingot"},
|
||||
{"pyutest_core:copper_ingot", craftitem, "pyutest_core:copper_ingot"},
|
||||
{"pyutest_core:copper_ingot", "pyutest_core:copper_ingot", "pyutest_core:copper_ingot"}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
PyuTestCore.make_device("pyutest_core:time", "Time Device", "orange", "pyutest_core:light", function (e)
|
||||
if not e then
|
||||
minetest.chat_send_all("Not electrified!")
|
||||
return
|
||||
end
|
||||
minetest.chat_send_all(string.format("Time: " .. os.date("%I:%M:%S", os.time())))
|
||||
if not e then
|
||||
minetest.chat_send_all("Not electrified!")
|
||||
return
|
||||
end
|
||||
minetest.chat_send_all(string.format("Time: " .. os.date("%I:%M:%S", os.time())))
|
||||
end)
|
||||
|
||||
PyuTestCore.make_device("pyutest_core:block_setter", "Block Setter Device", "blue", "pyutest_core:stone_block", function (e, pos)
|
||||
if not e then return end
|
||||
local blocks = {}
|
||||
for k, _ in pairs(minetest.registered_nodes) do
|
||||
local no_disallowed_blocks_match = (k ~= "ignore" and k ~= "pyutest_core:contagious_acid")
|
||||
if not e then return end
|
||||
local blocks = {}
|
||||
for k, _ in pairs(minetest.registered_nodes) do
|
||||
local no_disallowed_blocks_match = (k ~= "ignore" and k ~= "pyutest_core:contagious_acid")
|
||||
|
||||
if no_disallowed_blocks_match then
|
||||
table.insert(blocks, k)
|
||||
end
|
||||
end
|
||||
local pos = vector.new(pos.x, pos.y + 1, pos.z)
|
||||
minetest.remove_node(pos)
|
||||
minetest.place_node(pos, {name = blocks[math.random(#blocks)]})
|
||||
if no_disallowed_blocks_match then
|
||||
table.insert(blocks, k)
|
||||
end
|
||||
end
|
||||
local pos = vector.new(pos.x, pos.y + 1, pos.z)
|
||||
minetest.remove_node(pos)
|
||||
minetest.place_node(pos, {name = blocks[math.random(#blocks)]})
|
||||
end)
|
||||
|
||||
PyuTestCore.make_device("pyutest_core:freezer", "Freezer Device", "skyblue", "pyutest_core:ice_block", function(e, pos)
|
||||
if not e then return end
|
||||
if not e then return end
|
||||
|
||||
PyuTestCore.dorange(pos, 3, function(p)
|
||||
local node = minetest.get_node_or_nil(p)
|
||||
if node == nil then return end
|
||||
PyuTestCore.dorange(pos, 3, function(p)
|
||||
local node = minetest.get_node_or_nil(p)
|
||||
if node == nil then return end
|
||||
|
||||
if minetest.get_item_group(node.name, "water") ~= 0 then
|
||||
minetest.set_node(p, {name = "pyutest_core:ice_block"})
|
||||
elseif minetest.get_item_group(node.name, "lava") ~= 0 then
|
||||
minetest.set_node(p, {name = "pyutest_core:hellstone_block"})
|
||||
end
|
||||
end)
|
||||
if minetest.get_item_group(node.name, "water") ~= 0 then
|
||||
minetest.set_node(p, {name = "pyutest_core:ice_block"})
|
||||
elseif minetest.get_item_group(node.name, "lava") ~= 0 then
|
||||
minetest.set_node(p, {name = "pyutest_core:hellstone_block"})
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
PyuTestCore.make_device("pyutest_core:heater", "Heater Device", "maroon", "pyutest_core:ash", function(e, pos)
|
||||
if not e then return end
|
||||
if not e then return end
|
||||
|
||||
PyuTestCore.dorange(pos, 3, function(p)
|
||||
local node = minetest.get_node_or_nil(p)
|
||||
if node == nil then return end
|
||||
PyuTestCore.dorange(pos, 3, function(p)
|
||||
local node = minetest.get_node_or_nil(p)
|
||||
if node == nil then return end
|
||||
|
||||
if minetest.get_item_group(node.name, "ice") ~= 0 then
|
||||
minetest.set_node(p, {name = "pyutest_core:water_source"})
|
||||
end
|
||||
end)
|
||||
if minetest.get_item_group(node.name, "ice") ~= 0 then
|
||||
minetest.set_node(p, {name = "pyutest_core:water_source"})
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
@ -1,11 +1,11 @@
|
||||
PyuTestCore.registered_flowers = {}
|
||||
PyuTestCore.make_flower = function (name, desc, texture, dye, add_to_registry, drawtype, econf)
|
||||
PyuTestCore.make_node(name, desc, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT,
|
||||
flammable = 1,
|
||||
flower = 1,
|
||||
attached_node = 3,
|
||||
dig_immediate = 1
|
||||
dig_immediate = 1,
|
||||
oddly_breakable_by_hand = PyuTestCore.BLOCK_FAST
|
||||
}, {texture}, PyuTestCore.util.tableconcat({
|
||||
drawtype = drawtype or "plantlike",
|
||||
walkable = false,
|
||||
@ -13,7 +13,8 @@ PyuTestCore.make_flower = function (name, desc, texture, dye, add_to_registry, d
|
||||
buildable_to = true,
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
inventory_image = texture
|
||||
inventory_image = texture,
|
||||
floodable = true
|
||||
}, econf or {}))
|
||||
|
||||
if dye ~= nil then
|
||||
|
16
mods/pyutest/pyutest_core/food.lua
Normal file
16
mods/pyutest/pyutest_core/food.lua
Normal file
@ -0,0 +1,16 @@
|
||||
PyuTestCore.make_food = function (nsname, desc, wield_image, health_fill, extra_code)
|
||||
local code = extra_code or function()end
|
||||
|
||||
PyuTestCore.make_item(nsname, desc, {}, wield_image, {
|
||||
on_use = function (itemstack, user, pt)
|
||||
if user == nil then return end
|
||||
minetest.sound_play({name = "eat", gain = 1}, {pos = user:get_pos(), start_time = 1.2})
|
||||
minetest.do_item_eat(health_fill, "", itemstack, user, pt)
|
||||
code()
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
PyuTestCore.make_food("pyutest_core:apple", "Apple", "pyutest-apple.png", 6)
|
||||
PyuTestCore.make_food("pyutest_core:bread", "Bread", "pyutest-bread.png", 4)
|
||||
PyuTestCore.make_food("pyutest_core:water_bottle", "Water Bottle", "pyutest-water-bottle.png", 0)
|
@ -16,64 +16,69 @@ local function furnace_formspec(pos)
|
||||
end
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:furnace", "Furnace", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
|
||||
cracky = PyuTestCore.BLOCK_NORMAL
|
||||
}, {
|
||||
"pyutest-furnace-top-bottom.png",
|
||||
"pyutest-furnace-top-bottom.png",
|
||||
"pyutest-furnace-sides.png",
|
||||
"pyutest-furnace-sides.png",
|
||||
"pyutest-furnace-sides.png",
|
||||
"pyutest-furnace-front.png",
|
||||
"pyutest-furnace-top-bottom.png",
|
||||
"pyutest-furnace-top-bottom.png",
|
||||
"pyutest-furnace-sides.png",
|
||||
"pyutest-furnace-sides.png",
|
||||
"pyutest-furnace-sides.png",
|
||||
"pyutest-furnace-front.png",
|
||||
}, {
|
||||
is_ground_content = false,
|
||||
paramtype2 = "facedir",
|
||||
on_construct = function(pos, placer)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inventory = meta:get_inventory()
|
||||
inventory:set_size("src", 1)
|
||||
inventory:set_size("fuel", 1)
|
||||
inventory:set_size("dst", 4)
|
||||
meta:set_string("formspec", furnace_formspec(pos))
|
||||
end,
|
||||
on_receive_fields = function(pos, formname, fields, player)
|
||||
if fields.quit then
|
||||
return
|
||||
end
|
||||
is_ground_content = false,
|
||||
paramtype2 = "facedir",
|
||||
on_construct = function(pos, placer)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inventory = meta:get_inventory()
|
||||
inventory:set_size("src", 1)
|
||||
inventory:set_size("fuel", 1)
|
||||
inventory:set_size("dst", 4)
|
||||
meta:set_string("formspec", furnace_formspec(pos))
|
||||
end,
|
||||
on_receive_fields = function(pos, formname, fields, player)
|
||||
if fields.quit then
|
||||
return
|
||||
end
|
||||
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
|
||||
local function smelt()
|
||||
local src = inv:get_stack("src", 1)
|
||||
local fuel = inv:get_stack("fuel", 1)
|
||||
local function smelt()
|
||||
local src = inv:get_stack("src", 1)
|
||||
local fuel = inv:get_stack("fuel", 1)
|
||||
|
||||
if minetest.get_item_group(fuel:get_name(), "fuel") == 0 then
|
||||
return
|
||||
end
|
||||
if minetest.get_item_group(fuel:get_name(), "fuel") == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
local output, decremented_input = minetest.get_craft_result({
|
||||
method = "cooking",
|
||||
width = 1,
|
||||
items = {
|
||||
src
|
||||
}
|
||||
})
|
||||
local output, decremented_input = minetest.get_craft_result({
|
||||
method = "cooking",
|
||||
width = 1,
|
||||
items = {
|
||||
src
|
||||
}
|
||||
})
|
||||
|
||||
inv:add_item("dst", output.item)
|
||||
src:set_count(src:get_count() - output.item:get_count())
|
||||
fuel:set_count(fuel:get_count() - 1)
|
||||
inv:set_stack("src", 1, src)
|
||||
inv:set_stack("fuel", 1, fuel)
|
||||
end
|
||||
|
||||
if output.item:is_empty() then
|
||||
return
|
||||
end
|
||||
|
||||
inv:add_item("dst", output.item)
|
||||
src:set_count(src:get_count() - output.item:get_count())
|
||||
fuel:set_count(fuel:get_count() - 1)
|
||||
inv:set_stack("src", 1, src)
|
||||
inv:set_stack("fuel", 1, fuel)
|
||||
end
|
||||
|
||||
if fields.smelt then
|
||||
smelt()
|
||||
end
|
||||
if fields.smelt then
|
||||
smelt()
|
||||
end
|
||||
|
||||
if fields.smelt3 then
|
||||
for i = 1, 3 do
|
||||
smelt()
|
||||
end
|
||||
end
|
||||
end,
|
||||
if fields.smelt3 then
|
||||
for i = 1, 3 do
|
||||
smelt()
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
@ -22,97 +22,97 @@ PyuTestCore.make_furniture = function(name, desc, craft, tiles, cgroups, extra_c
|
||||
local id_mtable = name.."_mtable"
|
||||
|
||||
minetest.register_node(id_table, PyuTestCore.util.tableconcat({
|
||||
description = Translate(desc.." Table"),
|
||||
tiles = tiles,
|
||||
groups = PyuTestCore.util.tableconcat(groups, {
|
||||
table = 1
|
||||
}),
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = PyuTestCore.FURNITURE_NODEBOXES.TABLE,
|
||||
connects_to = {"group:table"}
|
||||
description = Translate(desc.." Table"),
|
||||
tiles = tiles,
|
||||
groups = PyuTestCore.util.tableconcat(groups, {
|
||||
table = 1
|
||||
}),
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = PyuTestCore.FURNITURE_NODEBOXES.TABLE,
|
||||
connects_to = {"group:table"}
|
||||
}, econf))
|
||||
|
||||
minetest.register_node(id_chair, PyuTestCore.util.tableconcat({
|
||||
description = Translate(desc.." Chair"),
|
||||
tiles = tiles,
|
||||
groups = PyuTestCore.util.tableconcat(groups, {
|
||||
chair = 1,
|
||||
attached_node = 3,
|
||||
}),
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
paramtype = "light",
|
||||
paramtype2 = "4dir",
|
||||
drawtype = "mesh",
|
||||
mesh = "chair.obj",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 1.1, 0.5}
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.10, 0.5}
|
||||
}
|
||||
}
|
||||
description = Translate(desc.." Chair"),
|
||||
tiles = tiles,
|
||||
groups = PyuTestCore.util.tableconcat(groups, {
|
||||
chair = 1,
|
||||
attached_node = 3,
|
||||
}),
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
paramtype = "light",
|
||||
paramtype2 = "4dir",
|
||||
drawtype = "mesh",
|
||||
mesh = "chair.obj",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 1.1, 0.5}
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.10, 0.5}
|
||||
}
|
||||
}
|
||||
}, econf))
|
||||
|
||||
minetest.register_node(id_mtable, PyuTestCore.util.tableconcat({
|
||||
description = Translate(desc.." Mini Table"),
|
||||
tiles = tiles,
|
||||
groups = PyuTestCore.util.tableconcat(groups, {
|
||||
mtable = 1,
|
||||
attached_node = 3,
|
||||
}),
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
paramtype = "light",
|
||||
paramtype2 = "4dir",
|
||||
drawtype = "mesh",
|
||||
mesh = "mtable.obj",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5}
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.25, 0.5}
|
||||
}
|
||||
}
|
||||
description = Translate(desc.." Mini Table"),
|
||||
tiles = tiles,
|
||||
groups = PyuTestCore.util.tableconcat(groups, {
|
||||
mtable = 1,
|
||||
attached_node = 3,
|
||||
}),
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
paramtype = "light",
|
||||
paramtype2 = "4dir",
|
||||
drawtype = "mesh",
|
||||
mesh = "mtable.obj",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5}
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.25, 0.5}
|
||||
}
|
||||
}
|
||||
}, econf))
|
||||
|
||||
minetest.register_craft({
|
||||
output = id_table .. " 4",
|
||||
recipe = {
|
||||
{craft, craft, craft},
|
||||
{"", craft, ""},
|
||||
{"", craft, ""}
|
||||
}
|
||||
output = id_table .. " 4",
|
||||
recipe = {
|
||||
{craft, craft, craft},
|
||||
{"", craft, ""},
|
||||
{"", craft, ""}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = id_chair .. " 4",
|
||||
recipe = {
|
||||
{craft, "", ""},
|
||||
{craft, craft, craft},
|
||||
{craft, "", craft}
|
||||
}
|
||||
output = id_chair .. " 4",
|
||||
recipe = {
|
||||
{craft, "", ""},
|
||||
{craft, craft, craft},
|
||||
{craft, "", craft}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = id_mtable .. " 4",
|
||||
recipe = {
|
||||
{craft, craft, craft},
|
||||
{craft, craft, craft}
|
||||
}
|
||||
output = id_mtable .. " 4",
|
||||
recipe = {
|
||||
{craft, craft, craft},
|
||||
{craft, craft, craft}
|
||||
}
|
||||
})
|
||||
|
||||
PyuTestCore.registered_furniture[name] = {
|
||||
craft = craft,
|
||||
groups = groups,
|
||||
tiles = tiles,
|
||||
econf = econf
|
||||
craft = craft,
|
||||
groups = groups,
|
||||
tiles = tiles,
|
||||
econf = econf
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -1,12 +1,8 @@
|
||||
Translate = minetest.get_translator("pyutest_core")
|
||||
PyuTestCore = {
|
||||
BLOCK_BREAKABLE_INSTANT = 7, -- Flowers, Torches, etc.
|
||||
BLOCK_BREAKABLE_NORMAL = 6, -- Grass, Dirt, Gravel, etc.
|
||||
BLOCK_BREAKABLE_CHOPPY = 5, -- Wood
|
||||
BLOCK_BREAKABLE_MIDDLE = 4, -- Stone, Coal, etc.
|
||||
BLOCK_BREAKABLE_LONG = 3, -- Iron, Zinc, etc.
|
||||
BLOCK_BREAKABLE_VERYLONG = 2, -- Obsidian, etc.
|
||||
BLOCK_BREAKABLE_FOREVER = 1, -- Barriers.
|
||||
BLOCK_FAST = 3,
|
||||
BLOCK_NORMAL = 2,
|
||||
BLOCK_SLOW = 1
|
||||
}
|
||||
PyuTestCore_SurfaceBottom = 1
|
||||
PyuTestCore_WorldTop = 31000
|
||||
@ -26,21 +22,24 @@ PyuTestCore_Path = minetest.get_modpath("pyutest_core")
|
||||
dofile(PyuTestCore_Path.."/utils.lua") -- Utilities
|
||||
|
||||
-- Core Game Code
|
||||
-- minetest.register_alias("mapgen_dirt", "pyutest_core:dirt_block")
|
||||
dofile(PyuTestCore_Path.."/blocks.lua")
|
||||
minetest.register_alias("mapgen_dirt", "pyutest_core:dirt_block")
|
||||
dofile(PyuTestCore_Path.."/liquid.lua")
|
||||
dofile(PyuTestCore_Path.."/wood.lua")
|
||||
dofile(PyuTestCore_Path.."/leaves.lua")
|
||||
|
||||
dofile(PyuTestCore_Path.."/player.lua")
|
||||
dofile(PyuTestCore_Path.."/items.lua")
|
||||
dofile(PyuTestCore_Path.."/tools.lua")
|
||||
dofile(PyuTestCore_Path.."/food.lua")
|
||||
dofile(PyuTestCore_Path.."/combat.lua")
|
||||
dofile(PyuTestCore_Path.."/wool.lua")
|
||||
|
||||
|
||||
dofile(PyuTestCore_Path.."/flowers.lua")
|
||||
dofile(PyuTestCore_Path.."/player.lua")
|
||||
dofile(PyuTestCore_Path.."/lootboxes.lua")
|
||||
dofile(PyuTestCore_Path.."/ores.lua")
|
||||
dofile(PyuTestCore_Path.."/abms.lua")
|
||||
dofile(PyuTestCore_Path.."/combat.lua")
|
||||
dofile(PyuTestCore_Path.."/magic.lua")
|
||||
dofile(PyuTestCore_Path.."/crafts.lua")
|
||||
dofile(PyuTestCore_Path.."/furnace.lua")
|
||||
|
@ -17,38 +17,36 @@ end
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:stick", "Stick", {}, "pyutest-stick.png")
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:bone", "Bone", {}, "pyutest-bone.png", {
|
||||
stack_max = 99
|
||||
})
|
||||
PyuTestCore.make_item("pyutest_core:bone", "Bone", {}, "pyutest-bone.png", {})
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:gunpowder", "Gunpowder", {}, "pyutest-powder.png", {
|
||||
color = "dimgray",
|
||||
color = "dimgray",
|
||||
})
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:ash", "Ash", {}, "pyutest-powder.png", {
|
||||
color = "gray",
|
||||
color = "gray",
|
||||
})
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:sugar", "Sugar", {}, "pyutest-powder.png")
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:coin", "Coin", {}, "pyutest-coin.png", {
|
||||
on_secondary_use = function (_, user)
|
||||
local pos = user:get_pos()
|
||||
minetest.sound_play({name = "coin", gain = 1}, {
|
||||
pos = pos
|
||||
})
|
||||
return nil
|
||||
end
|
||||
on_secondary_use = function (_, user)
|
||||
local pos = user:get_pos()
|
||||
minetest.sound_play({name = "coin", gain = 1}, {
|
||||
pos = pos
|
||||
})
|
||||
return nil
|
||||
end
|
||||
})
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:wheat", "Wheat", {}, "pyutest-wheat.png")
|
||||
PyuTestCore.make_item("pyutest_core:string", "String", {}, "pyutest-string.png")
|
||||
PyuTestCore.make_item("pyutest_core:egg", "Egg", {}, "pyutest-egg.png", {
|
||||
color = "peachpuff"
|
||||
color = "peachpuff"
|
||||
})
|
||||
PyuTestCore.make_item("pyutest_core:clay", "Clay Ball", {}, "pyutest-clay.png")
|
||||
PyuTestCore.make_item("pyutest_core:glass_bottle", "Glass Bottle", {}, "pyutest-glass-bottle.png", {
|
||||
stack_max = 16
|
||||
stack_max = 16
|
||||
})
|
||||
PyuTestCore.make_item("pyutest_core:brick", "Brick", {}, "pyutest-brick.png")
|
||||
PyuTestCore.make_item("pyutest_core:snowball", "Snowball", {}, "pyutest-snowball.png")
|
||||
|
@ -4,31 +4,32 @@ PyuTestCore.make_leaves = function (id, desc, tiles)
|
||||
local _desc = desc ~= nil and desc .. " Leaves" or "Leaves"
|
||||
|
||||
PyuTestCore.make_building_blocks(_id, _desc, tiles, nil, {
|
||||
acid_vulnerable = 1,
|
||||
flammable = 1,
|
||||
acid_vulnerable = 1,
|
||||
flammable = 1,
|
||||
snappy = PyuTestCore.BLOCK_FAST
|
||||
}, {
|
||||
is_ground_content = false
|
||||
is_ground_content = false
|
||||
})
|
||||
|
||||
local leaves_id = _id.."_block"
|
||||
minetest.override_item(leaves_id, {
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
rarity = 3.5,
|
||||
items = {"pyutest_core:apple 1"}
|
||||
},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
rarity = 3.5,
|
||||
items = {"pyutest_core:apple 1"}
|
||||
},
|
||||
|
||||
{
|
||||
items = {leaves_id}
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
items = {leaves_id}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
PyuTestCore.registered_leaves[_id] = {
|
||||
tiles = tiles
|
||||
tiles = tiles
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -10,32 +10,32 @@ PyuTestCore.make_liquid = function (name, desc, groups, texture, speed, extra_co
|
||||
end
|
||||
|
||||
local t = PyuTestCore.util.tableconcat({
|
||||
drawtype = drawtype,
|
||||
waving = 3,
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
use_texture_alpha = "blend",
|
||||
paramtype = "light",
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = liquidtype,
|
||||
liquid_renewable = true,
|
||||
liquid_viscosity = speed or 1,
|
||||
liquid_alternative_flowing = name.."_flowing",
|
||||
liquid_alternative_source = name.."_source",
|
||||
paramtype2 = liquidtype == "flowing" and "flowingliquid" or nil,
|
||||
special_tiles = liquidtype == "flowing" and {
|
||||
{
|
||||
name = texture,
|
||||
backface_culling = false
|
||||
},
|
||||
{
|
||||
name = texture,
|
||||
backface_culling = true
|
||||
}
|
||||
} or nil
|
||||
drawtype = drawtype,
|
||||
waving = 3,
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
use_texture_alpha = "blend",
|
||||
paramtype = "light",
|
||||
drop = "",
|
||||
drowning = 3,
|
||||
liquidtype = liquidtype,
|
||||
liquid_renewable = true,
|
||||
liquid_viscosity = speed or 1,
|
||||
liquid_alternative_flowing = name.."_flowing",
|
||||
liquid_alternative_source = name.."_source",
|
||||
paramtype2 = liquidtype == "flowing" and "flowingliquid" or nil,
|
||||
special_tiles = liquidtype == "flowing" and {
|
||||
{
|
||||
name = texture,
|
||||
backface_culling = false
|
||||
},
|
||||
{
|
||||
name = texture,
|
||||
backface_culling = true
|
||||
}
|
||||
} or nil
|
||||
}, extra_conf or {})
|
||||
return t
|
||||
end
|
||||
@ -47,27 +47,27 @@ PyuTestCore.make_liquid = function (name, desc, groups, texture, speed, extra_co
|
||||
PyuTestCore.make_node(name.."_flowing", "Flowing " .. desc, g, {texture}, make_liquid_flags("flowing"))
|
||||
|
||||
PyuTestCore.registered_liquids[name] = {
|
||||
source = name.."_source",
|
||||
flowing = name.."_flowing",
|
||||
texture = texture,
|
||||
groups = g
|
||||
source = name.."_source",
|
||||
flowing = name.."_flowing",
|
||||
texture = texture,
|
||||
groups = g
|
||||
}
|
||||
end
|
||||
|
||||
PyuTestCore.make_liquid("pyutest_core:water", "Water", {
|
||||
water = 1
|
||||
water = 1
|
||||
}, "pyutest-water.png", 1, {
|
||||
post_effect_color = {a=60, r=24.7, g=46.3, b=89.4},
|
||||
paramtype2 = "color",
|
||||
post_effect_color = {a=60, r=24.7, g=46.3, b=89.4},
|
||||
paramtype2 = "color",
|
||||
})
|
||||
|
||||
PyuTestCore.make_liquid("pyutest_core:lava", "Lava", {
|
||||
lava = 1
|
||||
lava = 1
|
||||
}, "pyutest-lava.png", 5, {
|
||||
damage_per_second = 4,
|
||||
light_source = 8
|
||||
damage_per_second = 4,
|
||||
light_source = 8
|
||||
})
|
||||
PyuTestCore.make_liquid("pyutest_core:oil", "Oil", {}, "pyutest-oil.png", 3)
|
||||
PyuTestCore.make_liquid("pyutest_core:liquid_acid", "Acid", {}, "pyutest-acid.png", 7, {
|
||||
damage_per_second = 4
|
||||
damage_per_second = 4
|
||||
})
|
||||
|
@ -2,62 +2,61 @@ PyuTestCore.registered_lootboxes = {}
|
||||
PyuTestCore.make_lootbox = function (name, dname, items)
|
||||
local id = name.."_lootbox"
|
||||
minetest.register_node(id, {
|
||||
description = Translate(dname .. " Lootbox"),
|
||||
groups = {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_CHOPPY,
|
||||
not_in_creative_inventory = 1
|
||||
},
|
||||
tiles = {"pyutest-crate.png"},
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
on_rightclick = function (pos, _, clicker)
|
||||
if clicker == nil then return end
|
||||
description = Translate(dname .. " Lootbox"),
|
||||
groups = {
|
||||
choppy = PyuTestCore.BLOCK_NORMAL,
|
||||
not_in_creative_inventory = 1
|
||||
},
|
||||
tiles = {"pyutest-crate.png"},
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
drop = "",
|
||||
after_destruct = function (pos)
|
||||
for _, v in pairs(items) do
|
||||
minetest.add_item(pos, v)
|
||||
end
|
||||
|
||||
for _, v in pairs(items) do
|
||||
minetest.add_item(pos, v)
|
||||
end
|
||||
|
||||
minetest.sound_play("lootbox_unlock", {
|
||||
pos = pos,
|
||||
gain = 1
|
||||
})
|
||||
minetest.remove_node(pos)
|
||||
end
|
||||
minetest.sound_play("lootbox_unlock", {
|
||||
pos = pos,
|
||||
gain = 1
|
||||
})
|
||||
minetest.remove_node(pos)
|
||||
end
|
||||
})
|
||||
PyuTestCore.registered_lootboxes[name] = {
|
||||
id = id,
|
||||
items = items
|
||||
id = id,
|
||||
items = items
|
||||
}
|
||||
end
|
||||
|
||||
PyuTestCore.make_lootbox("pyutest_core:trash", "Trash", {
|
||||
ItemStack("pyutest_core:deadbush 6"),
|
||||
ItemStack("pyutest_core:bone 3"),
|
||||
ItemStack("pyutest_core:ash 2")
|
||||
ItemStack("pyutest_core:deadbush 6"),
|
||||
ItemStack("pyutest_core:bone 3"),
|
||||
ItemStack("pyutest_core:ash 2")
|
||||
})
|
||||
|
||||
PyuTestCore.make_lootbox("pyutest_core:resource", "Resource", {
|
||||
ItemStack("pyutest_core:gunpowder 3"),
|
||||
ItemStack("pyutest_core:stick 4"),
|
||||
ItemStack("pyutest_core:sugar 2"),
|
||||
ItemStack("pyutest_core:tree_sapling 3"),
|
||||
ItemStack("pyutest_core:apple 3"),
|
||||
ItemStack("pyutest_core:string 5")
|
||||
ItemStack("pyutest_core:gunpowder 3"),
|
||||
ItemStack("pyutest_core:stick 4"),
|
||||
ItemStack("pyutest_core:sugar 2"),
|
||||
ItemStack("pyutest_core:tree_sapling 3"),
|
||||
ItemStack("pyutest_core:apple 3"),
|
||||
ItemStack("pyutest_core:string 5")
|
||||
})
|
||||
|
||||
PyuTestCore.make_lootbox("pyutest_core:griefer", "Griefer's Dream", {
|
||||
ItemStack("pyutest_core:tnt 3"),
|
||||
ItemStack("pyutest_core:bomb 2")
|
||||
ItemStack("pyutest_core:tnt 3"),
|
||||
ItemStack("pyutest_core:bomb 2")
|
||||
})
|
||||
|
||||
PyuTestCore.make_lootbox("pyutest_core:lighting", "Lighting", {
|
||||
ItemStack("pyutest_core:light 2"),
|
||||
ItemStack("pyutest_core:torch 5")
|
||||
ItemStack("pyutest_core:light 2"),
|
||||
ItemStack("pyutest_core:torch 5")
|
||||
})
|
||||
|
||||
PyuTestCore.make_lootbox("pyutest_core:color", "Color", {
|
||||
ItemStack("pyutest_core:green_dye 2"),
|
||||
ItemStack("pyutest_core:pink_dye 3"),
|
||||
ItemStack("pyutest_core:white_dye 1"),
|
||||
ItemStack("pyutest_core:black_dye 3"),
|
||||
ItemStack("pyutest_core:brown_dye 2")
|
||||
ItemStack("pyutest_core:green_dye 2"),
|
||||
ItemStack("pyutest_core:pink_dye 3"),
|
||||
ItemStack("pyutest_core:white_dye 1"),
|
||||
ItemStack("pyutest_core:black_dye 3"),
|
||||
ItemStack("pyutest_core:brown_dye 2")
|
||||
})
|
||||
|
@ -1,18 +1,18 @@
|
||||
PyuTestCore.make_item("pyutest_core:magic_shards", "Magic Shards", {}, "pyutest-magic-shards.png")
|
||||
minetest.override_item("pyutest_core:crying_obsidian_block", {
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
rarity = 3.2,
|
||||
items = {"pyutest_core:magic_shards 3"}
|
||||
},
|
||||
minetest.override_item("pyutest_core:enchanted_obsidian_block", {
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
rarity = 3.2,
|
||||
items = {"pyutest_core:magic_shards 3"}
|
||||
},
|
||||
|
||||
{
|
||||
items = {"pyutest_core:crying_obsidian_block"}
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
items = {"enchanted_obsidian_block_obsidian_block"}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
PyuTestCore.registered_spellbooks = {}
|
||||
@ -22,111 +22,107 @@ PyuTestCore.make_spellbook = function (nsname, desc, color, craftitem, action)
|
||||
end
|
||||
|
||||
PyuTestCore.make_item(nsname, desc, {}, "pyutest-spellbook.png", {
|
||||
stack_max = 1,
|
||||
color = color,
|
||||
on_use = function (itemstack, user, pointed_thing)
|
||||
local pos = user:get_pos()
|
||||
minetest.sound_play({name = "spellbook_action", gain = 0.75}, {pos = pos})
|
||||
action(itemstack, user, pointed_thing)
|
||||
end
|
||||
stack_max = 1,
|
||||
color = color,
|
||||
on_use = function (itemstack, user, pointed_thing)
|
||||
local pos = user:get_pos()
|
||||
minetest.sound_play({name = "spellbook_action", gain = 0.75}, {pos = pos})
|
||||
action(itemstack, user, pointed_thing)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = nsname,
|
||||
recipe = {
|
||||
{"", "pyutest_core:magic_shards", ""},
|
||||
{"pyutest_core:magic_shards", craftitem, "pyutest_core:magic_shards"},
|
||||
{"", "pyutest_core:magic_shards", ""}
|
||||
}
|
||||
output = nsname,
|
||||
recipe = {
|
||||
{"", "pyutest_core:magic_shards", ""},
|
||||
{"pyutest_core:magic_shards", craftitem, "pyutest_core:magic_shards"},
|
||||
{"", "pyutest_core:magic_shards", ""}
|
||||
}
|
||||
})
|
||||
|
||||
PyuTestCore.registered_spellbooks[nsname] = {
|
||||
color = color,
|
||||
craftitem = craftitem,
|
||||
action = action
|
||||
color = color,
|
||||
craftitem = craftitem,
|
||||
action = action
|
||||
}
|
||||
end
|
||||
|
||||
PyuTestCore.make_spellbook("pyutest_core:explosions_spellbook", "Spellbook of Explosions", "gray", "pyutest_core:bomb", function (itemstack, user)
|
||||
PyuTestCore.create_explosion(user:get_pos(), 3, false, 7, user)
|
||||
PyuTestCore.create_explosion(user:get_pos(), 3, false, 7, user)
|
||||
end)
|
||||
|
||||
PyuTestCore.make_spellbook("pyutest_core:fire_spellbook", "Spellbook of Fire", "crimson", "pyutest_core:hellstone_block", function (itemstack, user)
|
||||
local range = 2
|
||||
local range = 2
|
||||
|
||||
local function replace(pos)
|
||||
local node = minetest.get_node_or_nil(pos)
|
||||
if node == nil then return end
|
||||
if node.name ~= "air" then return end
|
||||
local pos2 = vector.new(pos.x, pos.y - 1, pos.z)
|
||||
node = minetest.get_node_or_nil(pos)
|
||||
if node == nil then return end
|
||||
if node.name ~= "air" then return end
|
||||
local function replace(pos)
|
||||
local node = minetest.get_node_or_nil(pos)
|
||||
if node == nil then return end
|
||||
if node.name ~= "air" then return end
|
||||
local pos2 = vector.new(pos.x, pos.y - 1, pos.z)
|
||||
node = minetest.get_node_or_nil(pos)
|
||||
if node == nil then return end
|
||||
if node.name ~= "air" then return end
|
||||
|
||||
minetest.set_node(pos, {name = "pyutest_core:fire"})
|
||||
end
|
||||
minetest.set_node(pos, {name = "pyutest_core:fire"})
|
||||
end
|
||||
|
||||
for dx = -range, range do
|
||||
for dz = -range, range do
|
||||
local pos = user:get_pos()
|
||||
replace({x = pos.x + dx, y = pos.y, z = pos.z + dz})
|
||||
end
|
||||
end
|
||||
for dx = -range, range do
|
||||
for dz = -range, range do
|
||||
local pos = user:get_pos()
|
||||
replace({x = pos.x + dx, y = pos.y, z = pos.z + dz})
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:enchanted_shard", "Enchanted Shard", {}, "pyutest-shard.png", {
|
||||
color = "indigo",
|
||||
color = "indigo",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:enchanted_shard 2",
|
||||
recipe = {
|
||||
{"pyutest_core:magic_shards", "pyutest_core:diamond_shard", "pyutest_core:magic_shards"},
|
||||
{"pyutest_core:emerald_shard", "pyutest_core:magic_shards", "pyutest_core:emerald_shard"},
|
||||
{"pyutest_core:magic_shards", "pyutest_core:diamond_shard", "pyutest_core:magic_shards"}
|
||||
}
|
||||
output = "pyutest_core:enchanted_shard 2",
|
||||
recipe = {
|
||||
{"pyutest_core:magic_shards", "pyutest_core:diamond_shard", "pyutest_core:magic_shards"},
|
||||
{"pyutest_core:emerald_shard", "pyutest_core:magic_shards", "pyutest_core:emerald_shard"},
|
||||
{"pyutest_core:magic_shards", "pyutest_core:diamond_shard", "pyutest_core:magic_shards"}
|
||||
}
|
||||
})
|
||||
|
||||
PyuTestCore.make_tool("pyutest_core:enchanted_pickaxe", "Enchanted Pickaxe", {}, "pyutest-enchanted-pickaxe.png", {
|
||||
stack_max = 1,
|
||||
tool_capabilities = {
|
||||
groupcaps = {
|
||||
block = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_BREAKABLE_INSTANT] = 0.035,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_NORMAL] = 0.35,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_CHOPPY] = 0.45,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_MIDDLE] = 0.45,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_LONG] = 0.8,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_VERYLONG] = 3,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_FOREVER] = 7
|
||||
},
|
||||
uses = 3600,
|
||||
}
|
||||
},
|
||||
punch_attack_uses = 1200,
|
||||
damage_groups = {fleshy = 4}
|
||||
}
|
||||
stack_max = 1,
|
||||
tool_capabilities = PyuTestCore.tool_caps({
|
||||
uses = 2768,
|
||||
attack_uses = 2768 / 2,
|
||||
maxlevel = 4,
|
||||
groupcaps = {
|
||||
cracky = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_FAST] = 0.25,
|
||||
[PyuTestCore.BLOCK_NORMAL] = 0.6,
|
||||
[PyuTestCore.BLOCK_SLOW] = 7
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:enchanted_pickaxe",
|
||||
recipe = {
|
||||
{"pyutest_core:enchanted_shard", "pyutest_core:enchanted_shard", "pyutest_core:enchanted_shard"},
|
||||
{"", "pyutest_core:stick", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
output = "pyutest_core:enchanted_pickaxe",
|
||||
recipe = {
|
||||
{"pyutest_core:enchanted_shard", "pyutest_core:enchanted_shard", "pyutest_core:enchanted_shard"},
|
||||
{"", "pyutest_core:stick", ""},
|
||||
{"", "pyutest_core:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
PyuTestCore.make_sword("pyutest_core:enchanted_sword", "Enchanted Sword", "pyutest-enchanted-sword.png", 9, 3600, 0.6)
|
||||
PyuTestCore.make_sword("pyutest_core:enchanted_sword", "Enchanted Sword", "pyutest-enchanted-sword.png", 9, 3600, 0.7)
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:enchanted_sword",
|
||||
recipe = {
|
||||
{"pyutest_core:enchanted_shard"},
|
||||
{"pyutest_core:enchanted_shard"},
|
||||
{"pyutest_core:stick"}
|
||||
}
|
||||
output = "pyutest_core:enchanted_sword",
|
||||
recipe = {
|
||||
{"pyutest_core:enchanted_shard"},
|
||||
{"pyutest_core:enchanted_shard"},
|
||||
{"pyutest_core:stick"}
|
||||
}
|
||||
})
|
||||
|
@ -1,13 +1,15 @@
|
||||
PyuTestCore.make_building_blocks("pyutest_core:granite", "Granite", {"pyutest-granite.png"}, nil, {
|
||||
ground = 1,
|
||||
stone = 1,
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
|
||||
ground = 1,
|
||||
stone = 1,
|
||||
cracky = PyuTestCore.BLOCK_NORMAL,
|
||||
level = 1
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:andesite", "Andesite", {"pyutest-andesite.png"}, nil, {
|
||||
ground = 1,
|
||||
stone = 1,
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
|
||||
ground = 1,
|
||||
stone = 1,
|
||||
cracky = PyuTestCore.BLOCK_NORMAL,
|
||||
level = 1
|
||||
})
|
||||
|
||||
PyuTestCore.SPECIALSTONE_NOISE_PARAMS = {
|
||||
@ -22,39 +24,39 @@ PyuTestCore.SPECIALSTONE_NOISE_PARAMS = {
|
||||
}
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "pyutest_core:granite_block",
|
||||
wherein = "pyutest_core:stone_block",
|
||||
clust_scarcity = 9 * 9 * 9,
|
||||
clust_num_ores = 35,
|
||||
clust_size = 5,
|
||||
y_max = PyuTestCore_SurfaceBottom - 1,
|
||||
y_min = PyuTestCore_WorldBottom,
|
||||
noise_params = PyuTestCore.SPECIALSTONE_NOISE_PARAMS
|
||||
ore_type = "blob",
|
||||
ore = "pyutest_core:granite_block",
|
||||
wherein = "pyutest_core:stone_block",
|
||||
clust_scarcity = 9 * 9 * 9,
|
||||
clust_num_ores = 35,
|
||||
clust_size = 5,
|
||||
y_max = PyuTestCore_SurfaceBottom - 1,
|
||||
y_min = PyuTestCore_WorldBottom,
|
||||
noise_params = PyuTestCore.SPECIALSTONE_NOISE_PARAMS
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "pyutest_core:andesite_block",
|
||||
wherein = "pyutest_core:stone_block",
|
||||
clust_scarcity = 9 * 9 * 9,
|
||||
clust_num_ores = 35,
|
||||
clust_size = 5,
|
||||
y_max = PyuTestCore_SurfaceBottom - 1,
|
||||
y_min = PyuTestCore_WorldBottom,
|
||||
noise_params = PyuTestCore.SPECIALSTONE_NOISE_PARAMS
|
||||
ore_type = "blob",
|
||||
ore = "pyutest_core:andesite_block",
|
||||
wherein = "pyutest_core:stone_block",
|
||||
clust_scarcity = 9 * 9 * 9,
|
||||
clust_num_ores = 35,
|
||||
clust_size = 5,
|
||||
y_max = PyuTestCore_SurfaceBottom - 1,
|
||||
y_min = PyuTestCore_WorldBottom,
|
||||
noise_params = PyuTestCore.SPECIALSTONE_NOISE_PARAMS
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "pyutest_core:clay_block",
|
||||
wherein = "pyutest_core:gravel_block",
|
||||
clust_scarcity = 7 * 7 * 7,
|
||||
clust_num_ores = 35,
|
||||
clust_size = 5,
|
||||
y_max = PyuTestCore_SurfaceBottom - 1,
|
||||
y_min = PyuTestCore_DeepOceanMin,
|
||||
noise_params = PyuTestCore.SPECIALSTONE_NOISE_PARAMS
|
||||
ore_type = "blob",
|
||||
ore = "pyutest_core:clay_block",
|
||||
wherein = "pyutest_core:gravel_block",
|
||||
clust_scarcity = 7 * 7 * 7,
|
||||
clust_num_ores = 35,
|
||||
clust_size = 5,
|
||||
y_max = PyuTestCore_SurfaceBottom - 1,
|
||||
y_min = PyuTestCore_DeepOceanMin,
|
||||
noise_params = PyuTestCore.SPECIALSTONE_NOISE_PARAMS
|
||||
})
|
||||
|
||||
PyuTestCore.ORE_STONES = {
|
||||
@ -65,103 +67,293 @@ PyuTestCore.ORE_STONES = {
|
||||
|
||||
-- TODO: The code here is very messy, and this function takes to much arguments. Squash the arguments into a table and clean the code.
|
||||
PyuTestCore.registered_ores = {}
|
||||
PyuTestCore.make_ore = function (id, desc, ifix, idfix, btxt, itxt, color, y_max, scarcity, count, btype, oconf, bconf)
|
||||
|
||||
PyuTestCore.make_ore = function(id, desc, item_id_suffix, item_description_suffix, options)
|
||||
local default_options = {
|
||||
scarcity = 5 * 5 * 5,
|
||||
y_max = 31000,
|
||||
|
||||
ore_strength = PyuTestCore.BLOCK_NORMAL,
|
||||
ore_conf = {},
|
||||
ore_groups = {},
|
||||
ore_drop = nil,
|
||||
ore_drop_count = 1,
|
||||
ore_sounds = nil,
|
||||
ore_tiles = {},
|
||||
ore_level = 1,
|
||||
|
||||
item_conf = {},
|
||||
item_groups = {},
|
||||
item_texture = nil,
|
||||
|
||||
make_raw = false,
|
||||
raw_conf = {},
|
||||
raw_groups = {},
|
||||
raw_texture = {},
|
||||
|
||||
block_conf = {},
|
||||
block_color = nil,
|
||||
block_tiles = {},
|
||||
block_groups = {}
|
||||
}
|
||||
local conf = {}
|
||||
|
||||
for k, v in pairs(options) do
|
||||
conf[k] = v
|
||||
end
|
||||
|
||||
for k, v in pairs(default_options) do
|
||||
if conf[k] == nil then
|
||||
conf[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local oid = id.."_ore"
|
||||
local iid = id.."_"..ifix
|
||||
local block_type = btype ~= nil and btype or PyuTestCore.BLOCK_BREAKABLE_LONG
|
||||
|
||||
local iid = id.."_"..item_id_suffix
|
||||
local rid = conf.make_raw and id.."_raw" or nil
|
||||
|
||||
minetest.register_node(oid, PyuTestCore.util.tableconcat({
|
||||
description = Translate(desc .. " Ore"),
|
||||
groups = {
|
||||
block = block_type,
|
||||
mineral = 1
|
||||
},
|
||||
tiles = {btxt},
|
||||
drop = iid .. " " .. tostring(count or 1),
|
||||
sounds = PyuTestCore.make_node_sounds(),
|
||||
light_source = 3.9, -- Make ores emit little light
|
||||
}, oconf or {}))
|
||||
description = Translate(desc .. " Ore"),
|
||||
groups = PyuTestCore.util.tableconcat({
|
||||
cracky = conf.ore_strength,
|
||||
mineral = 1,
|
||||
level = conf.ore_level
|
||||
}, conf.ore_groups),
|
||||
light_source = 2.2,
|
||||
drop = conf.ore_drop or (conf.make_raw and rid or iid) .. " " .. tostring(conf.ore_drop_count or 1),
|
||||
sounds = PyuTestCore.make_node_sounds(conf.ore_sounds),
|
||||
tiles = conf.ore_tiles
|
||||
}, conf.ore_conf))
|
||||
|
||||
minetest.register_craftitem(iid, {
|
||||
description = Translate(desc .. " " .. idfix),
|
||||
inventory_image = itxt,
|
||||
wield_image = itxt,
|
||||
color = color,
|
||||
groups = {
|
||||
mineral = 1
|
||||
}
|
||||
minetest.register_craftitem(iid, PyuTestCore.util.tableconcat({
|
||||
description = Translate(desc .. " " .. item_description_suffix),
|
||||
groups = PyuTestCore.util.tableconcat({
|
||||
mineral = 1
|
||||
}, conf.item_groups),
|
||||
wield_image = conf.item_texture,
|
||||
inventory_image = conf.item_texture
|
||||
}, conf.item_conf))
|
||||
|
||||
if conf.make_raw then
|
||||
minetest.register_craftitem(rid, PyuTestCore.util.tableconcat({
|
||||
description = Translate("Raw " .. desc),
|
||||
groups = PyuTestCore.util.tableconcat({
|
||||
mineral = 1,
|
||||
raw_mineral = 1
|
||||
}, conf.raw_groups),
|
||||
wield_image = conf.raw_texture,
|
||||
inventory_image = conf.raw_texture
|
||||
}, conf.raw_conf))
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = iid,
|
||||
recipe = rid
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = oid,
|
||||
wherein = PyuTestCore.ORE_STONES,
|
||||
clust_scarcity = conf.scarcity,
|
||||
clust_num_ores = 4,
|
||||
clust_size = 3,
|
||||
y_max = conf.y_max,
|
||||
y_min = PyuTestCore_WorldBottom,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = oid,
|
||||
wherein = PyuTestCore.ORE_STONES,
|
||||
clust_scarcity = scarcity * scarcity * scarcity,
|
||||
clust_num_ores = 4,
|
||||
clust_size = 3,
|
||||
y_max = y_max,
|
||||
y_min = PyuTestCore_WorldBottom,
|
||||
ore_type = "scatter",
|
||||
ore = oid,
|
||||
wherein = PyuTestCore.ORE_STONES,
|
||||
clust_scarcity = conf.scarcity * 2.2,
|
||||
clust_num_ores = 9,
|
||||
clust_size = 3,
|
||||
y_max = conf.y_max,
|
||||
y_min = PyuTestCore_WorldBottom,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = oid,
|
||||
wherein = PyuTestCore.ORE_STONES,
|
||||
clust_scarcity = scarcity * scarcity * scarcity * 2.2,
|
||||
clust_num_ores = 9,
|
||||
clust_size = 3,
|
||||
y_max = y_max,
|
||||
y_min = PyuTestCore_WorldBottom,
|
||||
ore_type = "scatter",
|
||||
ore = oid,
|
||||
wherein = PyuTestCore.ORE_STONES,
|
||||
clust_scarcity = conf.scarcity * 3,
|
||||
clust_num_ores = 18,
|
||||
clust_size = 6,
|
||||
y_max = conf.y_max,
|
||||
y_min = PyuTestCore_WorldBottom,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = oid,
|
||||
wherein = PyuTestCore.ORE_STONES,
|
||||
clust_scarcity = (scarcity * scarcity * scarcity) * 3,
|
||||
clust_num_ores = 18,
|
||||
clust_size = 6,
|
||||
y_max = y_max,
|
||||
y_min = PyuTestCore_WorldBottom,
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks(id, desc, {"pyutest-metal.png"}, color, {block = block_type}, bconf or {})
|
||||
PyuTestCore.make_building_blocks(id, desc, conf.block_tiles, conf.block_color, PyuTestCore.util.tableconcat({
|
||||
cracky = conf.ore_strength
|
||||
}, conf.block_groups), conf.block_conf)
|
||||
|
||||
local bid = id.."_block"
|
||||
minetest.register_craft({
|
||||
output = bid,
|
||||
recipe = {
|
||||
{iid, iid},
|
||||
{iid, iid}
|
||||
}
|
||||
output = bid,
|
||||
recipe = {
|
||||
{iid, iid},
|
||||
{iid, iid}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = iid .. " 4",
|
||||
recipe = {
|
||||
bid
|
||||
},
|
||||
type = "shapeless"
|
||||
output = iid .. " 4",
|
||||
recipe = {
|
||||
bid
|
||||
},
|
||||
type = "shapeless"
|
||||
})
|
||||
|
||||
PyuTestCore.registered_ores[id] = {
|
||||
ore = oid,
|
||||
item = iid
|
||||
}
|
||||
end
|
||||
|
||||
-- Useful Ores
|
||||
PyuTestCore.make_ore("pyutest_core:coal", "Coal", "lump", "Lump", "pyutest-ore-coal.png", "pyutest-lump.png", {r = 32, g = 32, b = 32}, 48, 8, 2, PyuTestCore.BLOCK_BREAKABLE_MIDDLE)
|
||||
PyuTestCore.make_ore("pyutest_core:copper", "Copper", "ingot", "Ingot", "pyutest-ore-copper.png", "pyutest-ingot.png", "darkgoldenrod", 18, 11, 2, PyuTestCore.BLOCK_BREAKABLE_MIDDLE)
|
||||
PyuTestCore.make_ore("pyutest_core:tin", "Tin", "ingot", "Ingot", "pyutest-ore-tin.png", "pyutest-ingot.png", "#8e8591", 18, 11, 1, PyuTestCore.BLOCK_BREAKABLE_MIDDLE)
|
||||
PyuTestCore.make_ore("pyutest_core:iron", "Iron", "ingot", "Ingot", "pyutest-ore-iron.png", "pyutest-ingot.png", nil, 18, 11, 1)
|
||||
PyuTestCore.make_ore("pyutest_core:gold", "Gold", "ingot", "Ingot", "pyutest-ore-gold.png", "pyutest-ingot.png", "gold", -75, 15.5, 1)
|
||||
PyuTestCore.make_ore("pyutest_core:diamond", "Diamond", "shard", "Shard", "pyutest-ore-diamond.png", "pyutest-shard.png", "cyan", -90, 16.7, 1)
|
||||
PyuTestCore.make_ore("pyutest_core:emerald", "Emerald", "shard", "Shard", "pyutest-ore-emerald.png", "pyutest-shard.png", "seagreen", -120, 18.3, 1)
|
||||
-- "Primary" Ores
|
||||
PyuTestCore.make_ore("pyutest_core:coal", "Coal", "lump", "Lump", {
|
||||
scarcity = 8 * 8 * 8,
|
||||
y_max = 48,
|
||||
|
||||
ore_strength = PyuTestCore.BLOCK_NORMAL,
|
||||
ore_drop_count = 2,
|
||||
ore_tiles = {"pyutest-ore-coal.png"},
|
||||
|
||||
item_texture = "pyutest-lump.png",
|
||||
item_conf = {
|
||||
color = {r = 32, g = 32, b = 32}
|
||||
},
|
||||
|
||||
-- Ores without any special uses
|
||||
PyuTestCore.make_ore("pyutest_core:zinc", "Zinc", "ingot", "Ingot", "pyutest-ore-zinc.png", "pyutest-ingot.png", "#bed3d4", 18, 13, 1)
|
||||
PyuTestCore.make_ore("pyutest_core:lapis_lazuli", "Lapis Lazuli", "lump", "Lump", "pyutest-ore-lapis.png", "pyutest-lump.png", "#3848AC", -25, 13.4, 1)
|
||||
PyuTestCore.make_ore("pyutest_core:amethyst_quartz", "Amethyst Quartz", "shard", "Shard", "pyutest-ore-amethyst.png", "pyutest-shard.png", "#9f7ba9", -50, 14.1, 1)
|
||||
PyuTestCore.make_ore("pyutest_core:pink_quartz", "Pink Quartz", "shard", "Shard", "pyutest-ore-pink-quartz.png", "pyutest-shard.png", "#dbafdc", -50, 14.1, 1)
|
||||
PyuTestCore.make_ore("pyutest_core:ruby", "Ruby", "shard", "Shard", "pyutest-ore-ruby.png", "pyutest-shard.png", "#992727", -75, 15.5, 1)
|
||||
block_tiles = {"pyutest-metal.png"},
|
||||
block_color = {r = 32, g = 32, b = 32}
|
||||
})
|
||||
|
||||
PyuTestCore.make_ore("pyutest_core:iron", "Iron", "ingot", "Ingot", {
|
||||
scarcity = 11 * 11 * 11,
|
||||
y_max = 18,
|
||||
|
||||
ore_strength = PyuTestCore.BLOCK_NORMAL,
|
||||
ore_tiles = {"pyutest-ore-iron.png"},
|
||||
ore_level = 2,
|
||||
|
||||
item_texture = "pyutest-ingot.png",
|
||||
|
||||
make_raw = true,
|
||||
raw_texture = "pyutest-lump.png",
|
||||
|
||||
block_tiles = {"pyutest-metal.png"}
|
||||
})
|
||||
|
||||
PyuTestCore.make_ore("pyutest_core:copper", "Copper", "ingot", "Ingot", {
|
||||
scarcity = 11 * 11 * 11,
|
||||
y_max = 18,
|
||||
|
||||
ore_strength = PyuTestCore.BLOCK_NORMAL,
|
||||
ore_tiles = {"pyutest-ore-copper.png"},
|
||||
ore_level = 2,
|
||||
|
||||
item_texture = "pyutest-ingot.png",
|
||||
item_conf = {
|
||||
color = "darkgoldenrod",
|
||||
},
|
||||
|
||||
make_raw = true,
|
||||
raw_texture = "pyutest-lump.png",
|
||||
raw_conf = {
|
||||
color = "darkgoldenrod"
|
||||
},
|
||||
|
||||
block_tiles = {"pyutest-metal.png"},
|
||||
block_color = "darkgoldenrod"
|
||||
})
|
||||
|
||||
PyuTestCore.make_ore("pyutest_core:gold", "Gold", "ingot", "Ingot", {
|
||||
scarcity = 15.5 * 15.5 * 15.5,
|
||||
y_max = -35,
|
||||
|
||||
ore_strength = PyuTestCore.BLOCK_NORMAL,
|
||||
ore_tiles = {"pyutest-ore-gold.png"},
|
||||
ore_level = 3,
|
||||
|
||||
item_texture = "pyutest-ingot.png",
|
||||
item_conf = {
|
||||
color = "gold"
|
||||
},
|
||||
|
||||
make_raw = true,
|
||||
raw_texture = "pyutest-lump.png",
|
||||
raw_conf = {
|
||||
color = "gold"
|
||||
},
|
||||
|
||||
block_tiles = {"pyutest-metal.png"},
|
||||
block_color = "gold"
|
||||
})
|
||||
|
||||
PyuTestCore.make_ore("pyutest_core:diamond", "Diamond", "shard", "Shard", {
|
||||
scarcity = 16.7 * 16.7 * 16.7,
|
||||
y_max = -50,
|
||||
|
||||
ore_strength = PyuTestCore.BLOCK_NORMAL,
|
||||
ore_tiles = {"pyutest-ore-diamond.png"},
|
||||
ore_level = 3,
|
||||
|
||||
item_texture = "pyutest-shard.png",
|
||||
item_conf = {
|
||||
color = "cyan"
|
||||
},
|
||||
|
||||
block_tiles = {"pyutest-metal.png"},
|
||||
block_color = "cyan"
|
||||
})
|
||||
|
||||
PyuTestCore.make_ore("pyutest_core:emerald", "Emerald", "shard", "Shard", {
|
||||
scarcity = 18.3 * 18.3 * 18.3,
|
||||
y_max = -50,
|
||||
|
||||
ore_strength = PyuTestCore.BLOCK_NORMAL,
|
||||
ore_tiles = {"pyutest-ore-emerald.png"},
|
||||
ore_level = 4,
|
||||
|
||||
item_texture = "pyutest-shard.png",
|
||||
item_conf = {
|
||||
color = "seagreen"
|
||||
},
|
||||
|
||||
block_tiles = {"pyutest-metal.png"},
|
||||
block_color = "seagreen"
|
||||
})
|
||||
|
||||
-- "Secondary" Ores
|
||||
|
||||
PyuTestCore.make_ore("pyutest_core:zinc", "Zinc", "ingot", "Ingot", {
|
||||
scarcity = 11 * 11 * 11,
|
||||
y_max = 18,
|
||||
|
||||
ore_strength = PyuTestCore.BLOCK_NORMAL,
|
||||
ore_tiles = {"pyutest-ore-zinc.png"},
|
||||
ore_level = 2,
|
||||
|
||||
item_texture = "pyutest-ingot.png",
|
||||
item_conf = {
|
||||
color = "#bed3d4"
|
||||
},
|
||||
|
||||
block_tiles = {"pyutest-metal.png"},
|
||||
block_color = "#bed3d4"
|
||||
})
|
||||
|
||||
PyuTestCore.make_ore("pyutest_core:tin", "Tin", "ingot", "Ingot", {
|
||||
scarcity = 11 * 11 * 11,
|
||||
y_max = 18,
|
||||
|
||||
ore_strength = PyuTestCore.BLOCK_NORMAL,
|
||||
ore_tiles = {"pyutest-ore-tin.png"},
|
||||
ore_levle = 2,
|
||||
|
||||
item_texture = "pyutest-ingot.png",
|
||||
item_conf = {
|
||||
color = "#8e8591"
|
||||
},
|
||||
|
||||
block_tiles = {"pyutest-metal.png"},
|
||||
block_color = "#8e8591"
|
||||
})
|
||||
|
@ -1,11 +1,11 @@
|
||||
minetest.override_item("pyutest_core:clay_block", {
|
||||
drop = "pyutest_core:clay 3"
|
||||
drop = "pyutest_core:clay 3"
|
||||
})
|
||||
|
||||
minetest.override_item("pyutest_core:coal_lump", {
|
||||
groups = {
|
||||
fuel = 1
|
||||
}
|
||||
groups = {
|
||||
fuel = 1
|
||||
}
|
||||
})
|
||||
|
||||
minetest.override_item("pyutest_core:bone_block", {
|
||||
|
@ -1,126 +1,149 @@
|
||||
-- player setup
|
||||
minetest.register_on_joinplayer(function (player)
|
||||
if player == nil then return end
|
||||
local name = player:get_player_name()
|
||||
player:set_properties({
|
||||
hp_max = 25
|
||||
})
|
||||
if player == nil then return end
|
||||
local name = player:get_player_name()
|
||||
player:set_properties({
|
||||
hp_max = 25
|
||||
})
|
||||
|
||||
player:get_inventory():set_width("main", 8)
|
||||
player:get_inventory():set_size("main", 8 * 4)
|
||||
player:hud_set_hotbar_itemcount(8)
|
||||
player:get_inventory():set_width("main", 8)
|
||||
player:get_inventory():set_size("main", 8 * 4)
|
||||
player:hud_set_hotbar_itemcount(8)
|
||||
|
||||
-- creative mode privs
|
||||
if minetest.is_creative_enabled(name) then
|
||||
minetest.set_player_privs(name, PyuTestCore.util.tableconcat({
|
||||
fly = true,
|
||||
fast = true,
|
||||
noclip = true,
|
||||
builder = true,
|
||||
settime = true,
|
||||
creative = true,
|
||||
peaceful_player = true, -- from mobs_redo
|
||||
teleport = true,
|
||||
}, minetest.get_player_privs(name)))
|
||||
end
|
||||
-- creative mode privs
|
||||
if minetest.is_creative_enabled(name) then
|
||||
minetest.set_player_privs(name, PyuTestCore.util.tableconcat({
|
||||
fly = true,
|
||||
fast = true,
|
||||
noclip = true,
|
||||
builder = true,
|
||||
settime = true,
|
||||
creative = true,
|
||||
peaceful_player = true, -- from mobs_redo
|
||||
teleport = true,
|
||||
}, minetest.get_player_privs(name)))
|
||||
end
|
||||
end)
|
||||
|
||||
-- player physics
|
||||
local function set_player_speed(player, speed)
|
||||
player:set_physics_override({
|
||||
speed = speed,
|
||||
speed = speed,
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_globalstep(function(dtime)
|
||||
local players = minetest.get_connected_players()
|
||||
for p=1, #players do
|
||||
local players = minetest.get_connected_players()
|
||||
for p=1, #players do
|
||||
local ctrl = players[p]:get_player_control()
|
||||
if ctrl.aux1 then
|
||||
set_player_speed(players[p], 1.60)
|
||||
else
|
||||
set_player_speed(players[p], 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
-- player hand
|
||||
minetest.register_item(":", {
|
||||
type = "none",
|
||||
wield_image = "pyutest-hand.png"
|
||||
type = "none",
|
||||
wield_image = "pyutest-hand.png"
|
||||
})
|
||||
|
||||
if minetest.is_creative_enabled("") then
|
||||
local break_speed = 0.2
|
||||
|
||||
minetest.override_item("", {
|
||||
range = 9,
|
||||
tool_capabilities = {
|
||||
groupcaps = {
|
||||
block = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_BREAKABLE_INSTANT] = break_speed,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_NORMAL] = break_speed,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_CHOPPY] = break_speed,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_MIDDLE] = break_speed,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_LONG] = break_speed,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_VERYLONG] = break_speed,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_FOREVER] = break_speed
|
||||
},
|
||||
uses = 0
|
||||
}
|
||||
},
|
||||
punch_attack_uses = 0,
|
||||
damage_groups = {fleshy = 10000}
|
||||
}
|
||||
range = 9,
|
||||
tool_capabilities = PyuTestCore.tool_caps({
|
||||
uses = 0,
|
||||
time = 0.35,
|
||||
|
||||
groupcaps = {
|
||||
crumbly = {},
|
||||
choppy = {},
|
||||
cracky = {},
|
||||
snappy = {},
|
||||
explody = {},
|
||||
oddly_breakable_by_hand = {}
|
||||
},
|
||||
|
||||
attack_uses = 0,
|
||||
damage_groups = {fleshy = 10000}
|
||||
})
|
||||
})
|
||||
else
|
||||
minetest.override_item("", {
|
||||
range = 5,
|
||||
tool_capabilities = {
|
||||
groupcaps = {
|
||||
block = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_BREAKABLE_INSTANT] = 0.35,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_NORMAL] = 0.85,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_CHOPPY] = 3,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_MIDDLE] = 5.5,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_LONG] = 9,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_VERYLONG] = 12,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_FOREVER] = 18
|
||||
},
|
||||
uses = 0
|
||||
}
|
||||
},
|
||||
punch_attack_uses = 0,
|
||||
damage_groups = {fleshy = 1}
|
||||
}
|
||||
range = 5,
|
||||
tool_capabilities = PyuTestCore.tool_caps({
|
||||
uses = 0,
|
||||
attck_uses = 0,
|
||||
damage_groups = {fleshy = 2},
|
||||
|
||||
groupcaps = {
|
||||
oddly_breakable_by_hand = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_FAST] = 0.35,
|
||||
[PyuTestCore.BLOCK_NORMAL] = 0.50,
|
||||
[PyuTestCore.BLOCK_SLOW] = 0.65,
|
||||
}
|
||||
},
|
||||
snappy = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_FAST] = 0.55,
|
||||
[PyuTestCore.BLOCK_NORMAL] = 0.70,
|
||||
[PyuTestCore.BLOCK_SLOW] = 0.70
|
||||
}
|
||||
},
|
||||
crumbly = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_FAST] = 0.75,
|
||||
[PyuTestCore.BLOCK_NORMAL] = 0.80,
|
||||
[PyuTestCore.BLOCK_SLOW] = 0.90
|
||||
}
|
||||
},
|
||||
choppy = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_FAST] = 1.2,
|
||||
[PyuTestCore.BLOCK_NORMAL] = 2.3,
|
||||
[PyuTestCore.BLOCK_SLOW] = 2.9,
|
||||
}
|
||||
},
|
||||
cracky = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_FAST] = 6,
|
||||
[PyuTestCore.BLOCK_NORMAL] = 10,
|
||||
[PyuTestCore.BLOCK_SLOW] = 45,
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
end
|
||||
|
||||
-- unlimited blocks in creative mode
|
||||
minetest.register_on_placenode(function(_, _, placer)
|
||||
if placer and placer:is_player() then
|
||||
return minetest.is_creative_enabled(placer:get_player_name())
|
||||
end
|
||||
if placer and placer:is_player() then
|
||||
return minetest.is_creative_enabled(placer:get_player_name())
|
||||
end
|
||||
end)
|
||||
|
||||
-- player death message
|
||||
minetest.register_on_dieplayer(function(player, reason)
|
||||
local playername = player:get_player_name()
|
||||
local playername = player:get_player_name()
|
||||
|
||||
if reason.object ~= nil then
|
||||
local le = reason.object:get_luaentity()
|
||||
if reason.object ~= nil then
|
||||
local le = reason.object:get_luaentity()
|
||||
|
||||
if le == nil then
|
||||
minetest.chat_send_all(string.format("%s was slain by %s",
|
||||
playername, reason.object:get_player_name()))
|
||||
else
|
||||
local split = string.split(le.name, ":")
|
||||
local name = split[#split]
|
||||
name = name:gsub("_", " ")
|
||||
name = string.upper(name:sub(1, 1))..name:sub(2, name:len())
|
||||
minetest.chat_send_all(string.format("%s was slain by %s", playername, name))
|
||||
end
|
||||
end
|
||||
if le == nil then
|
||||
minetest.chat_send_all(string.format("%s was slain by %s",
|
||||
playername, reason.object:get_player_name()))
|
||||
else
|
||||
local split = string.split(le.name, ":")
|
||||
local name = split[#split]
|
||||
name = name:gsub("_", " ")
|
||||
name = string.upper(name:sub(1, 1))..name:sub(2, name:len())
|
||||
minetest.chat_send_all(string.format("%s was slain by %s", playername, name))
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
@ -4,7 +4,7 @@ PyuTestCore.make_tool = function (nsname, desc, groups, wield_image, extra_conf)
|
||||
wield_image = wield_image,
|
||||
inventory_image = wield_image,
|
||||
groups = PyuTestCore.util.tableconcat(groups, {
|
||||
tool = 1
|
||||
tool = 1
|
||||
})
|
||||
}
|
||||
|
||||
@ -17,144 +17,177 @@ PyuTestCore.make_tool = function (nsname, desc, groups, wield_image, extra_conf)
|
||||
minetest.register_tool(nsname, conf)
|
||||
end
|
||||
|
||||
PyuTestCore.make_food = function (nsname, desc, wield_image, health_fill, extra_code)
|
||||
local code = extra_code or function()end
|
||||
|
||||
PyuTestCore.make_item(nsname, desc, {}, wield_image, {
|
||||
on_use = function (itemstack, user, pt)
|
||||
if user == nil then return end
|
||||
minetest.sound_play({name = "eat", gain = 1}, {pos = user:get_pos(), start_time = 1.2})
|
||||
minetest.do_item_eat(health_fill, "", itemstack, user, pt)
|
||||
code()
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
PyuTestCore.make_tool("pyutest_core:wooden_pickaxe", "Wooden Pickaxe", {}, "pyutest-wooden-pickaxe.png", {
|
||||
stack_max = 1,
|
||||
tool_capabilities = {
|
||||
groupcaps = {
|
||||
block = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_BREAKABLE_INSTANT] = 0.085,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_NORMAL] = 0.75,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_CHOPPY] = 1.3,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_MIDDLE] = 2.4,
|
||||
},
|
||||
uses = 200,
|
||||
}
|
||||
},
|
||||
punch_attack_uses = 100,
|
||||
damage_groups = {fleshy = 3}
|
||||
}
|
||||
stack_max = 1,
|
||||
tool_capabilities = PyuTestCore.tool_caps({
|
||||
uses = 69,
|
||||
attack_uses = 69 / 2,
|
||||
maxlevel = 1,
|
||||
groupcaps = {
|
||||
cracky = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_FAST] = 2,
|
||||
[PyuTestCore.BLOCK_NORMAL] = 3
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
PyuTestCore.make_tool("pyutest_core:stone_pickaxe", "Stone Pickaxe", {}, "pyutest-stone-pickaxe.png", {
|
||||
stack_max = 1,
|
||||
tool_capabilities = {
|
||||
groupcaps = {
|
||||
block = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_BREAKABLE_INSTANT] = 0.065,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_NORMAL] = 0.55,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_CHOPPY] = 0.9,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_MIDDLE] = 1.1,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_LONG] = 2.1,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_VERYLONG] = 9,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_FOREVER] = 15
|
||||
},
|
||||
uses = 450,
|
||||
}
|
||||
},
|
||||
punch_attack_uses = 225,
|
||||
damage_groups = {fleshy = 3}
|
||||
}
|
||||
stack_max = 1,
|
||||
tool_capabilities = PyuTestCore.tool_caps({
|
||||
uses = 274,
|
||||
attack_uses = 274 / 2,
|
||||
maxlevel = 2,
|
||||
groupcaps = {
|
||||
cracky = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_FAST] = 1.8,
|
||||
[PyuTestCore.BLOCK_NORMAL] = 2.4
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
PyuTestCore.make_tool("pyutest_core:iron_pickaxe", "Iron Pickaxe", {}, "pyutest-iron-pickaxe.png", {
|
||||
stack_max = 1,
|
||||
tool_capabilities = {
|
||||
groupcaps = {
|
||||
block = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_BREAKABLE_INSTANT] = 0.035,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_NORMAL] = 0.35,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_CHOPPY] = 0.8,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_MIDDLE] = 0.8,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_LONG] = 1.7,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_VERYLONG] = 7,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_FOREVER] = 11
|
||||
},
|
||||
uses = 750,
|
||||
}
|
||||
},
|
||||
punch_attack_uses = 375,
|
||||
damage_groups = {fleshy = 4}
|
||||
}
|
||||
stack_max = 1,
|
||||
tool_capabilities = PyuTestCore.tool_caps({
|
||||
uses = 689,
|
||||
attack_uses = 689 / 2,
|
||||
maxlevel = 3,
|
||||
groupcaps = {
|
||||
cracky = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_FAST] = 0.7,
|
||||
[PyuTestCore.BLOCK_NORMAL] = 1.5
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
PyuTestCore.make_tool("pyutest_core:diamond_pickaxe", "Diamond Pickaxe", {}, "pyutest-diamond-pickaxe.png", {
|
||||
stack_max = 1,
|
||||
tool_capabilities = {
|
||||
groupcaps = {
|
||||
block = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_BREAKABLE_INSTANT] = 0.035,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_NORMAL] = 0.35,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_CHOPPY] = 0.6,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_MIDDLE] = 0.6,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_LONG] = 1.3,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_VERYLONG] = 5,
|
||||
[PyuTestCore.BLOCK_BREAKABLE_FOREVER] = 8
|
||||
},
|
||||
uses = 1200,
|
||||
}
|
||||
},
|
||||
punch_attack_uses = 600,
|
||||
damage_groups = {fleshy = 4}
|
||||
}
|
||||
stack_max = 1,
|
||||
tool_capabilities = PyuTestCore.tool_caps({
|
||||
uses = 1345,
|
||||
attack_uses = 1345 / 2,
|
||||
maxlevel = 4,
|
||||
groupcaps = {
|
||||
cracky = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_FAST] = 0.3,
|
||||
[PyuTestCore.BLOCK_NORMAL] = 0.8,
|
||||
[PyuTestCore.BLOCK_SLOW] = 8
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
PyuTestCore.make_tool("pyutest_core:wooden_axe", "Wooden Axe", {}, "pyutest-wooden-axe.png", {
|
||||
stack_max = 1,
|
||||
tool_capabilities = PyuTestCore.tool_caps({
|
||||
uses = 69,
|
||||
attack_uses = 69 / 2,
|
||||
groupcaps = {
|
||||
choppy = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_FAST] = 1.1,
|
||||
[PyuTestCore.BLOCK_NORMAL] = 1.6,
|
||||
[PyuTestCore.BLOCK_SLOW] = 2.2
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
PyuTestCore.make_tool("pyutest_core:stone_axe", "Stone Axe", {}, "pyutest-stone-axe.png", {
|
||||
stack_max = 1,
|
||||
tool_capabilities = PyuTestCore.tool_caps({
|
||||
uses = 274,
|
||||
attack_uses = 274 / 2,
|
||||
groupcaps = {
|
||||
choppy = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_FAST] = 0.98,
|
||||
[PyuTestCore.BLOCK_NORMAL] = 1.23,
|
||||
[PyuTestCore.BLOCK_SLOW] = 2
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
PyuTestCore.make_tool("pyutest_core:iron_axe", "Iron Axe", {}, "pyutest-iron-axe.png", {
|
||||
stack_max = 1,
|
||||
tool_capabilities = PyuTestCore.tool_caps({
|
||||
uses = 689,
|
||||
attack_uses = 689 / 2,
|
||||
groupcaps = {
|
||||
choppy = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_FAST] = 0.4,
|
||||
[PyuTestCore.BLOCK_NORMAL] = 0.6,
|
||||
[PyuTestCore.BLOCK_SLOW] = 1.8
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
PyuTestCore.make_tool("pyutest_core:diamond_axe", "Diamond Axe", {}, "pyutest-diamond-axe.png", {
|
||||
stack_max = 1,
|
||||
tool_capabilities = PyuTestCore.tool_caps({
|
||||
uses = 1345,
|
||||
attack_uses = 1345 / 2,
|
||||
groupcaps = {
|
||||
choppy = {
|
||||
times = {
|
||||
[PyuTestCore.BLOCK_FAST] = 0.3,
|
||||
[PyuTestCore.BLOCK_NORMAL] = 0.4,
|
||||
[PyuTestCore.BLOCK_SLOW] = 1.4
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:bomb", "Bomb", {}, "pyutest-bomb.png", {
|
||||
stack_max = 16,
|
||||
on_use = function (_, user)
|
||||
if user == nil then
|
||||
return
|
||||
end
|
||||
local pos = user:get_pos()
|
||||
PyuTestCore.create_explosion(pos, 2, false, 3, user)
|
||||
local stack = user:get_wielded_item()
|
||||
stack:set_count(stack:get_count() - 1)
|
||||
stack_max = 16,
|
||||
on_use = function (_, user)
|
||||
if user == nil then
|
||||
return
|
||||
end
|
||||
local pos = user:get_pos()
|
||||
PyuTestCore.create_explosion(pos, 2, false, 6, user)
|
||||
local stack = user:get_wielded_item()
|
||||
stack:set_count(stack:get_count() - 1)
|
||||
|
||||
user:set_wielded_item(stack)
|
||||
end
|
||||
user:set_wielded_item(stack)
|
||||
end
|
||||
})
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:windball", "Windball", {}, "pyutest-windball.png", {
|
||||
stack_max = 16,
|
||||
on_use = function (_, user)
|
||||
if user == nil then
|
||||
return
|
||||
end
|
||||
stack_max = 16,
|
||||
on_use = function (_, user)
|
||||
if user == nil then
|
||||
return
|
||||
end
|
||||
|
||||
local pos = user:get_pos()
|
||||
minetest.sound_play({name = "spellbook_action", gain = 0.75}, {pos = pos})
|
||||
math.randomseed(os.time())
|
||||
user:add_velocity({
|
||||
x = 0,
|
||||
z = 0,
|
||||
y = math.random(12, 22)
|
||||
})
|
||||
local pos = user:get_pos()
|
||||
minetest.sound_play({name = "spellbook_action", gain = 0.75}, {pos = pos})
|
||||
math.randomseed(os.time())
|
||||
user:add_velocity({
|
||||
x = 0,
|
||||
z = 0,
|
||||
y = math.random(12, 22)
|
||||
})
|
||||
|
||||
local stack = user:get_wielded_item()
|
||||
stack:set_count(stack:get_count() - 1)
|
||||
|
||||
local stack = user:get_wielded_item()
|
||||
stack:set_count(stack:get_count() - 1)
|
||||
|
||||
user:set_wielded_item(stack)
|
||||
end
|
||||
user:set_wielded_item(stack)
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
PyuTestCore.make_food("pyutest_core:apple", "Apple", "pyutest-apple.png", 6)
|
||||
PyuTestCore.make_food("pyutest_core:bread", "Bread", "pyutest-bread.png", 4)
|
||||
PyuTestCore.make_food("pyutest_core:water_bottle", "Water Bottle", "pyutest-water-bottle.png", 0)
|
||||
|
@ -1,8 +1,4 @@
|
||||
PyuTestCore.util = {
|
||||
toint = function (float)
|
||||
return tonumber(string.format("%d", float))
|
||||
end,
|
||||
|
||||
tablecopy = function(t)
|
||||
if t == nil then return nil end
|
||||
local t2 = {}
|
||||
@ -45,25 +41,27 @@ PyuTestCore.create_explosion = function (pos, range, rm_pos, dmg, creator, dmg_c
|
||||
end
|
||||
|
||||
PyuTestCore.dorange(pos, range, function(p)
|
||||
if minetest.get_node(p).name == "pyutest_core:tnt" then
|
||||
minetest.remove_node(p)
|
||||
PyuTestCore.create_explosion(p, range, rm_pos, dmg, creator, dmg_creator)
|
||||
else
|
||||
minetest.dig_node(p)
|
||||
end
|
||||
if minetest.get_node(p).name == "pyutest_core:tnt" then
|
||||
minetest.after(0.8, function()
|
||||
minetest.remove_node(p)
|
||||
PyuTestCore.create_explosion(p, range, rm_pos, dmg, creator, dmg_creator)
|
||||
end)
|
||||
else
|
||||
minetest.dig_node(p)
|
||||
end
|
||||
end)
|
||||
|
||||
for _, v in pairs(minetest.get_objects_inside_radius(pos, range)) do
|
||||
if creator ~= nil then
|
||||
if v ~= creator then
|
||||
v:punch(creator, nil, {
|
||||
damage_groups = {fleshy = dmg}
|
||||
damage_groups = {fleshy = dmg}
|
||||
}, nil)
|
||||
end
|
||||
|
||||
if dmg_creator and v == creator then
|
||||
v:punch(creator, nil, {
|
||||
damage_groups = {fleshy = dmg}
|
||||
damage_groups = {fleshy = dmg}
|
||||
}, nil)
|
||||
end
|
||||
end
|
||||
@ -74,22 +72,46 @@ PyuTestCore.create_explosion = function (pos, range, rm_pos, dmg, creator, dmg_c
|
||||
local maxpos = {x = pos.x + r, y = pos.y + r, z = pos.z + r}
|
||||
|
||||
minetest.add_particlespawner({
|
||||
amount = range * 3,
|
||||
time = 0.1,
|
||||
minexptime = 0.4,
|
||||
maxexptime = 1.4,
|
||||
minsize = 32,
|
||||
maxsize = 64,
|
||||
amount = range * 3,
|
||||
time = 0.1,
|
||||
minexptime = 0.4,
|
||||
maxexptime = 1.4,
|
||||
minsize = 32,
|
||||
maxsize = 64,
|
||||
|
||||
collisiondetection = false,
|
||||
texture = "pyutest-blast.png",
|
||||
collisiondetection = false,
|
||||
texture = "pyutest-blast.png",
|
||||
|
||||
minpos = minpos,
|
||||
maxpos = maxpos,
|
||||
minpos = minpos,
|
||||
maxpos = maxpos,
|
||||
})
|
||||
|
||||
minetest.sound_play("block_break", {
|
||||
pos = pos,
|
||||
gain = 2.5
|
||||
pos = pos,
|
||||
gain = 2.5
|
||||
})
|
||||
end
|
||||
|
||||
PyuTestCore.tool_caps = function(options)
|
||||
local default_uses = 100
|
||||
local groupcaps = {}
|
||||
|
||||
for k, v in pairs(options.groupcaps or {}) do
|
||||
groupcaps[k] = {
|
||||
maxlevel = v.maxlevel or options.maxlevel,
|
||||
times = v.times or {
|
||||
[PyuTestCore.BLOCK_FAST] = options.time or 3,
|
||||
[PyuTestCore.BLOCK_NORMAL] = options.time or 3,
|
||||
[PyuTestCore.BLOCK_SLOW] = options.time or 3
|
||||
},
|
||||
uses = v.uses or options.uses or default_uses
|
||||
}
|
||||
end
|
||||
|
||||
return {
|
||||
groupcaps = groupcaps,
|
||||
punch_attack_uses = options.attack_uses,
|
||||
damage_groups = options.damage_groups or {fleshy=3},
|
||||
full_punch_interval = options.full_punch_interval
|
||||
}
|
||||
end
|
||||
|
@ -1,104 +1,104 @@
|
||||
PyuTestCore.registered_wood = {}
|
||||
PyuTestCore.make_wood = function (id, desc, ltiles, btiles)
|
||||
PyuTestCore.make_building_blocks(id.."_log", desc .. " Log", ltiles, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_CHOPPY,
|
||||
acid_vulnerable = 1,
|
||||
flammable = 1,
|
||||
choppy = PyuTestCore.BLOCK_NORMAL,
|
||||
acid_vulnerable = 1,
|
||||
flammable = 1,
|
||||
}, {
|
||||
is_ground_content = false
|
||||
is_ground_content = false
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks(id.."_wood", desc .. " Wood", btiles, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_CHOPPY,
|
||||
acid_vulnerable = 1,
|
||||
flammable = 1,
|
||||
choppy = PyuTestCore.BLOCK_NORMAL,
|
||||
acid_vulnerable = 1,
|
||||
flammable = 1,
|
||||
}, {
|
||||
is_ground_content = false
|
||||
is_ground_content = false
|
||||
})
|
||||
|
||||
local log_id = id.."_log_block"
|
||||
local wood_id = id.."_wood_block"
|
||||
|
||||
minetest.override_item(log_id, {
|
||||
groups = PyuTestCore.util.tableconcat(minetest.registered_nodes[log_id].groups, {
|
||||
wooden_log = 1,
|
||||
fuel = 1
|
||||
}),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node
|
||||
groups = PyuTestCore.util.tableconcat(minetest.registered_nodes[log_id].groups, {
|
||||
wooden_log = 1,
|
||||
fuel = 1
|
||||
}),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
||||
minetest.override_item(wood_id, {
|
||||
groups = PyuTestCore.util.tableconcat(minetest.registered_nodes[wood_id].groups, {
|
||||
wooden_planks = 1,
|
||||
fuel = 1
|
||||
})
|
||||
groups = PyuTestCore.util.tableconcat(minetest.registered_nodes[wood_id].groups, {
|
||||
wooden_planks = 1,
|
||||
fuel = 1
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = id.."_wood_block 4",
|
||||
recipe = {id.."_log_block"},
|
||||
type = "shapeless"
|
||||
output = id.."_wood_block 4",
|
||||
recipe = {id.."_log_block"},
|
||||
type = "shapeless"
|
||||
})
|
||||
|
||||
PyuTestCore.registered_wood[id] = {
|
||||
log = log_id,
|
||||
wood = wood_id
|
||||
log = log_id,
|
||||
wood = wood_id
|
||||
}
|
||||
end
|
||||
|
||||
PyuTestCore.make_wood("pyutest_core:wooden", "Oak", {
|
||||
"pyutest-log-top-bottom.png",
|
||||
"pyutest-log-top-bottom.png",
|
||||
"pyutest-log.png"
|
||||
"pyutest-log-top-bottom.png",
|
||||
"pyutest-log-top-bottom.png",
|
||||
"pyutest-log.png"
|
||||
}, {
|
||||
"pyutest-wood.png"
|
||||
"pyutest-wood.png"
|
||||
})
|
||||
|
||||
PyuTestCore.make_wood("pyutest_core:savanna", "Savanna", {
|
||||
"pyutest-savanna-log-top-bottom.png",
|
||||
"pyutest-savanna-log-top-bottom.png",
|
||||
"pyutest-savanna-log.png"
|
||||
"pyutest-savanna-log-top-bottom.png",
|
||||
"pyutest-savanna-log-top-bottom.png",
|
||||
"pyutest-savanna-log.png"
|
||||
}, {
|
||||
"pyutest-savanna-wood.png"
|
||||
"pyutest-savanna-wood.png"
|
||||
})
|
||||
|
||||
PyuTestCore.make_wood("pyutest_core:birch", "Birch", {
|
||||
"pyutest-birch-log-top-bottom.png",
|
||||
"pyutest-birch-log-top-bottom.png",
|
||||
"pyutest-birch-log.png"
|
||||
"pyutest-birch-log-top-bottom.png",
|
||||
"pyutest-birch-log-top-bottom.png",
|
||||
"pyutest-birch-log.png"
|
||||
}, {
|
||||
"pyutest-birch-wood.png"
|
||||
"pyutest-birch-wood.png"
|
||||
})
|
||||
|
||||
PyuTestCore.make_wood("pyutest_core:cherry", "Cherry", {
|
||||
"pyutest-cherry-log-top-bottom.png",
|
||||
"pyutest-cherry-log-top-bottom.png",
|
||||
"pyutest-cherry-log.png"
|
||||
"pyutest-cherry-log-top-bottom.png",
|
||||
"pyutest-cherry-log-top-bottom.png",
|
||||
"pyutest-cherry-log.png"
|
||||
}, {
|
||||
"pyutest-cherry-wood.png"
|
||||
"pyutest-cherry-wood.png"
|
||||
})
|
||||
|
||||
PyuTestCore.make_wood("pyutest_core:redwood", "Redwood", {
|
||||
"pyutest-redwood-log-top-bottom.png",
|
||||
"pyutest-redwood-log-top-bottom.png",
|
||||
"pyutest-redwood-log.png"
|
||||
"pyutest-redwood-log-top-bottom.png",
|
||||
"pyutest-redwood-log-top-bottom.png",
|
||||
"pyutest-redwood-log.png"
|
||||
}, {
|
||||
"pyutest-redwood.png"
|
||||
"pyutest-redwood.png"
|
||||
})
|
||||
|
||||
PyuTestCore.make_wood("pyutest_core:jungle", "Jungle", {
|
||||
"pyutest-jungle-log-top-bottom.png",
|
||||
"pyutest-jungle-log-top-bottom.png",
|
||||
"pyutest-jungle-log.png"
|
||||
"pyutest-jungle-log-top-bottom.png",
|
||||
"pyutest-jungle-log-top-bottom.png",
|
||||
"pyutest-jungle-log.png"
|
||||
}, {
|
||||
"pyutest-jungle-wood.png"
|
||||
"pyutest-jungle-wood.png"
|
||||
})
|
||||
|
||||
PyuTestCore.make_wood("pyutest_core:vyn", "Vyn", {
|
||||
"pyutest-vyn-log-top-bottom.png",
|
||||
"pyutest-vyn-log-top-bottom.png",
|
||||
"pyutest-vyn-log.png"
|
||||
"pyutest-vyn-log-top-bottom.png",
|
||||
"pyutest-vyn-log-top-bottom.png",
|
||||
"pyutest-vyn-log.png"
|
||||
}, {
|
||||
"pyutest-vyn-wood.png"
|
||||
"pyutest-vyn-wood.png"
|
||||
})
|
||||
|
@ -1,61 +1,62 @@
|
||||
PyuTestCore.registered_colored_blocks = {}
|
||||
PyuTestCore.make_colored_blocks = function(name, desc, color)
|
||||
PyuTestCore.make_building_blocks(name.."_wool", desc.." Wool", {
|
||||
"pyutest-wool.png"
|
||||
"pyutest-wool.png"
|
||||
}, color or "white", {
|
||||
colored = 1
|
||||
oddly_breakable_by_hand = PyuTestCore.BLOCK_NORMAL,
|
||||
colored = 1
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks(name.."_terracotta", desc .. " Terracotta", {
|
||||
"pyutest-terracotta.png"
|
||||
"pyutest-terracotta.png"
|
||||
}, color or "white", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE,
|
||||
cracky = PyuTestCore.BLOCK_FAST,
|
||||
colored = 1
|
||||
})
|
||||
|
||||
PyuTestCore.make_item(name.."_dye", desc.." Dye", {}, "pyutest-dye.png", {
|
||||
color = color or "white"
|
||||
color = color or "white"
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = name.."_wool_block",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"pyutest_core:white_wool_block",
|
||||
name.."_dye"
|
||||
}
|
||||
output = name.."_wool_block",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"pyutest_core:white_wool_block",
|
||||
name.."_dye"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = name.."_terracotta_block",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"pyutest_core:white_terracotta_block",
|
||||
name.."_dye"
|
||||
}
|
||||
output = name.."_terracotta_block",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"pyutest_core:white_terracotta_block",
|
||||
name.."_dye"
|
||||
}
|
||||
})
|
||||
|
||||
PyuTestCore.registered_colored_blocks[name] = {
|
||||
wool = name.."_wool",
|
||||
terracotta = name.."_terracotta",
|
||||
dye = name.."_dye"
|
||||
wool = name.."_wool",
|
||||
terracotta = name.."_terracotta",
|
||||
dye = name.."_dye"
|
||||
}
|
||||
end
|
||||
|
||||
PyuTestCore.make_colored_blocks("pyutest_core:white", "White", "white")
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:white_wool_block 4",
|
||||
recipe = {
|
||||
{"pyutest_core:string", "pyutest_core:string"},
|
||||
{"pyutest_core:string", "pyutest_core:string"}
|
||||
}
|
||||
output = "pyutest_core:white_wool_block 4",
|
||||
recipe = {
|
||||
{"pyutest_core:string", "pyutest_core:string"},
|
||||
{"pyutest_core:string", "pyutest_core:string"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "pyutest_core:white_terracotta_block",
|
||||
recipe = "pyutest_core:clay_block"
|
||||
type = "cooking",
|
||||
output = "pyutest_core:white_terracotta_block",
|
||||
recipe = "pyutest_core:clay_block"
|
||||
})
|
||||
|
||||
local colors = {
|
||||
@ -78,11 +79,11 @@ end
|
||||
|
||||
PyuTestCore.make_dye_mixing_recipe = function(c1, c2, out)
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = out .. " 2",
|
||||
recipe = {
|
||||
c1, c2
|
||||
}
|
||||
type = "shapeless",
|
||||
output = out .. " 2",
|
||||
recipe = {
|
||||
c1, c2
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -14,58 +14,58 @@ for k, v in pairs(unified_inventory.registered_categories) do
|
||||
end
|
||||
|
||||
unified_inventory.register_category("pyutest_inventory:blocks", {
|
||||
symbol = "pyutest_core:stone_block",
|
||||
label = "Blocks",
|
||||
index = 3,
|
||||
items = get_items_from_group("block")
|
||||
symbol = "pyutest_core:stone_block",
|
||||
label = "Blocks",
|
||||
index = 3,
|
||||
items = get_items_from_group("block")
|
||||
})
|
||||
|
||||
unified_inventory.register_category("pyutest_inventory:tools", {
|
||||
symbol = "pyutest_core:iron_pickaxe",
|
||||
label = "Tools",
|
||||
index = 4,
|
||||
items = get_items_from_group("tool")
|
||||
symbol = "pyutest_core:iron_pickaxe",
|
||||
label = "Tools",
|
||||
index = 4,
|
||||
items = get_items_from_group("tool")
|
||||
})
|
||||
|
||||
unified_inventory.register_category("pyutest_inventory:furniture", {
|
||||
symbol = "pyutest_core:wooden_wood_chair",
|
||||
label = "Furniture",
|
||||
index = 5,
|
||||
items = get_items_from_group("furniture")
|
||||
symbol = "pyutest_core:wooden_wood_chair",
|
||||
label = "Furniture",
|
||||
index = 5,
|
||||
items = get_items_from_group("furniture")
|
||||
})
|
||||
|
||||
unified_inventory.register_category("pyutest_inventory:minerals", {
|
||||
symbol = "pyutest_core:diamond_ore",
|
||||
label = "Minerals",
|
||||
index = 6,
|
||||
items = get_items_from_group("mineral")
|
||||
symbol = "pyutest_core:diamond_ore",
|
||||
label = "Minerals",
|
||||
index = 6,
|
||||
items = get_items_from_group("mineral")
|
||||
})
|
||||
|
||||
unified_inventory.register_category("pyutest_inventory:colored", {
|
||||
symbol = "pyutest_core:yellow_wool_block",
|
||||
label = "Colored Blocks",
|
||||
index = 7,
|
||||
items = get_items_from_group("colored")
|
||||
symbol = "pyutest_core:yellow_wool_block",
|
||||
label = "Colored Blocks",
|
||||
index = 7,
|
||||
items = get_items_from_group("colored")
|
||||
})
|
||||
|
||||
unified_inventory.register_category("pyutest_inventory:flowers", {
|
||||
symbol = "pyutest_core:rose",
|
||||
label = "Flora",
|
||||
index = 8,
|
||||
items = get_items_from_group("flower")
|
||||
symbol = "pyutest_core:rose",
|
||||
label = "Flora",
|
||||
index = 8,
|
||||
items = get_items_from_group("flower")
|
||||
})
|
||||
|
||||
unified_inventory.register_category("pyutest_inventory:fuel", {
|
||||
symbol = "pyutest_core:coal_lump",
|
||||
label = "Fuel",
|
||||
index = 9,
|
||||
items = get_items_from_group("fuel")
|
||||
symbol = "pyutest_core:coal_lump",
|
||||
label = "Fuel",
|
||||
index = 9,
|
||||
items = get_items_from_group("fuel")
|
||||
})
|
||||
|
||||
|
||||
unified_inventory.register_category("pyutest_inventory:solid_nodes", {
|
||||
symbol = "pyutest_core:stone_block",
|
||||
label = "Solid Nodes",
|
||||
index = 10,
|
||||
items = get_items_from_group("solid")
|
||||
symbol = "pyutest_core:stone_block",
|
||||
label = "Solid Nodes",
|
||||
index = 10,
|
||||
items = get_items_from_group("solid")
|
||||
})
|
||||
|
@ -1,48 +1,49 @@
|
||||
PyuTestMapgen = {}
|
||||
|
||||
-- This function is used for structures because it will update the lighting when placed.
|
||||
PyuTestMapgen.register_structure = function (name, schematic, def)
|
||||
local id = "pyutest_mapgen:structure_block_"..name
|
||||
minetest.register_node(id, {
|
||||
description = string.format("Structure Block (%s)", name),
|
||||
groups = {
|
||||
not_in_creative_inventory = 1
|
||||
},
|
||||
tiles = {
|
||||
"pyutest-stick.png"
|
||||
},
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
description = string.format("Structure Block (%s)", name),
|
||||
groups = {
|
||||
not_in_creative_inventory = 1
|
||||
},
|
||||
tiles = {
|
||||
"pyutest-stick.png"
|
||||
},
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
sidelen = 80,
|
||||
decoration = id,
|
||||
deco_type = "simple",
|
||||
place_on = def.place_on,
|
||||
spawn_by = def.spawn_by,
|
||||
num_spawn_by = def.num_spawn_by,
|
||||
fill_ratio = def.fill_ratio,
|
||||
noise_params = def.noise_params,
|
||||
flags = def.flags or "place_center_x, place_center_y, force_placement",
|
||||
biomes = def.biomes,
|
||||
y_max = def.y_max,
|
||||
y_min = def.y_min
|
||||
sidelen = 80,
|
||||
decoration = id,
|
||||
deco_type = "simple",
|
||||
place_on = def.place_on,
|
||||
spawn_by = def.spawn_by,
|
||||
num_spawn_by = def.num_spawn_by,
|
||||
fill_ratio = def.fill_ratio,
|
||||
noise_params = def.noise_params,
|
||||
flags = def.flags or "place_center_x, place_center_y, force_placement",
|
||||
biomes = def.biomes,
|
||||
y_max = def.y_max,
|
||||
y_min = def.y_min
|
||||
})
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "pyutest_mapgen:spawn_"..name,
|
||||
run_at_every_load = true,
|
||||
nodenames = {id},
|
||||
action = function (pos, node)
|
||||
minetest.remove_node(pos)
|
||||
minetest.place_schematic(
|
||||
pos,
|
||||
PyuTestCore.get_schem_path(schematic),
|
||||
def.rotation or "random",
|
||||
def.replacements or {},
|
||||
def.force_placement or true,
|
||||
def.flags or "place_center_x, place_center_z"
|
||||
)
|
||||
end
|
||||
name = "pyutest_mapgen:spawn_"..name,
|
||||
run_at_every_load = true,
|
||||
nodenames = {id},
|
||||
action = function (pos, node)
|
||||
minetest.remove_node(pos)
|
||||
minetest.place_schematic(
|
||||
pos,
|
||||
PyuTestCore.get_schem_path(schematic),
|
||||
def.rotation or "random",
|
||||
def.replacements or {},
|
||||
def.force_placement or true,
|
||||
def.flags or "place_center_x, place_center_z"
|
||||
)
|
||||
end
|
||||
})
|
||||
end
|
||||
|
@ -4,6 +4,10 @@ minetest.register_alias("mapgen_river_water_source", "pyutest_core:water_source"
|
||||
minetest.register_alias("mapgen_lava_source", "pyutest_core:lava_source")
|
||||
minetest.register_alias("mapgen_singlenode", "air")
|
||||
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
|
||||
minetest.set_mapgen_setting(string.format("mg%s_cavern_threshold", mg_name), "0.20", true)
|
||||
|
||||
-- Biomes
|
||||
|
||||
PyuTestCore_BiomeTops = {
|
||||
@ -96,342 +100,342 @@ PyuTestCore.register_biome = function(name, type, opts)
|
||||
nopts["node_riverbed"] = nopts["node_riverbed"] or "pyutest_core:gravel_block"
|
||||
|
||||
minetest.register_biome(PyuTestCore.util.tableconcat(nopts, {
|
||||
_pyutest_biome_type = type,
|
||||
_pyutest_biome_type = type,
|
||||
}))
|
||||
|
||||
minetest.register_biome(PyuTestCore.util.tableconcat({
|
||||
name = name.."_ocean",
|
||||
node_top = nopts["node_riverbed"],
|
||||
depth_top = 2,
|
||||
node_filler = nopts["node_riverbed"],
|
||||
depth_filler = 3,
|
||||
depth_riverbed = 2,
|
||||
|
||||
node_water = nopts["node_water"],
|
||||
node_river_water = nopts["node_river_water"],
|
||||
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
|
||||
y_max = 0,
|
||||
y_min = PyuTestCore_OceanMin
|
||||
name = name.."_ocean",
|
||||
node_top = nopts["node_riverbed"],
|
||||
depth_top = 2,
|
||||
node_filler = nopts["node_riverbed"],
|
||||
depth_filler = 3,
|
||||
depth_riverbed = 2,
|
||||
|
||||
node_water = nopts["node_water"],
|
||||
node_river_water = nopts["node_river_water"],
|
||||
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
|
||||
y_max = 0,
|
||||
y_min = PyuTestCore_OceanMin
|
||||
}, {
|
||||
_pyutest_biome_type = PyuTestCore.BIOME_TYPES.OCEAN,
|
||||
_pyutest_ocean_type = type
|
||||
_pyutest_biome_type = PyuTestCore.BIOME_TYPES.OCEAN,
|
||||
_pyutest_ocean_type = type
|
||||
}))
|
||||
|
||||
minetest.register_biome(PyuTestCore.util.tableconcat({
|
||||
name = name.."_deep_ocean",
|
||||
|
||||
node_top = nopts["node_riverbed"],
|
||||
depth_top = 2,
|
||||
node_filler = nopts["node_riverbed"],
|
||||
depth_filler = 3,
|
||||
depth_riverbed = 2,
|
||||
|
||||
node_water = nopts["node_water"],
|
||||
node_river_water = nopts["node_river_water"],
|
||||
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
|
||||
y_max = PyuTestCore_DeepOceanMax,
|
||||
y_min = PyuTestCore_DeepOceanMin,
|
||||
|
||||
vertical_blend = 5
|
||||
name = name.."_deep_ocean",
|
||||
|
||||
node_top = nopts["node_riverbed"],
|
||||
depth_top = 2,
|
||||
node_filler = nopts["node_riverbed"],
|
||||
depth_filler = 3,
|
||||
depth_riverbed = 2,
|
||||
|
||||
node_water = nopts["node_water"],
|
||||
node_river_water = nopts["node_river_water"],
|
||||
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
|
||||
y_max = PyuTestCore_DeepOceanMax,
|
||||
y_min = PyuTestCore_DeepOceanMin,
|
||||
|
||||
vertical_blend = 5
|
||||
}, {
|
||||
_pyutest_biome_type = PyuTestCore.BIOME_TYPES.OCEAN,
|
||||
_pyutest_ocean_type = type
|
||||
_pyutest_biome_type = PyuTestCore.BIOME_TYPES.OCEAN,
|
||||
_pyutest_ocean_type = type
|
||||
}))
|
||||
|
||||
minetest.register_biome(PyuTestCore.util.tableconcat({
|
||||
name = name.."_cave",
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
y_max = PyuTestCore_DeepOceanMin - 1,
|
||||
y_min = PyuTestCore_WorldBottom
|
||||
name = name.."_cave",
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
y_max = PyuTestCore_DeepOceanMin - 1,
|
||||
y_min = PyuTestCore_WorldBottom
|
||||
}, {
|
||||
_pyutest_biome_type = PyuTestCore.BIOME_TYPES.CAVE,
|
||||
_pyutest_cave_type = type
|
||||
_pyutest_biome_type = PyuTestCore.BIOME_TYPES.CAVE,
|
||||
_pyutest_cave_type = type
|
||||
}))
|
||||
end
|
||||
|
||||
PyuTestCore.register_biome("grassland", PyuTestCore.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.grassland,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.grassland,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
heat_point = 53,
|
||||
humidity_point = 50,
|
||||
|
||||
heat_point = 53,
|
||||
humidity_point = 50,
|
||||
|
||||
_pyutest_biome_flowering = true
|
||||
_pyutest_biome_flowering = true
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("forest", PyuTestCore.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 50,
|
||||
humidity_point = 65,
|
||||
_pyutest_biome_flowering = true
|
||||
heat_point = 50,
|
||||
humidity_point = 65,
|
||||
_pyutest_biome_flowering = true
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("stony_mountains", PyuTestCore.BIOME_TYPES.WARM, {
|
||||
node_top = "pyutest_core:stone_block",
|
||||
node_filler = "pyutest_core:stone_block",
|
||||
node_top = "pyutest_core:stone_block",
|
||||
node_filler = "pyutest_core:stone_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.mountains,
|
||||
y_min = PyuTestCore_BiomeTops.grassland,
|
||||
y_max = PyuTestCore_BiomeTops.mountains,
|
||||
y_min = PyuTestCore_BiomeTops.grassland,
|
||||
|
||||
heat_point = 65,
|
||||
humidity_point = 8
|
||||
heat_point = 65,
|
||||
humidity_point = 8
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("desert", PyuTestCore.BIOME_TYPES.DESERT, {
|
||||
node_top = "pyutest_core:sand_block",
|
||||
node_filler = "pyutest_core:sandstone_block",
|
||||
node_riverbed = "pyutest_core:sand_block",
|
||||
node_top = "pyutest_core:sand_block",
|
||||
node_filler = "pyutest_core:sandstone_block",
|
||||
node_riverbed = "pyutest_core:sand_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.desert,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.desert,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 84,
|
||||
humidity_point = 4
|
||||
heat_point = 84,
|
||||
humidity_point = 4
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("desert_mountains", PyuTestCore.BIOME_TYPES.DESERT, {
|
||||
node_top = "pyutest_core:sand_block",
|
||||
node_filler = "pyutest_core:sandstone_block",
|
||||
node_top = "pyutest_core:sand_block",
|
||||
node_filler = "pyutest_core:sandstone_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.mountains,
|
||||
y_min = PyuTestCore_BiomeTops.desert,
|
||||
y_max = PyuTestCore_BiomeTops.mountains,
|
||||
y_min = PyuTestCore_BiomeTops.desert,
|
||||
|
||||
heat_point = 83,
|
||||
humidity_point = 6
|
||||
heat_point = 83,
|
||||
humidity_point = 6
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("snowy_mountains", PyuTestCore.BIOME_TYPES.COLD, {
|
||||
node_top = "pyutest_core:snow_block",
|
||||
node_filler = "pyutest_core:snow_block",
|
||||
node_top = "pyutest_core:snow_block",
|
||||
node_filler = "pyutest_core:snow_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.mountains,
|
||||
y_min = PyuTestCore_BiomeTops.frozen_plains,
|
||||
y_max = PyuTestCore_BiomeTops.mountains,
|
||||
y_min = PyuTestCore_BiomeTops.frozen_plains,
|
||||
|
||||
heat_point = 6,
|
||||
humidity_point = 93
|
||||
heat_point = 6,
|
||||
humidity_point = 72
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("frozen_plains", PyuTestCore.BIOME_TYPES.COLD, {
|
||||
node_dust = "pyutest_core:snow_carpet",
|
||||
node_dust = "pyutest_core:snow_carpet",
|
||||
|
||||
node_top = "pyutest_core:snow_block",
|
||||
node_filler = "pyutest_core:snow_block",
|
||||
node_top = "pyutest_core:snow_block",
|
||||
node_filler = "pyutest_core:snow_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.frozen_plains,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.frozen_plains,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
node_water_top = "pyutest_core:ice_block",
|
||||
depth_water_top = 5,
|
||||
node_water_top = "pyutest_core:ice_block",
|
||||
depth_water_top = 5,
|
||||
|
||||
heat_point = 9,
|
||||
humidity_point = 90
|
||||
heat_point = 9,
|
||||
humidity_point = 67
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("mushroom_fields", PyuTestCore.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:mycelium_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:mycelium_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.mushroom_fields,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.mushroom_fields,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 53,
|
||||
humidity_point = 94
|
||||
heat_point = 53,
|
||||
humidity_point = 94
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("ice_spikes", PyuTestCore.BIOME_TYPES.COLD, {
|
||||
node_top = "pyutest_core:ice_block",
|
||||
node_filler = "pyutest_core:ice_block",
|
||||
node_top = "pyutest_core:ice_block",
|
||||
node_filler = "pyutest_core:ice_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.ice_spikes,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.ice_spikes,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
node_water_top = "pyutest_core:ice_block",
|
||||
depth_water_top = 5,
|
||||
node_water_top = "pyutest_core:ice_block",
|
||||
depth_water_top = 5,
|
||||
|
||||
heat_point = 9,
|
||||
humidity_point = 86
|
||||
heat_point = 9,
|
||||
humidity_point = 70
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("meadow", PyuTestCore.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
depth_filler = 4,
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
depth_filler = 4,
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.mountains,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.mountains,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 52,
|
||||
humidity_point = 83,
|
||||
heat_point = 52,
|
||||
humidity_point = 83,
|
||||
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("old_growth_forest", PyuTestCore.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 45,
|
||||
humidity_point = 92,
|
||||
heat_point = 45,
|
||||
humidity_point = 92,
|
||||
|
||||
_pyutest_biome_flowering = true
|
||||
_pyutest_biome_flowering = true
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("snowy_forest", PyuTestCore.BIOME_TYPES.COLD, {
|
||||
node_top = "pyutest_core:snow_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:snow_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
node_water_top = "pyutest_core:ice_block",
|
||||
depth_water_top = 5,
|
||||
node_water_top = "pyutest_core:ice_block",
|
||||
depth_water_top = 5,
|
||||
|
||||
heat_point = 8,
|
||||
humidity_point = 89
|
||||
heat_point = 8,
|
||||
humidity_point = 69
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("savanna", PyuTestCore.BIOME_TYPES.WARM, {
|
||||
node_top = "pyutest_core:savanna_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:savanna_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.grassland,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.grassland,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 72,
|
||||
humidity_point = 9
|
||||
heat_point = 72,
|
||||
humidity_point = 9
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("taiga", PyuTestCore.BIOME_TYPES.CHILLY, {
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 28,
|
||||
humidity_point = 67,
|
||||
heat_point = 28,
|
||||
humidity_point = 72,
|
||||
|
||||
_pyutest_biome_flowering = true
|
||||
_pyutest_biome_flowering = true
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("birch_forest", PyuTestCore.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 48,
|
||||
humidity_point = 85,
|
||||
heat_point = 48,
|
||||
humidity_point = 85,
|
||||
|
||||
_pyutest_biome_flowering = true
|
||||
_pyutest_biome_flowering = true
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("cherry_grove", PyuTestCore.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 52,
|
||||
humidity_point = 78,
|
||||
heat_point = 52,
|
||||
humidity_point = 78,
|
||||
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("swamp", PyuTestCore.BIOME_TYPES.WETLAND, {
|
||||
node_top = "pyutest_core:swampy_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:swampy_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.swamp,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.swamp,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 52,
|
||||
humidity_point = 88,
|
||||
heat_point = 52,
|
||||
humidity_point = 88,
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("old_growth_birch_forest", PyuTestCore.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 47,
|
||||
humidity_point = 80,
|
||||
heat_point = 47,
|
||||
humidity_point = 73,
|
||||
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("aspen_forest", PyuTestCore.BIOME_TYPES.CHILLY, {
|
||||
node_top = "pyutest_core:aspen_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:aspen_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 25,
|
||||
humidity_point = 63,
|
||||
heat_point = 25,
|
||||
humidity_point = 63,
|
||||
|
||||
_pyutest_biome_flowering = true
|
||||
_pyutest_biome_flowering = true
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("redwood_forest", PyuTestCore.BIOME_TYPES.CHILLY, {
|
||||
node_top = "pyutest_core:podzol_block",
|
||||
node_filler = "pyutest_core:podzol_block",
|
||||
node_top = "pyutest_core:podzol_block",
|
||||
node_filler = "pyutest_core:podzol_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 28,
|
||||
humidity_point = 67,
|
||||
heat_point = 21,
|
||||
humidity_point = 65,
|
||||
|
||||
_pyutest_biome_flowering = true
|
||||
_pyutest_biome_flowering = true
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("jungle", PyuTestCore.BIOME_TYPES.WARM, {
|
||||
node_top = "pyutest_core:jungle_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:jungle_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 52,
|
||||
humidity_point = 103,
|
||||
heat_point = 52,
|
||||
humidity_point = 103,
|
||||
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("large_mushroom_forest", PyuTestCore.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:mycelium_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:mycelium_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.mushroom_fields,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
y_max = PyuTestCore_BiomeTops.mushroom_fields,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 53,
|
||||
humidity_point = 98
|
||||
heat_point = 53,
|
||||
humidity_point = 98
|
||||
})
|
||||
|
@ -1,82 +1,72 @@
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0003,
|
||||
place_on = {"group:ground"},
|
||||
y_max = PyuTestCore_BiomeTops.mountains,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
decoration = {
|
||||
"pyutest_core:trash_lootbox",
|
||||
"pyutest_core:resource_lootbox",
|
||||
"pyutest_core:griefer_lootbox",
|
||||
"pyutest_core:liquid_sources_lootbox",
|
||||
"pyutest_core:lighting_lootbox",
|
||||
}
|
||||
deco_type = "simple",
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0003,
|
||||
place_on = {"group:ground"},
|
||||
y_max = PyuTestCore_BiomeTops.mountains,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
decoration = {
|
||||
"pyutest_core:trash_lootbox",
|
||||
"pyutest_core:resource_lootbox",
|
||||
"pyutest_core:griefer_lootbox",
|
||||
"pyutest_core:liquid_sources_lootbox",
|
||||
"pyutest_core:lighting_lootbox",
|
||||
}
|
||||
})
|
||||
|
||||
PyuTestMapgen.register_structure("igloo", "Igloo", {
|
||||
place_on = {"pyutest_core:snow_block"},
|
||||
fill_ratio = 0.00004,
|
||||
biomes = {"frozen_plains"},
|
||||
y_max = PyuTestCore_BiomeTops.frozen_plains,
|
||||
y_min = 1,
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
place_offset_y = 1
|
||||
place_on = {"pyutest_core:snow_block"},
|
||||
fill_ratio = 0.00004,
|
||||
biomes = {"frozen_plains"},
|
||||
y_max = PyuTestCore_BiomeTops.frozen_plains,
|
||||
y_min = 1,
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
place_offset_y = 1
|
||||
})
|
||||
|
||||
PyuTestMapgen.register_structure("desertwell", "DesertWell", {
|
||||
place_on = {"pyutest_core:sand_block"},
|
||||
fill_ratio = 0.00006,
|
||||
biomes = {"desert"},
|
||||
y_max = PyuTestCore_BiomeTops.desert,
|
||||
y_min = 1,
|
||||
rotation = "random"
|
||||
place_on = {"pyutest_core:sand_block"},
|
||||
fill_ratio = 0.00006,
|
||||
biomes = {"desert"},
|
||||
y_max = PyuTestCore_BiomeTops.desert,
|
||||
y_min = 1,
|
||||
rotation = "random"
|
||||
})
|
||||
|
||||
PyuTestMapgen.register_structure("ice_spike", "IceSpike", {
|
||||
fill_ratio = 0.0008,
|
||||
place_on = {
|
||||
"pyutest_core:ice_block",
|
||||
},
|
||||
biomes = {
|
||||
"ice_spikes",
|
||||
},
|
||||
y_max = PyuTestCore_BiomeTops.ice_spikes,
|
||||
y_min = PyuTestCore_WorldBottom,
|
||||
})
|
||||
|
||||
PyuTestMapgen.register_structure("obsidian_mound", "ObsidianMound", {
|
||||
fill_ratio = 0.0001,
|
||||
place_on = {"pyutest_core:mycelium_block"},
|
||||
biomes = {
|
||||
"mushroom_fields"
|
||||
},
|
||||
y_max = PyuTestCore_BiomeTops.mushroom_fields,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
fill_ratio = 0.0008,
|
||||
place_on = {
|
||||
"pyutest_core:ice_block",
|
||||
},
|
||||
biomes = {
|
||||
"ice_spikes",
|
||||
},
|
||||
y_max = PyuTestCore_BiomeTops.ice_spikes,
|
||||
y_min = PyuTestCore_WorldBottom,
|
||||
})
|
||||
|
||||
PyuTestMapgen.register_structure("ocean_ruins", "OceanRuins", {
|
||||
fill_ratio = 0.0002,
|
||||
place_on = {"pyutest_core:gravel_block"},
|
||||
biomes = PyuTestCore.get_biomes_from_type(PyuTestCore.BIOME_TYPES.OCEAN),
|
||||
y_max = PyuTestCore_DeepOceanMax + 4,
|
||||
y_min = PyuTestCore_DeepOceanMin,
|
||||
spawn_by = {"pyutest_core:water_source"},
|
||||
num_spawn_by = 2
|
||||
fill_ratio = 0.0002,
|
||||
place_on = {"pyutest_core:gravel_block"},
|
||||
biomes = PyuTestCore.get_biomes_from_type(PyuTestCore.BIOME_TYPES.OCEAN),
|
||||
y_max = PyuTestCore_DeepOceanMax + 4,
|
||||
y_min = PyuTestCore_DeepOceanMin,
|
||||
spawn_by = {"pyutest_core:water_source"},
|
||||
num_spawn_by = 2
|
||||
})
|
||||
|
||||
PyuTestMapgen.register_structure("snowman_tower", "SnowmanTower", {
|
||||
fill_ratio = 0.00002,
|
||||
place_on = {
|
||||
"pyutest_core:ice_block",
|
||||
"pyutest_core:snow_block"
|
||||
},
|
||||
biomes = {
|
||||
"frozen_plains",
|
||||
"ice_spikes",
|
||||
"snowy_forest"
|
||||
},
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_WorldBottom,
|
||||
fill_ratio = 0.000007,
|
||||
place_on = {
|
||||
"pyutest_core:ice_block",
|
||||
"pyutest_core:snow_block"
|
||||
},
|
||||
biomes = {
|
||||
"frozen_plains",
|
||||
"ice_spikes",
|
||||
"snowy_forest"
|
||||
},
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_WorldBottom,
|
||||
})
|
||||
|
@ -1,410 +1,362 @@
|
||||
-- plants and other small decorations
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.009,
|
||||
biomes = PyuTestCore.get_flowering_biomes(),
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
decoration = PyuTestCore.registered_flowers
|
||||
deco_type = "simple",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.009,
|
||||
biomes = PyuTestCore.get_flowering_biomes(),
|
||||
decoration = PyuTestCore.registered_flowers
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.032,
|
||||
biomes = PyuTestCore.get_extra_flowering_biomes(),
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
decoration = PyuTestCore.registered_flowers
|
||||
deco_type = "simple",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.032,
|
||||
biomes = PyuTestCore.get_extra_flowering_biomes(),
|
||||
decoration = PyuTestCore.registered_flowers
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.048,
|
||||
biomes = {"grassland"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
decoration = "pyutest_core:grass_plant"
|
||||
deco_type = "simple",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.048,
|
||||
biomes = {"grassland"},
|
||||
decoration = "pyutest_core:grass_plant"
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0018,
|
||||
biomes = {"grassland"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
decoration = "pyutest_core:haybale_block"
|
||||
deco_type = "simple",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0018,
|
||||
biomes = {"grassland"},
|
||||
decoration = "pyutest_core:haybale_block"
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"pyutest_core:dirt_block", "pyutest_core:sand_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.019,
|
||||
biomes = {"desert"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
decoration = "pyutest_core:deadbush"
|
||||
deco_type = "simple",
|
||||
place_on = {"pyutest_core:dirt_block", "pyutest_core:sand_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.019,
|
||||
biomes = {"desert"},
|
||||
decoration = "pyutest_core:deadbush"
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.03,
|
||||
place_on = {"pyutest_core:water_source"},
|
||||
biomes = {"swamp", "swamp_ocean"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 0,
|
||||
decoration = "pyutest_core:lilypad",
|
||||
flags = "liquid_surface"
|
||||
deco_type = "simple",
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.03,
|
||||
place_on = {"pyutest_core:water_source"},
|
||||
biomes = {"swamp", "swamp_ocean"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 0,
|
||||
decoration = "pyutest_core:lilypad",
|
||||
flags = "liquid_surface"
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.04,
|
||||
place_on = {"group:sugarcane_spawn_on"},
|
||||
decoration = "pyutest_core:sugarcane",
|
||||
y_max = PyuTestCore_SurfaceBottom,
|
||||
y_min = 0,
|
||||
spawn_by = {"pyutest_core:water_source"},
|
||||
num_spawn_by = 1,
|
||||
height = 1,
|
||||
height_max = 4
|
||||
deco_type = "simple",
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.04,
|
||||
place_on = {"group:sugarcane_spawn_on"},
|
||||
decoration = "pyutest_core:sugarcane",
|
||||
y_max = PyuTestCore_SurfaceBottom,
|
||||
y_min = 0,
|
||||
spawn_by = {"pyutest_core:water_source"},
|
||||
num_spawn_by = 1,
|
||||
height = 1,
|
||||
height_max = 4
|
||||
})
|
||||
|
||||
-- trees
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"forest", "old_growth_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("Tree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"forest", "old_growth_forest"},
|
||||
schematic = PyuTestCore.get_schem_path("Tree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00045,
|
||||
biomes = {"grassland"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("Tree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00045,
|
||||
biomes = {"grassland"},
|
||||
schematic = PyuTestCore.get_schem_path("Tree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"forest", "old_growth_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("Tree2"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"forest", "old_growth_forest"},
|
||||
schematic = PyuTestCore.get_schem_path("Tree2"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00085,
|
||||
biomes = {"savanna"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("SavannaTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
place_offset_y = 1
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00085,
|
||||
biomes = {"savanna"},
|
||||
schematic = PyuTestCore.get_schem_path("SavannaTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:mycelium_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.003,
|
||||
biomes = {"mushroom_fields", "large_mushroom_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("Mushroom"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z"
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:mycelium_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.003,
|
||||
biomes = {"mushroom_fields", "large_mushroom_forest"},
|
||||
schematic = PyuTestCore.get_schem_path("Mushroom"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0015,
|
||||
biomes = {"old_growth_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("Tree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z"
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.003,
|
||||
biomes = {"old_growth_forest"},
|
||||
schematic = PyuTestCore.get_schem_path("OldGrowthTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.003,
|
||||
biomes = {"old_growth_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("OldGrowthTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.005,
|
||||
biomes = {"taiga"},
|
||||
schematic = PyuTestCore.get_schem_path("TaigaTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.005,
|
||||
biomes = {"taiga"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("TaigaTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:grass_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.005,
|
||||
biomes = {"birch_forest"},
|
||||
schematic = PyuTestCore.get_schem_path("BirchTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:grass_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.005,
|
||||
biomes = {"birch_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("BirchTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:grass_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.005,
|
||||
biomes = {"birch_forest", "old_growth_birch_forest"},
|
||||
schematic = PyuTestCore.get_schem_path("TallBirchTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:grass_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.005,
|
||||
biomes = {"birch_forest", "old_growth_birch_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("TallBirchTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:grass_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.005,
|
||||
biomes = {"cherry_grove"},
|
||||
schematic = PyuTestCore.get_schem_path("CherryTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:grass_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.005,
|
||||
biomes = {"cherry_grove"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("CherryTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:snow_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"snowy_forest"},
|
||||
schematic = PyuTestCore.get_schem_path("SnowyTree1"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:snow_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"snowy_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("SnowyTree1"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:snow_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"snowy_forest"},
|
||||
schematic = PyuTestCore.get_schem_path("SnowyTree2"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:snow_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"snowy_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("SnowyTree2"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"swamp"},
|
||||
schematic = PyuTestCore.get_schem_path("SwampTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"swamp"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("SwampTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:grass_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"old_growth_birch_forest"},
|
||||
schematic = PyuTestCore.get_schem_path("VeryTallBirchTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:grass_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"old_growth_birch_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("VeryTallBirchTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.016,
|
||||
biomes = {"aspen_forest"},
|
||||
schematic = PyuTestCore.get_schem_path("AspenTree1"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.016,
|
||||
biomes = {"aspen_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("AspenTree1"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.008,
|
||||
biomes = {"aspen_forest"},
|
||||
schematic = PyuTestCore.get_schem_path("AspenTree2"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.008,
|
||||
biomes = {"aspen_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("AspenTree2"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:podzol_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.019,
|
||||
biomes = {"redwood_forest"},
|
||||
schematic = PyuTestCore.get_schem_path("RedwoodTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:podzol_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.019,
|
||||
biomes = {"redwood_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("RedwoodTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.010,
|
||||
biomes = {"jungle"},
|
||||
schematic = PyuTestCore.get_schem_path("JungleTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.010,
|
||||
biomes = {"jungle"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("JungleTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.008,
|
||||
biomes = {"jungle"},
|
||||
schematic = PyuTestCore.get_schem_path("SmallJungleTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.008,
|
||||
biomes = {"jungle"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("SmallJungleTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.013,
|
||||
biomes = {"jungle"},
|
||||
schematic = PyuTestCore.get_schem_path("LargeJungleTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.013,
|
||||
biomes = {"jungle"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("LargeJungleTree"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.008,
|
||||
biomes = {"jungle"},
|
||||
schematic = PyuTestCore.get_schem_path("JungleBush"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.008,
|
||||
biomes = {"jungle"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("JungleBush"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:mycelium_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.006,
|
||||
biomes = {"large_mushroom_forest"},
|
||||
schematic = PyuTestCore.get_schem_path("TallMushroom"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:mycelium_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.006,
|
||||
biomes = {"large_mushroom_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("TallMushroom"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z"
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:mycelium_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.002,
|
||||
biomes = {"large_mushroom_forest"},
|
||||
schematic = PyuTestCore.get_schem_path("SmallMushroom"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
place_offset_y = 1,
|
||||
force_placement = true
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:mycelium_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.002,
|
||||
biomes = {"large_mushroom_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("SmallMushroom"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
place_offset_y = 1
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:mycelium_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.007,
|
||||
biomes = {"large_mushroom_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("FallenMushroom"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
place_offset_y = 1
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:mycelium_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.007,
|
||||
biomes = {"large_mushroom_forest"},
|
||||
schematic = PyuTestCore.get_schem_path("FallenMushroom"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
place_offset_y = 1,
|
||||
force_placement = true
|
||||
})
|
||||
|
@ -1,129 +1,129 @@
|
||||
mobs:register_mob("pyutest_mobs:monster", {
|
||||
type = "monster",
|
||||
hp_max = 20,
|
||||
hp_min = 20,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
armor = 100,
|
||||
passive = false,
|
||||
walk_chance = 0,
|
||||
stand_chance = 25,
|
||||
damage = 2.7,
|
||||
attack_chance = 1,
|
||||
attack_type = "dogfight",
|
||||
pathfinding = 1,
|
||||
visual = "upright_sprite",
|
||||
visual_size = {x = 1, y = 2},
|
||||
collisionbox = PyuTestMobs.HUMAN_LIKE_CBOX,
|
||||
physical = true,
|
||||
blood_amount = PyuTestMobs.ENTITY_BLOOD_AMOUNT,
|
||||
view_range = 30,
|
||||
reach = 2,
|
||||
jump = 1,
|
||||
group_attack = true,
|
||||
makes_footstep_sound = true,
|
||||
type = "monster",
|
||||
hp_max = 20,
|
||||
hp_min = 20,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
armor = 100,
|
||||
passive = false,
|
||||
walk_chance = 0,
|
||||
stand_chance = 25,
|
||||
damage = 2.7,
|
||||
attack_chance = 1,
|
||||
attack_type = "dogfight",
|
||||
pathfinding = 1,
|
||||
visual = "upright_sprite",
|
||||
visual_size = {x = 1, y = 2},
|
||||
collisionbox = PyuTestMobs.HUMAN_LIKE_CBOX,
|
||||
physical = true,
|
||||
blood_amount = PyuTestMobs.ENTITY_BLOOD_AMOUNT,
|
||||
view_range = 30,
|
||||
reach = 2,
|
||||
jump = 1,
|
||||
group_attack = true,
|
||||
makes_footstep_sound = true,
|
||||
|
||||
textures = {
|
||||
"pyutest-monster.png", "pyutest-monster_back.png"
|
||||
},
|
||||
textures = {
|
||||
"pyutest-monster.png", "pyutest-monster_back.png"
|
||||
},
|
||||
|
||||
drops = {
|
||||
{
|
||||
name = "pyutest_core:bone",
|
||||
min = 2,
|
||||
max = 3,
|
||||
chance = 1
|
||||
}
|
||||
}
|
||||
drops = {
|
||||
{
|
||||
name = "pyutest_core:bone",
|
||||
min = 2,
|
||||
max = 3,
|
||||
chance = 1
|
||||
}
|
||||
}
|
||||
})
|
||||
mobs:register_egg("pyutest_mobs:monster", "Monster Spawn Egg", "pyutest-egg.png^[multiply:darkgreen", 0)
|
||||
|
||||
mobs:register_mob("pyutest_mobs:human", {
|
||||
type = "npc",
|
||||
hp_max = 20,
|
||||
hp_min = 20,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 5,
|
||||
armor = 100,
|
||||
passive = true,
|
||||
walk_chance = 50,
|
||||
stand_chance = 50,
|
||||
damage = 3,
|
||||
attack_type = "dogfight",
|
||||
pathfinding = 1,
|
||||
visual = "upright_sprite",
|
||||
visual_size = {x = 1, y = 2},
|
||||
collisionbox = PyuTestMobs.HUMAN_LIKE_CBOX,
|
||||
textures = {"player.png", "player_back.png"},
|
||||
follow = {"pyutest_mobs:coin"},
|
||||
runaway = true,
|
||||
view_range = 15,
|
||||
reach = 2,
|
||||
fear_height = 7,
|
||||
blood_amount = PyuTestMobs.ENTITY_BLOOD_AMOUNT,
|
||||
makes_footstep_sound = true,
|
||||
drops = {
|
||||
{
|
||||
name = "pyutest_core:bone",
|
||||
min = 2,
|
||||
max = 3,
|
||||
chance = 1
|
||||
}
|
||||
}
|
||||
type = "npc",
|
||||
hp_max = 20,
|
||||
hp_min = 20,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 5,
|
||||
armor = 100,
|
||||
passive = true,
|
||||
walk_chance = 50,
|
||||
stand_chance = 50,
|
||||
damage = 3,
|
||||
attack_type = "dogfight",
|
||||
pathfinding = 1,
|
||||
visual = "upright_sprite",
|
||||
visual_size = {x = 1, y = 2},
|
||||
collisionbox = PyuTestMobs.HUMAN_LIKE_CBOX,
|
||||
textures = {"player.png", "player_back.png"},
|
||||
follow = {"pyutest_mobs:coin"},
|
||||
runaway = true,
|
||||
view_range = 15,
|
||||
reach = 2,
|
||||
fear_height = 7,
|
||||
blood_amount = PyuTestMobs.ENTITY_BLOOD_AMOUNT,
|
||||
makes_footstep_sound = true,
|
||||
drops = {
|
||||
{
|
||||
name = "pyutest_core:bone",
|
||||
min = 2,
|
||||
max = 3,
|
||||
chance = 1
|
||||
}
|
||||
}
|
||||
})
|
||||
mobs:register_egg("pyutest_mobs:human", "Human Spawn Egg", "pyutest-egg.png^[multiply:peachpuff", 0)
|
||||
|
||||
mobs:register_mob("pyutest_mobs:mimic", {
|
||||
type = "monster",
|
||||
hp_max = 15,
|
||||
hp_min = 15,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
armor = 100,
|
||||
passive = false,
|
||||
stand_chance = 1,
|
||||
walk_chance = 0,
|
||||
damage = 4,
|
||||
attack_type = "dogfight",
|
||||
pathfinding = 1,
|
||||
visual = "cube",
|
||||
visual_size = {x = 1, y = 1, z = 1},
|
||||
collisionbox = {
|
||||
-0.25, -0.5, -0.25, 0.25, 0.5, 0.25
|
||||
},
|
||||
textures = {
|
||||
"pyutest-crate.png",
|
||||
"pyutest-crate.png",
|
||||
"pyutest-crate.png",
|
||||
"pyutest-crate.png",
|
||||
"pyutest-crate.png",
|
||||
"pyutest-crate.png"
|
||||
},
|
||||
view_range = 12,
|
||||
blood_amount = PyuTestMobs.ENTITY_BLOOD_AMOUNT,
|
||||
reach = 2,
|
||||
type = "monster",
|
||||
hp_max = 15,
|
||||
hp_min = 15,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
armor = 100,
|
||||
passive = false,
|
||||
stand_chance = 1,
|
||||
walk_chance = 0,
|
||||
damage = 4,
|
||||
attack_type = "dogfight",
|
||||
pathfinding = 1,
|
||||
visual = "cube",
|
||||
visual_size = {x = 1, y = 1, z = 1},
|
||||
collisionbox = {
|
||||
-0.25, -0.5, -0.25, 0.25, 0.5, 0.25
|
||||
},
|
||||
textures = {
|
||||
"pyutest-crate.png",
|
||||
"pyutest-crate.png",
|
||||
"pyutest-crate.png",
|
||||
"pyutest-crate.png",
|
||||
"pyutest-crate.png",
|
||||
"pyutest-crate.png"
|
||||
},
|
||||
view_range = 12,
|
||||
blood_amount = PyuTestMobs.ENTITY_BLOOD_AMOUNT,
|
||||
reach = 2,
|
||||
})
|
||||
mobs:register_egg("pyutest_mobs:mimic", "Mimic Spawn Egg", "pyutest-egg.png^[multiply:brown", 0)
|
||||
|
||||
mobs:register_mob("pyutest_mobs:firefly", {
|
||||
type = "animal",
|
||||
hp_max = 3,
|
||||
hp_min = 3,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
armor = 100,
|
||||
passive = true,
|
||||
stand_chance = 0,
|
||||
walk_chance = 100,
|
||||
fly = true,
|
||||
keep_flying = true,
|
||||
visual = "sprite",
|
||||
visual_size = {x = 0.05, y = 0.05},
|
||||
collisionbox = {
|
||||
-0.0, -0.0, -0.0, 0.0, 0.0, 0.0
|
||||
},
|
||||
textures = {"pyutest-firefly.png"},
|
||||
blood_amount = PyuTestMobs.ENTITY_BLOOD_AMOUNT,
|
||||
glow = 7,
|
||||
type = "animal",
|
||||
hp_max = 3,
|
||||
hp_min = 3,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
armor = 100,
|
||||
passive = true,
|
||||
stand_chance = 0,
|
||||
walk_chance = 100,
|
||||
fly = true,
|
||||
keep_flying = true,
|
||||
visual = "sprite",
|
||||
visual_size = {x = 0.05, y = 0.05},
|
||||
collisionbox = {
|
||||
-0.0, -0.0, -0.0, 0.0, 0.0, 0.0
|
||||
},
|
||||
textures = {"pyutest-firefly.png"},
|
||||
blood_amount = PyuTestMobs.ENTITY_BLOOD_AMOUNT,
|
||||
glow = 7,
|
||||
})
|
||||
mobs:register_egg("pyutest_mobs:firefly", "Firefly Spawn Egg", "pyutest-egg.png^[multiply:yellow", 0)
|
||||
|
@ -13,60 +13,62 @@ dofile(PyuTestMobs_Path.."/necromancer.lua")
|
||||
local mapgen = minetest.get_mapgen_params().mgname or "???"
|
||||
if mapgen ~= "flat" and mapgen ~= "singlenode" then
|
||||
mobs:spawn({
|
||||
name = "pyutest_mobs:monster",
|
||||
nodes = {"group:ground"},
|
||||
interval = 6,
|
||||
chance = 4,
|
||||
active_object_count = 3,
|
||||
min_light = 0,
|
||||
max_light = 8,
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = PyuTestCore_SurfaceBottom
|
||||
name = "pyutest_mobs:monster",
|
||||
nodes = {"group:ground"},
|
||||
interval = 4,
|
||||
chance = 1,
|
||||
active_object_count = 3,
|
||||
min_light = 0,
|
||||
max_light = 8,
|
||||
max_height = PyuTestCore_WorldTop,
|
||||
min_height = PyuTestCore_SurfaceBottom,
|
||||
day_toggle = false
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
name = "pyutest_mobs:monster",
|
||||
nodes = {"group:ground"},
|
||||
interval = 2,
|
||||
chance = 2,
|
||||
active_object_count = 6,
|
||||
min_light = 0,
|
||||
max_light = 8,
|
||||
y_max = PyuTestCore_DeepOceanMin - 1,
|
||||
y_min = PyuTestCore_WorldBottom
|
||||
name = "pyutest_mobs:monster",
|
||||
nodes = {"group:ground"},
|
||||
interval = 2,
|
||||
chance = 2,
|
||||
active_object_count = 6,
|
||||
min_light = 0,
|
||||
max_light = 8,
|
||||
min_height = PyuTestCore_SurfaceBottom - 1,
|
||||
max_height= PyuTestCore_WorldBottom
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
name = "pyutest_mobs:human",
|
||||
nodes = {"group:ground"},
|
||||
interval = 3,
|
||||
chance = 4,
|
||||
active_object_count = 3,
|
||||
min_light = 9,
|
||||
max_light = 15,
|
||||
min_height = PyuTestCore_SurfaceBottom,
|
||||
day_toggle = true,
|
||||
name = "pyutest_mobs:human",
|
||||
nodes = {"group:ground"},
|
||||
interval = 3,
|
||||
chance = 4,
|
||||
active_object_count = 3,
|
||||
min_light = 9,
|
||||
max_light = 15,
|
||||
min_height = PyuTestCore_SurfaceBottom,
|
||||
day_toggle = true,
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
name = "pyutest_mobs:mimic",
|
||||
nodes = {"group:ground"},
|
||||
interval = 3,
|
||||
chance = 18,
|
||||
active_object_count = 2,
|
||||
min_light = 0,
|
||||
max_light = 15,
|
||||
day_toggle = true,
|
||||
name = "pyutest_mobs:mimic",
|
||||
nodes = {"group:ground"},
|
||||
interval = 3,
|
||||
chance = 18,
|
||||
active_object_count = 2,
|
||||
min_light = 0,
|
||||
max_light = 15,
|
||||
day_toggle = true,
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
name = "pyutest_mobs:firefly",
|
||||
nodes = {"group:ground", "air"},
|
||||
interval = 3,
|
||||
chance = 3,
|
||||
active_object_count = 4,
|
||||
min_light = 0,
|
||||
max_light = 9,
|
||||
day_toggle = false,
|
||||
name = "pyutest_mobs:firefly",
|
||||
nodes = {"group:ground", "air"},
|
||||
interval = 3,
|
||||
chance = 3,
|
||||
active_object_count = 4,
|
||||
min_light = 0,
|
||||
max_light = 9,
|
||||
day_toggle = false,
|
||||
min_height = PyuTestCore_SurfaceBottom
|
||||
})
|
||||
end
|
||||
|
@ -1,46 +1,46 @@
|
||||
local necroball_hit_player = function (self, player)
|
||||
player:punch(self.object, nil, {
|
||||
damage_groups = {fleshy = 3}
|
||||
damage_groups = {fleshy = 3}
|
||||
}, nil)
|
||||
end
|
||||
|
||||
mobs:register_arrow("pyutest_mobs:arrow_necroball", {
|
||||
visual = "sprite",
|
||||
visual_size = {x = 1, y = 1},
|
||||
textures = {"pyutest-necroball.png"},
|
||||
hit_player = necroball_hit_player,
|
||||
hit_mob = necroball_hit_player,
|
||||
visual = "sprite",
|
||||
visual_size = {x = 1, y = 1},
|
||||
textures = {"pyutest-necroball.png"},
|
||||
hit_player = necroball_hit_player,
|
||||
hit_mob = necroball_hit_player,
|
||||
|
||||
hit_node = function(self, pos)
|
||||
math.randomseed(os.time())
|
||||
local num_minions = math.random(2, 3)
|
||||
local minions = {
|
||||
"pyutest_mobs:monster",
|
||||
"pyutest_mobs:mimic"
|
||||
}
|
||||
local m = minions[math.random(#minions)]
|
||||
hit_node = function(self, pos)
|
||||
math.randomseed(os.time())
|
||||
local num_minions = math.random(2, 3)
|
||||
local minions = {
|
||||
"pyutest_mobs:monster",
|
||||
"pyutest_mobs:mimic"
|
||||
}
|
||||
local m = minions[math.random(#minions)]
|
||||
|
||||
for i = 1, num_minions do
|
||||
mobs:add_mob(vector.add(pos, vector.new(0, 3, 0)), {
|
||||
name = m,
|
||||
child = false,
|
||||
nametag = "Necromancer Minion",
|
||||
ignore_count = true
|
||||
})
|
||||
end
|
||||
for i = 1, num_minions do
|
||||
mobs:add_mob(vector.add(pos, vector.new(0, 3, 0)), {
|
||||
name = m,
|
||||
child = false,
|
||||
nametag = "Necromancer Minion",
|
||||
ignore_count = true
|
||||
})
|
||||
end
|
||||
|
||||
self.object:remove()
|
||||
end,
|
||||
velocity = 18,
|
||||
collisionbox = {
|
||||
-1.5, -1.5, -1.5, 1.5, 1.5, 1.5
|
||||
}
|
||||
self.object:remove()
|
||||
end,
|
||||
velocity = 18,
|
||||
collisionbox = {
|
||||
-1.5, -1.5, -1.5, 1.5, 1.5, 1.5
|
||||
}
|
||||
})
|
||||
|
||||
mobs:register_mob("pyutest_mobs:necromancer", {
|
||||
type = "monster",
|
||||
hp_max = 325,
|
||||
hp_min = 325,
|
||||
hp_max = 125,
|
||||
hp_min = 125,
|
||||
walk_velocity = 2,
|
||||
run_velocity = 4,
|
||||
armor = 100,
|
||||
|
@ -1,76 +1,76 @@
|
||||
local snowball_hit_player = function (self, player)
|
||||
player:punch(self.object, nil, {
|
||||
damage_groups = {fleshy = 9}
|
||||
damage_groups = {fleshy = 5}
|
||||
}, nil)
|
||||
end
|
||||
|
||||
mobs:register_arrow("pyutest_mobs:arrow_snowball", {
|
||||
visual = "sprite",
|
||||
visual_size = {x = 1, y = 1},
|
||||
textures = {"pyutest-snowball.png"},
|
||||
hit_node = function (self, pos)
|
||||
PyuTestCore.create_explosion(pos, 1, false, 9, self.object, false)
|
||||
end,
|
||||
hit_player = snowball_hit_player,
|
||||
hit_mob = snowball_hit_player,
|
||||
velocity = 9,
|
||||
collisionbox = {
|
||||
-1.5, -1.5, -1.5, 1.5, 1.5, 1.5
|
||||
}
|
||||
visual = "sprite",
|
||||
visual_size = {x = 1, y = 1},
|
||||
textures = {"pyutest-snowball.png"},
|
||||
hit_node = function (self, pos)
|
||||
PyuTestCore.create_explosion(pos, 1, false, 9, self.object, false)
|
||||
end,
|
||||
hit_player = snowball_hit_player,
|
||||
hit_mob = snowball_hit_player,
|
||||
velocity = 9,
|
||||
collisionbox = {
|
||||
-1.5, -1.5, -1.5, 1.5, 1.5, 1.5
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
mobs:register_mob("pyutest_mobs:snowman", {
|
||||
type = "monster",
|
||||
hp_max = 450,
|
||||
hp_min = 450,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 4,
|
||||
armor = 100,
|
||||
passive = false,
|
||||
walk_chance = 1,
|
||||
stand_chance = 2,
|
||||
damage = 9,
|
||||
attack_chance = 1,
|
||||
attack_type = "dogshoot",
|
||||
arrow = "pyutest_mobs:arrow_snowball",
|
||||
shoot_interval = 0.75,
|
||||
shoot_offset = 2,
|
||||
homing = true,
|
||||
pathfinding = 1,
|
||||
visual = "upright_sprite",
|
||||
visual_size = {x = 1, y = 2},
|
||||
collisionbox = PyuTestMobs.HUMAN_LIKE_CBOX,
|
||||
physical = true,
|
||||
blood_amount = PyuTestMobs.ENTITY_BLOOD_AMOUNT,
|
||||
view_range = 35,
|
||||
reach = 2,
|
||||
jump = 1,
|
||||
group_attack = false,
|
||||
makes_footstep_sound = true,
|
||||
dogshoot_switch = 2,
|
||||
dogshoot_count_max = 3,
|
||||
dogshoot_count2_max = 6,
|
||||
type = "monster",
|
||||
hp_max = 150,
|
||||
hp_min = 150,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 4,
|
||||
armor = 100,
|
||||
passive = false,
|
||||
walk_chance = 1,
|
||||
stand_chance = 2,
|
||||
damage = 9,
|
||||
attack_chance = 1,
|
||||
attack_type = "dogshoot",
|
||||
arrow = "pyutest_mobs:arrow_snowball",
|
||||
shoot_interval = 0.75,
|
||||
shoot_offset = 2,
|
||||
homing = true,
|
||||
pathfinding = 1,
|
||||
visual = "upright_sprite",
|
||||
visual_size = {x = 1, y = 2},
|
||||
collisionbox = PyuTestMobs.HUMAN_LIKE_CBOX,
|
||||
physical = true,
|
||||
blood_amount = PyuTestMobs.ENTITY_BLOOD_AMOUNT,
|
||||
view_range = 35,
|
||||
reach = 2,
|
||||
jump = 1,
|
||||
group_attack = false,
|
||||
makes_footstep_sound = true,
|
||||
dogshoot_switch = 2,
|
||||
dogshoot_count_max = 3,
|
||||
dogshoot_count2_max = 6,
|
||||
|
||||
textures = {
|
||||
"pyutest-snowman.png", "pyutest-snowman_back.png"
|
||||
},
|
||||
textures = {
|
||||
"pyutest-snowman.png", "pyutest-snowman_back.png"
|
||||
},
|
||||
|
||||
drops = {
|
||||
{
|
||||
name = "pyutest_core:magic_shards",
|
||||
min = 2,
|
||||
max = 5,
|
||||
chance = 1
|
||||
},
|
||||
drops = {
|
||||
{
|
||||
name = "pyutest_core:magic_shards",
|
||||
min = 2,
|
||||
max = 5,
|
||||
chance = 1
|
||||
},
|
||||
|
||||
{
|
||||
name = "pyutest_core:snowball",
|
||||
min = 4,
|
||||
max = 9,
|
||||
chance = 1
|
||||
}
|
||||
}
|
||||
{
|
||||
name = "pyutest_core:snowball",
|
||||
min = 4,
|
||||
max = 9,
|
||||
chance = 1
|
||||
}
|
||||
}
|
||||
})
|
||||
PyuTestMobs.create_boss_egg("pyutest_mobs:snowman", "Snowman Spawn Egg",
|
||||
"pyutest-egg.png^[multiply:skyblue", 0, nil,
|
||||
|
@ -1,79 +1,79 @@
|
||||
local windball_hit_player = function (self, player)
|
||||
player:punch(self.object, nil, {
|
||||
damage_groups = {fleshy = 3}
|
||||
damage_groups = {fleshy = 3}
|
||||
}, nil)
|
||||
|
||||
math.randomseed(os.time())
|
||||
player:add_velocity({
|
||||
x = 0,
|
||||
z = 0,
|
||||
y = math.random(18, 25)
|
||||
x = 0,
|
||||
z = 0,
|
||||
y = math.random(18, 25)
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_arrow("pyutest_mobs:arrow_windball", {
|
||||
visual = "sprite",
|
||||
visual_size = {x = 1, y = 1},
|
||||
textures = {"pyutest-windball.png"},
|
||||
hit_player = windball_hit_player,
|
||||
hit_mob = windball_hit_player,
|
||||
velocity = 9,
|
||||
collisionbox = {
|
||||
-1.5, -1.5, -1.5, 1.5, 1.5, 1.5
|
||||
}
|
||||
visual = "sprite",
|
||||
visual_size = {x = 1, y = 1},
|
||||
textures = {"pyutest-windball.png"},
|
||||
hit_player = windball_hit_player,
|
||||
hit_mob = windball_hit_player,
|
||||
velocity = 9,
|
||||
collisionbox = {
|
||||
-1.5, -1.5, -1.5, 1.5, 1.5, 1.5
|
||||
}
|
||||
})
|
||||
|
||||
mobs:register_mob("pyutest_mobs:wind_warrior", {
|
||||
type = "monster",
|
||||
hp_max = 350,
|
||||
hp_min = 350,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 4,
|
||||
armor = 100,
|
||||
passive = false,
|
||||
walk_chance = 1,
|
||||
stand_chance = 2,
|
||||
damage = 9,
|
||||
attack_chance = 1,
|
||||
attack_type = "dogshoot",
|
||||
arrow = "pyutest_mobs:arrow_windball",
|
||||
shoot_interval = 0.75,
|
||||
shoot_offset = 2,
|
||||
homing = true,
|
||||
pathfinding = 1,
|
||||
visual = "upright_sprite",
|
||||
visual_size = {x = 1, y = 2},
|
||||
collisionbox = PyuTestMobs.HUMAN_LIKE_CBOX,
|
||||
physical = true,
|
||||
blood_amount = PyuTestMobs.ENTITY_BLOOD_AMOUNT,
|
||||
view_range = 35,
|
||||
reach = 2,
|
||||
jump = 1,
|
||||
group_attack = false,
|
||||
makes_footstep_sound = true,
|
||||
dogshoot_switch = 1,
|
||||
dogshoot_count_max = 3,
|
||||
dogshoot_count2_max = 6,
|
||||
type = "monster",
|
||||
hp_max = 120,
|
||||
hp_min = 120,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 4,
|
||||
armor = 100,
|
||||
passive = false,
|
||||
walk_chance = 1,
|
||||
stand_chance = 2,
|
||||
damage = 9,
|
||||
attack_chance = 1,
|
||||
attack_type = "dogshoot",
|
||||
arrow = "pyutest_mobs:arrow_windball",
|
||||
shoot_interval = 0.75,
|
||||
shoot_offset = 2,
|
||||
homing = true,
|
||||
pathfinding = 1,
|
||||
visual = "upright_sprite",
|
||||
visual_size = {x = 1, y = 2},
|
||||
collisionbox = PyuTestMobs.HUMAN_LIKE_CBOX,
|
||||
physical = true,
|
||||
blood_amount = PyuTestMobs.ENTITY_BLOOD_AMOUNT,
|
||||
view_range = 35,
|
||||
reach = 2,
|
||||
jump = 1,
|
||||
group_attack = false,
|
||||
makes_footstep_sound = true,
|
||||
dogshoot_switch = 1,
|
||||
dogshoot_count_max = 3,
|
||||
dogshoot_count2_max = 6,
|
||||
|
||||
textures = {
|
||||
"pyutest-wind-warrior.png", "pyutest-wind-warrior_back.png"
|
||||
},
|
||||
textures = {
|
||||
"pyutest-wind-warrior.png", "pyutest-wind-warrior_back.png"
|
||||
},
|
||||
|
||||
drops = {
|
||||
{
|
||||
name = "pyutest_core:magic_shards",
|
||||
min = 4,
|
||||
max = 7,
|
||||
chance = 1
|
||||
},
|
||||
drops = {
|
||||
{
|
||||
name = "pyutest_core:magic_shards",
|
||||
min = 4,
|
||||
max = 7,
|
||||
chance = 1
|
||||
},
|
||||
|
||||
{
|
||||
name = "pyutest_core:windball",
|
||||
min = 2,
|
||||
max = 4,
|
||||
chance = 1
|
||||
}
|
||||
}
|
||||
{
|
||||
name = "pyutest_core:windball",
|
||||
min = 2,
|
||||
max = 4,
|
||||
chance = 1
|
||||
}
|
||||
}
|
||||
})
|
||||
PyuTestMobs.create_boss_egg("pyutest_mobs:wind_warrior", "Wind Warrior Spawn Egg",
|
||||
"pyutest-egg.png^[multiply:white", 0, nil,
|
||||
|
BIN
textures/pyutest-diamond-axe.png
Normal file
BIN
textures/pyutest-diamond-axe.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 278 B |
Binary file not shown.
Before Width: | Height: | Size: 277 B After Width: | Height: | Size: 289 B |
BIN
textures/pyutest-iron-axe.png
Normal file
BIN
textures/pyutest-iron-axe.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 261 B |
BIN
textures/pyutest-stone-axe.png
Normal file
BIN
textures/pyutest-stone-axe.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 273 B |
BIN
textures/pyutest-wooden-axe.png
Normal file
BIN
textures/pyutest-wooden-axe.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 272 B |
Loading…
x
Reference in New Issue
Block a user