all Exile items have EMC values

This commit is contained in:
Jacob Lifshay 2024-03-24 23:13:23 -07:00
parent f5fdf0e645
commit e5f5a82dd9
Signed by: programmerjake
SSH Key Fingerprint: SHA256:B1iRVvUJkvd7upMIiMqn6OyxvD2SgJkAH3ZnUOj6z+c
16 changed files with 843 additions and 385 deletions

View File

@ -4,7 +4,7 @@ if exchangeclone.exile then
{"leafdecay", 1},
{"_ncrafting_bundle", 64},
{"_ncrafting_dye_color", 32},
{"air", 0},
{"wet_sediment", 1},
})
for itemstring, emc_value in pairs({
["tech:soup"] = 16,
@ -12,8 +12,28 @@ if exchangeclone.exile then
["bones:bones"] = 32,
["lore:exile_letter"] = 32,
["animals:gundu"] = 128,
["animals:pegasun_male"] = 128,
["animals:pegasun"] = 144, -- higher because they lay eggs
["animals:kubwakubwa"] = 144,
["animals:darkasthaan"] = 192,
["animals:sarkamos"] = 256,
["animals:impethu"] = 32,
["animals:impethu_eggs"] = 8,
["animals:sneachan"] = 32,
["animals:gundu_eggs"] = 64,
["animals:pegasun_eggs"] = 32,
["animals:kubwakubwa_eggs"] = 24,
["animals:darkasthaan_eggs"] = 32,
["animals:sarkamos_eggs"] = 64,
["animals:impethu_eggs"] = 16,
["animals:sneachan_eggs"] = 16,
["animals:carcass_invert_small"] = 3,
["animals:carcass_invert_large"] = 10,
["animals:carcass_bird_small"] = 20,
["animals:carcass_fish_small"] = 15,
["animals:carcass_fish_large"] = 45,
["nodes_nature:vansano"] = 32,
["nodes_nature:anperla"] = 32,
@ -42,16 +62,15 @@ if exchangeclone.exile then
['tech:molten_slag_source'] = 8192, -- because it's so hard to get
['nodes_nature:ironstone_boulder'] = 64,
['tech:slag'] = 16,
['nodes_nature:volcanic_ash'] = 1,
['tech:wood_ash'] = 8,
['tech:potash_source'] = 32,
['tech:broken_pottery'] = 8,
['nodes_nature:gneiss_boulder'] = 4,
['tech:clay_water_pot'] = 16,
['tech:cooking_pot'] = 16,
['tech:clay_storage_pot'] = 16,
['tech:clay_oil_lamp_empty'] = 16,
['tech:charcoal'] = 128,
['nodes_nature:jade_boulder'] = 64,
@ -67,8 +86,8 @@ if exchangeclone.exile then
--low level artifacts (rarity 5), non-durables
--['artifacts:conveyor'] = 256,
--['artifacts:trampoline'] = 256,
['artifacts:conveyor'] = 256,
['artifacts:trampoline'] = 256,
--['nodes_nature:merki_seed'] = 256,
@ -101,7 +120,7 @@ if exchangeclone.exile then
['artifacts:sculpture_j_dragon_head'] = 256,
['artifacts:sculpture_j_skull_head'] = 256,
--['artifacts:star_stone'] = 256,
['artifacts:star_stone'] = 256,
['artifacts:singing_stone'] = 256,
['artifacts:drumming_stone'] = 256,
@ -146,6 +165,13 @@ if exchangeclone.exile then
['artifacts:sculpture_g_arch_trickster'] = 1024,
['artifacts:sculpture_g_arch_mother'] = 1024,
['player_api:cloth_female_upper_default'] = 1024,
['player_api:cloth_female_lower_default'] = 1024,
['player_api:cloth_unisex_footwear_default'] = 1024,
['player_api:cloth_female_head_default'] = 1024,
['player_api:cloth_male_upper_default'] = 1024,
['player_api:cloth_male_lower_default'] = 1024,
['artifacts:metastim'] = 100000,
}) do
@ -179,4 +205,6 @@ if exchangeclone.exile then
local itemstring = "nodes_nature:"..v[1].."_block"
exchangeclone.base_emc_values[itemstring] = exchangeclone.base_emc_values[itemstring] or 1
end
exchangeclone.register_alias("artifacts:antiquorium", "rings:antiquorium")
exchangeclone.register_alias("artifacts:moon_glass", "rings:moon_glass")
end

View File

