Remove old pyutest modpack

This commit is contained in:
IamPyu 2024-09-30 20:52:41 -06:00
parent b37c71c2f2
commit 287cfdcb4a
73 changed files with 0 additions and 3331 deletions

View File

View File

@ -1,3 +0,0 @@
name = pyutest
title = PyuTest
description = PyuTest core code

View File

@ -1,3 +0,0 @@
# pyutest_core
Core gameplay, blocks, tools, events, textures, etc.

View File

@ -1,583 +0,0 @@
if true then
return
end
PyuTest.make_node_sounds = function(tbl)
local t = tbl or {}
t.footstep = t.footstep or {name = "block_walk", gain = 1}
t.dig = t.dig or {name = "block_dig", gain = 0.50}
t.dug = t.dug or {name = "block_break", gain = 0.50}
t.place = t.place or {name = "block_place", gain = 0.50}
return t
end
PyuTest.make_node = function(name, desc, groups, tiles, extra_conf)
local conf = {
description = Translate(desc),
tiles = tiles,
groups = PyuTest.util.tableconcat(groups, {
block = 1
}),
}
if extra_conf ~= nil then
for k, v in pairs(extra_conf) do
conf[k] = v
end
conf["sounds"] = PyuTest.make_node_sounds(extra_conf.sounds)
end
minetest.register_node(name, conf)
end
PyuTest.node_boxes = {
CARPET = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5}
},
SLAB = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}
},
PILLAR = {
type = "fixed",
fixed = {-0.15, -0.5, -0.15, 0.15, 0.5, 0.15}
},
STAIRS = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
},
},
}
PyuTest.building_blocks = {}
PyuTest.make_building_blocks = function (name, desc, tex, colortint, cgroups, extra_conf)
local groups = PyuTest.util.tablecopy(cgroups) or {}
groups["block"] = 1
local econf = extra_conf or {}
econf["is_ground_content"] = econf["is_ground_content"] or true
econf["color"] = colortint
local id_block = name.."_block"
local id_carpet = name.."_carpet"
local id_slab = name.."_slab"
local id_pillar = name.."_pillar"
local id_stairs = name.."_stairs"
local id_fence = name.."_fence"
table.insert(PyuTest.building_blocks, {
name = name,
desc = desc,
tiles = tex,
groups = groups,
econf = econf
})
minetest.register_node(id_block, PyuTest.util.tableconcat({
description = Translate(desc.." Block"),
tiles = tex,
groups = PyuTest.util.tableconcat(groups, {
solid = 1
}),
sounds = PyuTest.make_node_sounds(),
}, econf))
minetest.register_node(id_carpet, PyuTest.util.tableconcat({
description = Translate(desc .. " Carpet"),
tiles = tex,
groups = PyuTest.util.tableconcat(PyuTest.util.tablecopy(groups), {
attached_node = 1
}),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
node_box = PyuTest.node_boxes.CARPET,
sounds = PyuTest.make_node_sounds(),
buildable_to = true
}, econf))
minetest.register_node(id_slab, PyuTest.util.tableconcat({
description = Translate(desc.." Slab"),
tiles = tex,
groups = groups,
drawtype = "nodebox",
paramtype = "light",
node_box = PyuTest.node_boxes.SLAB,
sounds = PyuTest.make_node_sounds(),
}, econf))
minetest.register_node(id_pillar, PyuTest.util.tableconcat({
description = Translate(desc.." Pillar"),
tiles = tex,
groups = groups,
drawtype = "nodebox",
paramtype = "light",
node_box = PyuTest.node_boxes.PILLAR,
sounds = PyuTest.make_node_sounds(),
}, econf))
minetest.register_node(id_stairs, PyuTest.util.tableconcat({
description = Translate(desc.." Stairs"),
tiles = tex,
groups = groups,
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
node_box = PyuTest.node_boxes.STAIRS,
sounds = PyuTest.make_node_sounds(),
}, econf))
minetest.register_node(id_fence, PyuTest.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 = PyuTest.make_node_sounds(),
}, econf))
minetest.register_craft({
output = id_carpet .. " 2",
recipe = {
{id_block, id_block}
}
})
minetest.register_craft({
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}
}
})
minetest.register_craft({
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}
}
})
end
PyuTest.make_building_blocks("pyutest_core:grass", "Grass", {
"pyutest-grass.png"
}, nil, {
ground = 1,
acid_vulnerable = 1,
grass = 1,
crumbly = PyuTest.BLOCK_FAST
})
PyuTest.make_building_blocks("pyutest_core:dark_grass", "Dark Grass", {
"pyutest-dark-grass.png"
}, nil, {
ground = 1,
acid_vulnerable = 1,
grass = 1,
crumbly = PyuTest.BLOCK_FAST
})
PyuTest.make_building_blocks("pyutest_core:swampy_grass", "Swampy Grass", {
"pyutest-swampy-grass.png"
}, nil, {
ground = 1,
acid_vulnerable = 1,
sugarcane_spawn_on = 1,
grass = 1,
crumbly = PyuTest.BLOCK_FAST
})
PyuTest.make_building_blocks("pyutest_core:savanna_grass", "Savanna Grass", {
"pyutest-savanna-grass.png"
}, nil, {
ground = 1,
acid_vulnerable = 1,
sugarcane_spawn_on = 1,
grass = 1,
crumbly = PyuTest.BLOCK_FAST
})
PyuTest.make_building_blocks("pyutest_core:aspen_grass", "Aspen Grass", {
"pyutest-aspen-grass.png"
}, nil, {
ground = 1,
acid_vulnerable = 1,
grass = 1,
crumbly = PyuTest.BLOCK_FAST
})
PyuTest.make_building_blocks("pyutest_core:jungle_grass", "Jungle Grass", {
"pyutest-jungle-grass.png"
}, nil, {
ground = 1,
acid_vulnerable = 1,
grass = 1,
crumbly = PyuTest.BLOCK_FAST
})
PyuTest.make_building_blocks("pyutest_core:dirt", "Dirt", {"pyutest-dirt.png"}, nil, {
ground = 1,
acid_vulnerable = 1,
crumbly = PyuTest.BLOCK_FAST
})
PyuTest.make_building_blocks("pyutest_core:podzol", "Podzol", {"pyutest-podzol.png"}, nil, {
ground = 1,
acid_vulnerable = 1,
crumbly = PyuTest.BLOCK_FAST
})
PyuTest.make_building_blocks("pyutest_core:snow", "Snow", {"pyutest-snow.png"}, nil, {
ground = 1,
acid_vulnerable = 1,
crumbly = PyuTest.BLOCK_FAST
})
PyuTest.make_building_blocks("pyutest_core:sand", "Sand", {"pyutest-sand.png"}, nil, {
ground = 1,
acid_vulnerable = 1,
falling_node = 1,
sugarcane_spawn_on = 1,
crumbly = PyuTest.BLOCK_FAST
})
PyuTest.make_building_blocks("pyutest_core:mycelium", "Mycelium", {
"pyutest-mycelium.png"
}, nil, {
ground = 1,
crumbly = PyuTest.BLOCK_FAST
})
PyuTest.make_building_blocks("pyutest_core:clay", "Clay", {"pyutest-clay-block.png"}, nil, {
acid_vulnerable = 1,
crumbly = PyuTest.BLOCK_FAST
})
PyuTest.make_building_blocks("pyutest_core:gravel", "Gravel", {"pyutest-gravel.png"}, nil, {
falling_node = 1,
acid_vulnerable = 1,
crumbly = PyuTest.BLOCK_FAST
})
-- Cracky
PyuTest.make_building_blocks("pyutest_core:stone", "Stone", {"pyutest-stone.png"}, nil, {
ground = 1,
stone = 1,
cracky = PyuTest.BLOCK_NORMAL,
level = 1
}, {is_ground_content = false})
PyuTest.make_building_blocks("pyutest_core:darkstone", "Darkstone", {"pyutest-darkstone.png"}, nil, {
ground = 1,
stone = 1,
cracky = PyuTest.BLOCK_NORMAL,
level = 1
}, {is_ground_content = false})
PyuTest.make_building_blocks("pyutest_core:sandstone", "Sandstone", {"pyutest-sandstone.png"}, nil, {
ground = 1,
acid_vulnerable = 1,
cracky = PyuTest.BLOCK_FAST,
}, {is_ground_content = false})
PyuTest.make_building_blocks("pyutest_core:ice", "Ice", {"pyutest-ice.png"}, nil, {
ground = 1,
acid_vulnerable = 1,
slippery = 4,
cracky = PyuTest.BLOCK_FAST,
thawable = 1
})
PyuTest.make_building_blocks("pyutest_core:molten_rock", "Molten Rock", {"pyutest-molten-rock.png"}, nil, {
ground = 1,
cracky = PyuTest.BLOCK_FAST,
}, {is_ground_content = false})
PyuTest.make_building_blocks("pyutest_core:basalt", "Basalt", {"pyutest-basalt.png"}, nil, {
ground = 1,
cracky = PyuTest.BLOCK_FAST,
}, {is_ground_content = false})
PyuTest.make_building_blocks("pyutest_core:obsidian", "Obsidian", {"pyutest-obsidian.png"}, nil, {
cracky = PyuTest.BLOCK_SLOW,
}, {is_ground_content = false})
PyuTest.make_building_blocks("pyutest_core:crystal_lantern", "Crystal Lantern", {"pyutest-crystal-lantern.png"}, nil, {
cracky = PyuTest.BLOCK_FAST
}, {
light_source = minetest.LIGHT_MAX,
paramtype = "light"
})
PyuTest.make_building_blocks("pyutest_core:bone", "Bone", {
"pyutest-bone-block-top-bottom.png",
"pyutest-bone-block-top-bottom.png",
"pyutest-bone-block.png"
}, nil, {
cracky = PyuTest.BLOCK_FAST
})
PyuTest.make_building_blocks("pyutest_core:enchanted_obsidian", "Enchanted Obsidian", {
"pyutest-enchanted-obsidian.png"
}, nil, {
cracky = PyuTest.BLOCK_SLOW
}, {
is_ground_content = false
})
PyuTest.make_building_blocks("pyutest_core:brick", "Brick", {"pyutest-bricks.png"}, nil, {
cracky = PyuTest.BLOCK_NORMAL
}, {
is_ground_content = false
})
PyuTest.make_building_blocks("pyutest_core:stone_bricks", "Stone Bricks", {"pyutest-stone-bricks.png"}, nil, {
cracky = PyuTest.BLOCK_SLOW
}, {
is_ground_content = false
})
-- Choppy
PyuTest.make_building_blocks("pyutest_core:mushroom", "Mushroom", {"pyutest-mushroom.png"}, nil, {
flammable = 1,
choppy = PyuTest.BLOCK_FAST
}, {is_ground_content = false})
PyuTest.make_building_blocks("pyutest_core:mushroom_stem", "Mushroom Stem", {"pyutest-mushroom-stem.png"}, nil, {
flammable = 1,
choppy = PyuTest.BLOCK_FAST
}, {is_ground_content = false})
PyuTest.make_building_blocks("pyutest_core:purple_mushroom", "Purple Mushroom", {
"pyutest-purple-mushroom.png"
}, nil, {
flammable = 1,
choppy = PyuTest.BLOCK_FAST
}, {is_ground_content = false})
-- Breakable by hand
PyuTest.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 = PyuTest.BLOCK_FAST
})
PyuTest.make_building_blocks("pyutest_core:slime", "Slime", {"pyutest-slime.png"}, nil, {
bouncy = 85,
oddly_breakable_by_hand = PyuTest.BLOCK_FAST
})
PyuTest.make_building_blocks("pyutest_core:glowslime", "Glowslime", {"pyutest-glowslime.png"}, nil, {
bouncy = 85,
oddly_breakable_by_hand = PyuTest.BLOCK_FAST
}, {
paramtype = "light",
light_source = minetest.LIGHT_MAX
})
PyuTest.make_node("pyutest_core:sponge", "Sponge", {
oddly_breakable_by_hand = PyuTest.BLOCK_FAST
}, {"pyutest-sponge.png"})
PyuTest.make_node("pyutest_core:light", "Light", {
light = 1,
dig_immediate = 1,
oddly_breakable_by_hand = PyuTest.BLOCK_FAST
}, {
"pyutest-light.png"
}, {
drawtype = "torchlike",
walkable = false,
paramtype = "light",
sunlight_propagates = true,
light_source = minetest.LIGHT_MAX,
floodable = true
})
PyuTest.make_node("pyutest_core:torch", "Torch", {
dig_immediate = 1,
light = 1,
attached_node = 1,
oddly_breakable_by_hand = PyuTest.BLOCK_FAST
}, {
"pyutest-torch.png",
"pyutest-torch.png^[transform6",
"pyutest-torch.png^[transform1"
}, {
light_source = minetest.LIGHT_MAX,
walkable = false,
drawtype = "torchlike",
paramtype = "light",
inventory_image = "pyutest-torch.png",
paramtype2 = "wallmounted",
floodable = true
})
PyuTest.make_node("pyutest_core:glass", "Glass", {
cracky = PyuTest.BLOCK_NORMAL
}, {"pyutest-glass.png"}, {
drawtype = "glasslike_framed",
paramtype = "light",
sunlight_propagates = true
})
-- FIXME: This has been in the game for a month, implement it already!
PyuTest.make_node("pyutest_core:trapdoor", "Trapdoor", {
choppy = PyuTest.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}
}
})
PyuTest.make_node("pyutest_core:contagious_acid", "Contagious Acid", {
crumbly = PyuTest.BLOCK_NORMAL,
solid_node = 1
}, {"pyutest-acid.png"}, {})
PyuTest.make_node("pyutest_core:fire", "Fire", {
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"
})
PyuTest.make_node("pyutest_core:tnt", "TNT", {
dig_immediate = 1,
oddly_breakable_by_hand = PyuTest.BLOCK_FAST
}, {
"pyutest-tnt-top-bottom.png",
"pyutest-tnt-top-bottom.png",
"pyutest-tnt-side.png" -- Affects all other sides
}, {
on_rightclick = function (pos, node, clicker)
minetest.after(3, function()
if minetest.get_node(pos).name ~= "pyutest_core:tnt" then
return
end
PyuTest.create_explosion(pos, 3, true, 7, clicker, true)
end)
end,
__on_electricity_activated = function (pos, node, clicker, sender_pos)
minetest.after(3, function()
if minetest.get_node(pos).name ~= "pyutest_core:tnt" then
return
end
PyuTest.create_explosion(pos, 3, true, 7, clicker, true)
end)
end,
})
PyuTest.make_node("pyutest_core:crate", "Crate", {
choppy = PyuTest.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,
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
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
})
PyuTest.make_node("pyutest_core:workbench", "Workbench", {
choppy = PyuTest.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
})
PyuTest.make_node("pyutest_core:ladder", "Ladder", {
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"
})
PyuTest.make_node("pyutest_core:magma", "Magma", {
cracky = PyuTest.BLOCK_NORMAL
}, {"pyutest-magma.png"}, {
paramtype = "light",
light_source = 11,
damage_per_second = 3
})

