Update: The "Yet Another Unnamed Update" Update
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
minetest.register_privilege("fun", {
|
||||
description = "Access to for fun commands",
|
||||
description = "Access to \"powerful\" fun commands",
|
||||
give_to_singeplayer = true
|
||||
})
|
||||
|
||||
@@ -16,7 +16,21 @@ minetest.register_chatcommand("explode", {
|
||||
if range == nil then
|
||||
return false, "Please use a number for the range."
|
||||
end
|
||||
|
||||
|
||||
PyuTestCore.create_explosion(player:get_pos(), range, false, range, player, true)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("rtp", {
|
||||
description = [[Teleport to a random location in the world.
|
||||
This command may or may not kill you.]],
|
||||
func = function(name)
|
||||
local player = minetest.get_player_by_name(name)
|
||||
|
||||
local player_pos = player:get_pos()
|
||||
|
||||
math.randomseed(os.time())
|
||||
local pos = vector.new(math.random(-31000, 31000), player_pos.y, math.random(-31000, 31000))
|
||||
player:set_pos(pos)
|
||||
end
|
||||
})
|
||||
|
@@ -253,7 +253,7 @@ PyuTestCore.make_building_blocks("pyutest_core:sandstone", "Sandstone", {"sandst
|
||||
PyuTestCore.make_building_blocks("pyutest_core:ice", "Ice", {"ice.png"}, nil, {
|
||||
ground = 1,
|
||||
acid_vulnerable = 1,
|
||||
slippery = 2
|
||||
slippery = 4
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:mushroom", "Mushroom", {"mushroom.png"}, nil, {
|
||||
@@ -280,23 +280,32 @@ PyuTestCore.make_building_blocks("pyutest_core:obsidian", "Obsidian", {"obsidian
|
||||
PyuTestCore.make_building_blocks("pyutest_core:haybale", "Haybale", {"haybale-top-bottom.png", "haybale-top-bottom.png", "haybale.png"}, nil)
|
||||
|
||||
-- keeping old ID for backwards compatibility
|
||||
PyuTestCore.make_building_blocks("pyutest_core:crying_obsidian", "Enchanted Obsidian", {"enchanted-obsidian.png"}, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_VERYLONG}, {is_ground_content = false
|
||||
PyuTestCore.make_building_blocks("pyutest_core:crying_obsidian", "Enchanted Obsidian", {
|
||||
"enchanted-obsidian.png"
|
||||
}, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_VERYLONG
|
||||
}, {
|
||||
is_ground_content = false
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:brick", "Brick", {"bricks.png"}, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
|
||||
}, {
|
||||
is_ground_content = false
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:stone_bricks", "Stone Bricks", {"stone-bricks.png"}, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
|
||||
}, {
|
||||
is_ground_content = false
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:slime", "Slime", {"slime.png"}, nil, {bouncy = 85})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:clay", "Clay", {"clay-block.png"}, nil, {
|
||||
acid_vulnerable = 1
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:gravel", "Gravel", {"gravel.png"}, nil, {
|
||||
falling_node = 1,
|
||||
acid_vulnerable = 1
|
||||
@@ -308,6 +317,14 @@ PyuTestCore.make_building_blocks("pyutest_core:crystal_lantern", "Crystal Lanter
|
||||
light_source = minetest.LIGHT_MAX
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:bone", "Bone", {
|
||||
"bone-block-top-bottom.png",
|
||||
"bone-block-top-bottom.png",
|
||||
"bone-block.png"
|
||||
}, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:light", "Light", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT,
|
||||
light = 1
|
||||
@@ -512,5 +529,5 @@ PyuTestCore.make_node("pyutest_core:ladder", "Ladder", {
|
||||
selection_box = {
|
||||
type = "wallmounted"
|
||||
},
|
||||
inventory_image = "vines.png"
|
||||
inventory_image = "ladder.png"
|
||||
})
|
||||
|
@@ -204,6 +204,14 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
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",
|
||||
|
@@ -3,7 +3,9 @@ PyuTestCore.make_flower = function (name, desc, texture, dye, add_to_registry, d
|
||||
PyuTestCore.make_node(name, desc, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT,
|
||||
flammable = 1,
|
||||
flower = 1
|
||||
flower = 1,
|
||||
attached_node = 3,
|
||||
dig_immediate = 1
|
||||
}, {texture}, PyuTestCore.util.tableconcat({
|
||||
drawtype = drawtype or "plantlike",
|
||||
walkable = false,
|
||||
@@ -41,7 +43,7 @@ minetest.register_alias("pyutest_core:flower4", "pyutest_core:lavender")
|
||||
|
||||
PyuTestCore.make_flower("pyutest_core:deadbush", "Deadbush", "deadbush.png", "pyutest_core:brown_dye")
|
||||
PyuTestCore.make_flower("pyutest_core:grass_plant", "Grass", "grass-plant.png", "pyutest_core:green_dye")
|
||||
PyuTestCore.make_flower("pyutest_core:sugarcane", "Sugarcane", "sugarcane.png", "pyutest_core:green_dye")
|
||||
PyuTestCore.make_flower("pyutest_core:sugarcane", "Sugarcane", "sugarcane.png", "pyutest_core:green_dye", false, nil)
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:lilypad", "Lily Pad", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT
|
||||
@@ -95,3 +97,20 @@ PyuTestCore.make_flower("pyutest_core:kelp", "Kelp", "kelp.png", "pyutest_core:g
|
||||
|
||||
walkable = true
|
||||
})
|
||||
|
||||
|
||||
PyuTestCore.make_flower("pyutest_core:small_mushroom",
|
||||
"Small Mushroom",
|
||||
"mushroom-small.png",
|
||||
"pyutest_core:red_dye",
|
||||
false, nil, {
|
||||
groups = {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT,
|
||||
flammable = 1,
|
||||
flower = 1,
|
||||
dig_immediate = 1,
|
||||
attached_node = 1
|
||||
},
|
||||
|
||||
paramtype2 = "wallmounted"
|
||||
})
|
||||
|
@@ -15,26 +15,23 @@ PyuTestCore.make_item = function (nsname, desc, groups, wield_image, extra_conf)
|
||||
minetest.register_craftitem(nsname, conf)
|
||||
end
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:stick", "Stick", {}, "stick.png", {
|
||||
PyuTestCore.make_item("pyutest_core:stick", "Stick", {}, "stick.png")
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:bone", "Bone", {}, "bone.png", {
|
||||
stack_max = 99
|
||||
})
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:gunpowder", "Gunpowder", {}, "powder.png", {
|
||||
color = "dimgray",
|
||||
stack_max = 99
|
||||
})
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:ash", "Ash", {}, "powder.png", {
|
||||
color = "gray",
|
||||
stack_max = 99
|
||||
})
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:sugar", "Sugar", {}, "powder.png", {
|
||||
stack_max = 99
|
||||
})
|
||||
PyuTestCore.make_item("pyutest_core:sugar", "Sugar", {}, "powder.png")
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:coin", "Coin", {}, "coin.png", {
|
||||
stack_max = 99,
|
||||
on_secondary_use = function (_, user)
|
||||
local pos = user:get_pos()
|
||||
minetest.sound_play({name = "coin", gain = 1}, {
|
||||
@@ -49,10 +46,10 @@ PyuTestCore.make_item("pyutest_core:string", "String", {}, "string.png")
|
||||
PyuTestCore.make_item("pyutest_core:egg", "Egg", {}, "egg.png", {
|
||||
color = "peachpuff"
|
||||
})
|
||||
|
||||
PyuTestCore.make_item("pyutest_core:clay", "Clay Ball", {}, "clay.png")
|
||||
PyuTestCore.make_item("pyutest_core:glass_bottle", "Glass Bottle", {}, "glass-bottle.png", {
|
||||
stack_max = 16
|
||||
})
|
||||
PyuTestCore.make_item("pyutest_core:brick", "Brick", {}, "brick.png")
|
||||
PyuTestCore.make_item("pyutest_core:snowball", "Snowball", {}, "snowball.png")
|
||||
PyuTestCore.make_item("pyutest_core:bone", "Bone", {}, "bone.png")
|
||||
|
@@ -106,7 +106,7 @@ PyuTestCore.make_ore = function (id, desc, ifix, idfix, btxt, itxt, color, y_max
|
||||
ore = oid,
|
||||
wherein = PyuTestCore.ORE_STONES,
|
||||
clust_scarcity = scarcity * scarcity * scarcity * 2.2,
|
||||
clust_num_ores = 6,
|
||||
clust_num_ores = 9,
|
||||
clust_size = 3,
|
||||
y_max = y_max,
|
||||
y_min = PyuTestCore_WorldBottom,
|
||||
@@ -117,8 +117,8 @@ PyuTestCore.make_ore = function (id, desc, ifix, idfix, btxt, itxt, color, y_max
|
||||
ore = oid,
|
||||
wherein = PyuTestCore.ORE_STONES,
|
||||
clust_scarcity = (scarcity * scarcity * scarcity) * 3,
|
||||
clust_num_ores = 16,
|
||||
clust_size = 5,
|
||||
clust_num_ores = 18,
|
||||
clust_size = 6,
|
||||
y_max = y_max,
|
||||
y_min = PyuTestCore_WorldBottom,
|
||||
})
|
||||
@@ -154,6 +154,7 @@ PyuTestCore.make_ore("pyutest_core:emerald", "Emerald", "shard", "Shard", "ore-e
|
||||
|
||||
-- Ores without any special uses
|
||||
PyuTestCore.make_ore("pyutest_core:zinc", "Zinc", "ingot", "Ingot", "ore-zinc.png", "ingot.png", "#bed3d4", 18, 13, 1)
|
||||
PyuTestCore.make_ore("pyutest_core:lapis_lazuli", "Lapis Lazuli", "lump", "Lump", "ore-lapis.png", "lump.png", "#3848AC", -25, 13.4, 1)
|
||||
PyuTestCore.make_ore("pyutest_core:amethyst_quartz", "Amethyst Quartz", "shard", "Shard", "ore-amethyst.png", "shard.png", "#9f7ba9", -50, 14.1, 1)
|
||||
PyuTestCore.make_ore("pyutest_core:pink_quartz", "Pink Quartz", "shard", "Shard", "ore-pink-quartz.png", "shard.png", "#dbafdc", -50, 14.1, 1)
|
||||
PyuTestCore.make_ore("pyutest_core:ruby", "Ruby", "shard", "Shard", "ore-ruby.png", "shard.png", "#992727", -75, 15.5, 1)
|
||||
|
@@ -7,3 +7,8 @@ minetest.override_item("pyutest_core:coal_lump", {
|
||||
fuel = 1
|
||||
}
|
||||
})
|
||||
|
||||
minetest.override_item("pyutest_core:bone_block", {
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
@@ -23,7 +23,9 @@ PyuTestCore.make_wood = function (id, desc, ltiles, btiles)
|
||||
minetest.override_item(log_id, {
|
||||
groups = PyuTestCore.util.tableconcat(minetest.registered_nodes[log_id].groups, {
|
||||
wooden_log = 1
|
||||
})
|
||||
}),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
||||
minetest.override_item(wood_id, {
|
||||
|
@@ -61,7 +61,8 @@ local colors = {
|
||||
green = {"Green", "olivedrab"},
|
||||
blue = {"Blue", "cornflowerblue"},
|
||||
purple = {"Purple", "plum"},
|
||||
pink = {"Pink", "pink"}
|
||||
pink = {"Pink", "pink"},
|
||||
lime = {"Lime", "#64C044"}
|
||||
}
|
||||
|
||||
for k, v in pairs(colors) do
|
||||
|
@@ -1,7 +1,7 @@
|
||||
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:water_source")
|
||||
minetest.register_alias("mapgen_lava_source", "pyutest_core:lava_source")
|
||||
minetest.register_alias("mapgen_singlenode", "air")
|
||||
|
||||
-- Biomes
|
||||
@@ -21,7 +21,7 @@ PyuTestCore.BIOME_TYPES = {
|
||||
-- Normal biomes (Forests for example)
|
||||
NORMAL = 1,
|
||||
|
||||
-- Chilly biomes, but not snowy (Mushroom Fields and Taigas for example)
|
||||
-- Chilly biomes, but not snowy (Taigas for example)
|
||||
CHILLY = 2,
|
||||
|
||||
-- Snowy biomes (Frozen Plains for example)
|
||||
@@ -177,7 +177,7 @@ PyuTestCore.register_biome("forest", PyuTestCore.BIOME_TYPES.NORMAL, {
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 50,
|
||||
humidity_point = 86,
|
||||
humidity_point = 65,
|
||||
_pyutest_biome_flowering = true
|
||||
})
|
||||
|
||||
@@ -242,15 +242,15 @@ PyuTestCore.register_biome("frozen_plains", PyuTestCore.BIOME_TYPES.COLD, {
|
||||
humidity_point = 53
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("mushroom_fields", PyuTestCore.BIOME_TYPES.CHILLY, {
|
||||
PyuTestCore.register_biome("mushroom_fields", PyuTestCore.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:mycelium_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.mushroom_fields,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 34,
|
||||
humidity_point = 96
|
||||
heat_point = 42,
|
||||
humidity_point = 94
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("ice_spikes", PyuTestCore.BIOME_TYPES.COLD, {
|
||||
@@ -317,7 +317,7 @@ PyuTestCore.register_biome("savanna", PyuTestCore.BIOME_TYPES.WARM, {
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 72,
|
||||
humidity_point = 19
|
||||
humidity_point = 9
|
||||
})
|
||||
|
||||
PyuTestCore.register_biome("taiga", PyuTestCore.BIOME_TYPES.CHILLY, {
|
||||
@@ -353,8 +353,8 @@ PyuTestCore.register_biome("cherry_grove", PyuTestCore.BIOME_TYPES.NORMAL, {
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 46,
|
||||
humidity_point = 92,
|
||||
heat_point = 52,
|
||||
humidity_point = 78,
|
||||
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
@@ -392,7 +392,7 @@ PyuTestCore.register_biome("aspen_forest", PyuTestCore.BIOME_TYPES.CHILLY, {
|
||||
y_max = PyuTestCore_BiomeTops.forest,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 34,
|
||||
heat_point = 25,
|
||||
humidity_point = 52,
|
||||
|
||||
_pyutest_biome_flowering = true
|
||||
@@ -419,8 +419,19 @@ PyuTestCore.register_biome("jungle", PyuTestCore.BIOME_TYPES.WARM, {
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 48,
|
||||
humidity_point = 100,
|
||||
humidity_point = 97,
|
||||
|
||||
_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",
|
||||
|
||||
y_max = PyuTestCore_BiomeTops.mushroom_fields,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
|
||||
heat_point = 43,
|
||||
humidity_point = 98
|
||||
})
|
||||
|
BIN
mods/pyutest/pyutest_mapgen/schematics/fallen_mushroom.mts
Normal file
BIN
mods/pyutest/pyutest_mapgen/schematics/fallen_mushroom.mts
Normal file
Binary file not shown.
BIN
mods/pyutest/pyutest_mapgen/schematics/small_mushroom.mts
Normal file
BIN
mods/pyutest/pyutest_mapgen/schematics/small_mushroom.mts
Normal file
Binary file not shown.
BIN
mods/pyutest/pyutest_mapgen/schematics/snowman_tower.mts
Normal file
BIN
mods/pyutest/pyutest_mapgen/schematics/snowman_tower.mts
Normal file
Binary file not shown.
BIN
mods/pyutest/pyutest_mapgen/schematics/tall_mushroom.mts
Normal file
BIN
mods/pyutest/pyutest_mapgen/schematics/tall_mushroom.mts
Normal file
Binary file not shown.
@@ -73,3 +73,18 @@ PyuTestMapgen.register_structure("ocean_ruins", "ocean_ruins", {
|
||||
spawn_by = {"pyutest_core:water_source"},
|
||||
num_spawn_by = 2
|
||||
})
|
||||
|
||||
PyuTestMapgen.register_structure("snowman_tower", "snowman_tower", {
|
||||
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,
|
||||
})
|
||||
|
@@ -1,7 +1,7 @@
|
||||
-- plants and other small decorations
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"pyutest_core:grass_block", "pyutest_core:dark_grass_block"},
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.009,
|
||||
biomes = PyuTestCore.get_flowering_biomes(),
|
||||
@@ -23,7 +23,7 @@ minetest.register_decoration({
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"pyutest_core:grass_block"},
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.048,
|
||||
biomes = {"grassland"},
|
||||
@@ -34,7 +34,7 @@ minetest.register_decoration({
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"pyutest_core:grass_block"},
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0018,
|
||||
biomes = {"grassland"},
|
||||
@@ -48,23 +48,12 @@ minetest.register_decoration({
|
||||
place_on = {"pyutest_core:dirt_block", "pyutest_core:sand_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.019,
|
||||
biomes = {"wasteland", "desert"},
|
||||
biomes = {"desert"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
decoration = "pyutest_core:deadbush"
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0045,
|
||||
place_on = {"pyutest_core:molten_rock_block"},
|
||||
biomes = {"volcano"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = PyuTestCore_SurfaceBottom,
|
||||
decoration = "pyutest_core:fire"
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
sidelen = 16,
|
||||
@@ -94,7 +83,7 @@ minetest.register_decoration({
|
||||
-- trees
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:dark_grass_block"},
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"forest", "old_growth_forest"},
|
||||
@@ -107,7 +96,7 @@ minetest.register_decoration({
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:dark_grass_block"},
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"forest", "old_growth_forest"},
|
||||
@@ -120,7 +109,7 @@ minetest.register_decoration({
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:savanna_grass_block"},
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00085,
|
||||
biomes = {"savanna"},
|
||||
@@ -137,7 +126,7 @@ minetest.register_decoration({
|
||||
place_on = {"pyutest_core:mycelium_block"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.003,
|
||||
biomes = {"mushroom_fields"},
|
||||
biomes = {"mushroom_fields", "large_mushroom_forest"},
|
||||
y_max = PyuTestCore_WorldTop,
|
||||
y_min = 1,
|
||||
schematic = PyuTestCore.get_schem_path("mushroom"),
|
||||
@@ -147,7 +136,7 @@ minetest.register_decoration({
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:dark_grass_block"},
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.005,
|
||||
biomes = {"old_growth_forest"},
|
||||
@@ -160,7 +149,7 @@ minetest.register_decoration({
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:dark_grass_block"},
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0015,
|
||||
biomes = {"old_growth_forest"},
|
||||
@@ -173,7 +162,7 @@ minetest.register_decoration({
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:dark_grass_block"},
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.003,
|
||||
biomes = {"old_growth_forest"},
|
||||
@@ -186,7 +175,7 @@ minetest.register_decoration({
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:dark_grass_block"},
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.005,
|
||||
biomes = {"taiga"},
|
||||
@@ -264,7 +253,7 @@ minetest.register_decoration({
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:swampy_grass_block"},
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"swamp"},
|
||||
@@ -290,7 +279,7 @@ minetest.register_decoration({
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:aspen_grass_block"},
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.016,
|
||||
biomes = {"aspen_forest"},
|
||||
@@ -303,7 +292,7 @@ minetest.register_decoration({
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:aspen_grass_block"},
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.008,
|
||||
biomes = {"aspen_forest"},
|
||||
@@ -329,7 +318,7 @@ minetest.register_decoration({
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:jungle_grass_block"},
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.010,
|
||||
biomes = {"jungle"},
|
||||
@@ -342,7 +331,7 @@ minetest.register_decoration({
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:jungle_grass_block"},
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.008,
|
||||
biomes = {"jungle"},
|
||||
@@ -355,7 +344,7 @@ minetest.register_decoration({
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"pyutest_core:jungle_grass_block"},
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.008,
|
||||
biomes = {"jungle"},
|
||||
@@ -365,3 +354,44 @@ minetest.register_decoration({
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
})
|
||||
|
||||
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("tall_mushroom"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z"
|
||||
})
|
||||
|
||||
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("small_mushroom"),
|
||||
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("fallen_mushroom"),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_z",
|
||||
place_offset_y = 1
|
||||
})
|
||||
|
35
mods/pyutest/pyutest_mobs/api.lua
Normal file
35
mods/pyutest/pyutest_mobs/api.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
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"
|
||||
PyuTestCore.make_node(cage_id, desc:gsub("Spawn Egg", "") .. "Boss Spawner Cage", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_LONG
|
||||
}, {"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
|
@@ -25,6 +25,15 @@ mobs:register_mob("pyutest_mobs:monster", {
|
||||
|
||||
textures = {
|
||||
"monster.png", "monster_back.png"
|
||||
},
|
||||
|
||||
drops = {
|
||||
{
|
||||
name = "pyutest_core:bone",
|
||||
min = 2,
|
||||
max = 3,
|
||||
chance = 1
|
||||
}
|
||||
}
|
||||
})
|
||||
mobs:register_egg("pyutest_mobs:monster", "Monster Spawn Egg", "egg.png^[multiply:darkgreen", 0)
|
||||
@@ -53,6 +62,14 @@ mobs:register_mob("pyutest_mobs:human", {
|
||||
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", "egg.png^[multiply:peachpuff", 0)
|
||||
|
||||
@@ -77,7 +94,7 @@ mobs:register_mob("pyutest_mobs:mimic", {
|
||||
textures = {"crate.png", "crate.png", "crate.png", "crate.png", "crate.png", "crate.png"},
|
||||
view_range = 12,
|
||||
blood_amount = PyuTestMobs.ENTITY_BLOOD_AMOUNT,
|
||||
reach = 2
|
||||
reach = 2,
|
||||
})
|
||||
mobs:register_egg("pyutest_mobs:mimic", "Mimic Spawn Egg", "egg.png^[multiply:brown", 0)
|
||||
|
||||
|
@@ -1,11 +1,10 @@
|
||||
PyuTestMobs_Path = minetest.get_modpath("pyutest_mobs")
|
||||
PyuTestMobs = {}
|
||||
|
||||
PyuTestMobs.ENTITY_BLOOD_AMOUNT = 6
|
||||
PyuTestMobs.HUMAN_LIKE_CBOX = {-0.25, -1, -0.25, 0.25, 1, 0.25}
|
||||
|
||||
mobs.fallback_node = "pyutest_core:dirt_block"
|
||||
|
||||
dofile(PyuTestMobs_Path.."/api.lua")
|
||||
|
||||
dofile(PyuTestMobs_Path.."/basic.lua")
|
||||
dofile(PyuTestMobs_Path.."/snowman.lua")
|
||||
dofile(PyuTestMobs_Path.."/wind_warrior.lua")
|
||||
|
@@ -11,41 +11,36 @@ mobs:register_arrow("pyutest_mobs:arrow_necroball", {
|
||||
hit_player = necroball_hit_player,
|
||||
hit_mob = necroball_hit_player,
|
||||
|
||||
on_step = function (self, dt)
|
||||
hit_node = function(self, pos)
|
||||
math.randomseed(os.time())
|
||||
local rng = math.random(1, 4)
|
||||
if math.floor(dt * 100) == 5 then
|
||||
local num_minions = math.random(2, 3)
|
||||
local minions = {
|
||||
"pyutest_mobs:monster",
|
||||
"pyutest_mobs:mimic"
|
||||
}
|
||||
local m = minions[math.random(#minions)]
|
||||
|
||||
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(self.object:get_pos(), vector.new(0, 1, 0)), {
|
||||
name = m,
|
||||
child = false,
|
||||
nametag = "Necromancer Minion",
|
||||
ignore_count = true
|
||||
})
|
||||
end
|
||||
|
||||
self.object:remove()
|
||||
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 = 9,
|
||||
velocity = 18,
|
||||
collisionbox = {
|
||||
-1.5, -1.5, -1.5, 1.5, 1.5, 1.5
|
||||
-1.5, -1.5, -1.5, 1.5, 1.5, 1.5
|
||||
}
|
||||
})
|
||||
|
||||
mobs:register_mob("pyutest_mobs:necromancer", {
|
||||
type = "monster",
|
||||
hp_max = 225,
|
||||
hp_min = 225,
|
||||
hp_max = 325,
|
||||
hp_min = 325,
|
||||
walk_velocity = 2,
|
||||
run_velocity = 4,
|
||||
armor = 100,
|
||||
@@ -70,8 +65,8 @@ mobs:register_mob("pyutest_mobs:necromancer", {
|
||||
drops = {
|
||||
{
|
||||
name = "pyutest_core:magic_shards",
|
||||
min = 2,
|
||||
max = 5,
|
||||
min = 4,
|
||||
max = 8,
|
||||
chance = 1
|
||||
},
|
||||
},
|
||||
@@ -80,11 +75,13 @@ mobs:register_mob("pyutest_mobs:necromancer", {
|
||||
attack_chance = 1,
|
||||
attack_type = "dogshoot",
|
||||
arrow = "pyutest_mobs:arrow_necroball",
|
||||
shoot_interval = 2.5,
|
||||
shoot_offset = 1,
|
||||
shoot_interval = 1.2,
|
||||
shoot_offset = 0,
|
||||
pathfinding = 1,
|
||||
dogshoot_switch = 1,
|
||||
dogshoot_count_max = 5,
|
||||
dogshoot_count2_max = 6,
|
||||
})
|
||||
mobs:register_egg("pyutest_mobs:necromancer", "Necromancer Spawn Egg", "egg.png^[multiply:dimgray", 0)
|
||||
PyuTestMobs.create_boss_egg("pyutest_mobs:necromancer", "Necromancer Spawn Egg",
|
||||
"egg.png^[multiply:dimgray", 0, nil,
|
||||
"pyutest_core:bone")
|
||||
|
@@ -72,4 +72,6 @@ mobs:register_mob("pyutest_mobs:snowman", {
|
||||
}
|
||||
}
|
||||
})
|
||||
mobs:register_egg("pyutest_mobs:snowman", "Snowman Spawn Egg", "egg.png^[multiply:skyblue", 0)
|
||||
PyuTestMobs.create_boss_egg("pyutest_mobs:snowman", "Snowman Spawn Egg",
|
||||
"egg.png^[multiply:skyblue", 0, nil,
|
||||
"pyutest_core:snow_block")
|
||||
|
@@ -75,4 +75,7 @@ mobs:register_mob("pyutest_mobs:wind_warrior", {
|
||||
}
|
||||
}
|
||||
})
|
||||
mobs:register_egg("pyutest_mobs:wind_warrior", "Wind Warrior Spawn Egg", "egg.png^[multiply:white", 0)
|
||||
PyuTestMobs.create_boss_egg("pyutest_mobs:wind_warrior", "Wind Warrior Spawn Egg",
|
||||
"egg.png^[multiply:white", 0, nil,
|
||||
-- just a place holder until more wind-related items come.
|
||||
"pyutest_core:iron_ingot")
|
||||
|
Reference in New Issue
Block a user