[ITEMS/pyutest_tools] Stop using maxlevel and level for determining

whether a block can be mined or not
This commit is contained in:
IamPyu
2024-10-04 22:16:25 -06:00
parent 56ed399602
commit b5512557a7
6 changed files with 5 additions and 21 deletions

View File

@@ -15,6 +15,7 @@ PyuTest.make_node = function(name, desc, groups, tiles, extra_conf)
block = 1
}),
}
conf["sounds"] = PyuTest.make_node_sounds()
if extra_conf ~= nil then
for k, v in pairs(extra_conf) do

View File

@@ -103,28 +103,24 @@ PyuTest.make_building_blocks("pyutest_blocks:stone", "Stone", { "pyutest-stone.p
ground = 1,
stone = 1,
cracky = PyuTest.BLOCK_NORMAL,
level = 1
}, { is_ground_content = true })
PyuTest.make_building_blocks("pyutest_blocks:darkstone", "Darkstone", { "pyutest-darkstone.png" }, nil, {
ground = 1,
stone = 1,
cracky = PyuTest.BLOCK_NORMAL,
level = 1
}, { is_ground_content = true })
PyuTest.make_building_blocks("pyutest_blocks:granite", "Granite", {"pyutest-granite.png"}, nil, {
ground = 1,
stone = 1,
cracky = PyuTest.BLOCK_NORMAL,
level = 1
})
PyuTest.make_building_blocks("pyutest_blocks:andesite", "Andesite", {"pyutest-andesite.png"}, nil, {
ground = 1,
stone = 1,
cracky = PyuTest.BLOCK_NORMAL,
level = 1
})
PyuTest.make_building_blocks("pyutest_blocks:sandstone", "Sandstone", { "pyutest-sandstone.png" }, nil, {

View File

@@ -171,7 +171,7 @@ PyuTest.make_node("pyutest_blocks:ladder", "Ladder", {
})
PyuTest.make_node("pyutest_blocks:magma", "Magma", {
cracky = PyuTest.BLOCK_NORMAL
cracky = PyuTest.BLOCK_FAST
}, { "pyutest-magma.png" }, {
paramtype = "light",
light_source = 11,

View File

@@ -93,7 +93,6 @@ PyuTest.make_tool("pyutest_magic:enchanted_pickaxe", "Enchanted Pickaxe", {}, "p
tool_capabilities = PyuTest.tool_caps({
uses = 2768,
attack_uses = 2768 / 2,
maxlevel = 4,
groupcaps = {
cracky = {
times = {

View File

@@ -3,7 +3,6 @@ PyuTest.make_tool("pyutest_tools:wooden_pickaxe", "Wooden Pickaxe", {}, "pyutest
tool_capabilities = PyuTest.tool_caps({
uses = 69,
attack_uses = 69 / 2,
maxlevel = 1,
groupcaps = {
cracky = {
times = {
@@ -20,7 +19,6 @@ PyuTest.make_tool("pyutest_tools:stone_pickaxe", "Stone Pickaxe", {}, "pyutest-s
tool_capabilities = PyuTest.tool_caps({
uses = 274,
attack_uses = 274 / 2,
maxlevel = 2,
groupcaps = {
cracky = {
times = {
@@ -37,7 +35,6 @@ PyuTest.make_tool("pyutest_tools:iron_pickaxe", "Iron Pickaxe", {}, "pyutest-iro
tool_capabilities = PyuTest.tool_caps({
uses = 689,
attack_uses = 689 / 2,
maxlevel = 3,
groupcaps = {
cracky = {
times = {
@@ -54,7 +51,6 @@ PyuTest.make_tool("pyutest_tools:diamond_pickaxe", "Diamond Pickaxe", {}, "pyute
tool_capabilities = PyuTest.tool_caps({
uses = 1345,
attack_uses = 1345 / 2,
maxlevel = 3,
groupcaps = {
cracky = {
times = {

View File

@@ -16,7 +16,7 @@ minetest.register_ore({
clust_scarcity = 9 * 9 * 9,
clust_num_ores = 35,
clust_size = 5,
y_max = PyuTest.SURFACE_BOTTOM - 1,
y_max = PyuTest.OVERWORLD_SURFACE_BOTTOM - 1,
y_min = PyuTest.OVERWORLD_BOTTOM,
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
@@ -28,7 +28,7 @@ minetest.register_ore({
clust_scarcity = 9 * 9 * 9,
clust_num_ores = 35,
clust_size = 5,
y_max = PyuTest.SURFACE_BOTTOM - 1,
y_max = PyuTest.OVERWORLD_SURFACE_BOTTOM - 1,
y_min = PyuTest.OVERWORLD_BOTTOM,
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
@@ -40,7 +40,7 @@ minetest.register_ore({
clust_scarcity = 7 * 7 * 7,
clust_num_ores = 35,
clust_size = 5,
y_max = PyuTest.SURFACE_BOTTOM - 1,
y_max = PyuTest.OVERWORLD_SURFACE_BOTTOM - 1,
y_min = PyuTest.DEAP_OCEAN_MIN,
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
@@ -65,7 +65,6 @@ PyuTest.make_ore = function(id, desc, item_id_suffix, item_description_suffix, o
ore_drop_count = 1,
ore_sounds = nil,
ore_tiles = {},
ore_level = 1,
item_conf = {},
item_groups = {},
@@ -103,7 +102,6 @@ PyuTest.make_ore = function(id, desc, item_id_suffix, item_description_suffix, o
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),
@@ -220,7 +218,6 @@ PyuTest.make_ore("pyutest_ores:iron", "Iron", "ingot", "Ingot", {
ore_strength = PyuTest.BLOCK_NORMAL,
ore_tiles = {"pyutest-ore-iron.png"},
ore_level = 2,
item_texture = "pyutest-ingot.png",
@@ -236,7 +233,6 @@ PyuTest.make_ore("pyutest_ores:copper", "Copper", "ingot", "Ingot", {
ore_strength = PyuTest.BLOCK_NORMAL,
ore_tiles = {"pyutest-ore-copper.png"},
ore_level = 2,
item_texture = "pyutest-ingot.png",
item_conf = {
@@ -259,7 +255,6 @@ PyuTest.make_ore("pyutest_ores:gold", "Gold", "ingot", "Ingot", {
ore_strength = PyuTest.BLOCK_NORMAL,
ore_tiles = {"pyutest-ore-gold.png"},
ore_level = 3,
item_texture = "pyutest-ingot.png",
item_conf = {
@@ -282,7 +277,6 @@ PyuTest.make_ore("pyutest_ores:diamond", "Diamond", "shard", "Shard", {
ore_strength = PyuTest.BLOCK_NORMAL,
ore_tiles = {"pyutest-ore-diamond.png"},
ore_level = 3,
item_texture = "pyutest-shard.png",
item_conf = {
@@ -299,7 +293,6 @@ PyuTest.make_ore("pyutest_ores:emerald", "Emerald", "shard", "Shard", {
ore_strength = PyuTest.BLOCK_NORMAL,
ore_tiles = {"pyutest-ore-emerald.png"},
ore_level = 3,
item_texture = "pyutest-shard.png",
item_conf = {
@@ -316,7 +309,6 @@ PyuTest.make_ore("pyutest_ores:zinc", "Zinc", "ingot", "Ingot", {
ore_strength = PyuTest.BLOCK_NORMAL,
ore_tiles = {"pyutest-ore-zinc.png"},
ore_level = 2,
item_texture = "pyutest-ingot.png",
item_conf = {