View File

@ -1,18 +0,0 @@
PyuTest.make_sword = function (nsname, desc, texture, damage, durability, atkspeed)
PyuTest.make_tool(nsname, desc, {
weapon = 1
}, texture, {
stack_max = 1,
tool_capabilities = PyuTest.tool_caps({
uses = durability / 2,
attack_uses = durability,
damage_groups = {fleshy = damage or 3},
full_punch_interval = atkspeed or 1
})
})
end
PyuTest.make_sword("pyutest_core:wooden_sword", "Wooden Sword", "pyutest-wooden-sword.png", 4, 69, 1.1)
PyuTest.make_sword("pyutest_core:stone_sword", "Stone Sword", "pyutest-stone-sword.png", 5, 274, 1.05)
PyuTest.make_sword("pyutest_core:iron_sword", "Iron Sword", "pyutest-iron-sword.png", 6, 689, 0.8)
PyuTest.make_sword("pyutest_core:diamond_sword", "Diamond Sword", "pyutest-diamond-sword.png", 7, 1345, 0.7)

View File

@ -1 +0,0 @@

View File

@ -1,118 +0,0 @@
PyuTest.registered_flowers = {}
PyuTest.make_flower = function (name, desc, texture, dye, add_to_registry, drawtype, econf)
PyuTest.make_node(name, desc, {
flammable = 1,
flower = 1,
attached_node = 3,
dig_immediate = 1,
oddly_breakable_by_hand = PyuTest.BLOCK_FAST
}, {texture}, PyuTest.util.tableconcat({
drawtype = drawtype or "plantlike",
walkable = false,
waving = 1,
buildable_to = true,
paramtype = "light",
sunlight_propagates = true,
inventory_image = texture,
floodable = true
}, econf or {}))
if dye ~= nil then
minetest.register_craft({
output = dye .. " 2",
recipe = {name},
type = "shapeless"
})
end
-- This is for plants like deadbushes which I do not want spawning in for say, Forests.
if add_to_registry then
table.insert(PyuTest.registered_flowers, name)
end
end
-- Plants from before the floral update
PyuTest.make_flower("pyutest_core:rose", "Rose", "pyutest-flower.png", "pyutest_core:red_dye", true)
PyuTest.make_flower("pyutest_core:dandelion", "Dandelion", "pyutest-flower2.png", "pyutest_core:yellow_dye", true)
PyuTest.make_flower("pyutest_core:blue_daisy", "Blue Daisy", "pyutest-flower3.png", "pyutest_core:blue_dye", true)
PyuTest.make_flower("pyutest_core:lavender", "Lavender", "pyutest-flower4.png", "pyutest_core:purple_dye", true)
minetest.register_alias("pyutest_core:flower", "pyutest_core:rose")
minetest.register_alias("pyutest_core:flower2", "pyutest_core:dandelion")
minetest.register_alias("pyutest_core:flower3", "pyutest_core:blue_daisy")
minetest.register_alias("pyutest_core:flower4", "pyutest_core:lavender")
PyuTest.make_flower("pyutest_core:deadbush", "Deadbush", "pyutest-deadbush.png", "pyutest_core:brown_dye")
PyuTest.make_flower("pyutest_core:grass_plant", "Grass", "pyutest-grass-plant.png", "pyutest_core:green_dye")
PyuTest.make_flower("pyutest_core:sugarcane", "Sugarcane", "pyutest-sugarcane.png", "pyutest_core:green_dye", false, nil)
PyuTest.make_node("pyutest_core:lilypad", "Lily Pad", {
block = PyuTest.BLOCK_BREAKABLE_INSTANT
}, {"pyutest-lilypad.png"}, {
drawtype = "signlike",
paramtype = "light",
paramtype2 = "facedir",
buildable_to = true,
sunlight_propagates = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -31/64, -0.5, 0.5, -15/32, 0.5}
},
})
-- Plants after the floral update
PyuTest.make_flower("pyutest_core:maybell", "Maybell", "pyutest-maybell.png", "pyutest_core:white_dye", true)
PyuTest.make_flower("pyutest_core:orange_tulip", "Orange Tulip", "pyutest-orange-tulip.png", "pyutest_core:orange_dye", true)
PyuTest.make_flower("pyutest_core:black_rose", "Black Rose", "pyutest-black-rose.png", "pyutest_core:black_dye", false)
PyuTest.make_node("pyutest_core:vines", "Vines", {
block = PyuTest.BLOCK_BREAKABLE_INSTANT,
attached_node = 1,
flammable = 1
}, {"pyutest-vines.png"}, {
drawtype = "signlike",
paramtype = "light",
walkable = false,
climbable = true,
buildable_to = true,
sunlight_propagates = true,
paramtype2 = "wallmounted",
selection_box = {
type = "wallmounted"
},
inventory_image = "pyutest-vines.png"
})
PyuTest.make_flower("pyutest_core:kelp", "Kelp", "pyutest-kelp.png", "pyutest_core:green_dye", false, "plantlike_rooted", {
paramtype2 = "leveled",
place_param2 = 128,
wield_image = "pyutest-kelp.png",
special_tiles = {
{
image = "pyutest-kelp.png",
tileable_vertical = true
},
},
tiles = {
"pyutest-gravel.png"
},
walkable = true
})
PyuTest.make_flower("pyutest_core:small_mushroom",
"Small Mushroom",
"pyutest-mushroom-small.png",
"pyutest_core:red_dye",
false, nil, {
groups = {
block = PyuTest.BLOCK_BREAKABLE_INSTANT,
flammable = 1,
flower = 1,
dig_immediate = 1,
attached_node = 1
},
paramtype2 = "wallmounted"
})

