Finalized textures and sounds

This commit is contained in:
ThePython 2024-02-12 16:25:25 -08:00
parent 00a087a992
commit 255af53e15
22 changed files with 75 additions and 81 deletions

View File

@ -33,8 +33,6 @@ local function alchemical_on_construct(color)
end end
end end
local pipeworks_connect = exchangeclone.pipeworks and "^pipeworks_tube_connection_stony.png" or ""
minetest.register_node("exchangeclone:alchemical_chest", { minetest.register_node("exchangeclone:alchemical_chest", {
description = S("Alchemical Chest"), description = S("Alchemical Chest"),
groups = {container = 2, alchemical_chest = 1, cracky = 2, pickaxey = 2, tubedevice = 1, tubedevice_receiver = 1}, groups = {container = 2, alchemical_chest = 1, cracky = 2, pickaxey = 2, tubedevice = 1, tubedevice_receiver = 1},
@ -42,12 +40,12 @@ minetest.register_node("exchangeclone:alchemical_chest", {
_mcl_blast_resistance = 15, _mcl_blast_resistance = 15,
paramtype2 = "4dir", paramtype2 = "4dir",
tiles = { tiles = {
"exchangeclone_alchemical_chest_top.png"..pipeworks_connect, "exchangeclone_alchemical_chest_top.png",
"exchangeclone_alchemical_chest_bottom.png"..pipeworks_connect, "exchangeclone_alchemical_chest_bottom.png",
"exchangeclone_alchemical_chest_side.png"..pipeworks_connect, "exchangeclone_alchemical_chest_side.png",
"exchangeclone_alchemical_chest_side.png"..pipeworks_connect, "exchangeclone_alchemical_chest_side.png",
"exchangeclone_alchemical_chest_side.png"..pipeworks_connect, "exchangeclone_alchemical_chest_side.png",
"exchangeclone_alchemical_chest_front.png"..pipeworks_connect, "exchangeclone_alchemical_chest_front.png",
}, },
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)

View File

@ -203,7 +203,7 @@ if exchangeclone.mcl then
for _, matter in pairs({"dark", "red"}) do for _, matter in pairs({"dark", "red"}) do
for _, type in pairs({"helmet", "chestplate", "leggings", "boots"}) do for _, type in pairs({"helmet", "chestplate", "leggings", "boots"}) do
minetest.override_item("exchangeclone:"..type.."_"..matter.."_matter", { minetest.override_item("exchangeclone:"..type.."_"..matter.."_matter", {
inventory_image = get_armor_texture("inv_"..type, matter), inventory_image = get_armor_texture("inv_"..matter.."_matter_"..type, matter),
wield_image = get_armor_texture("inv_"..type, matter), wield_image = get_armor_texture("inv_"..type, matter),
}) })
end end

View File

@ -22,7 +22,7 @@ function exchangeclone.axe_action(itemstack, player, center)
if charge > 1 then if charge > 1 then
local vector1, vector2 = exchangeclone.process_range(player, range_type, charge) local vector1, vector2 = exchangeclone.process_range(player, range_type, charge)
local pos1, pos2 = vector.add(center, vector1), vector.add(center, vector2) local pos1, pos2 = vector.add(center, vector1), vector.add(center, vector2)
exchangeclone.play_ability_sound(player) exchangeclone.play_sound(player, strip and "exchangeclone_charge_up" or "exchangeclone_destruct")
nodes = minetest.find_nodes_in_area(pos1, pos2, groups_to_search) nodes = minetest.find_nodes_in_area(pos1, pos2, groups_to_search)
else else
nodes = {center} nodes = {center}

View File

@ -29,7 +29,7 @@ local function constructor_action(pos)
local player local player
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local inv = meta:get_inventory() local inv = meta:get_inventory()
if minetest.get_item_group(inv:get_stack("fuel", 1):get_name(), "klein_star" < 1 then if minetest.get_item_group(inv:get_stack("fuel", 1):get_name(), "klein_star") < 1 then
using_star = false using_star = false
player = minetest.get_player_by_name(meta:get_string("exchangeclone_placer")) player = minetest.get_player_by_name(meta:get_string("exchangeclone_placer"))
if not (player and player ~= "") then return end if not (player and player ~= "") then return end
@ -117,17 +117,15 @@ local function allow_metadata_inventory_take(pos, listname, index, stack, player
return stack:get_count() return stack:get_count()
end end
local pipeworks_connect = exchangeclone.pipeworks and "^pipeworks_tube_connection_metallic.png" or ""
minetest.register_node("exchangeclone:constructor", { minetest.register_node("exchangeclone:constructor", {
description = S("Constructor"), description = S("Constructor"),
tiles = { tiles = {
"exchangeclone_constructor_up.png"..pipeworks_connect, "exchangeclone_constructor_up.png",
"exchangeclone_constructor_down.png"..pipeworks_connect, "exchangeclone_constructor_down.png",
"exchangeclone_constructor_right.png"..pipeworks_connect, "exchangeclone_constructor_right.png",
"exchangeclone_constructor_right.png"..pipeworks_connect, "exchangeclone_constructor_right.png",
"exchangeclone_constructor_right.png"..pipeworks_connect, "exchangeclone_constructor_right.png",
"exchangeclone_constructor_right.png"..pipeworks_connect, "exchangeclone_constructor_right.png",
}, },
groups = {cracky = 2, container = exchangeclone.mcl2 and 2 or 4, pickaxey = 2, tubedevice = 1, tubedevice_receiver = 1}, groups = {cracky = 2, container = exchangeclone.mcl2 and 2 or 4, pickaxey = 2, tubedevice = 1, tubedevice_receiver = 1},
_mcl_hardness = 3, _mcl_hardness = 3,

View File

@ -79,7 +79,7 @@ local listnames = {exchangeclone_covalence_dust = true, exchangeclone_covalence_
local function is_repairable_gear(item) local function is_repairable_gear(item)
item = ItemStack(item) item = ItemStack(item)
if item:get_wear() <= 0 then return end if item:get_wear() <= 0 then return end
if minetest.get_item_group(item:get_name(), "disable_repair") then return end if minetest.get_item_group(item:get_name(), "disable_repair") > 0 then return end
if (exchangeclone.get_item_energy(item) or 0) <= 0 then return end if (exchangeclone.get_item_energy(item) or 0) <= 0 then return end
local result = 0 local result = 0

View File

@ -120,17 +120,15 @@ local function allow_metadata_inventory_take(pos, listname, index, stack, player
return stack:get_count() return stack:get_count()
end end
local pipeworks_connect = exchangeclone.pipeworks and "^pipeworks_tube_connection_metallic.png" or ""
minetest.register_node("exchangeclone:deconstructor", { minetest.register_node("exchangeclone:deconstructor", {
description = S("Deconstructor"), description = S("Deconstructor"),
tiles = { tiles = {
"exchangeclone_deconstructor_up.png"..pipeworks_connect, "exchangeclone_deconstructor_up.png",
"exchangeclone_deconstructor_down.png"..pipeworks_connect, "exchangeclone_deconstructor_down.png",
"exchangeclone_deconstructor_right.png"..pipeworks_connect, "exchangeclone_deconstructor_right.png",
"exchangeclone_deconstructor_right.png"..pipeworks_connect, "exchangeclone_deconstructor_right.png",
"exchangeclone_deconstructor_right.png"..pipeworks_connect, "exchangeclone_deconstructor_right.png",
"exchangeclone_deconstructor_right.png"..pipeworks_connect, "exchangeclone_deconstructor_right.png",
}, },
groups = {cracky = 2, container = exchangeclone.mcl2 and 2 or 4, pickaxey = 2, tubedevice = 1, tubedevice_receiver = 1}, groups = {cracky = 2, container = exchangeclone.mcl2 and 2 or 4, pickaxey = 2, tubedevice = 1, tubedevice_receiver = 1},
_mcl_hardness = 3, _mcl_hardness = 3,

View File

@ -119,7 +119,6 @@ local function allow_metadata_inventory_take(pos, listname, index, stack, player
end end
function exchangeclone.register_energy_collector(itemstring, name, amount, modifier, recipe) function exchangeclone.register_energy_collector(itemstring, name, amount, modifier, recipe)
if exchangeclone.pipeworks then modifier = modifier.."^pipeworks_tube_connection_stony.png" end
minetest.register_node(itemstring, { minetest.register_node(itemstring, {
description = name.."\nGenerates "..exchangeclone.format_number(amount).." energy/second", description = name.."\nGenerates "..exchangeclone.format_number(amount).." energy/second",
tiles = { tiles = {
@ -211,7 +210,7 @@ exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk1", S(
} }
) )
exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk2", S("Energy Collector MK2"), 12, "^[multiply:#555555", { exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk2", S("Energy Collector MK2"), 12, "^[multiply:#333333", {
{iron_block, iron_block, iron_block}, {iron_block, iron_block, iron_block},
{"exchangeclone:energy_collector_mk1", "exchangeclone:energy_collector_mk1", "exchangeclone:energy_collector_mk1"}, {"exchangeclone:energy_collector_mk1", "exchangeclone:energy_collector_mk1", "exchangeclone:energy_collector_mk1"},
{iron_block, iron_block, iron_block} {iron_block, iron_block, iron_block}
@ -225,49 +224,49 @@ exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk3", S(
} }
) )
exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk4", S("Energy Collector MK4"), 160, "^[multiply:#aa7700", { exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk4", S("Energy Collector MK4"), 160, "^[multiply:#aa5500", {
{iron_block, iron_block, iron_block}, {iron_block, iron_block, iron_block},
{"exchangeclone:energy_collector_mk3", "exchangeclone:energy_collector_mk3", "exchangeclone:energy_collector_mk3"}, {"exchangeclone:energy_collector_mk3", "exchangeclone:energy_collector_mk3", "exchangeclone:energy_collector_mk3"},
{iron_block, iron_block, iron_block} {iron_block, iron_block, iron_block}
} }
) )
exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk5", S("Energy Collector MK5"), 640, "^[multiply:#007700", { exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk5", S("Energy Collector MK5"), 640, "^[multiply:#cc9900", {
{iron_block, iron_block, iron_block}, {iron_block, iron_block, iron_block},
{"exchangeclone:energy_collector_mk4", "exchangeclone:energy_collector_mk4", "exchangeclone:energy_collector_mk4"}, {"exchangeclone:energy_collector_mk4", "exchangeclone:energy_collector_mk4", "exchangeclone:energy_collector_mk4"},
{iron_block, iron_block, iron_block} {iron_block, iron_block, iron_block}
} }
) )
exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk6", S("Energy Collector MK6"), 2560, "^[multiply:#007777", { exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk6", S("Energy Collector MK6"), 2560, "^[multiply:#007700", {
{iron_block, iron_block, iron_block}, {iron_block, iron_block, iron_block},
{"exchangeclone:energy_collector_mk5", "exchangeclone:energy_collector_mk5", "exchangeclone:energy_collector_mk5"}, {"exchangeclone:energy_collector_mk5", "exchangeclone:energy_collector_mk5", "exchangeclone:energy_collector_mk5"},
{iron_block, iron_block, iron_block} {iron_block, iron_block, iron_block}
} }
) )
exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk7", S("Energy Collector MK7"), 10240, "^[multiply:#000077", { exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk7", S("Energy Collector MK7"), 10240, "^[multiply:#007777", {
{iron_block, iron_block, iron_block}, {iron_block, iron_block, iron_block},
{"exchangeclone:energy_collector_mk6", "exchangeclone:energy_collector_mk6", "exchangeclone:energy_collector_mk6"}, {"exchangeclone:energy_collector_mk6", "exchangeclone:energy_collector_mk6", "exchangeclone:energy_collector_mk6"},
{iron_block, iron_block, iron_block} {iron_block, iron_block, iron_block}
} }
) )
exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk8", S("Energy Collector MK8"), 40960, "^[multiply:#770077", { exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk8", S("Energy Collector MK8"), 40960, "^[multiply:#000077", {
{iron_block, iron_block, iron_block}, {iron_block, iron_block, iron_block},
{"exchangeclone:energy_collector_mk7", "exchangeclone:energy_collector_mk7", "exchangeclone:energy_collector_mk7"}, {"exchangeclone:energy_collector_mk7", "exchangeclone:energy_collector_mk7", "exchangeclone:energy_collector_mk7"},
{iron_block, iron_block, iron_block} {iron_block, iron_block, iron_block}
} }
) )
exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk9", S("Energy Collector MK9"), 163840, "^[brighten", { exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk9", S("Energy Collector MK9"), 163840, "^[multiply:#770077", {
{iron_block, iron_block, iron_block}, {iron_block, iron_block, iron_block},
{"exchangeclone:energy_collector_mk8", "exchangeclone:energy_collector_mk8", "exchangeclone:energy_collector_mk8"}, {"exchangeclone:energy_collector_mk8", "exchangeclone:energy_collector_mk8", "exchangeclone:energy_collector_mk8"},
{iron_block, iron_block, iron_block} {iron_block, iron_block, iron_block}
} }
) )
exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk10", S("Energy Collector MK10"), 655360, "^[invert:rgb", { exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk10", S("Energy Collector MK10"), 655360, "^[multiply:#cc00aa", {
{iron_block, iron_block, iron_block}, {iron_block, iron_block, iron_block},
{"exchangeclone:energy_collector_mk9", "exchangeclone:energy_collector_mk9", "exchangeclone:energy_collector_mk9"}, {"exchangeclone:energy_collector_mk9", "exchangeclone:energy_collector_mk9", "exchangeclone:energy_collector_mk9"},
{iron_block, iron_block, iron_block} {iron_block, iron_block, iron_block}

View File

@ -502,16 +502,15 @@ if minetest.get_modpath("screwdriver") then
end end
end end
end end
local pipeworks_connect = exchangeclone.pipeworks and "^pipeworks_tube_connection_stony.png" or ""
local inactive_def = { local inactive_def = {
description = S("Dark Matter Furnace"), description = S("Dark Matter Furnace"),
tiles = { tiles = {
"exchangeclone_dark_matter_block.png"..pipeworks_connect, "exchangeclone_dark_matter_block.png",
"exchangeclone_dark_matter_block.png"..pipeworks_connect, "exchangeclone_dark_matter_block.png",
"exchangeclone_dark_matter_block.png"..pipeworks_connect, "exchangeclone_dark_matter_block.png",
"exchangeclone_dark_matter_block.png"..pipeworks_connect, "exchangeclone_dark_matter_block.png",
"exchangeclone_dark_matter_block.png"..pipeworks_connect, "exchangeclone_dark_matter_block.png",
"exchangeclone_dark_matter_furnace.png", "exchangeclone_dark_matter_furnace.png",
}, },
paramtype2 = "4dir", paramtype2 = "4dir",
@ -579,11 +578,11 @@ local inactive_def = {
local active_def = { local active_def = {
description = S("Active Dark Matter Furnace"), description = S("Active Dark Matter Furnace"),
tiles = { tiles = {
"exchangeclone_dark_matter_block.png"..pipeworks_connect, "exchangeclone_dark_matter_block.png",
"exchangeclone_dark_matter_block.png"..pipeworks_connect, "exchangeclone_dark_matter_block.png",
"exchangeclone_dark_matter_block.png"..pipeworks_connect, "exchangeclone_dark_matter_block.png",
"exchangeclone_dark_matter_block.png"..pipeworks_connect, "exchangeclone_dark_matter_block.png",
"exchangeclone_dark_matter_block.png"..pipeworks_connect, "exchangeclone_dark_matter_block.png",
"exchangeclone_dark_matter_furnace_active.png", "exchangeclone_dark_matter_furnace_active.png",
}, },
paramtype2 = "4dir", paramtype2 = "4dir",
@ -658,11 +657,11 @@ minetest.register_node("exchangeclone:red_matter_furnace_active", table.copy(act
minetest.override_item("exchangeclone:red_matter_furnace", { minetest.override_item("exchangeclone:red_matter_furnace", {
description = S("Red Matter Furnace"), description = S("Red Matter Furnace"),
tiles = { tiles = {
"exchangeclone_red_matter_block.png"..pipeworks_connect, "exchangeclone_red_matter_block.png",
"exchangeclone_red_matter_block.png"..pipeworks_connect, "exchangeclone_red_matter_block.png",
"exchangeclone_red_matter_block.png"..pipeworks_connect, "exchangeclone_red_matter_block.png",
"exchangeclone_red_matter_block.png"..pipeworks_connect, "exchangeclone_red_matter_block.png",
"exchangeclone_red_matter_block.png"..pipeworks_connect, "exchangeclone_red_matter_block.png",
"exchangeclone_red_matter_furnace.png", "exchangeclone_red_matter_furnace.png",
}, },
groups = {pickaxey=6, cracky = 3, container = exchangeclone.mcl2 and 2 or 4, deco_block=1, material_stone=1, level = get_level(5), exchangeclone_furnace = 2, tubedevice = 1, tubedevice_receiver = 1}, groups = {pickaxey=6, cracky = 3, container = exchangeclone.mcl2 and 2 or 4, deco_block=1, material_stone=1, level = get_level(5), exchangeclone_furnace = 2, tubedevice = 1, tubedevice_receiver = 1},

View File

@ -8,7 +8,7 @@ function exchangeclone.hammer_action(itemstack, player, center)
if not (vector1 and vector2) then return end if not (vector1 and vector2) then return end
local pos1, pos2 = vector.add(center, vector1), vector.add(center, vector2) local pos1, pos2 = vector.add(center, vector1), vector.add(center, vector2)
exchangeclone.play_ability_sound(player) exchangeclone.play_sound(player, "exchangeclone_destruct")
local nodes = minetest.find_nodes_in_area(pos1, pos2, {"group:"..exchangeclone.pickaxe_group}) local nodes = minetest.find_nodes_in_area(pos1, pos2, {"group:"..exchangeclone.pickaxe_group})
for _, pos in pairs(nodes) do for _, pos in pairs(nodes) do
if minetest.is_protected(pos, player:get_player_name()) then if minetest.is_protected(pos, player:get_player_name()) then

View File

@ -47,7 +47,7 @@ function exchangeclone.hoe_action(itemstack, player, center)
if not (vector1 and vector2) then return end if not (vector1 and vector2) then return end
local pos1, pos2 = vector.add(center, vector1), vector.add(center, vector2) local pos1, pos2 = vector.add(center, vector1), vector.add(center, vector2)
nodes = minetest.find_nodes_in_area(pos1, pos2, {"group:cultivatable"}) nodes = minetest.find_nodes_in_area(pos1, pos2, {"group:cultivatable"})
exchangeclone.play_ability_sound(player) exchangeclone.play_sound(player, "exchangeclone_charge_up")
else else
nodes = {center} nodes = {center}
end end

View File

@ -31,7 +31,7 @@ minetest.register_alias("exchangeclone:exchange_orb", "exchangeclone:klein_star_
for i, name in ipairs(names) do for i, name in ipairs(names) do
local codified_name = name:lower():gsub(" ", "_") local codified_name = name:lower():gsub(" ", "_")
minetest.register_tool("exchangeclone:"..codified_name, { minetest.register_tool("exchangeclone:"..codified_name, {
description = S(name).."\n"..S("Current Charge: @1", 0) description = S(name).."\n"..S("Current Charge: @1", 0),
inventory_image = "exchangeclone_"..codified_name..".png", inventory_image = "exchangeclone_"..codified_name..".png",
wield_image = "exchangeclone_"..codified_name..".png", wield_image = "exchangeclone_"..codified_name..".png",
on_secondary_use = read_star_charge, on_secondary_use = read_star_charge,
@ -44,7 +44,7 @@ for i, name in ipairs(names) do
}) })
if i > 1 then if i > 1 then
previous_codified_name = names[i-1]:lower():gsub(" ", "_") local previous_codified_name = names[i-1]:lower():gsub(" ", "_")
minetest.register_craft({ minetest.register_craft({
output = "exchangeclone:"..codified_name, output = "exchangeclone:"..codified_name,
type = "shapeless", type = "shapeless",

View File

@ -63,9 +63,9 @@ local function pickaxe_on_use(itemstack, player, pointed_thing)
end end
return itemstack return itemstack
elseif pointed_thing.type == "node" then elseif pointed_thing.type == "node" then
if (minetest.get_item_group(minetest.get_node(pointed_thing.under).name, "exchangeclone_ore") > 0) then if minetest.get_item_group(minetest.get_node(pointed_thing.under).name, "exchangeclone_ore") > 0 then
if exchangeclone.check_cooldown(player, "pickaxe") then return itemstack end if exchangeclone.check_cooldown(player, "pickaxe") then return itemstack end
exchangeclone.play_ability_sound(player) exchangeclone.play_sound(player, "exchangeclone_destruct")
exchangeclone.mine_vein(player, pointed_thing.under) exchangeclone.mine_vein(player, pointed_thing.under)
exchangeclone.start_cooldown(player, "pickaxe", 0.5) exchangeclone.start_cooldown(player, "pickaxe", 0.5)
elseif itemstack:get_name():find("red_") then elseif itemstack:get_name():find("red_") then

View File

@ -156,9 +156,9 @@ local function morningstar_on_use(itemstack, player, pointed_thing)
local sneaking = player:get_player_control().sneak local sneaking = player:get_player_control().sneak
if pointed_thing.type == "node" then if pointed_thing.type == "node" then
local name = minetest.get_node(pointed_thing.under).name local name = minetest.get_node(pointed_thing.under).name
if (minetest.get_item_group(name, "exchangeclone_ore") > 0) then if minetest.get_item_group(name, "exchangeclone_ore") > 0 then
if exchangeclone.check_cooldown(player, "pickaxe") then return itemstack end if exchangeclone.check_cooldown(player, "pickaxe") then return itemstack end
exchangeclone.play_ability_sound(player) exchangeclone.play_sound(player, "exchangeclone_destruct")
exchangeclone.multidig_data[player:get_player_name()] = true exchangeclone.multidig_data[player:get_player_name()] = true
exchangeclone.mine_vein(player, pointed_thing.under) exchangeclone.mine_vein(player, pointed_thing.under)
exchangeclone.multidig_data[player:get_player_name()] = nil exchangeclone.multidig_data[player:get_player_name()] = nil

View File

@ -8,7 +8,7 @@ function exchangeclone.shear_action(itemstack, player, center)
if not (vector1 and vector2) then return end if not (vector1 and vector2) then return end
local pos1, pos2 = vector.add(center, vector1), vector.add(center, vector2) local pos1, pos2 = vector.add(center, vector1), vector.add(center, vector2)
exchangeclone.play_ability_sound(player) exchangeclone.play_sound(player, "exchangeclone_destruct")
local grouped = leaves and {"group:leaves"} or {"group:shearsy", "group:shearsy_cobweb"} local grouped = leaves and {"group:leaves"} or {"group:shearsy", "group:shearsy_cobweb"}
local nodes = minetest.find_nodes_in_area(pos1, pos2, grouped) local nodes = minetest.find_nodes_in_area(pos1, pos2, grouped)
for i, pos in pairs(nodes) do for i, pos in pairs(nodes) do
@ -54,7 +54,7 @@ local shears_rightclick = function(itemstack, player, pointed_thing)
minetest.set_node(pointed_thing.under, {name="mcl_farming:pumpkin_face", param2 = param2}) minetest.set_node(pointed_thing.under, {name="mcl_farming:pumpkin_face", param2 = param2})
minetest.add_item(pointed_thing.above, "mcl_farming:pumpkin_seeds 4") minetest.add_item(pointed_thing.above, "mcl_farming:pumpkin_seeds 4")
elseif minetest.get_item_group(node.name, "shearsy") > 0 elseif minetest.get_item_group(node.name, "shearsy") > 0
or minetest.get_item_group(node.name, "shearsy_cobweb") then or minetest.get_item_group(node.name, "shearsy_cobweb") > 0 then
exchangeclone.shear_action(itemstack, player, pointed_thing.under) exchangeclone.shear_action(itemstack, player, pointed_thing.under)
end end
end end

View File

@ -47,7 +47,11 @@ function exchangeclone.shovel_action(itemstack, player, center)
if charge > 1 then if charge > 1 then
local vector1, vector2 = exchangeclone.process_range(player, range_type, charge) local vector1, vector2 = exchangeclone.process_range(player, range_type, charge)
local pos1, pos2 = vector.add(center, vector1), vector.add(center, vector2) local pos1, pos2 = vector.add(center, vector1), vector.add(center, vector2)
exchangeclone.play_ability_sound(player) if action == "path" or action == "unpath" then
exchangeclone.play_sound(player, "exchangeclone_charge_up")
else
exchangeclone.play_sound(player, "exchangeclone_destruct")
end
nodes = minetest.find_nodes_in_area(pos1, pos2, groups_to_search) nodes = minetest.find_nodes_in_area(pos1, pos2, groups_to_search)
else else
if action == "path" or action == "unpath" then if action == "path" or action == "unpath" then

View File

@ -79,7 +79,7 @@ function exchangeclone.aoe_attack(info)
if exchangeclone.check_cooldown(player, "sword") then return end if exchangeclone.check_cooldown(player, "sword") then return end
exchangeclone.play_ability_sound(player) exchangeclone.play_sound(player, "exchangeclone_charge_up")
local pos = player:get_pos() local pos = player:get_pos()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 B

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -136,14 +136,12 @@ local function get_level(level)
end end
end end
local pipeworks_connect = exchangeclone.pipeworks and "^pipeworks_tube_connection_stony.png" or ""
minetest.register_node("exchangeclone:upgrader", { minetest.register_node("exchangeclone:upgrader", {
description = "Upgrader", description = "Upgrader",
tiles = { tiles = {
"exchangeclone_upgrader_top.png"..pipeworks_connect, "exchangeclone_upgrader_top.png",
"exchangeclone_upgrader_bottom.png"..pipeworks_connect, "exchangeclone_upgrader_bottom.png",
"exchangeclone_upgrader_side.png"..pipeworks_connect, "exchangeclone_upgrader_side.png",
}, },
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)

View File

@ -139,7 +139,7 @@ local function handle_inventory(player, inventory, to_list)
if wear and wear > 1 then if wear and wear > 1 then
individual_energy_value = math.max(math.floor(individual_energy_value * ((65536 - wear)/65536)), 1) individual_energy_value = math.max(math.floor(individual_energy_value * ((65536 - wear)/65536)), 1)
end end
if minetest.get_item_group(itemstring, "klein_star") then if minetest.get_item_group(itemstring, "klein_star") > 0 then
individual_energy_value = individual_energy_value + exchangeclone.get_star_itemstack_energy(stack) individual_energy_value = individual_energy_value + exchangeclone.get_star_itemstack_energy(stack)
end end
local player_energy = exchangeclone.get_player_energy(player) local player_energy = exchangeclone.get_player_energy(player)
@ -193,7 +193,7 @@ local function allow_inventory_action(player, stack, to_list, count, move, inven
if not check_for_table(player, inventory) then return 0 end if not check_for_table(player, inventory) then return 0 end
if to_list == "output" then if to_list == "output" then
return 0 return 0
elseif to_list == "charge" and minetest.get_item_group(stack:get_name, "klein_star") then elseif to_list == "charge" and minetest.get_item_group(stack:get_name(), "klein_star") < 1 then
return 0 return 0
elseif to_list == "learn" then elseif to_list == "learn" then
if stack:get_name() == "exchangeclone:alchemical_tome" then return count end if stack:get_name() == "exchangeclone:alchemical_tome" then return count end
@ -375,7 +375,7 @@ minetest.register_node("exchangeclone:transmutation_table", {
}) })
minetest.register_tool("exchangeclone:alchemical_tome", { minetest.register_tool("exchangeclone:alchemical_tome", {
description = "Alchemical Tome\Magnum Star Omegas in crafting recipe must be full", description = "Alchemical Tome\nMagnum Star Omegas in crafting recipe must be full",
inventory_image = "exchangeclone_alchemical_tome.png", inventory_image = "exchangeclone_alchemical_tome.png",
wield_image = "exchangeclone_alchemical_tome.png", wield_image = "exchangeclone_alchemical_tome.png",
groups = {disable_repair = 1, fire_immune = 1} groups = {disable_repair = 1, fire_immune = 1}

View File

@ -78,7 +78,7 @@ function exchangeclone.get_item_energy(item)
end end
local def = minetest.registered_items[item:get_name()] local def = minetest.registered_items[item:get_name()]
if not def then return end if not def then return end
if minetest.get_item_group(item:get_name(), "klein_star" then if minetest.get_item_group(item:get_name(), "klein_star") > 0 then
if def.energy_value then if def.energy_value then
return def.energy_value + exchangeclone.get_star_itemstack_energy(item) return def.energy_value + exchangeclone.get_star_itemstack_energy(item)
end end
@ -285,7 +285,7 @@ end
-- Plays the sound caused by ExchangeClone abilities -- Plays the sound caused by ExchangeClone abilities
function exchangeclone.play_sound(player, sound, pitch) function exchangeclone.play_sound(player, sound, pitch)
if not player then return end if not player then return end
minetest.sound_play("exchangeclone_ability", {pitch = pitch or 1, pos = player:get_pos(), max_hear_distance = 20, }) minetest.sound_play(sound, {pitch = pitch or 1, pos = player:get_pos(), max_hear_distance = 20, })
end end
-- Check the clicked node for a right-click function. -- Check the clicked node for a right-click function.
@ -308,16 +308,16 @@ function exchangeclone.charge_update(itemstack, player)
local max_charge = exchangeclone.tool_levels.count[charge_type] local max_charge = exchangeclone.tool_levels.count[charge_type]
if not max_charge then return itemstack end if not max_charge then return itemstack end
local charge = math.max(itemstack:get_meta():get_int("exchangeclone_tool_charge"), 1) local charge = math.max(itemstack:get_meta():get_int("exchangeclone_tool_charge"), 1)
local new_pitch = 0.5 + ((0.5 / (max_charge - 1)) * (charge-1))
minetest.log(new_pitch or 1)
if player:get_player_control().sneak then if player:get_player_control().sneak then
if charge > 1 then if charge > 1 then
charge = charge - 1
local new_pitch = charge/max_charge
exchangeclone.play_sound(player, "exchangeclone_charge_down", new_pitch) exchangeclone.play_sound(player, "exchangeclone_charge_down", new_pitch)
charge = charge - 1
end end
elseif charge < max_charge then elseif charge < max_charge then
exchangeclone.play_sound(player, "exchangeclone_charge_up", new_pitch)
charge = charge + 1 charge = charge + 1
local new_pitch = charge/max_charge
minetest.sound_play("exchangeclone_charge_up", {pitch = new_pitch, pos = player:get_pos(), max_hear_distance = 20, })
end end
itemstack:get_meta():set_int("exchangeclone_tool_charge", charge) itemstack:get_meta():set_int("exchangeclone_tool_charge", charge)
itemstack:set_wear(math.max(1, math.min(65535, 65535-(65535/(max_charge-1))*(charge-1)))) itemstack:set_wear(math.max(1, math.min(65535, 65535-(65535/(max_charge-1))*(charge-1))))
@ -940,8 +940,8 @@ function exchangeclone.multidig(pos, node, player, mode, nodes)
local pos1 = vector.add(pos, {[dir1] = -1, [dir2] = -1, [unused_dir] = 0}) local pos1 = vector.add(pos, {[dir1] = -1, [dir2] = -1, [unused_dir] = 0})
local pos2 = vector.add(pos, {[dir1] = 1, [dir2] = 1, [unused_dir] = 0}) local pos2 = vector.add(pos, {[dir1] = 1, [dir2] = 1, [unused_dir] = 0})
local nodes = minetest.find_nodes_in_area(pos1, pos2, nodes) local found_nodes = minetest.find_nodes_in_area(pos1, pos2, nodes)
for _, node_pos in pairs(nodes) do for _, node_pos in pairs(found_nodes) do
minetest.node_dig(node_pos, minetest.get_node(node_pos), player) minetest.node_dig(node_pos, minetest.get_node(node_pos), player)
end end
elseif mode == "3x1_long" then elseif mode == "3x1_long" then