@ -222,7 +222,7 @@ minetest.register_tool("exchangeclone:void_ring", {
_exchangeclone_pedestal = black_hole_pedestal,
})
local ingredient = exchangeclone.mcl and "mcl_mobitems:string" or "farming:cotton"
local ingredient = exchangeclone.itemstrings.cotton
minetest.register_craft({
output = "exchangeclone:black_hole_band",
recipe = {

View File

@ -20,7 +20,7 @@ for group, amount in pairs({
exchangeclone.tool_types[group] = exchangeclone.tool_types[group] or amount
end
local charcoal_itemstring = exchangeclone.mcl and "mcl_core:charcoal_lump" or "group:tree"
local charcoal_itemstring = exchangeclone.itemstrings.charcoal
minetest.register_craftitem("exchangeclone:low_covalence_dust", {
description = S("Low Covalence Dust"),

View File

@ -215,7 +215,7 @@ local collectors = {
"White",
}
local ingredient = exchangeclone.mcl and "mcl_nether:glowstone" or "default:gold_ingot"
local ingredient = exchangeclone.itemstrings.collector_ingredient
exchangeclone.register_energy_collector(
"exchangeclone:basic_collector",
@ -225,7 +225,7 @@ exchangeclone.register_energy_collector(
{{
{ingredient, exchangeclone.itemstrings.glass, ingredient},
{ingredient, "exchangeclone:aeternalis_fuel_block", ingredient},
{ingredient, (exchangeclone.mcl and "mcl_furnaces:furnace" or "default:furnace"), ingredient},
{ingredient, exchangeclone.itemstrings.furnace, ingredient},
}},
5

View File

@ -0,0 +1,687 @@
-- Exile always registers the legacy/unused items, register the recipes so we can assign EMC
local extra_exile_crafting_recipes = {
{
type = "crafting_spot",
output = "tech:grinding_stone",
items = {'nodes_nature:granite_boulder', 'nodes_nature:sand 8'},
level = 1,
always_known = true,
},
{
type = "crafting_spot",
output = "tech:weaving_frame",
items = {'tech:stick 12', 'group:fibrous_plant 8'},
level = 1,
always_known = true,
},
{
type = "crafting_spot",
output = "tech:chopping_block",
items = {'group:log'},
level = 1,
always_known = true,
},
{
type = "chopping_block",
output = "tech:chopping_block",
items = {'group:log'},
level = 1,
always_known = true,
},
{
type = "chopping_block",
output = "tech:hammering_block",
items = {'group:log'},
level = 1,
always_known = true,
},
{
type = "mixing_spot",
output = "tech:potash_block",
items = {'tech:potash 2'},
level = 1,
always_known = true,
},
}
local function register_translated_recipes()
local seen_unknown_crafting_types = {}
local did_cooking_warning = false
local replacements_actions = {}
-- Exile doesn't have lava buckets and uses an alternative,
-- so just eat the input item
replacements_actions[dump({{
exchangeclone.itemstrings.lava_bucket,
exchangeclone.itemstrings.empty_bucket,
}})] = {just_eat_input = true}
-- we're already using a philosopher's stone to do the crafting,
-- don't add to recipe so we don't need two
replacements_actions[dump({{
"exchangeclone:philosophers_stone",
"exchangeclone:philosophers_stone",
}})] = {remove_from_input = "exchangeclone:philosophers_stone"}
-- used for recipe for iron band -- crafting mod doesn't support
-- replacements, there is another recipe for the iron band,
-- so just ignore the recipe
replacements_actions[dump({{
"exchangeclone:volcanite_amulet",
"exchangeclone:volcanite_amulet",
}})] = {ignore_recipe = true}
local replacement_itemstrings = {
["group:tree"] = "group:log",
}
for _, recipes in pairs(exchangeclone.recipes) do
for _, recipe in ipairs(recipes) do
local mt_craft_type = recipe.type and exchangeclone.craft_types[recipe.type].type
if not mt_craft_type or mt_craft_type == "shaped" or mt_craft_type == "shapeless" then
---@type table<string, integer>
local item_counts = {}
local remove_from_input = nil
local ignore_recipe = false
if recipe.replacements then
local replacements_value = dump(recipe.replacements)
local replacements_action = replacements_actions[replacements_value]
assert(replacements_action, "[ExchangeClone] unimplemented replacements style: "..replacements_value)
if replacements_action.remove_from_input then
remove_from_input = replacements_action.remove_from_input
elseif replacements_action.ignore_recipe then
ignore_recipe = true
else
assert(replacements_action.just_eat_input, "unhandled replacements_action"..dump(replacements_action))
end
end
local worklist = table.copy(recipe.recipe)
while #worklist > 0 do
local item = table.remove(worklist)
if type(item) == "table" then
for _, v in ipairs(item) do
table.insert(worklist, v)
end
elseif item and item ~= remove_from_input and item ~= "" then
local count = item_counts[item] or 0
item_counts[item] = count + 1
end
end
local items_array = {}
for itemstring, count in pairs(item_counts) do
itemstring = replacement_itemstrings[itemstring] or itemstring
local item = ItemStack(itemstring)
item:set_count(count)
if not itemstring:find("^group:") and not item:is_known() then
ignore_recipe = true
break
end
assert(item:to_string() ~= "", dump({itemstring=itemstring,count=count,recipe=recipe}))
table.insert(items_array, item:to_string())
end
if not ignore_recipe then
local final_recipe = {
type = "exchangeclone_crafting",
output = recipe.output,
items = items_array,
always_known = true,
}
minetest.log("verbose", "[ExchangeClone]: registered Exile crafting recipe: \n"..dump(final_recipe))
crafting.register_recipe(final_recipe)
end
elseif mt_craft_type == "cooking" then
if not did_cooking_warning then
minetest.log("warning", "[ExchangeClone] cooking crafts aren't implemented for Exile, ignoring")
end
did_cooking_warning = true
else
local unknown_craft_type = dump(mt_craft_type)
if not seen_unknown_crafting_types[unknown_craft_type] then
minetest.log("warning", "[ExchangeClone] unknown minetest crafting type: "..unknown_craft_type)
end
seen_unknown_crafting_types[unknown_craft_type] = true
end
end
end
local crafting_recipes = table.copy(crafting.recipes)
for _, recipe in ipairs(extra_exile_crafting_recipes) do
assert(crafting_recipes[recipe.type], "unknown exile crafting recipe type"..recipe.type)
crafting_recipes[recipe.type] = table.copy(crafting_recipes[recipe.type])
table.insert(crafting_recipes[recipe.type], recipe)
end
for craft_type, recipes in pairs(crafting_recipes) do
if craft_type ~= "exchangeclone_crafting" then
exchangeclone.register_craft_type(craft_type, "shapeless")
for _, orig_recipe in ipairs(recipes) do
local recipe = {}
for _, item in ipairs(orig_recipe.items) do
item = ItemStack(item)
for _ = 1, item:get_count() do
table.insert(recipe, item:get_name())
end
end
exchangeclone.register_craft({
type = orig_recipe.type,
output = orig_recipe.output,
recipe = recipe,
})
end
end
end
end
register_translated_recipes()
-- Exile always registers the legacy items, register the recipes so we can assign EMC
local function register_exile_legacy_recipes()
crafting.register_recipe({
type = "crafting_spot",
output = "tech:grinding_stone",
items = {'nodes_nature:granite_boulder', 'nodes_nature:sand 8'},
level = 1,
always_known = true,
})
crafting.register_recipe({ --weaving_frame
type = "crafting_spot",
output = "tech:weaving_frame",
items = {'tech:stick 12', 'group:fibrous_plant 8'},
level = 1,
always_known = true,
})
crafting.register_recipe({ --chopping_block
type = "crafting_spot",
output = "tech:chopping_block",
items = {'group:log'},
level = 1,
always_known = true,
})
crafting.register_recipe({
type = "chopping_block",
output = "tech:chopping_block",
items = {'group:log'},
level = 1,
always_known = true,
})
crafting.register_recipe({ --hammering block
type = "chopping_block",
output = "tech:hammering_block",
items = {'group:log'},
level = 1,
always_known = true,
})
end
register_exile_legacy_recipes()
local sorted_dump_action
---@param v any
---@param indent? nil|string
---@return string
local function sorted_dump(v, indent)
if not indent then
indent = ""
end
local action = sorted_dump_action[type(v)] or sorted_dump_action.default
return action(v, indent)
end
sorted_dump_action = {
["nil"] = function(v, indent)
return "nil"
end,
number = function(v, indent)
return tostring(v)
end,
string = function(v, indent)
return string.format("%q", v)
end,
boolean = function(v, indent)
return string.format("%q", v)
end,
table = function(v, indent)
local inner_indent = indent.." "
---@type any[]
local keys = {}
for key, _ in pairs(v) do
table.insert(keys, key)
end
table.sort(keys)
local is_array = true
for index, key in ipairs(keys) do
if index ~= key then
is_array = false
break
end
end
---@type string[]
local lines = {}
if is_array then
for _, key in ipairs(keys) do
table.insert(lines, sorted_dump(v[key], inner_indent))
end
else
for _, key in ipairs(keys) do
local value = sorted_dump(v[key], inner_indent)
if type(key) == "string" and key:match("^[a-zA-Z_][a-zA-Z0-9_]*$") then
table.insert(lines, key.." = "..value)
else
table.insert(lines, "["..sorted_dump(key, inner_indent).."] = "..value)
end
end
end
local lines_len_total = 0
for _, line in ipairs(lines) do
if line:match("\n") then
lines_len_total = math.huge
break
end
lines_len_total = lines_len_total + #line
end
if #lines == 0 then
return "{}"
end
if #lines == 1 then
return "{"..lines[1].."}"
end
if lines_len_total + 2 * #lines + 2 < 80 then
return "{"..table.concat(lines, ", ").."}"
end
return "{\n"..inner_indent..table.concat(lines, ",\n"..inner_indent).."\n"..indent.."}"
end,
default = function(v, indent)
return "<" .. type(v) .. ">"
end
}
---@class SedimentSoil
---@field soil string
---@field soil_wet string
---@class Sediment
---@field wet string
---@field wet_salty string
---@field ag string
---@field ag_wet string
---@field ag_depleted string
---@field ag_wet_depleted string
---@field soils? SedimentSoil[]
---@type table<string, Sediment>
local sediments = {}
for name, def in pairs(minetest.registered_items) do
if def.groups.natural_slope or def.groups.not_in_creative_inventory then
goto continue
end
minetest.log("verbose", "[ExchangeClone] exile_on_mods_loaded examining: "..name.." = "..sorted_dump(def))
if def.groups.sediment then
if def.groups.natural_slope then
elseif def.groups.wet_sediment then
elseif def.groups.bare_sediment then
local dry = name
sediments[dry] = sediments[dry] or {}
sediments[dry].wet = def._wet_name
sediments[dry].wet_salty = def._wet_salty_name
elseif def.groups.agricultural_soil then
local dry = def.drop
sediments[dry] = sediments[dry] or {}
sediments[dry].ag = name
sediments[dry].ag_wet = def._wet_name
elseif def.groups.depleted_agricultural_soil then
local dry = def.drop
sediments[dry] = sediments[dry] or {}
sediments[dry].ag_depleted = name
sediments[dry].ag_wet_depleted = def._wet_name
else
local dry = def.drop
sediments[dry] = sediments[dry] or {}
sediments[dry].soils = sediments[dry].soils or {}
table.insert(sediments[dry].soils, {soil = name, soil_wet = def._wet_name})
end
end
::continue::
end
minetest.log("sediments = "..sorted_dump(sediments))
exchangeclone.register_craft_type("roasting", "cooking")
for recipe, output in pairs({
["tech:iron_and_slag"] = "tech:iron_bloom",
["tech:iron_smelting_mix"] = "tech:iron_and_slag",
["tech:crushed_iron_ore"] = "tech:roasted_iron_ore",
["tech:green_glass_mix"] = "tech:green_glass_ingot",
["tech:clear_glass_mix"] = "tech:clear_glass_ingot",
["tech:crushed_lime"] = "tech:quicklime",
}) do
exchangeclone.register_craft({
type = "roasting",
output = output,
recipe = recipe,
})
end
exchangeclone.register_craft_type("fire_pottery", "cooking")
for recipe, output in pairs({
["tech:loose_brick_unfired"] = "tech:loose_brick",
["tech:roof_tile_loose_unfired"] = "tech:roof_tile_loose",
["tech:tile_block_unfired"] = "tech:tile_block",
["tech:cooking_pot_unfired"] = "tech:cooking_pot",
["tech:clay_water_pot_unfired"] = "tech:clay_water_pot",
["tech:clay_storage_pot_unfired"] = "tech:clay_storage_pot",
["tech:clay_oil_lamp_unfired"] = "tech:clay_oil_lamp_empty",
["tech:clay_watering_can_unfired"] = "tech:clay_watering_can",
}) do
exchangeclone.register_craft({
type = "fire_pottery",
output = output,
recipe = recipe,
})
end
exchangeclone.register_craft_type("baking", "cooking")
local baking_map = {}
for name, _ in pairs(bake_table) do
baking_map[name] = name.."_cooked"
baking_map[name.."_cooked"] = name.."_burned"
end
for name, _ in pairs(exchangeclone.colors) do
baking_map["ncrafting:bundle_treated_"..name] = "ncrafting:bundle_treated_blue" -- burning
baking_map["ncrafting:bundle_"..name] = "ncrafting:bundle_treated_"..name
end
for recipe, output in pairs(baking_map) do
if minetest.registered_items[recipe] and minetest.registered_items[output] then
exchangeclone.register_craft({
type = "baking",
output = output,
recipe = recipe,
})
end
end
exchangeclone.register_craft_type("melting", "shapeless")
exchangeclone.register_craft({
type = "melting",
output = "tech:pane_tray_clear",
recipe = {"tech:clear_glass_ingot", "tech:pane_tray"},
})
exchangeclone.register_craft({
type = "melting",
output = "tech:pane_tray_green",
recipe = {"tech:green_glass_ingot", "tech:pane_tray"},
})
exchangeclone.register_craft({
type = "melting",
output = "tech:pane_clear",
recipe = {"tech:clear_glass_ingot"},
})
exchangeclone.register_craft({
type = "melting",
output = "tech:pane_green",
recipe = {"tech:green_glass_ingot"},
})
local fire_kinds = {
["tech:small_wood_fire"] = {
unlit = "tech:small_wood_fire_unlit",
extinguished = "tech:small_wood_fire_ext",
smoldering = "tech:small_wood_fire_smoldering",
charcoal_fire = "tech:small_charcoal_fire",
},
["tech:large_wood_fire"] = {
unlit = "tech:large_wood_fire_unlit",
extinguished = "tech:large_wood_fire_ext",
smoldering = "tech:large_wood_fire_smoldering",
charcoal_fire = "tech:large_charcoal_fire",
},
["tech:small_charcoal_fire"] = {
unlit = "tech:charcoal",
extinguished = "tech:small_charcoal_fire_ext",
smoldering = "tech:small_charcoal_fire_smoldering",
},
["tech:large_charcoal_fire"] = {
unlit = "tech:charcoal_block",
extinguished = "tech:large_charcoal_fire_ext",
smoldering = "tech:large_charcoal_fire_smoldering",
},
["tech:lantern_lit"] = {
unlit = "tech:lantern_unlit",
extinguished = "tech:lantern_unlit",
},
["tech:clay_oil_lamp"] = {
unlit = "tech:clay_oil_lamp_unlit",
},
}
exchangeclone.register_craft_type("start_fire", "cooking")
exchangeclone.register_craft_type("extinguish_fire", "cooking", true)
exchangeclone.register_craft_type("to_smoldering", "cooking", true)
exchangeclone.register_craft_type("to_charcoal", "cooking")
for name, fire_kind in pairs(fire_kinds) do
exchangeclone.register_craft({
type = "start_fire",
output = name,
recipe = fire_kind.unlit,
})
if fire_kind.extinguished then
exchangeclone.register_craft({
type = "extinguish_fire",
output = fire_kind.extinguished,
recipe = name,
})
end
if fire_kind.smoldering then
exchangeclone.register_craft({
type = "to_smoldering",
output = fire_kind.smoldering,
recipe = name,
})
end
if fire_kind.charcoal_fire then
exchangeclone.register_craft({
type = "to_charcoal",
output = fire_kinds[fire_kind.charcoal_fire].unlit,
recipe = fire_kind.smoldering,
})
end
end
exchangeclone.register_craft_type("hammer_place", "cooking")
exchangeclone.register_craft({
type = "hammer_place",
output = "tech:hammer_basalt_placed",
recipe = "tech:hammer_basalt",
})
exchangeclone.register_craft({
type = "hammer_place",
output = "tech:hammer_granite_placed",
recipe = "tech:hammer_granite",
})
exchangeclone.register_craft_type("soaking", "cooking")
exchangeclone.register_craft({
type = "soaking",
output = "tech:retted_cana_bundle",
recipe = "tech:unretted_cana_bundle",
})
exchangeclone.register_craft({
type = "soaking",
output = "tech:maraka_flour",
recipe = "tech:maraka_flour_bitter",
})
--@type string[]
local liquid_containers = {
"tech:clay_water_pot",
"tech:wooden_water_pot",
"tech:glass_bottle_green",
"tech:glass_bottle_clear",
"tech:clay_watering_can",
}
---@class LiquidKind
---@field container_suffixes string[]
---@field source string
---@field ice? string
---@field water? true
---@type table<string, LiquidKind>
local liquid_kinds = {
freshwater = {
container_suffixes = {"_freshwater"},
source = "nodes_nature:freshwater_source",
ice = "nodes_nature:ice",
water = true,
},
salt_water = {
container_suffixes = {"_salt_water", "_saltwater"},
source = "nodes_nature:salt_water_source",
ice = "nodes_nature:sea_ice",
water = true,
},
potash = {
container_suffixes = {"_potash"},
source = "tech:potash_source",
}
}
exchangeclone.register_craft_type("make_ag_depleted", "cooking")
exchangeclone.register_craft_type("ag_soil_to_soil", "cooking")
exchangeclone.register_craft_type("wetten", "shapeless")
---@param name string|nil
---@param wet_name string|nil
---@param liquid_kind LiquidKind
local function register_wetten(name, wet_name, liquid_kind)
if not name or not wet_name then
return
end
for _, container_suffix in ipairs(liquid_kind.container_suffixes) do
local filled = liquid_containers[1]..container_suffix
if minetest.registered_craftitems[filled] then
exchangeclone.register_craft({
type = "wetten",
output = wet_name,
recipe = {name, filled},
replacements = {{filled, liquid_containers[1]}},
})
end
end
end
---@param name string|nil
---@param ag_depleted string|nil
local function register_make_ag_depleted(name, ag_depleted)
if not name or not ag_depleted then
return
end
exchangeclone.register_craft({
type = "make_ag_depleted",
output = ag_depleted,
recipe = name,
})
end
---@param ag string|nil
---@param soil string|nil
local function register_ag_soil_to_soil(ag, soil)
if not ag or not soil then
return
end
exchangeclone.register_craft({
type = "ag_soil_to_soil",
output = soil,
recipe = ag,
})
end
for name, sediment in pairs(sediments) do
register_wetten(name, sediment.wet, liquid_kinds.freshwater)
register_wetten(name, sediment.wet_salty, liquid_kinds.salt_water)
register_wetten(sediment.ag, sediment.ag_wet, liquid_kinds.freshwater)
register_wetten(sediment.ag_depleted, sediment.ag_wet_depleted, liquid_kinds.freshwater)
for _, soil in ipairs(sediment.soils or {}) do
register_wetten(soil.soil, soil.soil_wet, liquid_kinds.freshwater)
register_ag_soil_to_soil(sediment.ag, soil.soil)
end
register_make_ag_depleted(name, sediment.ag_depleted)
end
exchangeclone.register_craft_type("thawing", "cooking", true)
exchangeclone.register_craft_type("fill_water_pot", "shapeless")
for _, liquid_kind in pairs(liquid_kinds) do
if liquid_kind.ice then
exchangeclone.register_craft({
type = "thawing",
output = liquid_kind.source,
recipe = liquid_kind.ice,
})
end
for _, container in ipairs(liquid_containers) do
for _, container_suffix in ipairs(liquid_kind.container_suffixes) do
local filled = container..container_suffix
if minetest.registered_items[filled] then
exchangeclone.register_craft({
type = "fill_water_pot",
output = filled,
recipe = {container, liquid_kind.source},
})
end
end
end
end
exchangeclone.register_craft_type("make_potash_source", "shapeless")
exchangeclone.register_craft({
type = "make_potash_source",
output = liquid_kinds.potash.source,
recipe = {"tech:wood_ash_block", liquid_kinds.freshwater.source},
})
exchangeclone.register_craft_type("make_potash", "shapeless")
exchangeclone.register_craft({
type = "make_potash",
output = "tech:dry_potash_pot",
recipe = {"tech:clay_water_pot_potash"},
})
exchangeclone.register_craft({
type = "make_potash",
output = "tech:potash",
recipe = {"tech:clay_water_pot_potash"},
replacements = {{"tech:clay_water_pot_potash", "tech:clay_water_pot"}},
})
exchangeclone.register_craft_type("transporter_activate", "cooking")
exchangeclone.register_craft({
type = "transporter_activate",
output = "artifacts:transporter_pad_active",
recipe = "artifacts:transporter_pad_charging",
})
exchangeclone.register_craft({
type = "transporter_activate",
output = "artifacts:transporter_pad_charging",
recipe = "artifacts:transporter_pad",
})
exchangeclone.register_craft_type("make_latern", "shapeless")
exchangeclone.register_craft({
type = "make_latern",
output = "tech:lantern_case_wick",
recipe = {"tech:lantern_case", "tech:coarse_fibre"},
})
exchangeclone.register_craft({
type = "make_latern",
output = "tech:lantern_case_glass",
recipe = {"tech:lantern_case", "tech:pane_clear"},
})
exchangeclone.register_craft({
type = "make_latern",
output = "tech:lantern_unlit",
recipe = {"tech:lantern_case_wick", "tech:pane_clear"},
})
exchangeclone.register_craft_type("dye_crafting", "shapeless")
for name, color_data in pairs(exchangeclone.colors) do
exchangeclone.register_craft({
type = "make_latern",
output = color_data.dye.." 2",
recipe = {"ncrafting:bundle_treated_"..name},
})
end
exchangeclone.register_craft_type("lime_slaking", "shapeless")
exchangeclone.register_craft({
type = "lime_slaking",
output = "tech:slaked_lime",
recipe = {"tech:quicklime", liquid_kinds.freshwater.source},
})
exchangeclone.register_craft({
type = "lime_slaking",
output = "tech:slaked_lime_ruined",
recipe = {"tech:quicklime", liquid_kinds.salt_water.source},
})
exchangeclone.register_craft_type("fermenting", "cooking")
exchangeclone.register_craft({
type = "fermenting",
output = "tech:tang",
recipe = "tech:tang_unfermented",
})
exchangeclone.register_craft({
type = "fermenting",
output = "tech:wooden_tang",
recipe = "tech:wooden_tang_unfermented",
})

View File

@ -25,11 +25,6 @@ local ores = {
["technic:zinc_lump"] = true,
}
local furnace_itemstring = "default:furnace"
if exchangeclone.mcl then
furnace_itemstring = "mcl_furnaces:furnace"
end
local function is_ore(itemstring)
if ores[itemstring] then return true end
local exchangeclone_ore = minetest.get_item_group(itemstring, "exchangeclone_ore")
@ -730,7 +725,7 @@ minetest.register_craft({
output = "exchangeclone:dark_matter_furnace",
recipe = {
{ "exchangeclone:dark_matter_block", "exchangeclone:dark_matter_block", "exchangeclone:dark_matter_block" },
{ "exchangeclone:dark_matter_block", furnace_itemstring, "exchangeclone:dark_matter_block" },
{ "exchangeclone:dark_matter_block", exchangeclone.itemstrings.furnace, "exchangeclone:dark_matter_block" },
{ "exchangeclone:dark_matter_block", "exchangeclone:dark_matter_block", "exchangeclone:dark_matter_block" },
}
})

View File

@ -27,7 +27,10 @@ local hoe_function
if exchangeclone.mcl then
hoe_function = create_soil
elseif exchangeclone.exile then
hoe_function = function(...) end -- FIXME: implement
else
assert(exchangeclone.mtg)
if farming then
hoe_function = farming.hoe_on_use
else

View File

@ -32,7 +32,7 @@ minetest.register_tool("exchangeclone:infinite_food", {
groups = { food = 2, eatable = 8, disable_repair = 1, fire_immune = 1},
on_place = exchangeclone.mcl and infinite_food_function,
on_secondary_use = exchangeclone.mcl and infinite_food_function,
on_use = exchangeclone.mtg and infinite_food_function,
on_use = (not exchangeclone.mcl) and infinite_food_function,
_mcl_saturation = 12.8,
})
@ -42,7 +42,7 @@ minetest.register_on_item_eat(function(hp_change, replace_with_item, itemstack,
end
end)
local bread_itemstring = exchangeclone.mcl and "mcl_farming:bread" or "farming:bread"
local bread_itemstring = exchangeclone.itemstrings.bread
minetest.register_craft({
output = "exchangeclone:infinite_food",

View File

@ -35,7 +35,7 @@ if exchangeclone.mcl then
end
end
elseif exchangeclone.exile then
exchangeclone.colors = {} -- FIXME: extract from ncrafting
exchangeclone.colors = {}
for name, palette in pairs(bundlelist) do
if name ~= "none" then
exchangeclone.colors[name] = {
@ -191,6 +191,9 @@ for _, file in ipairs(files) do
end
minetest.register_on_mods_loaded(function()
if exchangeclone.exile then
dofile(modpath.."/exile_on_mods_loaded.lua")
end
local emc_start_time = minetest.get_us_time()
minetest.log("action", "[ExchangeClone] Registering EMC values")
dofile(modpath.."/register_emc.lua")

View File

@ -2,5 +2,5 @@ name = exchangeclone
title = ExchangeClone
description = The main part of the modpack (depends on both the other mods)
depends = zzzz_exchangeclone_init
optional_depends = mcl_core, default, mcl_armor, 3d_armor, mcl_item_id, mobs_mc, hopper, pipeworks, mcl_dispensers, awards, exile_env_sounds, nodes_nature, ncrafting, crafting, megamorph
optional_depends = mcl_core, default, mcl_armor, 3d_armor, mcl_item_id, mobs_mc, hopper, pipeworks, mcl_dispensers, awards, exile_env_sounds, nodes_nature, ncrafting, crafting, megamorph, health
author = ThePython10110

View File

@ -7,24 +7,31 @@ local function heal(player, amount)
end
end
local function satiate() end
local satiate = nil
if exchangeclone.mcl and mcl_hunger.active then
satiate = function(player, amount)
local hunger = mcl_hunger.get_hunger(player)
if hunger < 20 then
mcl_hunger.set_hunger(player, hunger + amount)
mcl_hunger.set_saturation(player, hunger + amount)
return true
if exchangeclone.mcl then
if mcl_hunger.active then
satiate = function(player, amount)
local hunger = mcl_hunger.get_hunger(player)
if hunger < 20 then
mcl_hunger.set_hunger(player, hunger + amount)
mcl_hunger.set_saturation(player, hunger + amount)
return true
end
end
end
elseif exchangeclone.mtg and minetest.get_modpath("stamina") then
satiate = function(player, amount)
if stamina.get_saturation(player) < stamina.settings.visual_max then
stamina.change_saturation(player, amount)
return true
elseif exchangeclone.mtg then
if minetest.get_modpath("stamina") then
satiate = function(player, amount)
if stamina.get_saturation(player) < stamina.settings.visual_max then
stamina.change_saturation(player, amount)
return true
end
end
end
else
assert(exchangeclone.exile)
-- FIXME: implement satiate()
end
minetest.register_tool("exchangeclone:soul_stone", {
@ -62,7 +69,7 @@ minetest.register_craft({
}
})
if (exchangeclone.mcl and mcl_hunger.active) or (exchangeclone.mtg and minetest.get_modpath("stamina")) then
if satiate then
minetest.register_tool("exchangeclone:body_stone", {
description = "Body Stone",
inventory_image = "exchangeclone_body_stone.png",
@ -90,7 +97,7 @@ if (exchangeclone.mcl and mcl_hunger.active) or (exchangeclone.mtg and minetest.
groups = {exchangeclone_passive = 1, disable_repair = 1}
})
local sugar_ingredient = exchangeclone.mcl and "mcl_core:sugar" or "default:papyrus"
local sugar_ingredient = exchangeclone.itemstrings.sugar
minetest.register_craft({
output = "exchangeclone:body_stone",
recipe = {

View File

@ -162,26 +162,56 @@ minetest.register_craft({
replacements = {{phil, phil}}
})
minetest.register_craft({
output = exchangeclone.itemstrings.iron,
type = "shapeless",
recipe = {
phil,
exchangeclone.itemstrings.coal,
exchangeclone.itemstrings.coal,
},
replacements = {{phil, phil}}
})
if exchangeclone.exile then
-- in Exile, iron is really hard to make, increase cost to compensate
minetest.register_craft({
output = exchangeclone.itemstrings.iron,
type = "shapeless",
recipe = {
phil,
exchangeclone.itemstrings.coal,
exchangeclone.itemstrings.coal,
exchangeclone.itemstrings.coal,
exchangeclone.itemstrings.coal,
exchangeclone.itemstrings.coal,
exchangeclone.itemstrings.coal,
exchangeclone.itemstrings.coal,
exchangeclone.itemstrings.coal,
},
replacements = {{phil, phil}}
})
minetest.register_craft({
output = exchangeclone.itemstrings.coal.." 2",
type = "shapeless",
recipe = {
phil,
exchangeclone.itemstrings.iron
},
replacements = {{phil, phil}}
})
minetest.register_craft({
output = exchangeclone.itemstrings.coal.." 8",
type = "shapeless",
recipe = {
phil,
exchangeclone.itemstrings.iron
},
replacements = {{phil, phil}}
})
else
minetest.register_craft({
output = exchangeclone.itemstrings.iron,
type = "shapeless",
recipe = {
phil,
exchangeclone.itemstrings.coal,
exchangeclone.itemstrings.coal,
},
replacements = {{phil, phil}}
})
minetest.register_craft({
output = exchangeclone.itemstrings.coal.." 2",
type = "shapeless",
recipe = {
phil,
exchangeclone.itemstrings.iron
},
replacements = {{phil, phil}}
})
end
minetest.register_craft({
output = exchangeclone.itemstrings.copper.." 2",

View File

@ -146,331 +146,6 @@ end
local auto = {}
if exchangeclone.exile then
local seen_unknown_crafting_types = {}
local did_cooking_warning = false
local replacements_actions = {}
-- Exile doesn't have lava buckets and uses an alternative,
-- so just eat the input item
replacements_actions[dump({{
exchangeclone.itemstrings.lava_bucket,
exchangeclone.itemstrings.empty_bucket,
}})] = {just_eat_input = true}
-- we're already using a philosopher's stone to do the crafting,
-- don't add to recipe so we don't need two
replacements_actions[dump({{
"exchangeclone:philosophers_stone",
"exchangeclone:philosophers_stone",
}})] = {remove_from_input = "exchangeclone:philosophers_stone"}
-- used for recipe for iron band -- crafting mod doesn't support
-- replacements, there is another recipe for the iron band,
-- so just ignore the recipe
replacements_actions[dump({{
"exchangeclone:volcanite_amulet",
"exchangeclone:volcanite_amulet",
}})] = {ignore_recipe = true}
local replacement_itemstrings = {
["group:tree"] = "group:log",
}
for _, recipes in pairs(exchangeclone.recipes) do
for _, recipe in ipairs(recipes) do
local mt_craft_type = recipe.type and exchangeclone.craft_types[recipe.type].type
if not mt_craft_type or mt_craft_type == "shaped" or mt_craft_type == "shapeless" then
---@type table<string, integer>
local item_counts = {}
local remove_from_input = nil
local ignore_recipe = false
if recipe.replacements then
local replacements_value = dump(recipe.replacements)
local replacements_action = replacements_actions[replacements_value]
assert(replacements_action, "[ExchangeClone] unimplemented replacements style: "..replacements_value)
if replacements_action.remove_from_input then
remove_from_input = replacements_action.remove_from_input
elseif replacements_action.ignore_recipe then
ignore_recipe = true
else
assert(replacements_action.just_eat_input, "unhandled replacements_action"..dump(replacements_action))
end
end
local worklist = table.copy(recipe.recipe)
while #worklist > 0 do
local item = table.remove(worklist)
if type(item) == "table" then
for _, v in ipairs(item) do
table.insert(worklist, v)
end
elseif item and item ~= remove_from_input and item ~= "" then
local count = item_counts[item] or 0
item_counts[item] = count + 1
end
end
local items_array = {}
for itemstring, count in pairs(item_counts) do
itemstring = replacement_itemstrings[itemstring] or itemstring
local item = ItemStack(itemstring)
item:set_count(count)
if not itemstring:find("^group:") and not item:is_known() then
ignore_recipe = true
break
end
assert(item:to_string() ~= "", dump({itemstring=itemstring,count=count,recipe=recipe}))
table.insert(items_array, item:to_string())
end
if not ignore_recipe then
local final_recipe = {
type = "exchangeclone_crafting",
output = recipe.output,
items = items_array,
always_known = true,
}
minetest.log("[ExchangeClone]: registered Exile crafting recipe: \n"..dump(final_recipe))
crafting.register_recipe(final_recipe)
end
elseif mt_craft_type == "cooking" then
if not did_cooking_warning then
minetest.log("warning", "[ExchangeClone] cooking crafts aren't implemented for Exile, ignoring")
end
did_cooking_warning = true
else
local unknown_craft_type = dump(mt_craft_type)
if not seen_unknown_crafting_types[unknown_craft_type] then
minetest.log("warning", "[ExchangeClone] unknown minetest crafting type: "..unknown_craft_type)
end
seen_unknown_crafting_types[unknown_craft_type] = true
end
end
end
for craft_type, recipes in pairs(crafting.recipes) do
if craft_type ~= "exchangeclone_crafting" then
exchangeclone.register_craft_type(craft_type, "shapeless")
for _, orig_recipe in ipairs(recipes) do
local recipe = {}
for _, item in ipairs(orig_recipe.items) do
item = ItemStack(item)
for _ = 1, item:get_count() do
table.insert(recipe, item:get_name())
end
end
exchangeclone.register_craft({
type = orig_recipe.type,
output = orig_recipe.output,
recipe = recipe,
})
end
end
end
exchangeclone.register_craft_type("thawing", "cooking", true)
exchangeclone.register_craft({
type = "thawing",
output = "nodes_nature:freshwater_source",
recipe = "nodes_nature:ice",
})
exchangeclone.register_craft({
type = "thawing",
output = "nodes_nature:salt_water_source",
recipe = "nodes_nature:sea_ice",
})
exchangeclone.register_craft_type("roasting", "cooking")
exchangeclone.register_craft({
type = "roasting",
output = "tech:iron_bloom",
recipe = "tech:iron_and_slag",
})
exchangeclone.register_craft({
type = "roasting",
output = "tech:iron_and_slag",
recipe = "tech:iron_smelting_mix",
})
exchangeclone.register_craft({
type = "roasting",
output = "tech:green_glass_ingot",
recipe = "tech:green_glass_mix",
})
exchangeclone.register_craft({
type = "roasting",
output = "tech:clear_glass_ingot",
recipe = "tech:clear_glass_mix",
})
exchangeclone.register_craft({
type = "roasting",
output = "tech:quicklime",
recipe = "tech:crushed_lime",
})
exchangeclone.register_craft_type("melting", "shapeless")
exchangeclone.register_craft({
type = "melting",
output = "tech:pane_tray_clear",
recipe = {"tech:clear_glass_ingot", "tech:pane_tray"},
})
exchangeclone.register_craft({
type = "melting",
output = "tech:pane_tray_green",
recipe = {"tech:green_glass_ingot", "tech:pane_tray"},
})
exchangeclone.register_craft_type("start_fire", "cooking")
exchangeclone.register_craft({
type = "start_fire",
output = "tech:small_wood_fire",
recipe = "tech:small_wood_fire_unlit",
})
exchangeclone.register_craft({
type = "start_fire",
output = "tech:large_wood_fire",
recipe = "tech:large_wood_fire_unlit",
})
exchangeclone.register_craft({
type = "start_fire",
output = "tech:small_charcoal_fire",
recipe = "tech:charcoal",
})
exchangeclone.register_craft({
type = "start_fire",
output = "tech:large_charcoal_fire",
recipe = "tech:charcoal_block",
})
exchangeclone.register_craft_type("extinguish_fire", "cooking", true)
exchangeclone.register_craft({
type = "extinguish_fire",
output = "tech:small_wood_fire_ext",
recipe = "tech:small_wood_fire",
})
exchangeclone.register_craft({
type = "extinguish_fire",
output = "tech:large_wood_fire_ext",
recipe = "tech:large_wood_fire",
})
exchangeclone.register_craft({
type = "extinguish_fire",
output = "tech:small_charcoal_fire_ext",
recipe = "tech:small_charcoal_fire",
})
exchangeclone.register_craft({
type = "extinguish_fire",
output = "tech:large_charcoal_fire_ext",
recipe = "tech:large_charcoal_fire",
})
exchangeclone.register_craft_type("to_smoldering", "cooking", true)
exchangeclone.register_craft({
type = "to_smoldering",
output = "tech:small_wood_fire_smoldering",
recipe = "tech:small_wood_fire",
})
exchangeclone.register_craft({
type = "to_smoldering",
output = "tech:large_wood_fire_smoldering",
recipe = "tech:large_wood_fire",
})
exchangeclone.register_craft({
type = "to_smoldering",
output = "tech:small_charcoal_fire_smoldering",
recipe = "tech:small_charcoal_fire",
})
exchangeclone.register_craft({
type = "to_smoldering",
output = "tech:large_charcoal_fire_smoldering",
recipe = "tech:large_charcoal_fire",
})
exchangeclone.register_craft_type("hammer_place", "cooking")
exchangeclone.register_craft({
type = "hammer_place",
output = "tech:hammer_basalt_placed",
recipe = "tech:hammer_basalt",
})
exchangeclone.register_craft({
type = "hammer_place",
output = "tech:hammer_granite_placed",
recipe = "tech:hammer_granite",
})
exchangeclone.register_craft_type("retting", "cooking")
exchangeclone.register_craft({
type = "retting",
output = "tech:retted_cana_bundle",
recipe = "tech:unretted_cana_bundle",
})
local extended_sed_list = table.copy(sed_list)
local artificial_seds = {broken_pottery_block = {mod_name = 'tech'}}
for name, _ in pairs(artificial_seds) do
table.insert(extended_sed_list, {name})
end
local water_pots = {
"tech:clay_water_pot",
"tech:wooden_water_pot",
"tech:glass_bottle_green",
"tech:glass_bottle_clear",
}
local wetnesses = {
[""] = {water_pot_suffix = "", source = ""},
["_wet"] = {water_pot_suffix = "_freshwater", source = "nodes_nature:freshwater_source"},
["_wet_salty"] = {water_pot_suffix = "_salt_water", source = "nodes_nature:salt_water_source"},
}
local ag_soils = {
{ag = "", depleted = ""},
{ag = "_agricultural_soil", depleted = ""},
{ag = "_agricultural_soil", depleted = "_depleted"},
}
exchangeclone.register_craft_type("make_ag_depleted", "cooking")
exchangeclone.register_craft_type("ag_soil_to_soil", "cooking")
exchangeclone.register_craft_type("wetten", "shapeless")
for _, v in ipairs(extended_sed_list) do
local name = v[1]
local mod_name = "nodes_nature"
if artificial_seds[name] then
mod_name = artificial_seds[name].mod_name
end
for wetness, wetness_data in pairs(wetnesses) do
for _, ag_soil in ipairs(ag_soils) do
if wetness == "_wet" or (wetness == "_wet_salty" and ag_soil.ag == "") then
exchangeclone.register_craft({
type = "wetten",
output = mod_name..":"..name..ag_soil.ag..wetness..ag_soil.depleted,
recipe = {
mod_name..":"..name..ag_soil.ag..ag_soil.depleted,
water_pots[1]..wetness_data.water_pot_suffix,
},
replacements = {{water_pots[1]..wetness_data.water_pot_suffix, water_pots[1]}},
})
end
end
if wetness ~= "_wet_salty" then
exchangeclone.register_craft({
type = "make_ag_depleted",
output = mod_name..":"..name.."_agricultural_soil"..wetness.."_depleted",
recipe = mod_name..":"..name..wetness,
})
end
end
end
exchangeclone.register_craft_type("fill_water_pot", "shapeless")
for wetness, wetness_data in pairs(wetnesses) do
if wetness ~= "" then
for _, water_pot in ipairs(water_pots) do
exchangeclone.register_craft({
type = "fill_water_pot",
output = water_pot..wetness_data.water_pot_suffix,
recipe = {
water_pot,
wetness_data.source,
},
})
end
end
end
for _, v in ipairs(soil_list) do
local name = v[1]
local sed_name = v[4]
for wetness, wetness_data in pairs(wetnesses) do
if wetness ~= "_wet_salty" then
exchangeclone.register_craft({
type = "ag_soil_to_soil",
output = "nodes_nature:"..name..wetness,
recipe = "nodes_nature:"..sed_name.."_agricultural_soil"..wetness,
})
end
end
end
end
-- Handle stonecutter recipes and decaychains in Mineclonia
if exchangeclone.mcla then
exchangeclone.register_craft_type("stonecutting", "cooking")
@ -609,6 +284,7 @@ end
if minetest.global_exists("logistica") then
assert(exchangeclone.mcl or exchangeclone.mtg, "logistica integration not implemented for Exile")
exchangeclone.register_craft_type("lava_furnace", "shapeless") -- weird that it's not cooking but I can't see any way around that
exchangeclone.register_craft({
output = "logistica:silverin",
@ -695,6 +371,8 @@ for itemstring, def in pairs(minetest.registered_items) do
add_to_auto = false
elseif exchangeclone.exile and minetest.get_item_group(itemstring, "natural_slope") ~= 0 then
add_to_auto = false
elseif exchangeclone.exile and minetest.get_item_group(itemstring, "air") ~= 0 then
add_to_auto = false
elseif exchangeclone.get_item_emc(itemstring) then
add_to_auto = false
end
@ -765,7 +443,7 @@ end
local cheapest_color = {""}
for color, color_data in pairs(exchangeclone.colors) do
local dye_itemstring = (exchangeclone.mcl and "mcl_dye:" or "dye:")..color
local dye_itemstring = exchangeclone.itemstrings.dye_prefix..color
local dye_emc = exchangeclone.get_item_emc(dye_itemstring)
if dye_emc then
if (not cheapest_color[2]) or (dye_emc < cheapest_color[2]) then

View File

@ -28,7 +28,10 @@ if exchangeclone.mcl then
mcl_fire.set_fire(pointed_thing, player, false)
end
end
elseif exchangeclone.exile then
--FIXME: implement set_fire
else
assert(exchangeclone.mtg)
set_fire = function(player, pos)
local protname = player:get_player_name()
if minetest.is_protected(pos, protname) then

View File

@ -71,13 +71,13 @@ minetest.register_tool("exchangeclone:talisman_of_repair", {
groups = {exchangeclone_passive = 1, disable_repair = 1}
})
local string = exchangeclone.mcl and "mcl_mobitems:string" or "farming:string"
local string = exchangeclone.itemstrings.string
minetest.register_craft({
output = "exchangeclone:talisman_of_repair",
recipe = {
{"exchangeclone:low_covalence_dust", "exchangeclone:medium_covalence_dust", "exchangeclone:high_covalence_dust"},
{string, exchangeclone.mcl and "mcl_core:paper" or "default:paper", string},
{string, exchangeclone.itemstrings.paper, string},
{"exchangeclone:high_covalence_dust", "exchangeclone:medium_covalence_dust", "exchangeclone:low_covalence_dust"}
}
})

View File

@ -374,6 +374,7 @@ if exchangeclone.mcl then
glowstoneworth = "mcl_nether:glowstone_dust",
lapisworth = "mcl_core:lapis",
coal = "mcl_core:coal_lump",
charcoal = "mcl_core:charcoal_lump",
iron = "mcl_core:iron_ingot",
copper = "mcl_copper:copper_ingot",
gold = "mcl_core:gold_ingot",
@ -399,6 +400,13 @@ if exchangeclone.mcl then
chest = "mcl_chests:chest",
dye_prefix = "mcl_dye:",
wool_prefix = "mcl_wool:",
furnace = "mcl_furnaces:furnace",
collector_ingredient = "mcl_nether:glowstone",
cotton = "mcl_mobitems:string",
string = "mcl_mobitems:string",
bread = "mcl_farming:bread",
sugar = "mcl_core:sugar",
paper = "mcl_core:paper",
}
elseif exchangeclone.exile then
exchangeclone.itemstrings = {
@ -408,7 +416,8 @@ elseif exchangeclone.exile then
obsidian = "nodes_nature:basalt_boulder",
glowstoneworth = "tech:iron_ingot",
lapisworth = "tech:green_glass_ingot",
coal = "tech:charcoal",
coal = "tech:charcoal_block",
charcoal = "tech:charcoal",
iron = "tech:iron_ingot",
copper = "tech:clear_glass_ingot",
gold = "artifacts:moon_glass",
@ -434,6 +443,13 @@ elseif exchangeclone.exile then
chest = "tech:primitive_wooden_chest",
dye_prefix = "ncrafting:dye_",
wool_prefix = "ncrafting:dye_", -- there isn't really dyable blocks
furnace = "tech:torch", -- there aren't really furnaces
collector_ingredient = "tech:iron_ingot",
cotton = "tech:coarse_fibre",
string = "tech:coarse_fibre",
bread = "tech:maraka_bread_cooked",
sugar = "nodes_nature:tangkal_fruit",
paper = "tech:coarse_fabric",
}
else
assert(exchangeclone.mtg)
@ -445,6 +461,7 @@ else
glowstoneworth = "default:tin_ingot",
lapisworth = "bucket:bucket_lava",
coal = "default:coal_lump",
charcoal = "group:tree",
iron = "default:steel_ingot",
copper = "default:copper_ingot",
gold = "default:gold_ingot",
@ -469,6 +486,13 @@ else
chest = "default:chest",
dye_prefix = "dye:",
wool_prefix = "wool:",
furnace = "default:furnace",
collector_ingredient = "default:gold_ingot",
cotton = "farming:cotton",
string = "farming:string",
bread = "farming:bread",
sugar = "default:papyrus",
paper = "default:paper",
}
end
@ -555,7 +579,7 @@ end
-- This function gets the drops from a node and drops them at the player's position
function exchangeclone.drop_items_on_player(pos, drops, player) -- modified from MineClone's code
if exchangeclone.mtg then
if not exchangeclone.mcl then
return minetest.handle_node_drops(pos, drops, player)
end
-- NOTE: This function override allows player to be nil.