View File

@ -1,16 +0,0 @@
PyuTest.make_food = function (nsname, desc, wield_image, health_fill, extra_code)
local code = extra_code or function()end
PyuTest.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
PyuTest.make_food("pyutest_core:apple", "Apple", "pyutest-apple.png", 6)
PyuTest.make_food("pyutest_core:bread", "Bread", "pyutest-bread.png", 4)
PyuTest.make_food("pyutest_core:water_bottle", "Water Bottle", "pyutest-water-bottle.png", 0)

View File

@ -1,85 +0,0 @@
local function furnace_formspec(pos)
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[context;src;1,1;1,1;]",
"list[context;fuel;1,2.5;1,1;]",
"list[context;dst;5,1.25;2,2;]",
"button[0,3.5;4,2;smelt;Smelt]",
"button[4,3.5;4,2;smelt3;Smelt 3]",
"list[current_player;main;0,5;8,4;]"
}
return table.concat(formspec)
end
PyuTest.make_node("pyutest_core:furnace", "Furnace", {
cracky = PyuTest.BLOCK_NORMAL,
level = 1
}, {
"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
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)
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
}
})
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.smelt3 then
for i = 1, 3 do
smelt()
end
end
end,
})

View File

@ -1,33 +0,0 @@
if true then
return
end
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")
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.."/lootboxes.lua")
dofile(PyuTestCore_Path.."/ores.lua")
dofile(PyuTestCore_Path.."/abms.lua")
dofile(PyuTestCore_Path.."/magic.lua")
dofile(PyuTestCore_Path.."/crafts.lua")
dofile(PyuTestCore_Path.."/furnace.lua")
dofile(PyuTestCore_Path.."/overrides.lua")
dofile(PyuTestCore_Path.."/furniture.lua")
dofile(PyuTestCore_Path.."/electricity.lua")

View File

@ -1,53 +0,0 @@
PyuTest.make_item = function (nsname, desc, groups, wield_image, extra_conf)
local conf = {
description = Translate(desc),
wield_image = wield_image,
inventory_image = wield_image,
groups = groups
}
if extra_conf ~= nil then
for k, v in pairs(extra_conf) do
conf[k] = v
end
end
minetest.register_craftitem(nsname, conf)
end
PyuTest.make_item("pyutest_core:stick", "Stick", {}, "pyutest-stick.png")
PyuTest.make_item("pyutest_core:bone", "Bone", {}, "pyutest-bone.png", {})
PyuTest.make_item("pyutest_core:gunpowder", "Gunpowder", {}, "pyutest-powder.png", {
color = "dimgray",
})
PyuTest.make_item("pyutest_core:ash", "Ash", {}, "pyutest-powder.png", {
color = "gray",
})
PyuTest.make_item("pyutest_core:sugar", "Sugar", {}, "pyutest-powder.png")
PyuTest.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
})
PyuTest.make_item("pyutest_core:wheat", "Wheat", {}, "pyutest-wheat.png")
PyuTest.make_item("pyutest_core:string", "String", {}, "pyutest-string.png")
PyuTest.make_item("pyutest_core:egg", "Egg", {}, "pyutest-egg.png", {
color = "peachpuff"
})
PyuTest.make_item("pyutest_core:clay", "Clay Ball", {}, "pyutest-clay.png")
PyuTest.make_item("pyutest_core:glass_bottle", "Glass Bottle", {}, "pyutest-glass-bottle.png", {
stack_max = 16
})
PyuTest.make_item("pyutest_core:brick", "Brick", {}, "pyutest-brick.png")
PyuTest.make_item("pyutest_core:snowball", "Snowball", {}, "pyutest-snowball.png")
PyuTest.make_item("pyutest_core:bone", "Bone", {}, "pyutest-bone.png")

View File

