Compare commits

...

5 Commits

Author SHA1 Message Date
ThePython 23620611bd Update readme 2024-03-02 17:17:28 -08:00
ThePython abb198eb40 Finished Alchemical Books, made decisions 2024-03-02 17:09:45 -08:00
ThePython af6872a222 Finished Alchemical Book functions 2024-03-02 15:12:13 -08:00
ThePython 40f6295413 All buttons besides rename and delete working! 2024-03-02 14:20:27 -08:00
ThePython 47450327c4 Fixed bugs with pedestal abilities, started working on Alchemical Books 2024-03-02 12:55:08 -08:00
11 changed files with 450 additions and 56 deletions

View File

@ -80,8 +80,10 @@ You can find the old textures and sounds by going back to previous commits in Gi
- [x] Remove fuel crafting recipes for stars and upgrades
- [x] Add ProjectE armor textures
- [x] Add EMC Link
- [ ] ~~Add Divining Rods~~
- [ ] Add Alchemical Books
- [x] Add Alchemical Books
- [ ] Add more matter/fuel types
- [ ] Make collectors less expensive and less effective (gold instead of glowstone)
- [ ] Make collectors use ProjectExpansion's textures
- [ ] Add Knowledge Sharing Book
- [ ] Add function for getting player's learned items
- [ ] Add Evertide Amulet
@ -92,18 +94,13 @@ You can find the old textures and sounds by going back to previous commits in Gi
- [ ] Add Void Ring
- [x] Add DM Pedestal
- [ ] Add Pedestal abilities
- [ ] Passive Stones
- [x] Soul
- [x] Body
- [x] Life
- [ ] Mind
- [ ] Talisman
- [x] Passive Stones
- [x] Talisman
- [ ] Evertide
- [ ] Volcanite
- [ ] Zero
- [ ] Ignition
- [ ] Black Hole/Void
- [ ] Functions for passive stones, talisman, evertide/volcanite, zero/ignition
## Changelog
<details><summary>Look at this fancy expanding changelog</summary>
@ -111,13 +108,15 @@ You can find the old textures and sounds by going back to previous commits in Gi
### v8.0
* New Features:
* Added the EMC Link to replace both the Constructor and Deconstructor.
* Added the Dark Matter Pedestal.
* Added Alchemical Books.
* Changes:
* The Constructor and Deconstructor are now deprecated. Element Exchange is no more.
* The Constructor and Deconstructor are now deprecated, replaced with the EMC Link.
* Upgrades and Stars can no longer be used as fuel.
* Dark and Red Matter Armor now uses ProjectE's textures
* Removed the ability to right click with stars to see the charge (made it more convenient to add the EMC Link)
* Removed the ability to right click with stars to see the charge (it's unnecessary).
* Bugfixes:
* Dark and Red Matter Armor display properly (and identically) in both games.
* Dark and Red Matter Armor display properly (and identically) in both games, with ProjectE's textures.
* `add_star_emc` now correctly works with negative energy values.
@ -475,27 +474,33 @@ I didn't get to everything I wanted to, mostly because the automatic energy valu
</details>
### Features that I might add eventually:
* ProjectE's armor textures (maybe MCL only)\*
* ProjectE's armor textures\*\*
* Archangel's Smite (MCL only, arrows will not track targets)
* Ring of Ignition\*
* Zero Ring\*
* Swiftwolf's Rending Gale (maybe not, if so, without the force field; basically Why's Flying Sausage with a different texture and maybe lightning in MCL)
* Harvest Band (maybe not)
* Ring of Arcana (possibly without the Harvest Band)
* Gem Armor
* Gem Armor (only if the engine bug with armor is fixed)
* Destruction Catalyst
* Hyperkinetic Lens?
* Divining Rods\*
* Alchemical Books\*
* Alchemical Books\*\*
* Catalytic Lens
* Mercurial Eye
* Evertide Amulet (but without being able to stand on water)\*
* Volcanite Amulet (but without being able to stand on lava)\*
* Pedestals\*
* Pedestals\*\* (haven't added all the abilities yet)
* Black Hole Band and Void Ring\*
* Nova Catalyst/Cataclysm?
* Knowledge Sharing Book\*
* Energy Condensers\*
* EMC Link\*
* EMC Link\*\*
\* Planned for v8.0
\* Planned for v8.0
\*\* Added to v8.0
### Features that I will not add:
* Divining Rods (I would have to manually add energy values for ores, and I'm not going to do that)
* Energy Condensers (what's the point?)
* Watch of Flowing Time (impossible/laggy)
* Any item from ProjectE(xpansion) with an EMC value of over 1 trillion (impossible)

View File

@ -0,0 +1,366 @@
-- There's a lot of duplicated code in this file, but removing it means adding more duplicated code... so I'm just going to leave it.
local function extract_dimension(pos)
if exchangeclone.mtg then
if minetest.get_modpath("nether") then
if pos.y >= nether.DEPTH_FLOOR and pos.y <= nether.DEPTH_CEILING then
return "Nether", pos
else
return "Overworld", pos
end
end
return nil, pos
end
-- overworld
if (pos.y >= mcl_vars.mg_overworld_min) and (pos.y <= mcl_vars.mg_overworld_max) then
return "Overworld", pos
end
-- nether
if (pos.y >= mcl_vars.mg_nether_min) and (pos.y <= mcl_vars.mg_nether_max) then
local report_y = pos.y - mcl_vars.mg_nether_min
return "Nether", {x = pos.x, y = report_y, z = pos.z}
end
-- end
if (pos.y >= mcl_vars.mg_end_min) and (pos.y <= mcl_vars.mg_end_max) then
local report_y = pos.y - mcl_vars.mg_end_min
return "End", {x = pos.x, y = report_y, z = pos.z}
end
-- outside of scoped bounds.
return "Void", pos
end
local function add_dimension(dimension, pos)
dimension = dimension:lower()
if exchangeclone.mtg then
return pos
end
if dimension == "nether" then
local report_y = pos.y + mcl_vars.mg_nether_min
return {x = pos.x, y = report_y, z = pos.z}
end
if dimension == "end" then
local report_y = pos.y + mcl_vars.mg_end_min
return {x = pos.x, y = report_y, z = pos.z}
end
return pos
end
local base_formspec = {
"formspec_version[3]",
"size[13,10]",
"button[11.5,0.5;1,0.7;add;Add]",
"button[8.5,1.5;4,1;teleport;Teleport]",
"button[8.5,2.75;4,1;rename;Rename]",
"button[8.5,4;4,1;up;Move Up]",
"button[8.5,5.25;4,1;down;Move Down]",
"button[8.5,6.5;4,1;delete;Delete]",
"field_close_on_enter[name;false]",
"field_enter_after_edit[name;false]"
}
local context = {}
-- player: The player to be shown the formspec
-- index: The index of the location the player is currently selecting
-- use_stack_data: Whether to use locations stored with the book or the player.
local function show_formspec(player, index, text, use_stack_data, confirmation)
local stack = player:get_wielded_item()
if minetest.get_item_group(stack:get_name(), "exchangeclone_alchemical_book") < 1 then
return
end
context[player:get_player_name()] = context[player:get_player_name()] or {}
context[player:get_player_name()].using_stack_data = use_stack_data
local book_data = stack:get_definition().alchemical_book_data
local data = minetest.deserialize((use_stack_data and stack or player):get_meta():get_string("exchangeclone_alchemical_book"))
local formspec = table.copy(base_formspec)
formspec[#formspec+1] = "field[8.5,0.5;3,0.7;name;;"..minetest.formspec_escape(text or "").."]"
local player_pos = player:get_pos()
if type(data) ~= "table" then
data = {}
end
if not data.locations then
data.locations = {}
end
if #data.locations > 0 then
formspec[#formspec+1] = "textlist[0.5,0.5;7,7;location_list;"
for _, location in ipairs(data.locations) do
formspec[#formspec+1] = minetest.formspec_escape(location.name)..","
end
if index then
formspec[#formspec+1] = ";"..index
end
formspec[#formspec+1] = "]"
end
if index then
local selected = data.locations[index]
if selected then
local dimension, adjusted_pos = extract_dimension(selected.pos)
local player_dimension, player_adjusted_pos = extract_dimension(player_pos)
local dimension_string = dimension and (" ("..dimension..")") or ""
local distance = vector.distance(adjusted_pos, player_adjusted_pos)
local cost = math.floor(book_data.emc_per_node*distance*20)/20
local info = minetest.formspec_escape(string.format(
"%s\nPosition: %.1f, %.1f, %.1f%s\nDistance: %.1f\nCost: %s EMC",
selected.name,
adjusted_pos.x,
adjusted_pos.y,
adjusted_pos.z,
dimension_string,
distance,
exchangeclone.format_number(cost)
))
if player_dimension ~= dimension then
if book_data.dimension_lock then
info = info.."\nCannot teleport between dimensions."
end
end
formspec[#formspec+1] = "textarea[0.5,8;7,1.75;;;"..info.."]"
end
end
if confirmation then
formspec[#formspec+1] = "label[8.5,8;Delete?]button[10,8;1.25,1;cancel;Cancel]button[11.25,8;1.25,1;confirm;Delete]"
end
minetest.show_formspec(player:get_player_name(), "exchangeclone_alchemical_book", table.concat(formspec))
end
minetest.register_on_joinplayer(function(player)
context[player:get_player_name()] = nil
end)
minetest.register_on_leaveplayer(function(player)
context[player:get_player_name()] = nil
end)
minetest.register_on_player_receive_fields(function(player, formname, fields)
if formname ~= "exchangeclone_alchemical_book" then return end
if fields.quit then
context[player:get_player_name()] = nil
return
end
local use_stack_data = context[player:get_player_name()].using_stack_data
local stack = player:get_wielded_item()
if minetest.get_item_group(stack:get_name(), "exchangeclone_alchemical_book") < 1 then
return
end
local meta = (use_stack_data and stack or player):get_meta()
local data = minetest.deserialize(meta:get_string("exchangeclone_alchemical_book"))
if not data then data = {} end
if not data.locations then data.locations = {} end
local index = context[player:get_player_name()].index
local book_data = stack:get_definition().alchemical_book_data
if type(data) ~= "table" then
data = {}
end
if not data.locations then
data.locations = {}
end
if fields.key_enter_field == "name" or fields.add or fields.rename then
local name = fields.name:trim()
if name == "" then return end
for _, location in pairs(data.locations) do
if location.name == name then
minetest.chat_send_player(player:get_player_name(), "There is already a location called '"..location.name.."'")
return
end
end
if fields.rename then
data.locations[index].name = name
else
data.locations[#data.locations+1] = {name = name, pos = player:get_pos()}
end
meta:set_string("exchangeclone_alchemical_book", minetest.serialize(data))
if use_stack_data then player:set_wielded_item(stack) end
show_formspec(player, index, "", use_stack_data)
elseif fields.teleport then
if not data.locations[index] then return end
local pos = data.locations[index].pos
local dimension, adjusted_pos = extract_dimension(pos)
local player_dimension, adjusted_player_pos = extract_dimension(player:get_pos())
if dimension ~= player_dimension then
if book_data.dimension_lock then
minetest.chat_send_player(player:get_player_name(), "This Alchemical Book is not powerful enough to teleport between dimensions.")
show_formspec(player, index, fields.name, use_stack_data)
return
end
end
local distance = vector.distance(adjusted_player_pos, adjusted_pos)
local emc_per_node = stack:get_definition().alchemical_book_data.emc_per_node
local cost = distance*emc_per_node
local player_emc = exchangeclone.get_player_emc(player)
if player_emc < cost then
minetest.chat_send_player(player:get_player_name(), "Not enough EMC to teleport.")
else
player:set_pos(pos)
exchangeclone.add_player_emc(-cost)
end
show_formspec(player, index, fields.name, use_stack_data)
elseif fields.location_list then
local exploded = minetest.explode_textlist_event(fields.location_list)
index = math.min(exploded.index, #data.locations)
if not context[player:get_player_name()] then context[player:get_player_name()] = {} end
context[player:get_player_name()].index = index
if exploded.type == "DCL" then
local pos = data.locations[index].pos
local dimension, adjusted_pos = extract_dimension(pos)
local player_dimension, adjusted_player_pos = extract_dimension(player:get_pos())
if dimension ~= player_dimension then
if book_data.dimension_lock then
minetest.chat_send_player(player:get_player_name(), "This Alchemical Book is not powerful enough to teleport between dimensions.")
show_formspec(player, index, fields.name, use_stack_data)
return
end
end
local distance = vector.distance(adjusted_player_pos, adjusted_pos)
local emc_per_node = stack:get_definition().alchemical_book_data.emc_per_node
local cost = distance*emc_per_node
local player_emc = exchangeclone.get_player_emc(player)
if player_emc < cost then
minetest.chat_send_player(player:get_player_name(), "Not enough EMC to teleport.")
else
player:set_pos(pos)
exchangeclone.add_player_emc(-cost)
end
end
show_formspec(player, index, fields.name, use_stack_data)
elseif fields.up then
if not data.locations[index] then return end
if index > 1 then
data.locations[index], data.locations[index-1] = data.locations[index-1], data.locations[index]
meta:set_string("exchangeclone_alchemical_book", minetest.serialize(data))
if use_stack_data then player:set_wielded_item(stack) end
index = index - 1
if not context[player:get_player_name()] then context[player:get_player_name()] = {} end
context[player:get_player_name()].index = index
show_formspec(player, index, fields.name, use_stack_data)
end
elseif fields.down then
if not data.locations[index] then return end
if index < #data.locations then
data.locations[index], data.locations[index+1] = data.locations[index+1], data.locations[index]
meta:set_string("exchangeclone_alchemical_book", minetest.serialize(data))
if use_stack_data then player:set_wielded_item(stack) end
index = index + 1
if not context[player:get_player_name()] then context[player:get_player_name()] = {} end
context[player:get_player_name()].index = index
show_formspec(player, index, fields.name, use_stack_data)
end
elseif fields.delete then
if not data.locations[index] then return end
show_formspec(player, index, fields.name, use_stack_data, true)
elseif fields.cancel then
if not data.locations[index] then return end
show_formspec(player, index, fields.name, use_stack_data)
elseif fields.confirm then
if not data.locations[index] then return end
for i = index,#data.locations - 1 do
data.locations[i] = data.locations[i+1]
end
data.locations[#data.locations] = nil
index = math.min(index, #data.locations)
if not context[player:get_player_name()] then context[player:get_player_name()] = {} end
context[player:get_player_name()].index = index
meta:set_string("exchangeclone_alchemical_book", minetest.serialize(data))
if use_stack_data then player:set_wielded_item(stack) end
show_formspec(player, index, fields.name, use_stack_data)
end
end)
local function alchemical_book_function(itemstack, player, pointed_thing)
local use_stack_data = itemstack:get_meta():get_int("exchangeclone_use_stack_data")
if use_stack_data == 0 then
use_stack_data = nil
end
if player:get_player_control().sneak then
if use_stack_data then
minetest.chat_send_player(player:get_player_name(), "Using player data")
itemstack:get_meta():set_int("exchangeclone_use_stack_data", 0)
else
minetest.chat_send_player(player:get_player_name(), "Using book data")
itemstack:get_meta():set_int("exchangeclone_use_stack_data", 1)
end
return itemstack
else
show_formspec(player, nil, "", use_stack_data)
end
end
minetest.register_tool("exchangeclone:basic_alchemical_book", {
description = "Basic Alchemical Book\n1000 EMC/node\nCannot travel between dimensions",
inventory_image = "exchangeclone_basic_alchemical_book.png",
groups = {exchangeclone_alchemical_book = 1},
alchemical_book_data = {emc_per_node = 1000, dimension_lock = true},
on_secondary_use = alchemical_book_function,
on_place = alchemical_book_function
})
minetest.register_tool("exchangeclone:advanced_alchemical_book", {
description = "Advanced Alchemical Book\n500 EMC/node",
inventory_image = "exchangeclone_advanced_alchemical_book.png",
groups = {exchangeclone_alchemical_book = 1},
alchemical_book_data = {emc_per_node = 500},
on_secondary_use = alchemical_book_function,
on_place = alchemical_book_function
})
minetest.register_tool("exchangeclone:master_alchemical_book", {
description = "Master Alchemical Book\n100 EMC/node.",
inventory_image = "exchangeclone_master_alchemical_book.png",
groups = {exchangeclone_alchemical_book = 1},
alchemical_book_data = {emc_per_node = 100},
on_secondary_use = alchemical_book_function,
on_place = alchemical_book_function
})
minetest.register_tool("exchangeclone:arcane_alchemical_book", {
description = "Arcane Alchemical Book\n0 EMC/node",
inventory_image = "exchangeclone_arcane_alchemical_book.png",
groups = {exchangeclone_alchemical_book = 1},
alchemical_book_data = {emc_per_node = 0},
on_secondary_use = alchemical_book_function,
on_place = alchemical_book_function
})
local craftitem = exchangeclone.mcl and "mcl_throwing:ender_pearl" or "default:mese_crystal"
minetest.register_craft({
output = "exchangeclone:basic_alchemical_book",
recipe = {
{"exchangeclone:low_covalence_dust","exchangeclone:red_matter", "exchangeclone:low_covalence_dust"},
{craftitem, exchangeclone.itemstrings.book, "exchangeclone:philosophers_stone"},
{"exchangeclone:low_covalence_dust","exchangeclone:red_matter", "exchangeclone:low_covalence_dust"},
}
})
minetest.register_craft({
output = "exchangeclone:advanced_alchemical_book",
recipe = {
{"exchangeclone:medium_covalence_dust","exchangeclone:pink_matter", "exchangeclone:medium_covalence_dust"},
{craftitem, "exchangeclone:basic_alchemical_book", "exchangeclone:pink_matter"},
{"exchangeclone:medium_covalence_dust","exchangeclone:pink_matter", "exchangeclone:medium_covalence_dust"},
}
})
minetest.register_craft({
output = "exchangeclone:master_alchemical_book",
recipe = {
{"exchangeclone:high_covalence_dust","exchangeclone:violet_matter", "exchangeclone:high_covalence_dust"},
{"exchangeclone:violet_matter", "exchangeclone:advanced_alchemical_book", "exchangeclone:violet_matter"},
{"exchangeclone:high_covalence_dust","exchangeclone:violet_matter", "exchangeclone:high_covalence_dust"},
}
})
minetest.register_craft({
output = "exchangeclone:arcane_alchemical_book",
recipe = {
{"exchangeclone:void_ring","exchangeclone:block_cyan_matter", "exchangeclone:void_ring"},
{"exchangeclone:void_ring", "exchangeclone:master_alchemical_book", "exchangeclone:void_ring"},
{"exchangeclone:void_ring","exchangeclone:block_cyan_matter", "exchangeclone:void_ring"},
}
})

View File

@ -131,6 +131,7 @@ local files = {
"talisman_of_repair",
"passive_stones",
"emc_link",
"alchemical_books",
"dark_matter_pedestal",
}

View File

@ -43,8 +43,10 @@ minetest.register_tool("exchangeclone:soul_stone", {
exclude = {"exchangeclone:life_stone"}
},
_exchangeclone_pedestal = function(pos)
for _, player in minetest.get_objects_inside_radius(pos, 5) do
heal(player, 2)
for _, object in pairs(minetest.get_objects_inside_radius(pos, 5)) do
if object:is_player() then
heal(object, 2)
end
end
end,
on_secondary_use = exchangeclone.toggle_active,
@ -79,7 +81,7 @@ if (exchangeclone.mcl and mcl_hunger.active) or (exchangeclone.mtg and minetest.
_exchangeclone_pedestal = function(pos)
for _, object in pairs(minetest.get_objects_inside_radius(pos, 5)) do
if object:is_player() then
heal(object, 2)
satiate(object, 2)
end
end
end,
@ -174,12 +176,12 @@ if exchangeclone.mcl then
mcl_experience.set_xp(player, player_xp - amount_to_take)
stored = stored + amount_to_take
meta:set_int("exchangeclone_stored_xp", stored)
meta:set_string("description", get_mind_description(itemstack))
if stored > 0 then
meta:set_string("exchangeclone_emc_value", "none")
else
meta:set_string("exchangeclone_emc_value", "")
end
meta:set_string("description", get_mind_description(itemstack))
return itemstack
else
local player_xp = mcl_experience.get_xp(player)
@ -208,10 +210,28 @@ if exchangeclone.mcl then
on_secondary_use = mind_action,
on_place = mind_action,
groups = {exchangeclone_passive = 1, disable_repair = 1},
_mcl_generate_description = get_mind_description
_mcl_generate_description = get_mind_description,
_exchangeclone_pedestal = function(pos, itemstack)
local meta = itemstack:get_meta()
for _, object in pairs(minetest.get_objects_inside_radius(pos, 5)) do
local lua_entity = object:get_luaentity()
if lua_entity and lua_entity.name == "mcl_experience:orb" then
local amount = lua_entity._xp
meta:set_int("exchangeclone_stored_xp", meta:get_int("exchangeclone_stored_xp") + amount)
if meta:get_int("exchangeclone_stored_xp") > 0 then
meta:set_string("exchangeclone_emc_value", "none")
else
meta:set_string("exchangeclone_emc_value", "")
end
meta:set_string("description", get_mind_description(itemstack))
object:remove()
end
end
return itemstack
end,
})
local book = "mcl_books:book"
local book = exchangeclone.itemstrings.book
minetest.register_craft({
output = "exchangeclone:mind_stone",
recipe = {

View File

@ -42,23 +42,32 @@ local function repair_items(inv, listname)
end
end
local function repair_player_inv(player)
local inv = player:get_inventory()
repair_items(inv, "main")
if exchangeclone.mcl then
repair_items(inv, "offhand")
repair_items(inv, "armor")
elseif minetest.get_modpath("3d_armor") then
local _, armor_inv = armor:get_valid_player(player, "3d_armor")
repair_items(armor_inv, "armor")
end
end
minetest.register_tool("exchangeclone:talisman_of_repair", {
description = "Talisman of Repair",
inventory_image = "exchangeclone_talisman_of_repair.png",
_exchangeclone_passive = {
func = function(player)
local inv = player:get_inventory()
repair_items(inv, "main")
if exchangeclone.mcl then
repair_items(inv, "offhand")
repair_items(inv, "armor")
elseif minetest.get_modpath("3d_armor") then
local _, armor_inv = armor:get_valid_player(player, "3d_armor")
repair_items(armor_inv, "armor")
end
end,
func = repair_player_inv,
always_active = true
},
_exchangeclone_pedestal = function(pos)
for _, object in pairs(minetest.get_objects_inside_radius(pos, 5)) do
if object:is_player() then
repair_player_inv(object)
end
end
end,
groups = {exchangeclone_passive = 1, disable_repair = 1}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -108,7 +108,7 @@ local function add_to_output(player, amount, show)
local max_amount = math.min(amount, stack_max, math.floor(player_emc/emc_value))
local inventory = minetest.get_inventory({type = "detached", name = "exchangeclone_transmutation_"..player:get_player_name()})
local added_amount = max_amount - inventory:add_item("output", ItemStack(item.." "..max_amount)):get_count()
exchangeclone.set_player_emc(player, math.min(player_emc, player_emc - (emc_value * added_amount))) -- not sure if "math.min()" is necessary
exchangeclone.add_player_emc(player, math.min(player_emc, -(emc_value * added_amount))) -- not sure if "math.min()" is necessary
if show then exchangeclone.show_transmutation_table_formspec(player) end
end
end
@ -379,23 +379,14 @@ minetest.register_tool("exchangeclone:tome_of_knowledge", {
groups = {disable_repair = 1, fire_immune = 1}
})
minetest.register_alias("exchangeclone:tome_of_knowledge", "exchangeclone:tome_of_knowledge")
local book = "default:book"
local obsidian = "default:obsidian"
local stone = "default:stone"
if exchangeclone.mcl then
book = "mcl_books:book"
obsidian = "mcl_core:obsidian"
stone = "mcl_core:stone"
end
minetest.register_alias("exchangeclone:alchemical_tome", "exchangeclone:tome_of_knowledge")
minetest.register_craft({
output = "exchangeclone:transmutation_table",
recipe = {
{obsidian, stone, obsidian},
{stone, "exchangeclone:philosophers_stone", stone},
{obsidian, stone, obsidian}
{exchangeclone.itemstrings.obsidian, exchangeclone.itemstrings.stone, exchangeclone.itemstrings.obsidian},
{exchangeclone.itemstrings.stone, "exchangeclone:philosophers_stone", exchangeclone.itemstrings.stone},
{exchangeclone.itemstrings.obsidian, exchangeclone.itemstrings.stone, exchangeclone.itemstrings.obsidian}
},
replacements = {{"exchangeclone:philosophers_stone", "exchangeclone:philosophers_stone"}}
})
@ -403,9 +394,9 @@ minetest.register_craft({
minetest.register_craft({
output = "exchangeclone:transmutation_tablet",
recipe = {
{"exchangeclone:dark_matter_block", stone, "exchangeclone:dark_matter_block"},
{stone, "exchangeclone:transmutation_table", stone},
{"exchangeclone:dark_matter_block", stone, "exchangeclone:dark_matter_block"}
{"exchangeclone:dark_matter_block", exchangeclone.itemstrings.stone, "exchangeclone:dark_matter_block"},
{exchangeclone.itemstrings.stone, "exchangeclone:transmutation_table", exchangeclone.itemstrings.stone},
{"exchangeclone:dark_matter_block", exchangeclone.itemstrings.stone, "exchangeclone:dark_matter_block"}
},
})
@ -413,7 +404,7 @@ if minetest.settings:get_bool("exchangeclone.allow_crafting_alchemical_tome", fa
minetest.register_craft({
output = "exchangeclone:tome_of_knowledge",
recipe = {
{"", book, ""},
{"", exchangeclone.itemstrings.book, ""},
{"exchangeclone:klein_star_omega", "exchangeclone:philosophers_stone", "exchangeclone:klein_star_omega"},
{"", "exchangeclone:red_matter", ""}
},

View File

@ -344,6 +344,7 @@ end
-- Itemstrings for various items used in crafting recipes.
exchangeclone.itemstrings = {
cobble = exchangeclone.mcl and "mcl_core:cobble" or "default:cobble",
stone = exchangeclone.mcl and "mcl_core:stone" or "default:stone",
redstoneworth = exchangeclone.mcl and "mesecons:redstone" or "default:obsidian",
obsidian = exchangeclone.mcl and "mcl_core:obsidian" or "default:obsidian",
glowstoneworth = exchangeclone.mcl and "mcl_nether:glowstone_dust" or "default:tin_ingot",
@ -358,7 +359,8 @@ exchangeclone.itemstrings = {
dirt = exchangeclone.mcl and "mcl_core:dirt" or "default:dirt",
clay = exchangeclone.mcl and "mcl_core:clay" or "default:clay",
sand = exchangeclone.mcl and "mcl_core:sand" or "default:sand",
torch = exchangeclone.mcl and "mcl_torches:torch" or "default:torch"
torch = exchangeclone.mcl and "mcl_torches:torch" or "default:torch",
book = exchangeclone.mcl and "mcl_books:book" or "default:book"
}
exchangeclone.emc_aliases = {}