thingsnstuff
This commit is contained in:
parent
362310b041
commit
5ed7c7e92f
10
README.md
10
README.md
|
@ -56,7 +56,7 @@ Dependencies: Minetest Game or MineClone.
|
||||||
|
|
||||||
<details><summary><h1>Changelog:</h1></summary>
|
<details><summary><h1>Changelog:</h1></summary>
|
||||||
|
|
||||||
### 6.0)
|
### v6.0
|
||||||
* New Features:
|
* New Features:
|
||||||
* Automatically generated energy values! Based on crafting and cooking recipes.
|
* Automatically generated energy values! Based on crafting and cooking recipes.
|
||||||
* For reasons beyond my control, things kind of vary a bit between loads because of which items are added to the `minetest.registered_items` first (which is kind of random). For instance, the Lookup Tool in MineClone2 might sometimes have an energy value of 5 (1 stick + 1 glass) or 16 (4 sticks) depending on whether the energy value for glass is added first or not. At least, I assume that's the reason.
|
* For reasons beyond my control, things kind of vary a bit between loads because of which items are added to the `minetest.registered_items` first (which is kind of random). For instance, the Lookup Tool in MineClone2 might sometimes have an energy value of 5 (1 stick + 1 glass) or 16 (4 sticks) depending on whether the energy value for glass is added first or not. At least, I assume that's the reason.
|
||||||
|
@ -72,11 +72,17 @@ Dependencies: Minetest Game or MineClone.
|
||||||
* Chat commands to set/add/remove energy from a player (requires `privs` privilege):
|
* Chat commands to set/add/remove energy from a player (requires `privs` privilege):
|
||||||
* `/add_energy [player] value` (player defaults to self, value can be negative)
|
* `/add_energy [player] value` (player defaults to self, value can be negative)
|
||||||
* `/set_energy [player] value` (player defaults to self)
|
* `/set_energy [player] value` (player defaults to self)
|
||||||
|
* Added `exchangeclone.register_energy_alias(alias, itemstring)` function, which allow items to be treated as other items.
|
||||||
* Changes:
|
* Changes:
|
||||||
* Energy values are now in `_exchangeclone_energy/energy_values.lua`, and are laid out differently, and aliases now work.
|
* Energy values are now in `_exchangeclone_energy/energy_values.lua`, and are laid out differently, and aliases now work.
|
||||||
* ExchangeClone is now a modpack for [annoying reasons](https://forum.minetest.net/viewtopic.php?f=47&p=429775s). *Every single mod* in the modpack is required, regardless of what it says the dependencies are. Disable and then enable it for everything to work correctly.
|
* ExchangeClone is now a modpack for [annoying reasons](https://forum.minetest.net/viewtopic.php?f=47&p=429775s). *Every single mod* in the modpack is required, regardless of what it says the dependencies are. Disable and then enable it for everything to work correctly.
|
||||||
* The default energy value is no longer 1 but none.
|
* The default energy value is no longer 1 but none.
|
||||||
* The 2-billion-ish personal energy limit is has been increased to 1,000,000,000,000 (1 trillion). Any higher and there are precision-based exploits like being able to create infinite glass panes (or really anything with an energy value less than 1) when you have enough energy. It's still a 50,000% increase.
|
* The 2-billion-ish personal energy limit is has been increased to 1,000,000,000,000 (1 trillion). Any higher and there are precision-based exploits like being able to create infinite glass panes (or really anything with an energy value less than 1) when you have enough energy. It's still a 50,000% increase.
|
||||||
|
* ExchangeClone's energy values now (mostly) match ProjectE's, with a few minor differences.
|
||||||
|
* Emeralds are still worth less than diamonds, mostly due to villager trades.
|
||||||
|
* Dyes are worth different amounts based on their crafting recipes, so different colors of things are worth different amounts.
|
||||||
|
* Since fractional energy values are allowed, some energy values may be slightly different.
|
||||||
|
* Energy values are now multiples of 0.05 instead of 0.25, for no real reason.
|
||||||
* Added comma separators when energy is shown (to make it easier to identify large numbers)
|
* Added comma separators when energy is shown (to make it easier to identify large numbers)
|
||||||
* Tools that break multiple nodes at once (hammers, hoes, katar, and morningstar) use a better method that may (?) slightly decrease lag.
|
* Tools that break multiple nodes at once (hammers, hoes, katar, and morningstar) use a better method that may (?) slightly decrease lag.
|
||||||
* Ender pearls can now be crafted with 4 iron and the Philosopher's Stone.
|
* Ender pearls can now be crafted with 4 iron and the Philosopher's Stone.
|
||||||
|
@ -91,7 +97,7 @@ Dependencies: Minetest Game or MineClone.
|
||||||
* Fixed Red Matter Shield recipe
|
* Fixed Red Matter Shield recipe
|
||||||
* Fixed other modes of DM/RM tools not having energy values
|
* Fixed other modes of DM/RM tools not having energy values
|
||||||
|
|
||||||
### 5.4
|
### v5.4
|
||||||
* Fixed a minor bug with the Energy Collector (thanks @programmerjake!)
|
* Fixed a minor bug with the Energy Collector (thanks @programmerjake!)
|
||||||
|
|
||||||
### 5.3
|
### 5.3
|
||||||
|
|
|
@ -75,7 +75,7 @@ if exchangeclone.mcl then
|
||||||
["mcl_core:gold_ingot"] = 2048,
|
["mcl_core:gold_ingot"] = 2048,
|
||||||
["mcl_core:granite"] = 16,
|
["mcl_core:granite"] = 16,
|
||||||
["mcl_core:grass"] = 1,
|
["mcl_core:grass"] = 1,
|
||||||
["mcl_core:gravel"] = 1,
|
["mcl_core:gravel"] = 4,
|
||||||
["mcl_core:ice"] = 1,
|
["mcl_core:ice"] = 1,
|
||||||
["mcl_core:iron_ingot"] = 256,
|
["mcl_core:iron_ingot"] = 256,
|
||||||
["mcl_core:lapis"] = 864,
|
["mcl_core:lapis"] = 864,
|
||||||
|
@ -202,26 +202,6 @@ if exchangeclone.mcl then
|
||||||
}) do
|
}) do
|
||||||
exchangeclone.energy_values[itemstring] = exchangeclone.energy_values[itemstring] or energy_value
|
exchangeclone.energy_values[itemstring] = exchangeclone.energy_values[itemstring] or energy_value
|
||||||
end
|
end
|
||||||
|
|
||||||
exchangeclone.mcl_potion_data = exchangeclone.mcl_potion_data or {}
|
|
||||||
table.insert_all(exchangeclone.mcl_potion_data, { -- automatically assumes base cost is awkward potion if not specified
|
|
||||||
{name = "water", ingredient_cost = 0, custom_base_cost = 0, no_arrow = true},
|
|
||||||
{name = "awkward", ingredient_cost = 0, no_arrow = true},
|
|
||||||
{name = "fire_resistance", ingredient_cost = 768, plus = true},
|
|
||||||
{name = "poison", ingredient_cost = 128, plus = true, two = true},
|
|
||||||
{name = "harming", ingredient_cost = 192, custom_base_cost = 52, two = true},
|
|
||||||
{name = "healing", ingredient_cost = 1852, two = true},
|
|
||||||
{name = "leaping", ingredient_cost = 64, plus = true, two = true},
|
|
||||||
{name = "mundane", ingredient_cost = 32, no_arrow = true, custom_base_cost = 0},
|
|
||||||
{name = "night_vision", ingredient_cost = 1840, plus = true},
|
|
||||||
{name = "regeneration", ingredient_cost = 4096, plus = true, two = true},
|
|
||||||
{name = "slowness", ingredient_cost = 192, custom_base_cost = 20, plus = true, two = true},
|
|
||||||
{name = "swiftness", ingredient_cost = 32, plus = true, two = true},
|
|
||||||
{name = "thick", ingredient_cost = 384, no_arrow = true, custom_base_cost = 0},
|
|
||||||
{name = "water_breathing", ingredient_cost = 64, plus = true},
|
|
||||||
{name = "invisibility", ingredient_cost = 192, custom_base_cost = 623, plus = true},
|
|
||||||
{name = "withering", ingredient_cost = 128, plus = true, two = true}
|
|
||||||
})
|
|
||||||
else
|
else
|
||||||
for itemstring, energy_value in pairs({
|
for itemstring, energy_value in pairs({
|
||||||
["bones:bones"] = 4,
|
["bones:bones"] = 4,
|
||||||
|
@ -265,7 +245,7 @@ else
|
||||||
["default:flint"] = 4,
|
["default:flint"] = 4,
|
||||||
["default:gold_ingot"] = 2048,
|
["default:gold_ingot"] = 2048,
|
||||||
["default:grass"] = 1,
|
["default:grass"] = 1,
|
||||||
["default:gravel"] = 1,
|
["default:gravel"] = 4,
|
||||||
["default:ice"] = 1,
|
["default:ice"] = 1,
|
||||||
["default:iron_ingot"] = 256,
|
["default:iron_ingot"] = 256,
|
||||||
["default:large_cactus_seedling"] = 32,
|
["default:large_cactus_seedling"] = 32,
|
||||||
|
|
|
@ -48,7 +48,7 @@ local function get_cheapest_recipe(recipes)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not skip then
|
if not skip then
|
||||||
ingredient_cost = math.floor(ingredient_cost*4/output_count)/4 -- allow .25
|
ingredient_cost = math.floor(ingredient_cost*20/output_count)/20 -- allow .05
|
||||||
if (not cheapest) or (cheapest[1] > ingredient_cost) then
|
if (not cheapest) or (cheapest[1] > ingredient_cost) then
|
||||||
cheapest = {ingredient_cost, recipe}
|
cheapest = {ingredient_cost, recipe}
|
||||||
end
|
end
|
||||||
|
@ -59,7 +59,7 @@ end
|
||||||
|
|
||||||
local function set_item_energy(itemstring, energy_value)
|
local function set_item_energy(itemstring, energy_value)
|
||||||
if not (energy_value and itemstring) then return end
|
if not (energy_value and itemstring) then return end
|
||||||
energy_value = math.floor(energy_value*4)/4 -- floor to nearest .25
|
energy_value = math.floor(energy_value*20)/20 -- floor to nearest .05
|
||||||
if energy_value < 0 then return end
|
if energy_value < 0 then return end
|
||||||
local def = minetest.registered_items[itemstring]
|
local def = minetest.registered_items[itemstring]
|
||||||
if not def then return end
|
if not def then return end
|
||||||
|
@ -199,6 +199,25 @@ minetest.register_on_mods_loaded(function()
|
||||||
--minetest.log(dump(auto))
|
--minetest.log(dump(auto))
|
||||||
|
|
||||||
if exchangeclone.mcl then
|
if exchangeclone.mcl then
|
||||||
|
exchangeclone.mcl_potion_data = exchangeclone.mcl_potion_data or {}
|
||||||
|
table.insert_all(exchangeclone.mcl_potion_data, { -- automatically assumes base cost is awkward potion if not specified
|
||||||
|
{name = "water", ingredient_cost = 0, custom_base_cost = 0, no_arrow = true},
|
||||||
|
{name = "awkward", ingredient_cost = 0, no_arrow = true},
|
||||||
|
{name = "fire_resistance", ingredient_cost = 768, plus = true},
|
||||||
|
{name = "poison", ingredient_cost = 128, plus = true, two = true},
|
||||||
|
{name = "harming", ingredient_cost = 192, custom_base_cost = 52, two = true},
|
||||||
|
{name = "healing", ingredient_cost = 1852, two = true},
|
||||||
|
{name = "leaping", ingredient_cost = 64, plus = true, two = true},
|
||||||
|
{name = "mundane", ingredient_cost = 32, no_arrow = true, custom_base_cost = 0},
|
||||||
|
{name = "night_vision", ingredient_cost = 1840, plus = true},
|
||||||
|
{name = "regeneration", ingredient_cost = 4096, plus = true, two = true},
|
||||||
|
{name = "slowness", ingredient_cost = 192, custom_base_cost = 20, plus = true, two = true},
|
||||||
|
{name = "swiftness", ingredient_cost = 32, plus = true, two = true},
|
||||||
|
{name = "thick", ingredient_cost = 384, no_arrow = true, custom_base_cost = 0},
|
||||||
|
{name = "water_breathing", ingredient_cost = 64, plus = true},
|
||||||
|
{name = "invisibility", ingredient_cost = 192, custom_base_cost = 623, plus = true},
|
||||||
|
{name = "withering", ingredient_cost = 128, plus = true, two = true}
|
||||||
|
})
|
||||||
for _, info in ipairs(exchangeclone.mcl_potion_data) do
|
for _, info in ipairs(exchangeclone.mcl_potion_data) do
|
||||||
add_potion_energy(info)
|
add_potion_energy(info)
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,13 +3,23 @@ local S = minetest.get_translator()
|
||||||
-- Everything with the exchangeclone_ore group is also included (see pickaxes.lua)
|
-- Everything with the exchangeclone_ore group is also included (see pickaxes.lua)
|
||||||
-- This is pretty much the one thing I can't really figure out how to automate.
|
-- This is pretty much the one thing I can't really figure out how to automate.
|
||||||
local ores = {
|
local ores = {
|
||||||
["mcl_raw_ores:raw_gold"] = true,
|
|
||||||
["mcl_raw_ores:raw_iron"] = true,
|
|
||||||
["mcl_copper:raw_copper"] = true,
|
|
||||||
["default:copper_lump"] = true,
|
["default:copper_lump"] = true,
|
||||||
["default:gold_lump"] = true,
|
["default:gold_lump"] = true,
|
||||||
["default:iron_lump"] = true,
|
["default:iron_lump"] = true,
|
||||||
["default:tin_lump"] = true,
|
["default:tin_lump"] = true,
|
||||||
|
|
||||||
|
["mcl_copper:raw_copper"] = true,
|
||||||
|
["mcl_raw_ores:raw_gold"] = true,
|
||||||
|
["mcl_raw_ores:raw_iron"] = true,
|
||||||
|
|
||||||
|
["moreores:mithril_lump"] = true,
|
||||||
|
["moreores:silver_lump"] = true,
|
||||||
|
["moreores:tin_lump"] = true, -- tin is built into MTG but it's in the moreores code
|
||||||
|
|
||||||
|
["technic:chromium_lump"] = true,
|
||||||
|
["technic:lead_lump"] = true,
|
||||||
|
["technic:uranium_lump"] = true,
|
||||||
|
["technic:zinc_lump"] = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
local furnace_itemstring = "default:furnace"
|
local furnace_itemstring = "default:furnace"
|
||||||
|
|
Loading…
Reference in New Issue