@ -1,62 +0,0 @@
PyuTest.registered_lootboxes = {}
PyuTest.make_lootbox = function (name, dname, items)
local id = name.."_lootbox"
minetest.register_node(id, {
description = Translate(dname .. " Lootbox"),
groups = {
choppy = PyuTest.BLOCK_NORMAL,
not_in_creative_inventory = 1
},
tiles = {"pyutest-crate.png"},
sounds = PyuTest.make_node_sounds(),
drop = "",
after_destruct = function (pos)
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
})
PyuTest.registered_lootboxes[name] = {
id = id,
items = items
}
end
PyuTest.make_lootbox("pyutest_core:trash", "Trash", {
ItemStack("pyutest_core:deadbush 6"),
ItemStack("pyutest_core:bone 3"),
ItemStack("pyutest_core:ash 2")
})
PyuTest.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")
})
PyuTest.make_lootbox("pyutest_core:griefer", "Griefer's Dream", {
ItemStack("pyutest_core:tnt 3"),
ItemStack("pyutest_core:bomb 2")
})
PyuTest.make_lootbox("pyutest_core:lighting", "Lighting", {
ItemStack("pyutest_core:light 2"),
ItemStack("pyutest_core:torch 5")
})
PyuTest.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")
})

View File

@ -1 +0,0 @@

View File

@ -1 +0,0 @@
name = pyutest_core

View File

@ -1,371 +0,0 @@
PyuTest.make_building_blocks("pyutest_core:granite", "Granite", {"pyutest-granite.png"}, nil, {
ground = 1,
stone = 1,
cracky = PyuTest.BLOCK_NORMAL,
level = 1
})
PyuTest.make_building_blocks("pyutest_core:andesite", "Andesite", {"pyutest-andesite.png"}, nil, {
ground = 1,
stone = 1,
cracky = PyuTest.BLOCK_NORMAL,
level = 1
})
PyuTest.SPECIALSTONE_NOISE_PARAMS = {
offset = 0,
scale = 1,
spread = {x = 250, y = 250, z = 250},
seed = 1536,
octaves = 3,
persist = 0.4,
lacunarity = 2,
flags = "defaults"
}
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 = PyuTest.SURFACE_BOTTOM - 1,
y_min = PyuTest.OVERWORLD_BOTTOM,
noise_params = PyuTest.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 = PyuTest.SURFACE_BOTTOM - 1,
y_min = PyuTest.OVERWORLD_BOTTOM,
noise_params = PyuTest.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 = PyuTest.SURFACE_BOTTOM - 1,
y_min = PyuTest.DEAP_OCEAN_MIN,
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
PyuTest.ORE_STONES = {
"pyutest_core:stone_block",
"pyutest_core:granite_block",
"pyutest_core:andesite_block",
}
-- TODO: The code here is very messy, and this function takes to much arguments. Squash the arguments into a table and clean the code.
PyuTest.registered_ores = {}
PyuTest.make_ore = function(id, desc, item_id_suffix, item_description_suffix, options)
local default_options = {
scarcity = 5 * 5 * 5,
y_max = 31000,
ore_strength = PyuTest.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.."_"..item_id_suffix
local rid = conf.make_raw and id.."_raw" or nil
minetest.register_node(oid, PyuTest.util.tableconcat({
description = Translate(desc .. " Ore"),
groups = PyuTest.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 = PyuTest.make_node_sounds(conf.ore_sounds),
tiles = conf.ore_tiles
}, conf.ore_conf))
minetest.register_craftitem(iid, PyuTest.util.tableconcat({
description = Translate(desc .. " " .. item_description_suffix),
groups = PyuTest.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, PyuTest.util.tableconcat({
description = Translate("Raw " .. desc),
groups = PyuTest.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 = PyuTest.ORE_STONES,
clust_scarcity = conf.scarcity,
clust_num_ores = 4,
clust_size = 3,
y_max = conf.y_max,
y_min = PyuTest.OVERWORLD_BOTTOM,
})
minetest.register_ore({
ore_type = "scatter",
ore = oid,
wherein = PyuTest.ORE_STONES,
clust_scarcity = conf.scarcity * 2.2,
clust_num_ores = 9,
clust_size = 3,
y_max = conf.y_max,
y_min = PyuTest.OVERWORLD_BOTTOM,
})
minetest.register_ore({
ore_type = "scatter",
ore = oid,
wherein = PyuTest.ORE_STONES,
clust_scarcity = conf.scarcity * 3,
clust_num_ores = 18,
clust_size = 6,
y_max = conf.y_max,
y_min = PyuTest.OVERWORLD_BOTTOM,
})
PyuTest.make_building_blocks(id, desc, conf.block_tiles, conf.block_color, PyuTest.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}
}
})
minetest.register_craft({
output = iid .. " 4",
recipe = {
bid
},
type = "shapeless"
})
end
-- "Primary" Ores
PyuTest.make_ore("pyutest_core:coal", "Coal", "lump", "Lump", {
scarcity = 8 * 8 * 8,
y_max = 48,
ore_strength = PyuTest.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}
},
block_tiles = {"pyutest-metal.png"},
block_color = {r = 32, g = 32, b = 32}
})
PyuTest.make_ore("pyutest_core:iron", "Iron", "ingot", "Ingot", {
scarcity = 11 * 11 * 11,
y_max = 18,
ore_strength = PyuTest.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"}
})
PyuTest.make_ore("pyutest_core:copper", "Copper", "ingot", "Ingot", {
scarcity = 11 * 11 * 11,
y_max = 18,
ore_strength = PyuTest.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"
})
PyuTest.make_ore("pyutest_core:gold", "Gold", "ingot", "Ingot", {
scarcity = 15.5 * 15.5 * 15.5,
y_max = -35,
ore_strength = PyuTest.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"
})
PyuTest.make_ore("pyutest_core:diamond", "Diamond", "shard", "Shard", {
scarcity = 16.7 * 16.7 * 16.7,
y_max = -50,
ore_strength = PyuTest.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"
})
PyuTest.make_ore("pyutest_core:emerald", "Emerald", "shard", "Shard", {
scarcity = 18.3 * 18.3 * 18.3,
y_max = -50,
ore_strength = PyuTest.BLOCK_NORMAL,
ore_tiles = {"pyutest-ore-emerald.png"},
ore_level = 3,
item_texture = "pyutest-shard.png",
item_conf = {
color = "seagreen"
},
block_tiles = {"pyutest-metal.png"},
block_color = "seagreen"
})
PyuTest.make_ore("pyutest_core:zinc", "Zinc", "ingot", "Ingot", {
scarcity = 11 * 11 * 11,
y_max = 18,
ore_strength = PyuTest.BLOCK_NORMAL,
ore_tiles = {"pyutest-ore-zinc.png"},
ore_level = 2,
item_texture = "pyutest-ingot.png",
item_conf = {
color = "#bed3d4"
},
make_raw = true,
raw_texture = "pyutest-lump.png",
raw_conf = {
color = "#bed3d4"
},
block_tiles = {"pyutest-metal.png"},
block_color = "#bed3d4"
})
-- "Secondary" Ores
PyuTest.make_ore("pyutest_core:tin", "Tin", "ingot", "Ingot", {
scarcity = 11 * 11 * 11,
y_max = 18,
ore_strength = PyuTest.BLOCK_NORMAL,
ore_tiles = {"pyutest-ore-tin.png"},
ore_levle = 2,
item_texture = "pyutest-ingot.png",
item_conf = {
color = "#8e8591"
},
make_raw = true,
raw_texture = "pyutest-lump.png",
raw_conf = {
color = "#8e8591"
},
block_tiles = {"pyutest-metal.png"},
block_color = "#8e8591"
})

View File

@ -1,14 +0,0 @@
minetest.override_item("pyutest_core:clay_block", {
drop = "pyutest_core:clay 3"
})
minetest.override_item("pyutest_core:coal_lump", {
groups = {
fuel = 1
}
})
minetest.override_item("pyutest_core:bone_block", {
paramtype2 = "facedir",
on_place = minetest.rotate_node
})

View File

