Compare commits

...

7 Commits

Author SHA1 Message Date
ThePython 48a01f324c Merge branch 'main' into dev 2024-02-27 18:19:09 -08:00
ThePython da82fc283a Fix Tome 2024-02-27 18:18:47 -08:00
ThePython 704dc487c9 Started adding EMC link 2024-02-27 18:16:22 -08:00
ThePython 5548c91ecf Merge (de)constructor code into `deprecated_stuff.lua` 2024-02-27 17:20:42 -08:00
ThePython b20a47e4b6 Forgot to update readme 2024-02-27 17:04:43 -08:00
ThePython 639a341dce Armor textures finished 2024-02-27 17:04:15 -08:00
ThePython abe48311de MCL armor textures 2024-02-27 15:48:27 -08:00
40 changed files with 222 additions and 281 deletions

View File

@ -54,10 +54,12 @@ Dependencies: Minetest Game or MineClone.
![Philosopher's Stone Transmutation Screenshot](phil_transmutation.png) ![Philosopher's Stone Transmutation Screenshot](phil_transmutation.png)
## Sources/licenses: ## Sources/licenses:
* Ideas:
* Based on the Minecraft mod Equivalent Exchange 2 and the modern version, ProjectE (both MIT, though the source for EE2 is unavailable)
* Also includes some features from ProjectExpansion, an expansion to ProjectE (MIT).
* Code: GPLv3+ * Code: GPLv3+
* Originally started as a fork of Enchant97's mod [Element Exchange](https://github.com/enchant97/minetest_element_exchange) (GPLv3+). * Originally started as a fork of Enchant97's mod [Element Exchange](https://github.com/enchant97/minetest_element_exchange) (GPLv3+).
* Based on the Minecraft mod Equivalent Exchange 2 and the modern version, ProjectE (both MIT, though the source for EE2 is unavailable) * Some code copied/modified from MineClone2 and Minetest Game (both GPLv3+)
* Also includes some features from ProjectExpansion, an expansion to ProjectE.
* Textures: * Textures:
* Constructor and Deconstructor: Unmodified from Element Exchange (GPLv3+) * Constructor and Deconstructor: Unmodified from Element Exchange (GPLv3+)
* Armor (not the inventory image): Modified versions of diamond armor from 3D Armor in MTG and `mcl_armor` in MCL (both CC-BY-SA-3.0) * Armor (not the inventory image): Modified versions of diamond armor from 3D Armor in MTG and `mcl_armor` in MCL (both CC-BY-SA-3.0)
@ -77,6 +79,7 @@ You can find the old textures and sounds by going back to previous commits in Gi
## To-to for v8.0: ## To-to for v8.0:
[x] Deprecate (De)Constructors [x] Deprecate (De)Constructors
[x] Remove fuel crafting recipes for stars and upgrades [x] Remove fuel crafting recipes for stars and upgrades
[x] Add ProjectE armor textures
[ ] Add EMC Link [ ] Add EMC Link
[ ] Add Energy Condensers [ ] Add Energy Condensers
[ ] Add Divining Rods [ ] Add Divining Rods
@ -91,14 +94,20 @@ You can find the old textures and sounds by going back to previous commits in Gi
[ ] Add Void Ring [ ] Add Void Ring
[ ] Add DM Pedestal [ ] Add DM Pedestal
[ ] Functions for passive stones, talisman, evertide/volcanite, zero/ignition [ ] Functions for passive stones, talisman, evertide/volcanite, zero/ignition
[ ] Add ProjectE armor textures
## Changelog ## Changelog
<details><summary>Look at this fancy expanding changelog</summary> <details><summary>Look at this fancy expanding changelog</summary>
### v8.0 ### v8.0
* The Constructor and Deconstructor are now deprecated. Element Exchange is no more. * New Features:
* Upgrades and Stars can no longer be used as fuel. *
* Changes:
* The Constructor and Deconstructor are now deprecated. Element Exchange is no more.
* Upgrades and Stars can no longer be used as fuel.
* Dark and Red Matter Armor now uses ProjectE's textures
* Bugfixes:
* Dark and Red Matter Armor display properly (and identically) in both games.
### v7.3 (not released yet because there's not enough) ### v7.3 (not released yet because there's not enough)
* Renamed Alchemical Tome to Tome of Knowledge, and made it uncraftable by default. * Renamed Alchemical Tome to Tome of Knowledge, and made it uncraftable by default.

View File

@ -1,28 +1,5 @@
local S = minetest.get_translator() local S = minetest.get_translator()
local function get_armor_texture(type, matter, preview)
local modifier
-- hsl unfortunately only works in 5.8
if matter == "dark" then
modifier = "^[multiply:#222222"
--modifier = "^[hsl:0:-100:-100^[hsl:0:-100:-100"
else
modifier = "^[multiply:#990000"
--modifier = "^[hsl:-180:100:-100"
end
local result
if type:sub(1,3) == "inv" then
result = "exchangeclone_"..type..".png"
elseif exchangeclone.mcl then
result = "exchangeclone_mcl_"..type.."_base.png"..modifier
else
result = "exchangeclone_mtg_"..type.."_base"
if preview then result = result.."_preview" end
result = result..".png"..modifier
end
return result
end
local armor_pieces = { local armor_pieces = {
["exchangeclone:helmet_dark_matter"] = {material = "dark_matter", piece = "helmet", category = "weak"}, ["exchangeclone:helmet_dark_matter"] = {material = "dark_matter", piece = "helmet", category = "weak"},
["exchangeclone:helmet_red_matter"] = {material = "red_matter", piece = "helmet", category = "weak"}, ["exchangeclone:helmet_red_matter"] = {material = "red_matter", piece = "helmet", category = "weak"},
@ -156,10 +133,10 @@ if exchangeclone.mcl then
feet = 0, feet = 0,
}, },
textures = { textures = {
head = get_armor_texture("helmet","dark"), head = "exchangeclone_dark_matter_helmet.png",
torso = get_armor_texture("chestplate","dark"), torso = "exchangeclone_dark_matter_chestplate.png",
legs = get_armor_texture("leggings","dark"), legs = "exchangeclone_dark_matter_leggings.png",
feet = get_armor_texture("boots","dark"), feet = "exchangeclone_dark_matter_boots.png",
}, },
toughness = 4, toughness = 4,
groups = {dark_matter_armor = 1, fire_immune = 1, exchangeclone_upgradable = 1}, groups = {dark_matter_armor = 1, fire_immune = 1, exchangeclone_upgradable = 1},
@ -187,10 +164,10 @@ if exchangeclone.mcl then
feet = 0, feet = 0,
}, },
textures = { textures = {
head = get_armor_texture("helmet","red"), head = "exchangeclone_red_matter_helmet.png",
torso = get_armor_texture("chestplate","red"), torso = "exchangeclone_red_matter_chestplate.png",
legs = get_armor_texture("leggings","red"), legs = "exchangeclone_red_matter_leggings.png",
feet = get_armor_texture("boots","red"), feet = "exchangeclone_red_matter_boots.png",
}, },
toughness = 5, toughness = 5,
groups = {red_matter_armor = 1, disable_repair = 1, fire_immune = 1, exchangeclone_upgradable = 1}, groups = {red_matter_armor = 1, disable_repair = 1, fire_immune = 1, exchangeclone_upgradable = 1},
@ -203,14 +180,13 @@ 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_"..matter.."_matter_"..type, matter), inventory_image = "exchangeclone_inv_"..matter.."_matter_"..type..".png",
}) })
end end
end end
-- Until Minetest fixes an issue, there's no way to make this work correctly. -- Until Minetest fixes an issue, there's no way to make this work correctly.
mcl_damage.register_modifier(function(obj, damage, reason) mcl_damage.register_modifier(function(obj, damage, reason)
local start_time = minetest.get_us_time()
if not obj:is_player() then return end if not obj:is_player() then return end
local inv = mcl_util.get_inventory(obj) local inv = mcl_util.get_inventory(obj)
local blocked = 0 local blocked = 0
@ -224,62 +200,19 @@ if exchangeclone.mcl then
end end
end, -100) end, -100)
else else
armor:register_armor("exchangeclone:helmet_dark_matter", { for _, matter in pairs({"Dark", "Red"}) do
description = S("Dark Matter Helmet"), for piece, place in pairs({Helmet = "head", Chestplate = "torso", Leggings = "legs", Boots = "feet"}) do
texture = get_armor_texture("helmet","dark"), local matter_lower = matter:lower()
inventory_image = get_armor_texture("inv_dark_matter_helmet"), local piece_lower = piece:lower()
preview = get_armor_texture("helmet","dark", true), armor:register_armor("exchangeclone:"..piece_lower.."_"..matter_lower.."_matter", {
groups = {armor_head = 1, dark_matter_armor = 1, disable_repair = 1, exchangeclone_upgradable = 1} description = S("@1 Matter @2", matter, piece),
}) texture = "exchangeclone_"..matter_lower.."_matter_"..piece_lower..".png",
armor:register_armor("exchangeclone:chestplate_dark_matter", { inventory_image = "exchangeclone_inv_"..matter_lower.."_matter_"..piece_lower..".png",
description = S("Dark Matter Chestplate"), groups = {["armor_"..place] = 1, [matter_lower.."_matter_armor"] = 1, disable_repair = 1, exchangeclone_upgradable = 1}
texture = get_armor_texture("chestplate","dark"), })
inventory_image = get_armor_texture("inv_dark_matter_chestplate"), end
preview = get_armor_texture("chestplate","dark", true), end
groups = {armor_torso = 1, dark_matter_armor = 1, disable_repair = 1, exchangeclone_upgradable = 1}
})
armor:register_armor("exchangeclone:leggings_dark_matter", {
description = S("Dark Matter Leggings"),
texture = get_armor_texture("leggings","dark"),
inventory_image = get_armor_texture("inv_dark_matter_leggings"),
preview = get_armor_texture("leggings","dark", true),
groups = {armor_legs = 1, dark_matter_armor = 1, disable_repair = 1, exchangeclone_upgradable = 1}
})
armor:register_armor("exchangeclone:boots_dark_matter", {
description = S("Dark Matter Boots"),
texture = get_armor_texture("boots","dark"),
inventory_image = get_armor_texture("inv_dark_matter_boots"),
preview = get_armor_texture("boots","dark", true),
groups = {armor_feet = 1, dark_matter_armor = 1, disable_repair = 1, exchangeclone_upgradable = 1, armor_feather = 1}
})
armor:register_armor("exchangeclone:helmet_red_matter", {
description = S("Red Matter Helmet"),
texture = get_armor_texture("helmet","red"),
inventory_image = get_armor_texture("inv_red_matter_helmet"),
preview = get_armor_texture("helmet","red", true),
groups = {armor_head = 1, red_matter_armor = 1, disable_repair = 1, exchangeclone_upgradable = 1}
})
armor:register_armor("exchangeclone:chestplate_red_matter", {
description = S("Red Matter Chestplate"),
texture = get_armor_texture("chestplate","red"),
inventory_image = get_armor_texture("inv_red_matter_chestplate"),
preview = get_armor_texture("chestplate","red", true),
groups = {armor_torso = 1, red_matter_armor = 1, disable_repair = 1, exchangeclone_upgradable = 1}
})
armor:register_armor("exchangeclone:leggings_red_matter", {
description = S("Red Matter Leggings"),
texture = get_armor_texture("leggings","red"),
inventory_image = get_armor_texture("inv_red_matter_leggings"),
preview = get_armor_texture("leggings","red", true),
groups = {armor_legs = 1, red_matter_armor = 1, disable_repair = 1, exchangeclone_upgradable = 1}
})
armor:register_armor("exchangeclone:boots_red_matter", {
description = S("Red Matter Boots"),
texture = get_armor_texture("boots","red"),
inventory_image = get_armor_texture("inv_red_matter_boots"),
preview = get_armor_texture("boots","red", true),
groups = {armor_feet = 1, red_matter_armor = 1, disable_repair = 1, exchangeclone_upgradable = 1}
})
minetest.register_on_player_hpchange(function(player, hp_change, reason) minetest.register_on_player_hpchange(function(player, hp_change, reason)
if hp_change < 0 then if hp_change < 0 then
local damage = -hp_change local damage = -hp_change

View File

@ -1,89 +0,0 @@
local S = minetest.get_translator()
local formspec =
"size["..(exchangeclone.mcl and 9 or 8)..",9]"..
"label[2,1;"..S("Star").."]"..
"list[context;fuel;2,2;1,1;]"..
"label[3,1;"..S("Source").."]"..
"list[context;src;3,2;1,1;]"..
"label[5,1;"..S("Output").."]"..
"list[context;dst;5,2;1,1;]"..
exchangeclone.inventory_formspec(0,5)..
"listring[current_player;main]"..
"listring[context;src]"..
"listring[current_player;main]"..
"listring[context;fuel]"..
"listring[current_player;main]"..
"listring[context;dst]"
if exchangeclone.mcl then
formspec = formspec..
mcl_formspec.get_itemslot_bg(2,2,1,1)..
mcl_formspec.get_itemslot_bg(3,2,1,1)..
mcl_formspec.get_itemslot_bg(5,2,1,1)
end
minetest.register_alias("exchangeclone:element_constructor", "exchangeclone:constructor")
local function on_construct(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("fuel", 1)
inv:set_size("src", 1)
inv:set_size("dst", 1)
meta:set_string("formspec", formspec)
meta:set_string("infotext", S("Constructor"))
end
local function allow_metadata_inventory_put(pos, listname, index, stack, player)
return 0
end
local function allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player)
return 0
end
local function allow_metadata_inventory_take(pos, listname, index, stack, player)
if minetest.is_protected(pos, player:get_player_name()) then
return 0
end
return stack:get_count()
end
minetest.register_node("exchangeclone:constructor", {
description = "Constructor (DEPRECATED)\nUse the EMC Link instead. This will be removed in a future version.",
tiles = {
"exchangeclone_constructor_up.png",
"exchangeclone_constructor_down.png",
"exchangeclone_constructor_right.png",
"exchangeclone_constructor_right.png",
"exchangeclone_constructor_right.png",
"exchangeclone_constructor_right.png",
},
groups = {cracky = 2, container = exchangeclone.mcl2 and 2 or 4, pickaxey = 2, not_in_creative_inventory = 1, not_in_craft_guide = 1},
_mcl_hardness = 3,
_mcl_blast_resistance = 6,
sounds = exchangeclone.sound_mod.node_sound_metal_defaults(),
is_ground_content = false,
can_dig = exchangeclone.can_dig,
after_dig_node = exchangeclone.drop_after_dig({"src", "fuel", "dst"}),
on_construct = on_construct,
on_blast = exchangeclone.on_blast({"src", "fuel", "dst"}),
allow_metadata_inventory_put = allow_metadata_inventory_put,
allow_metadata_inventory_move = allow_metadata_inventory_move,
allow_metadata_inventory_take = allow_metadata_inventory_take,
})
local recipe_ingredient = "default:pick_diamond"
if exchangeclone.mcl then
recipe_ingredient = "mcl_tools:pick_diamond"
end
minetest.register_craft({
type = "shaped",
output = "exchangeclone:constructor",
recipe = {
{"exchangeclone:klein_star_drei"},
{recipe_ingredient},
{"exchangeclone:klein_star_drei"}
}
})

View File

@ -1,85 +0,0 @@
local S = minetest.get_translator()
local formspec =
"size["..(exchangeclone.mcl and 9 or 8)..",9]"..
"label[2,1;"..S("Input").."]"..
"list[context;src;2,2;1,1;]"..
"label[5,1;"..S("Star").."]"..
"list[context;fuel;5,2;1,1;]"..
exchangeclone.inventory_formspec(0,5)..
"listring[current_player;main]"..
"listring[context;src]"..
"listring[current_player;main]"..
"listring[context;fuel]"..
"listring[current_player;main]"..
"listring[context;dst]"
if exchangeclone.mcl then
formspec = formspec..
mcl_formspec.get_itemslot_bg(2,2,1,1)..
mcl_formspec.get_itemslot_bg(5,2,1,1)
end
minetest.register_alias("exchangeclone:element_deconstructor", "exchangeclone:deconstructor")
local function on_construct(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("src", 1)
inv:set_size("fuel", 1)
meta:set_string("formspec", formspec)
meta:set_string("infotext", S("Deconstructor"))
end
local function allow_metadata_inventory_put(pos, listname, index, stack, player)
return 0
end
local function allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player)
return 0
end
local function allow_metadata_inventory_take(pos, listname, index, stack, player)
if minetest.is_protected(pos, player:get_player_name()) then
return 0
end
return stack:get_count()
end
minetest.register_node("exchangeclone:deconstructor", {
description = S("Deconstructor (DEPRECATED)\nUse the EMC Link instead. This will be removed in a future version."),
tiles = {
"exchangeclone_deconstructor_up.png",
"exchangeclone_deconstructor_down.png",
"exchangeclone_deconstructor_right.png",
"exchangeclone_deconstructor_right.png",
"exchangeclone_deconstructor_right.png",
"exchangeclone_deconstructor_right.png",
},
groups = {cracky = 2, container = exchangeclone.mcl2 and 2 or 4, pickaxey = 2, not_in_creative_inventory = 1, not_in_craft_guide = 1},
_mcl_hardness = 3,
_mcl_blast_resistance = 6,
sounds = exchangeclone.sound_mod.node_sound_metal_defaults(),
is_ground_content = false,
can_dig = exchangeclone.can_dig,
after_dig_node = exchangeclone.drop_after_dig({"src", "fuel"}),
on_construct = on_construct,
on_blast = exchangeclone.on_blast({"src", "fuel"}),
allow_metadata_inventory_put = allow_metadata_inventory_put,
allow_metadata_inventory_move = allow_metadata_inventory_move,
allow_metadata_inventory_take = allow_metadata_inventory_take,
})
local recipe_ingredient = "default:furnace"
if exchangeclone.mcl then
recipe_ingredient = "mcl_furnaces:furnace"
end
minetest.register_craft({
output = "exchangeclone:deconstructor",
recipe = {
{"exchangeclone:klein_star_drei"},
{recipe_ingredient},
{"exchangeclone:klein_star_drei"}
}
})

View File

@ -0,0 +1,126 @@
local S = minetest.get_translator()
local c_formspec =
"size["..(exchangeclone.mcl and 9 or 8)..",9]"..
"label[2,1;"..S("Star").."]"..
"list[context;fuel;2,2;1,1;]"..
"label[3,1;"..S("Source").."]"..
"list[context;src;3,2;1,1;]"..
"label[5,1;"..S("Output").."]"..
"list[context;dst;5,2;1,1;]"..
exchangeclone.inventory_formspec(0,5)..
"listring[current_player;main]"..
"listring[context;src]"..
"listring[current_player;main]"..
"listring[context;fuel]"..
"listring[current_player;main]"..
"listring[context;dst]"
if exchangeclone.mcl then
c_formspec = c_formspec..
mcl_formspec.get_itemslot_bg(2,2,1,1)..
mcl_formspec.get_itemslot_bg(3,2,1,1)..
mcl_formspec.get_itemslot_bg(5,2,1,1)
end
minetest.register_alias("exchangeclone:element_constructor", "exchangeclone:constructor")
local function c_on_construct(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("fuel", 1)
inv:set_size("src", 1)
inv:set_size("dst", 1)
meta:set_string("formspec", c_formspec)
meta:set_string("infotext", "Cheater")
end
local function return_zero() return 0 end
local function allow_metadata_inventory_take(pos, listname, index, stack, player)
if minetest.is_protected(pos, player:get_player_name()) then
return 0
end
return stack:get_count()
end
minetest.register_node("exchangeclone:constructor", {
description = "Constructor (DEPRECATED)\nUse the new EMC Link instead. This will be removed in a future version.",
tiles = {
"exchangeclone_constructor_up.png",
"exchangeclone_constructor_down.png",
"exchangeclone_constructor_right.png",
"exchangeclone_constructor_right.png",
"exchangeclone_constructor_right.png",
"exchangeclone_constructor_right.png",
},
groups = {cracky = 2, pickaxey = 2, not_in_creative_inventory = 1, not_in_craft_guide = 1},
_mcl_hardness = 3,
_mcl_blast_resistance = 6,
sounds = exchangeclone.sound_mod.node_sound_metal_defaults(),
is_ground_content = false,
can_dig = exchangeclone.can_dig,
after_dig_node = exchangeclone.drop_after_dig({"src", "fuel", "dst"}),
on_construct = c_on_construct,
on_blast = exchangeclone.on_blast({"src", "fuel", "dst"}),
allow_metadata_inventory_put = return_zero,
allow_metadata_inventory_move = return_zero,
allow_metadata_inventory_take = allow_metadata_inventory_take,
emc_value = 811012,
})
local d_formspec =
"size["..(exchangeclone.mcl and 9 or 8)..",9]"..
"label[2,1;"..S("Input").."]"..
"list[context;src;2,2;1,1;]"..
"label[5,1;"..S("Star").."]"..
"list[context;fuel;5,2;1,1;]"..
exchangeclone.inventory_formspec(0,5)..
"listring[current_player;main]"..
"listring[context;src]"..
"listring[current_player;main]"..
"listring[context;fuel]"..
"listring[current_player;main]"..
"listring[context;dst]"
if exchangeclone.mcl then
d_formspec = d_formspec..
mcl_formspec.get_itemslot_bg(2,2,1,1)..
mcl_formspec.get_itemslot_bg(5,2,1,1)
end
minetest.register_alias("exchangeclone:element_deconstructor", "exchangeclone:deconstructor")
local function d_on_construct(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("src", 1)
inv:set_size("fuel", 1)
meta:set_string("formspec", d_formspec)
meta:set_string("infotext", "I thought I made this unplaceable")
end
minetest.register_node("exchangeclone:deconstructor", {
description = S("Deconstructor (DEPRECATED)\nUse the new EMC Link instead. This will be removed in a future version."),
tiles = {
"exchangeclone_deconstructor_up.png",
"exchangeclone_deconstructor_down.png",
"exchangeclone_deconstructor_right.png",
"exchangeclone_deconstructor_right.png",
"exchangeclone_deconstructor_right.png",
"exchangeclone_deconstructor_right.png",
},
groups = {cracky = 2, pickaxey = 2, not_in_creative_inventory = 1, not_in_craft_guide = 1},
_mcl_hardness = 3,
_mcl_blast_resistance = 6,
sounds = exchangeclone.sound_mod.node_sound_metal_defaults(),
is_ground_content = false,
can_dig = exchangeclone.can_dig,
after_dig_node = exchangeclone.drop_after_dig({"src", "fuel"}),
on_construct = d_on_construct,
on_blast = exchangeclone.on_blast({"src", "fuel"}),
on_secondary_use = function() return end,
on_place = function() return end,
allow_metadata_inventory_put = return_zero,
allow_metadata_inventory_move = return_zero,
allow_metadata_inventory_take = allow_metadata_inventory_take,
emc_value = 786440,
})

View File

@ -0,0 +1,46 @@
-- I want to make this without a formspec.
local function on_rightclick(pos, node, player, itemstack, pointed_thing)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if player:get_player_control().sneak then
local contained = inv:get_stack("star", 1)
if minetest.get_item_group(itemstack:get_name(), "klein_star") > 0 then
inv:set_stack("star", 1, itemstack)
return contained
elseif itemstack:is_empty() then
inv:set_stack("star", 1, ItemStack(""))
return contained
end
elseif not itemstack:is_empty() then
local dealiased = exchangeclone.handle_alias(itemstack)
local emc = exchangeclone.get_item_emc(dealiased)
if emc and emc > 0 then
minetest.chat_send_player(player:get_player_name(), "Target Item: "..ItemStack(dealiased):get_short_description())
meta:set_string("target_item", dealiased)
end
end
end
minetest.register_node("exchangeclone:emc_link", {
description = "EMC Link\nAllows automation with personal EMC",
tiles = {"exchangeclone_emc_link.png"},
on_rightclick = on_rightclick,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("star", 1)
inv:set_size("input", 1)
inv:set_size("output", 1)
meta:set_string("infotext", "EMC Link")
end,
after_place_node = function(pos, player, itemstack, pointed_thing)
local player_name = player:get_player_name()
local meta = minetest.get_meta(pos)
meta:set_string("exchangeclone_placer", player_name)
meta:set_string("infotext", "EMC Link".."\n"..S("Owned by ")..player_name)
if exchangeclone.pipeworks then
pipeworks.after_place(pos, player, itemstack, pointed_thing)
end
end,
})

View File

@ -107,16 +107,16 @@ end
if exchangeclone.mcl2 then if exchangeclone.mcl2 then
mcl_item_id.set_mod_namespace("exchangeclone") mcl_item_id.set_mod_namespace("exchangeclone")
end end
local files = { local files = {
"constructor",
"deconstructor",
"energy_collector",
"klein_stars",
"craftitems", "craftitems",
"tool_upgrades", "deprecated_stuff",
"energy_collectors",
"klein_stars",
"swords", "swords",
"pickaxes", "pickaxes",
"axes", "axes",
"tool_upgrades",
"shovels", "shovels",
"hoes", "hoes",
"hammers", "hammers",
@ -130,6 +130,7 @@ local files = {
"gem_of_eternal_density", "gem_of_eternal_density",
"talisman_of_repair", "talisman_of_repair",
"passive_stones", "passive_stones",
"emc_link",
} }
if exchangeclone.mcl or minetest.get_modpath("3d_armor") then if exchangeclone.mcl or minetest.get_modpath("3d_armor") then

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -120,7 +120,7 @@ local function handle_inventory(player, inventory, to_list)
itemstring = exchangeclone.emc_aliases[itemstring] or itemstring itemstring = exchangeclone.emc_aliases[itemstring] or itemstring
if to_list == "learn" then if to_list == "learn" then
local list = minetest.deserialize(player:get_meta():get_string("exchangeclone_transmutation_learned_items")) or {} local list = minetest.deserialize(player:get_meta():get_string("exchangeclone_transmutation_learned_items")) or {}
if itemstring == "exchangeclone:alchemical_tome" then if itemstring == "exchangeclone:tome_of_knowledge" then
list = {} list = {}
local i = 0 local i = 0
for name, def in pairs(minetest.registered_items) do for name, def in pairs(minetest.registered_items) do
@ -191,7 +191,7 @@ local function allow_inventory_action(player, stack, to_list, count, move, inven
elseif to_list == "charge" and minetest.get_item_group(stack:get_name(), "klein_star") < 1 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:tome_of_knowledge" then return count end
local emc_value = exchangeclone.get_item_emc(exchangeclone.handle_alias(stack)) local emc_value = exchangeclone.get_item_emc(exchangeclone.handle_alias(stack))
if not emc_value then return 0 end if not emc_value then return 0 end
if emc_value <= 0 then if emc_value <= 0 then
@ -379,7 +379,7 @@ minetest.register_tool("exchangeclone:tome_of_knowledge", {
groups = {disable_repair = 1, fire_immune = 1} groups = {disable_repair = 1, fire_immune = 1}
}) })
minetest.register_alias("exchangeclone:alchemical_tome", "exchangeclone:tome_of_knowledge") minetest.register_alias("exchangeclone:tome_of_knowledge", "exchangeclone:tome_of_knowledge")
local book = "default:book" local book = "default:book"
local obsidian = "default:obsidian" local obsidian = "default:obsidian"
@ -411,7 +411,7 @@ minetest.register_craft({
if minetest.settings:get_bool("exchangeclone.allow_crafting_alchemical_tome", false) then if minetest.settings:get_bool("exchangeclone.allow_crafting_alchemical_tome", false) then
minetest.register_craft({ minetest.register_craft({
output = "exchangeclone:alchemical_tome", output = "exchangeclone:tome_of_knowledge",
recipe = { recipe = {
{"", book, ""}, {"", book, ""},
{"exchangeclone:klein_star_omega", "exchangeclone:philosophers_stone", "exchangeclone:klein_star_omega"}, {"exchangeclone:klein_star_omega", "exchangeclone:philosophers_stone", "exchangeclone:klein_star_omega"},
@ -422,7 +422,7 @@ if minetest.settings:get_bool("exchangeclone.allow_crafting_alchemical_tome", fa
end end
minetest.register_craft_predict(function(itemstack, player, old_craft_grid, craft_inv) minetest.register_craft_predict(function(itemstack, player, old_craft_grid, craft_inv)
if itemstack == ItemStack("exchangeclone:alchemical_tome") then if itemstack == ItemStack("exchangeclone:tome_of_knowledge") then
for _, i in pairs({4,6}) do for _, i in pairs({4,6}) do
local stack = old_craft_grid[i] local stack = old_craft_grid[i]
if exchangeclone.get_star_itemstack_emc(stack) < exchangeclone.get_star_max(stack) then if exchangeclone.get_star_itemstack_emc(stack) < exchangeclone.get_star_max(stack) then

View File

@ -1,5 +1,5 @@
Keep unnecessary temporary data (such as the list of recipes) after load time for debugging purposes. Keep unnecessary temporary data (such as the list of recipes) after load time for debugging purposes.
exchangeclone.keep_data (Keep temporary data after loading) bool false exchangeclone.keep_data (Keep temporary data after loading) bool false
# Allow the crafting recipe for the Alchemical Tome # Allow the crafting recipe for the Tome of Knowledge
exchangeclone.allow_crafting_alchemical_tome (Allow crafting Alchemical Tome) bool false exchangeclone.allow_crafting_alchemical_tome (Allow crafting Tome of Knowledge) bool false

View File

@ -289,7 +289,7 @@ end
-- For things that are the same in both games: -- For things that are the same in both games:
for itemstring, emc_value in pairs ({ for itemstring, emc_value in pairs ({
["exchangeclone:alchemical_tome"] = 0, ["exchangeclone:tome_of_knowledge"] = 0,
["moreores:mithril_ingot"] = 16384, ["moreores:mithril_ingot"] = 16384,
["moreores:silver_ingot"] = 4000, ["moreores:silver_ingot"] = 4000,