@ -1,149 +0,0 @@
-- 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
})
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, PyuTest.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,
})
end
minetest.register_globalstep(function(dtime)
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)
-- player hand
minetest.register_item(":", {
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 = PyuTest.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 = PyuTest.tool_caps({
uses = 0,
attck_uses = 0,
damage_groups = {fleshy = 2},
groupcaps = {
oddly_breakable_by_hand = {
times = {
[PyuTest.BLOCK_FAST] = 0.35,
[PyuTest.BLOCK_NORMAL] = 0.50,
[PyuTest.BLOCK_SLOW] = 0.65,
}
},
snappy = {
times = {
[PyuTest.BLOCK_FAST] = 0.55,
[PyuTest.BLOCK_NORMAL] = 0.70,
[PyuTest.BLOCK_SLOW] = 0.70
}
},
crumbly = {
times = {
[PyuTest.BLOCK_FAST] = 0.75,
[PyuTest.BLOCK_NORMAL] = 0.80,
[PyuTest.BLOCK_SLOW] = 0.90
}
},
choppy = {
times = {
[PyuTest.BLOCK_FAST] = 1.2,
[PyuTest.BLOCK_NORMAL] = 2.3,
[PyuTest.BLOCK_SLOW] = 2.9,
}
},
cracky = {
times = {
[PyuTest.BLOCK_FAST] = 6,
[PyuTest.BLOCK_NORMAL] = 10,
[PyuTest.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
end)
-- player death message
minetest.register_on_dieplayer(function(player, reason)
local playername = player:get_player_name()
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
end)

View File

@ -1,170 +0,0 @@
PyuTest.make_tool = function (nsname, desc, groups, wield_image, extra_conf)
local conf = {
description = Translate(desc),
wield_image = wield_image,
inventory_image = wield_image,
groups = PyuTest.util.tableconcat(groups, {
tool = 1
})
}
if extra_conf ~= nil then
for k, v in pairs(extra_conf) do
conf[k] = v
end
end
minetest.register_tool(nsname, conf)
end
PyuTest.make_tool("pyutest_core:wooden_pickaxe", "Wooden Pickaxe", {}, "pyutest-wooden-pickaxe.png", {
stack_max = 1,
tool_capabilities = PyuTest.tool_caps({
uses = 69,
attack_uses = 69 / 2,
maxlevel = 1,
groupcaps = {
cracky = {
times = {
[PyuTest.BLOCK_FAST] = 2,
[PyuTest.BLOCK_NORMAL] = 3
}
}
}
})
})
PyuTest.make_tool("pyutest_core:stone_pickaxe", "Stone Pickaxe", {}, "pyutest-stone-pickaxe.png", {
stack_max = 1,
tool_capabilities = PyuTest.tool_caps({
uses = 274,
attack_uses = 274 / 2,
maxlevel = 2,
groupcaps = {
cracky = {
times = {
[PyuTest.BLOCK_FAST] = 1.8,
[PyuTest.BLOCK_NORMAL] = 2.4
}
}
}
})
})
PyuTest.make_tool("pyutest_core:iron_pickaxe", "Iron Pickaxe", {}, "pyutest-iron-pickaxe.png", {
stack_max = 1,
tool_capabilities = PyuTest.tool_caps({
uses = 689,
attack_uses = 689 / 2,
maxlevel = 3,
groupcaps = {
cracky = {
times = {
[PyuTest.BLOCK_FAST] = 0.7,
[PyuTest.BLOCK_NORMAL] = 1.5
}
}
}
})
})
PyuTest.make_tool("pyutest_core:diamond_pickaxe", "Diamond Pickaxe", {}, "pyutest-diamond-pickaxe.png", {
stack_max = 1,
tool_capabilities = PyuTest.tool_caps({
uses = 1345,
attack_uses = 1345 / 2,
maxlevel = 3,
groupcaps = {
cracky = {
times = {
[PyuTest.BLOCK_FAST] = 0.3,
[PyuTest.BLOCK_NORMAL] = 0.8,
[PyuTest.BLOCK_SLOW] = 8
}
}
}
})
})
PyuTest.make_tool("pyutest_core:wooden_axe", "Wooden Axe", {}, "pyutest-wooden-axe.png", {
stack_max = 1,
tool_capabilities = PyuTest.tool_caps({
uses = 69,
attack_uses = 69 / 2,
groupcaps = {
choppy = {
times = {
[PyuTest.BLOCK_FAST] = 1.1,
[PyuTest.BLOCK_NORMAL] = 1.6,
[PyuTest.BLOCK_SLOW] = 2.2
}
}
}
})
})
PyuTest.make_tool("pyutest_core:stone_axe", "Stone Axe", {}, "pyutest-stone-axe.png", {
stack_max = 1,
tool_capabilities = PyuTest.tool_caps({
uses = 274,
attack_uses = 274 / 2,
groupcaps = {
choppy = {
times = {
[PyuTest.BLOCK_FAST] = 0.98,
[PyuTest.BLOCK_NORMAL] = 1.23,
[PyuTest.BLOCK_SLOW] = 2
}
}
}
})
})
PyuTest.make_tool("pyutest_core:iron_axe", "Iron Axe", {}, "pyutest-iron-axe.png", {
stack_max = 1,
tool_capabilities = PyuTest.tool_caps({
uses = 689,
attack_uses = 689 / 2,
groupcaps = {
choppy = {
times = {
[PyuTest.BLOCK_FAST] = 0.4,
[PyuTest.BLOCK_NORMAL] = 0.6,
[PyuTest.BLOCK_SLOW] = 1.8
}
}
}
})
})
PyuTest.make_tool("pyutest_core:diamond_axe", "Diamond Axe", {}, "pyutest-diamond-axe.png", {
stack_max = 1,
tool_capabilities = PyuTest.tool_caps({
uses = 1345,
attack_uses = 1345 / 2,
groupcaps = {
choppy = {
times = {
[PyuTest.BLOCK_FAST] = 0.3,
[PyuTest.BLOCK_NORMAL] = 0.4,
[PyuTest.BLOCK_SLOW] = 1.4
}
}
}
})
})
PyuTest.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()
PyuTest.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
})

View File

@ -1,3 +0,0 @@
# pyutest_mapgen
Map generation

View File

@ -1,49 +0,0 @@
-- This function is used for structures because it will update the lighting when placed.
PyuTest.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
},
drawtype = "airlike",
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
})
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,
PyuTest.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
PyuTest.is_flat = function()
return minetest.get_mapgen_setting("mg_name") == "flat"
end

View File

@ -1,13 +0,0 @@
if true then
return
end
PyuTestMapgen_Path = minetest.get_modpath("pyutest_mapgen")
dofile(PyuTestMapgen_Path.."/api.lua")
dofile(PyuTestMapgen_Path.."/mapgen.lua")
dofile(PyuTestMapgen_Path.."/worlds.lua")
if not PyuTest.is_flat() then
dofile(PyuTestMapgen_Path.."/structures.lua")
dofile(PyuTestMapgen_Path.."/trees.lua")
end

View File

@ -1,488 +0,0 @@
minetest.register_alias("mapgen_stone", "pyutest_core:stone_block")
minetest.register_alias("mapgen_water_source", "pyutest_core:water_source")
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_flags = minetest.settings:get_flags("mg_flags")
local mg_name = minetest.get_mapgen_setting("mg_name")
minetest.set_mapgen_setting(string.format("mg%s_cavern_threshold", mg_name), "0.20", true)
mg_flags.caverns = true
mg_flags.dungeons = false
-- https://git.minetest.land/VoxeLibre/VoxeLibre/src/branch/master/mods/MAPGEN/mcl_mapgen_core/init.lua#L127
local mg_flags_str = ""
for k,v in pairs(mg_flags) do
if v == false then
k = "no" .. k
end
mg_flags_str = mg_flags_str .. k .. ","
end
if string.len(mg_flags_str) > 0 then
mg_flags_str = string.sub(mg_flags_str, 1, string.len(mg_flags_str)-1)
end
minetest.set_mapgen_setting("mg_flags", mg_flags_str, true)
-- Biomes
PyuTest.BIOME_TOPS = {
grassland = 30,
forest = 35,
desert = 70,
frozen_plains = 30,
mountains = 300,
mushroom_fields = 30,
ice_spikes = 250,
swamp = 10
}
-- Overworld biome types
PyuTest.BIOME_TYPES = {
-- Normal biomes (Forests for example)
NORMAL = 1,
-- Chilly biomes, but not snowy (Taigas for example)
CHILLY = 2,
-- Snowy biomes (Frozen Plains for example)
COLD = 3,
-- Warm biomes (Savannas for example)
WARM = 4,
-- Hot biomes (Deserts for example)
DESERT = 5,
-- Wasteland biomes (Wastelands and Volcano for example)
WASTELAND = 6,
-- Wetland biomes (Swamps for example)
WETLAND = 7,
-- Ocean biomes (What example do you want?)
OCEAN = 8,
-- Cave biomes (What example do you want?)
CAVE = 9
}
PyuTest.get_biomes_from_type = function(type)
local biomes = {}
for k, v in pairs(minetest.registered_biomes) do
if v._pyutest_biome_type == type then
biomes[k] = v
end
end
return biomes
end
PyuTest.get_flowering_biomes = function ()
local biomes = {}
for k, v in pairs(minetest.registered_biomes) do
if v._pyutest_biome_flowering == true and v._pyutest_biome_flowering_extra == false then
table.insert(biomes, k)
end
end
return biomes
end
PyuTest.get_extra_flowering_biomes = function ()
local biomes = {}
for k, v in pairs(minetest.registered_biomes) do
if v._pyutest_biome_flowering == true and v._pyutest_biome_flowering_extra == true then
table.insert(biomes, k)
end
end
return biomes
end
-- wrapper around minetest.register_biome but with defaults and caves
PyuTest.register_overworld_biome = function(name, type, opts)
local nopts = PyuTest.util.tablecopy(opts) or {}
nopts["name"] = name
nopts["depth_top"] = nopts["depth_top"] or 1
nopts["depth_filler"] = nopts["depth_filler"] or 3
nopts["depth_riverbed"] = nopts["depth_riverbed"] or 2
nopts["depth_water_top"] = nopts["depth_water_top"] or nil -- cant think of a sane default..
nopts["node_water"] = nopts["node_water"] or "pyutest_core:water_source"
nopts["node_river_water"] = nopts["node_river_water"] or "pyutest_core:water_source"
nopts["node_riverbed"] = nopts["node_riverbed"] or "pyutest_core:gravel_block"
minetest.register_biome(PyuTest.util.tableconcat(nopts, {
_pyutest_biome_type = type,
}))
minetest.register_biome(PyuTest.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 = PyuTest.OCEAN_MIN
}, {
_pyutest_biome_type = PyuTest.BIOME_TYPES.OCEAN,
_pyutest_ocean_type = type
}))
minetest.register_biome(PyuTest.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 = PyuTest.DEEP_OCEAN_MAX,
y_min = PyuTest.DEEP_OCEAN_MIN,
vertical_blend = 5
}, {
_pyutest_biome_type = PyuTest.BIOME_TYPES.OCEAN,
_pyutest_ocean_type = type
}))
minetest.register_biome(PyuTest.util.tableconcat({
name = name.."_cave",
heat_point = nopts["heat_point"],
humidity_point = nopts["humidity_point"],
y_max = PyuTest.DEEP_OCEAN_MIN - 1,
y_min = PyuTest.OVERWORLD_BOTTOM,
}, {
_pyutest_biome_type = PyuTest.BIOME_TYPES.CAVE,
_pyutest_cave_type = type
}))
end
if PyuTest.is_flat() then
PyuTest.register_overworld_biome("flat", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_core:dark_grass_block",
node_filler = "pyutest_core:dirt_block",
y_max = PyuTest.BIOME_TOPS.grassland,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 50,
humidity_point = 50,
})
return
end
PyuTest.register_overworld_biome("grassland", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_core:grass_block",
node_filler = "pyutest_core:dirt_block",
y_max = PyuTest.BIOME_TOPS.grassland,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 53,
humidity_point = 57,
_pyutest_biome_flowering = true
})
PyuTest.register_overworld_biome("forest", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_core:dark_grass_block",
node_filler = "pyutest_core:dirt_block",
y_max = PyuTest.BIOME_TOPS.forest,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 50,
humidity_point = 65,
_pyutest_biome_flowering = true
})
PyuTest.register_overworld_biome("stony_mountains", PyuTest.BIOME_TYPES.WARM, {
node_top = "pyutest_core:stone_block",
node_filler = "pyutest_core:stone_block",
y_max = PyuTest.BIOME_TOPS.mountains,
y_min = PyuTest.BIOME_TOPS.grassland,
heat_point = 65,
humidity_point = 8
})
PyuTest.register_overworld_biome("desert", PyuTest.BIOME_TYPES.DESERT, {
node_top = "pyutest_core:sand_block",
node_filler = "pyutest_core:sandstone_block",
node_riverbed = "pyutest_core:sand_block",
y_max = PyuTest.BIOME_TOPS.desert,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 84,
humidity_point = 4
})
PyuTest.register_overworld_biome("desert_mountains", PyuTest.BIOME_TYPES.DESERT, {
node_top = "pyutest_core:sand_block",
node_filler = "pyutest_core:sandstone_block",
y_max = PyuTest.BIOME_TOPS.mountains,
y_min = PyuTest.BIOME_TOPS.desert,
heat_point = 83,
humidity_point = 6
})
PyuTest.register_overworld_biome("snowy_mountains", PyuTest.BIOME_TYPES.COLD, {
node_dust = "pyutest_core:snow_carpet",
node_top = "pyutest_core:snow_block",
node_filler = "pyutest_core:snow_block",
y_max = PyuTest.BIOME_TOPS.mountains,
y_min = PyuTest.BIOME_TOPS.frozen_plains,
heat_point = 6,
humidity_point = 72
})
PyuTest.register_overworld_biome("frozen_plains", PyuTest.BIOME_TYPES.COLD, {
node_dust = "pyutest_core:snow_carpet",
node_top = "pyutest_core:snow_block",
node_filler = "pyutest_core:snow_block",
y_max = PyuTest.BIOME_TOPS.frozen_plains,
y_min = PyuTest.SURFACE_BOTTOM,
node_water_top = "pyutest_core:ice_block",
depth_water_top = 5,
heat_point = 9,
humidity_point = 67
})
PyuTest.register_overworld_biome("mushroom_fields", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_core:mycelium_block",
node_filler = "pyutest_core:dirt_block",
y_max = PyuTest.BIOME_TOPS.mushroom_fields,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 53,
humidity_point = 94
})
PyuTest.register_overworld_biome("ice_spikes", PyuTest.BIOME_TYPES.COLD, {
node_top = "pyutest_core:ice_block",
node_filler = "pyutest_core:ice_block",
y_max = PyuTest.BIOME_TOPS.ice_spikes,
y_min = PyuTest.SURFACE_BOTTOM,
node_water_top = "pyutest_core:ice_block",
depth_water_top = 5,
heat_point = 9,
humidity_point = 70
})
PyuTest.register_overworld_biome("meadow", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_core:dark_grass_block",
node_filler = "pyutest_core:dirt_block",
depth_filler = 4,
y_max = PyuTest.BIOME_TOPS.mountains,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 52,
humidity_point = 83,
_pyutest_biome_flowering = true,
_pyutest_biome_flowering_extra = true
})
PyuTest.register_overworld_biome("old_growth_forest", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_core:dark_grass_block",
node_filler = "pyutest_core:dirt_block",
y_max = PyuTest.BIOME_TOPS.forest,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 45,
humidity_point = 92,
_pyutest_biome_flowering = true
})
PyuTest.register_overworld_biome("snowy_forest", PyuTest.BIOME_TYPES.COLD, {
node_dust = "pyutest_core:snow_carpet",
node_top = "pyutest_core:snow_block",
node_filler = "pyutest_core:dirt_block",
y_max = PyuTest.BIOME_TOPS.forest,
y_min = PyuTest.SURFACE_BOTTOM,
node_water_top = "pyutest_core:ice_block",
depth_water_top = 5,
heat_point = 8,
humidity_point = 69
})
PyuTest.register_overworld_biome("savanna", PyuTest.BIOME_TYPES.WARM, {
node_top = "pyutest_core:savanna_grass_block",
node_filler = "pyutest_core:dirt_block",
y_max = PyuTest.BIOME_TOPS.grassland,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 72,
humidity_point = 9
})
PyuTest.register_overworld_biome("taiga", PyuTest.BIOME_TYPES.CHILLY, {
node_top = "pyutest_core:dark_grass_block",
node_filler = "pyutest_core:dirt_block",
y_max = PyuTest.BIOME_TOPS.forest,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 28,
humidity_point = 72,
_pyutest_biome_flowering = true
})
PyuTest.register_overworld_biome("birch_forest", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_core:grass_block",
node_filler = "pyutest_core:dirt_block",
y_max = PyuTest.BIOME_TOPS.forest,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 48,
humidity_point = 85,
_pyutest_biome_flowering = true
})
PyuTest.register_overworld_biome("cherry_grove", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_core:grass_block",
node_filler = "pyutest_core:dirt_block",
y_max = PyuTest.BIOME_TOPS.forest,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 52,
humidity_point = 78,
_pyutest_biome_flowering = true,
_pyutest_biome_flowering_extra = true
})
PyuTest.register_overworld_biome("swamp", PyuTest.BIOME_TYPES.WETLAND, {
node_top = "pyutest_core:swampy_grass_block",
node_filler = "pyutest_core:dirt_block",
y_max = PyuTest.BIOME_TOPS.swamp,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 52,
humidity_point = 88,
})
PyuTest.register_overworld_biome("old_growth_birch_forest", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_core:grass_block",
node_filler = "pyutest_core:dirt_block",
y_max = PyuTest.BIOME_TOPS.forest,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 47,
humidity_point = 73,
_pyutest_biome_flowering = true,
_pyutest_biome_flowering_extra = true
})
PyuTest.register_overworld_biome("aspen_forest", PyuTest.BIOME_TYPES.CHILLY, {
node_top = "pyutest_core:aspen_grass_block",
node_filler = "pyutest_core:dirt_block",
y_max = PyuTest.BIOME_TOPS.forest,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 25,
humidity_point = 63,
_pyutest_biome_flowering = true
})
PyuTest.register_overworld_biome("redwood_forest", PyuTest.BIOME_TYPES.CHILLY, {
node_top = "pyutest_core:podzol_block",
node_filler = "pyutest_core:podzol_block",
y_max = PyuTest.BIOME_TOPS.forest,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 21,
humidity_point = 65,
_pyutest_biome_flowering = true
})
PyuTest.register_overworld_biome("jungle", PyuTest.BIOME_TYPES.WARM, {
node_top = "pyutest_core:jungle_grass_block",
node_filler = "pyutest_core:dirt_block",
y_max = PyuTest.BIOME_TOPS.forest,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 52,
humidity_point = 103,
_pyutest_biome_flowering = true,
_pyutest_biome_flowering_extra = true
})
PyuTest.register_overworld_biome("large_mushroom_forest", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_core:mycelium_block",
node_filler = "pyutest_core:dirt_block",
y_max = PyuTest.BIOME_TOPS.mushroom_fields,
y_min = PyuTest.SURFACE_BOTTOM,
heat_point = 53,
humidity_point = 98
})
PyuTest.register_overworld_biome("vyn_forest", PyuTest.BIOME_TYPES.COLD, {
node_dust = "pyutest_core:snow_carpet",
node_top = "pyutest_core:snow_block",
node_filler = "pyutest_core:dirt_block",
y_max = PyuTest.BIOME_TOPS.forest,
y_min = PyuTest.SURFACE_BOTTOM,
node_water_top = "pyutest_core:ice_block",
depth_water_top = 5,
heat_point = 11,
humidity_point = 68
})

View File

@ -1,72 +0,0 @@
minetest.register_decoration({
deco_type = "simple",
sidelen = 16,
fill_ratio = 0.0003,
place_on = {"group:ground"},
y_max = PyuTest.BIOME_TOPS.mountains,
y_min = PyuTest.SURFACE_BOTTOM,
decoration = {
"pyutest_core:trash_lootbox",
"pyutest_core:resource_lootbox",
"pyutest_core:griefer_lootbox",
"pyutest_core:liquid_sources_lootbox",
"pyutest_core:lighting_lootbox",
}
})
PyuTest.register_structure("igloo", "Igloo", {
place_on = {"pyutest_core:snow_block"},
fill_ratio = 0.00004,
biomes = {"frozen_plains"},
y_max = PyuTest.BIOME_TOPS.frozen_plains,
y_min = 1,
rotation = "random",
flags = "place_center_x, place_center_z",
place_offset_y = 1
})
PyuTest.register_structure("desertwell", "DesertWell", {
place_on = {"pyutest_core:sand_block"},
fill_ratio = 0.00006,
biomes = {"desert"},
y_max = PyuTest.BIOME_TOPS.desert,
y_min = 1,
rotation = "random"
})
PyuTest.register_structure("ice_spike", "IceSpike", {
fill_ratio = 0.0008,
place_on = {
"pyutest_core:ice_block",
},
biomes = {
"ice_spikes",
},
y_max = PyuTest.BIOME_TOPS.ice_spikes,
y_min = PyuTest.OVERWORLD_BOTTOM,
})
PyuTest.register_structure("ocean_ruins", "OceanRuins", {
fill_ratio = 0.0002,
place_on = {"pyutest_core:gravel_block"},
biomes = PyuTest.get_biomes_from_type(PyuTest.BIOME_TYPES.OCEAN),
y_max = PyuTest.DEEP_OCEAN_MAX + 4,
y_min = PyuTest.DEAP_OCEAN_MIN,
spawn_by = {"pyutest_core:water_source"},
num_spawn_by = 2
})
PyuTest.register_structure("snowman_tower", "SnowmanTower", {
fill_ratio = 0.000007,
place_on = {
"pyutest_core:ice_block",
"pyutest_core:snow_block"
},
biomes = {
"frozen_plains",
"ice_spikes",
"snowy_forest"
},
y_max = PyuTest.BIOME_TOPS.forest,
y_min = PyuTest.OVERWORLD_BOTTOM,
})

View File

@ -1,375 +0,0 @@
-- plants and other small decorations
minetest.register_decoration({
deco_type = "simple",
place_on = {"group:grass"},
sidelen = 16,
fill_ratio = 0.009,
biomes = PyuTest.get_flowering_biomes(),
decoration = PyuTest.registered_flowers
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"group:grass"},
sidelen = 16,
fill_ratio = 0.032,
biomes = PyuTest.get_extra_flowering_biomes(),
decoration = PyuTest.registered_flowers
})
minetest.register_decoration({
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"},
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"},
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 = PyuTest.OVERWORLD_TOP,
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 = PyuTest.SURFACE_BOTTOM,
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"},
schematic = PyuTest.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"},
schematic = PyuTest.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"},
schematic = PyuTest.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"},
schematic = PyuTest.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"},
schematic = PyuTest.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.003,
biomes = {"old_growth_forest"},
schematic = PyuTest.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.005,
biomes = {"taiga"},
schematic = PyuTest.get_schem_path("TaigaTree"),
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"},
schematic = PyuTest.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", "old_growth_birch_forest"},
schematic = PyuTest.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 = {"cherry_grove"},
schematic = PyuTest.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:snow_block"},
sidelen = 16,
fill_ratio = 0.004,
biomes = {"snowy_forest"},
schematic = PyuTest.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"},
schematic = PyuTest.get_schem_path("SnowyTree2"),
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"},
schematic = PyuTest.get_schem_path("SwampTree"),
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"},
schematic = PyuTest.get_schem_path("VeryTallBirchTree"),
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"},
schematic = PyuTest.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.008,
biomes = {"aspen_forest"},
schematic = PyuTest.get_schem_path("AspenTree2"),
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"},
schematic = PyuTest.get_schem_path("RedwoodTree"),
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"},
schematic = PyuTest.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.008,
biomes = {"jungle"},
schematic = PyuTest.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.013,
biomes = {"jungle"},
schematic = PyuTest.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.008,
biomes = {"jungle"},
schematic = PyuTest.get_schem_path("JungleBush"),
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"},
schematic = PyuTest.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.002,
biomes = {"large_mushroom_forest"},
schematic = PyuTest.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.007,
biomes = {"large_mushroom_forest"},
schematic = PyuTest.get_schem_path("FallenMushroom"),
rotation = "random",
flags = "place_center_x, place_center_z",
place_offset_y = 1,
force_placement = true
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"group:grass"},
sidelen = 16,
fill_ratio = 0.003,
biomes = {"vyn_forest"},
schematic = PyuTest.get_schem_path("VynTree"),
rotation = "random",
flags = "place_center_x, place_center_z",
place_offset_y = 1,
force_placement = true
})

View File

@ -1,153 +0,0 @@
PyuTest.register_world = function (options)
local default_options = {}
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
if conf.y_max == nil or conf.y_min == nil then
error("Please supply 'y_max' and 'y_min' to the options table!")
end
if conf.name == nil then
error("Please supply 'name' in the options table!")
end
return {
name = conf.name,
y_max = conf.y_max,
y_min = conf.y_min,
register_biome = function (o)
local name = conf.name .. "-" .. o.name
local cfg = PyuTest.util.tablecopy(o)
cfg.node_stone = cfg.node_stone or conf.node_stone -- Defaults to nil
cfg.node_water = cfg.node_water or "air"
minetest.register_biome(PyuTest.util.tableconcat(cfg, {
name = name,
depth_top = 0,
depth_filler = 0,
y_max = conf.y_max,
y_min = conf.y_min,
node_river_water = cfg.node_water,
node_cave_liquid = cfg.node_water,
}))
return name
end,
register_ore = function (o)
minetest.register_ore(PyuTest.util.tableconcat(o, {
y_max = conf.y_max,
y_min = conf.y_min,
}))
end,
register_decoration = function (o)
minetest.register_decoration(PyuTest.util.tableconcat(o, {
y_max = conf.y_max,
y_min = conf.y_min
}))
end
}
end
PyuTest.IceWorld = PyuTest.register_world({
name = "ice_world",
y_max = -400,
y_min = -800
})
local icy_cavern = PyuTest.IceWorld.register_biome({
name = "icy_cave",
node_stone = "pyutest_core:ice_block",
heat_point = 14,
humidity_point = 0
})
PyuTest.IceWorld.register_ore({
ore_type = "blob",
ore = "pyutest_core:snow_block",
wherein = "pyutest_core:ice_block",
clust_scarcity = 3 * 3 * 3,
clust_num_ores = 35,
clust_size = 5,
biomes = {icy_cavern},
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
PyuTest.IceWorld.register_ore({
ore_type = "blob",
ore = "pyutest_core:crystal_lantern_block",
wherein = "pyutest_core:ice_block",
clust_scarcity = 5.5 * 5.5 * 5.5,
clust_num_ores = 6,
clust_size = 5,
biomes = {icy_cavern},
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
SlimeWorld = PyuTest.register_world({
name = "slime_world",
y_max = -1400,
y_min = -1800
})
local slimey_cavern = SlimeWorld.register_biome({
name = "slimey_cavern",
node_stone = "pyutest_core:slime_block",
heat_point = 45,
humidity_point = 0
})
SlimeWorld.register_ore({
ore_type = "blob",
ore = "pyutest_core:glowslime_block",
wherein = "pyutest_core:slime_block",
clust_scarcity = 4 * 4 * 4,
clust_num_ores = 6,
clust_size = 5,
biomes = {slimey_cavern},
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
PyuTest.LavaWorld = PyuTest.register_world({
name = "lava_world",
y_max = -2000,
y_min = -2400
})
local lava_cavern = PyuTest.LavaWorld.register_biome({
name = "lava_cavern",
node_stone = "pyutest_core:molten_rock_block",
heat_point = 100,
humidity_point = 0,
})
PyuTest.LavaWorld.register_ore({
ore_type = "blob",
ore = "pyutest_core:magma",
wherein = "pyutest_core:molten_rock_block",
clust_scarcity = 4.5 * 4.5 * 4.5,
clust_num_ores = 6,
clust_size = 5,
biomes = {lava_cavern},
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
PyuTest.LavaWorld.register_decoration({
deco_type = "simple",
sidelen = 16,
fill_ratio = 0.00063,
decoration = {"pyutest_core:lava_source"},
place_on = {"pyutest_core:molten_rock_block", "pyutest_core:magma"},
biomes = {lava_cavern},
flags = "all_ceilings"
})

View File

@ -1,3 +0,0 @@
# pyutest_mobs
Mobs and entities

View File

@ -1,35 +0,0 @@
PyuTestMobs = {}
PyuTestMobs.ENTITY_BLOOD_AMOUNT = 6
PyuTestMobs.HUMAN_LIKE_CBOX = {-0.25, -1, -0.25, 0.25, 1, 0.25}
PyuTestMobs.create_boss_egg = function(mob_id, desc, texture, addegg, no_creative, craft)
mobs:register_egg(mob_id, desc, texture, addegg, no_creative)
minetest.register_craft({
output = mob_id,
recipe = {
{"", craft, ""},
{craft, "pyutest_core:emerald_shard", craft},
{"", craft, ""}
}
})
local t = mob_id:split(":")
local mob_name = t[#t]
local cage_id = "pyutest_mobs:"..mob_name.."_spawn_cage"
PyuTest.make_node(cage_id, desc:gsub("Spawn Egg", "") .. "Boss Spawner Cage", {
block = PyuTest.BLOCK_BREAKABLE_LONG
}, {"pyutest-cage.png"}, {
drawtype = "glasslike",
on_rightclick = function(pos)
mobs:add_mob(vector.add(pos, vector.new(0, 1, 0)), {
name = mob_id,
child = false,
ignore_count = true
})
minetest.remove_node(pos)
end
})
end

View File

@ -1,135 +0,0 @@
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,
textures = {
"pyutest-monster.png", "pyutest-monster_back.png"
},
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
},
{
name = "pyutest_core:apple",
min = 1,
max = 4,
chance = 2.5
}
}
})
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,
})
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,
})
mobs:register_egg("pyutest_mobs:firefly", "Firefly Spawn Egg", "pyutest-egg.png^[multiply:yellow", 0)

View File

@ -1,78 +0,0 @@
if true then
mobs.fallback_node = "pyutest_blocks:dirt_block"
return
end
modpath = minetest.get_modpath("pyutest_mobs")
dofile(modpath.."/api.lua")
dofile(modpath.."/basic.lua")
dofile(modpath.."/snowman.lua")
dofile(modpath.."/wind_warrior.lua")
dofile(modpath.."/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 = 4,
chance = 1,
active_object_count = 3,
min_light = 0,
max_light = 8,
max_height = PyuTest.OVERWORLD_TOP,
min_height = PyuTest.SURFACE_BOTTOM,
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,
min_height = PyuTest.SURFACE_BOTTOM - 1,
max_height= PyuTest.OVERWORLD_BOTTOM
})
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 = PyuTest.SURFACE_BOTTOM,
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,
})
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,
min_height = PyuTest.SURFACE_BOTTOM
})
end

View File

@ -1 +0,0 @@
depends = pyutest_core,mobs,pyutest_mapgen

View File

@ -1,87 +0,0 @@
local necroball_hit_player = function (self, player)
player:punch(self.object, nil, {
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,
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
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 = 125,
hp_min = 125,
walk_velocity = 2,
run_velocity = 4,
armor = 100,
passive = false,
visual = "upright_sprite",
visual_size = {x = 1, y = 2},
collisionbox = PyuTestMobs.HUMAN_LIKE_CBOX,
physical = true,
blood_amount = PyuTestMobs.ENTITY_BLOOD_AMOUNT,
view_range = 25,
reach = 2,
jump = 1,
group_attack = true,
group_helper = {
"pyutest_mobs:monster",
"pyutest_mobs:mimic"
},
makes_footstep_sound = true,
textures = {
"pyutest-necromancer.png", "pyutest-necromancer_back.png"
},
drops = {
{
name = "pyutest_core:magic_shards",
min = 4,
max = 8,
chance = 1
},
},
damage = 4,
attack_chance = 1,
attack_type = "dogshoot",
arrow = "pyutest_mobs:arrow_necroball",
shoot_interval = 1.2,
shoot_offset = 0,
pathfinding = 1,
dogshoot_switch = 1,
dogshoot_count_max = 5,
dogshoot_count2_max = 6,
})
PyuTestMobs.create_boss_egg("pyutest_mobs:necromancer", "Necromancer Spawn Egg",
"pyutest-egg.png^[multiply:dimgray", 0, nil,
"pyutest_core:bone")

View File

@ -1,77 +0,0 @@
local snowball_hit_player = function (self, player)
player:punch(self.object, nil, {
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)
PyuTest.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 = 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"
},
drops = {
{
name = "pyutest_core:magic_shards",
min = 2,
max = 5,
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,
"pyutest_core:snow_block")

View File

@ -1,81 +0,0 @@
local windball_hit_player = function (self, player)
player:punch(self.object, nil, {
damage_groups = {fleshy = 3}
}, nil)
math.randomseed(os.time())
player:add_velocity({
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
}
})
mobs:register_mob("pyutest_mobs:wind_warrior", {
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"
},
drops = {
{
name = "pyutest_core:magic_shards",
min = 4,
max = 7,
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,
-- just a place holder until more wind-related items come.
"pyutest_core:iron_ingot")