Compare commits
2 Commits
2e877676f9
...
6acbc76427
Author | SHA1 | Date |
---|---|---|
|
6acbc76427 | |
|
2635fd9d06 |
32
README.md
32
README.md
|
@ -50,21 +50,27 @@ Dependencies: Minetest Game or MineClone.
|
||||||
![Screenshot](screenshot.png)
|
![Screenshot](screenshot.png)
|
||||||
![Transmutation GUI Screenshot](transmutation_screenshot.png)
|
![Transmutation GUI Screenshot](transmutation_screenshot.png)
|
||||||
|
|
||||||
## Sources/license: (note: this will change soon)
|
## Sources/licenses:
|
||||||
* Code: Originally started as a fork of Enchant97's mod [Element Exchange](https://github.com/enchant97/minetest_element_exchange). Since then, there have been tons of new bugs and features (at this point, at least 95% of the code is my own). Both this mod and Element Exchange are licenced under GPLv3+. Based on Equivalent Exchange and ProjectE, mods for Minecraft.
|
* Code: GPLv3+
|
||||||
|
* Originally started as a fork of Enchant97's mod [Element Exchange](https://github.com/enchant97/minetest_element_exchange) (also GPLv3+).
|
||||||
|
* Based on the Minecraft mods Equivalent Exchange 2 and ProjectE (both MIT, though the source for EE2 is unavailable)
|
||||||
* Textures:
|
* Textures:
|
||||||
* Energy Collector, Deconstructor, Constructor: Directly from Element Exchange, GPLv3+.
|
* Constructor and Deconstructor: Unmodified from Element Exchange (GPLv3+)
|
||||||
* Exchange Orb: *Slightly* modified from Element Exchange (I just changed the color to white so it could change colors correctly)
|
* 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)
|
||||||
* Alchemical Coal, Mobius Fuel, and Aeternalis Fuel: modified versions of MineClone's coal texture (CC-BY-SA-3.0).
|
* Upgraders and Upgrades: Created by me (CC-BY-SA-3.0)
|
||||||
* Covalence Dust: Slightly modified from MineClon(e2/ia)'s redstone dust (CC-BY-SA-3.0)
|
* Energy Collectors:
|
||||||
* Dark and Red Matter Armor (and maybe eventually Gem Armor): modified versions of diamond armor from 3D Armor (CC-BY-SA-3.0) and `mcl_armor` (CC-BY-SA-3.0).
|
* Base: Glowstone block from MineClone2 (CC-BY-SA-3.0)
|
||||||
* All other textures (and sounds): Created by me, inspired by Equivalent Exchange and licensed under CC-BY-SA-3.0.
|
* Overlay: Created by me (CC-BY-SA-3.0)
|
||||||
|
* Alchemical Chests (and Advanced Alchemical Chests): Modified version of EE2/ProjectE's textures, extended to 16x16 instead of 14x14 (MIT)
|
||||||
|
* All other textures and sounds: Directly from EE2/ProjectE (MIT)
|
||||||
|
|
||||||
|
You can find the old textures and sounds by going back to previous commits in GitHub.
|
||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
|
||||||
### PLANS/TODO FOR v7.0 (see dev branch for current progress)
|
### PLANS/TODO FOR v7.0 (see dev branch for current progress)
|
||||||
* [x] Achievements/advancements/awards
|
* [x] Achievements/advancements/awards (match ProjectE with a few missing/added)
|
||||||
* [x] Textures/sounds from ProjectE/ProjectExpansion (I wanted this for a while, but I couldn't figure out how to get permission until I saw [this tweet](https://twitter.com/MercuriusXeno/status/1662203934713212932) from the creator of Equivalent Exchange)
|
* [x] Textures/sounds from ProjectE/ProjectExpansion (I wanted this for a while, but I couldn't figure out how to get permission until I saw [this tweet](https://twitter.com/MercuriusXeno/status/1662203934713212932) from the creator of Equivalent Exchange)
|
||||||
* [x] Change "energy" to EMC
|
* [x] Change "energy" to EMC
|
||||||
* [ ] Improvements to tools (\* = only in MCL at the moment)
|
* [ ] Improvements to tools (\* = only in MCL at the moment)
|
||||||
|
@ -91,6 +97,7 @@ Dependencies: Minetest Game or MineClone.
|
||||||
* [ ] DM/RM blocks can only be broken by correct (or higher) type.
|
* [ ] DM/RM blocks can only be broken by correct (or higher) type.
|
||||||
* [ ] Change energy collector recipes to match ProjectE
|
* [ ] Change energy collector recipes to match ProjectE
|
||||||
* [ ] Update screenshots
|
* [ ] Update screenshots
|
||||||
|
* [x] Update media licenses
|
||||||
* [ ] Edit wiki:
|
* [ ] Edit wiki:
|
||||||
* [ ] Achievements?
|
* [ ] Achievements?
|
||||||
* [ ] Divining rods
|
* [ ] Divining rods
|
||||||
|
@ -119,11 +126,7 @@ Dependencies: Minetest Game or MineClone.
|
||||||
* Replaced Exchange Orbs with Klein Stars and Magnum Stars
|
* Replaced Exchange Orbs with Klein Stars and Magnum Stars
|
||||||
* Added storage blocks for Alchemical Coal, Mobius Fuel, and Aeternalis Fuel
|
* Added storage blocks for Alchemical Coal, Mobius Fuel, and Aeternalis Fuel
|
||||||
* Changes:
|
* Changes:
|
||||||
* Most textures and all sounds are now from ProjectE/EE2.
|
* Most textures and all sounds are now from ProjectE/EE2. See license section for details.
|
||||||
* Only (De)Constructors, and worn armor have the original textures.
|
|
||||||
* Textures for Upgrades and Upgraders have been changed.
|
|
||||||
* Textures for Collectors are based on ProjectE's but not identical.
|
|
||||||
* Textures for Alchemical Chests are slightly modified from ProjectE's to make them 16x16 instead of 14x14
|
|
||||||
* Several improvements to tools:
|
* Several improvements to tools:
|
||||||
* The pickaxe vein mining ability only checks each position once.
|
* The pickaxe vein mining ability only checks each position once.
|
||||||
* Tools do not mine slower in 3x1/3x3 modes (to match ProjectE)
|
* Tools do not mine slower in 3x1/3x3 modes (to match ProjectE)
|
||||||
|
@ -134,6 +137,7 @@ Dependencies: Minetest Game or MineClone.
|
||||||
* Several changes to tool abilities (*mostly* making them closer to the ProjectE versions)
|
* Several changes to tool abilities (*mostly* making them closer to the ProjectE versions)
|
||||||
* Got rid of `exchangeclone.node_radius_action` function (it was pretty much over-refactoring and made things so much more complicated)
|
* Got rid of `exchangeclone.node_radius_action` function (it was pretty much over-refactoring and made things so much more complicated)
|
||||||
* Removed the deprecated PESA.
|
* Removed the deprecated PESA.
|
||||||
|
* Changed "energy" to "EMC"
|
||||||
* Replaced Exchange Orbs with Klein Stars and Magnum Stars
|
* Replaced Exchange Orbs with Klein Stars and Magnum Stars
|
||||||
* Since Klein Star Omegas have the same capacity as the old Exchange Orbs, they now replace them (meaning players don't lose anything).
|
* Since Klein Star Omegas have the same capacity as the old Exchange Orbs, they now replace them (meaning players don't lose anything).
|
||||||
* Klein Star Ein->Zwei->Drei->Vier->Sphere->Omega, then the same order for Magnum Stars.
|
* Klein Star Ein->Zwei->Drei->Vier->Sphere->Omega, then the same order for Magnum Stars.
|
||||||
|
|
|
@ -87,7 +87,7 @@ minetest.register_tool("exchangeclone:dark_matter_axe", {
|
||||||
damage_groups = {fleshy=9},
|
damage_groups = {fleshy=9},
|
||||||
punch_attack_uses = 0,
|
punch_attack_uses = 0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
choppy = {times={[1]=1.5, [2]=0.75, [3]=0.38}, uses=0, maxlevel=4},
|
choppy = {times = exchangeclone.get_mtg_times(14, nil, "choppy"), uses=0, maxlevel=4},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sound = { breaks = "default_tool_breaks" },
|
sound = { breaks = "default_tool_breaks" },
|
||||||
|
@ -114,7 +114,7 @@ minetest.register_tool("exchangeclone:red_matter_axe", {
|
||||||
damage_groups = {fleshy=10},
|
damage_groups = {fleshy=10},
|
||||||
punch_attack_uses = 0,
|
punch_attack_uses = 0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
choppy = {times={[1]=1, [2]=0.5, [3]=0.25}, uses=0, maxlevel=5},
|
choppy = {times = exchangeclone.get_mtg_times(16, nil, "choppy"), uses=0, maxlevel=5},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sound = { breaks = "default_tool_breaks" },
|
sound = { breaks = "default_tool_breaks" },
|
||||||
|
|
|
@ -64,7 +64,7 @@ minetest.register_tool("exchangeclone:dark_matter_hammer", {
|
||||||
damage_groups = {fleshy=14},
|
damage_groups = {fleshy=14},
|
||||||
punch_attack_uses = 0,
|
punch_attack_uses = 0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
cracky = {times={[1]=1.5, [2]=0.75, [3]=0.325}, uses=0, maxlevel=4},
|
cracky = {times = exchangeclone.get_mtg_times(14, nil, "cracky"), uses=0, maxlevel=4},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
|
@ -92,7 +92,7 @@ minetest.register_tool("exchangeclone:red_matter_hammer", {
|
||||||
damage_groups = {fleshy=15},
|
damage_groups = {fleshy=15},
|
||||||
punch_attack_uses = 0,
|
punch_attack_uses = 0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
cracky = {times={[1]=1, [2]=0.5, [3]=0.2}, uses=0, maxlevel=5},
|
cracky = {times = exchangeclone.get_mtg_times(16, nil, "cracky"), uses=0, maxlevel=5},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
|
|
|
@ -124,7 +124,7 @@ minetest.register_tool("exchangeclone:dark_matter_hoe", {
|
||||||
full_punch_interval = 0.25,
|
full_punch_interval = 0.25,
|
||||||
damage_groups = { fleshy = 1, },
|
damage_groups = { fleshy = 1, },
|
||||||
groupcaps={
|
groupcaps={
|
||||||
exchangeclone_dirt = {times={[1]=0.25, [2]=0.25, [3]=0.25}, uses=0, maxlevel=4},
|
exchangeclone_dirt = {times=exchangeclone.get_mtg_times(14, nil, "crumbly"), uses=0, maxlevel=4},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
|
@ -150,7 +150,7 @@ minetest.register_tool("exchangeclone:red_matter_hoe", {
|
||||||
full_punch_interval = 0.25,
|
full_punch_interval = 0.25,
|
||||||
damage_groups = { fleshy = 1, },
|
damage_groups = { fleshy = 1, },
|
||||||
groupcaps={
|
groupcaps={
|
||||||
exchangeclone_dirt = {times={[1]=0.25, [2]=0.25, [3]=0.25}, uses=0, maxlevel=4},
|
exchangeclone_dirt = {times=exchangeclone.get_mtg_times(16, nil, "crumbly"), uses=0, maxlevel=4},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
|
|
|
@ -88,7 +88,7 @@ minetest.register_tool("exchangeclone:dark_matter_pickaxe", {
|
||||||
damage_groups = {fleshy=8},
|
damage_groups = {fleshy=8},
|
||||||
punch_attack_uses = 0,
|
punch_attack_uses = 0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
cracky = {times={[1]=0.4, [2]=0.2, [3]=0.1}, uses=0, maxlevel=4},
|
cracky = {times = exchangeclone.get_mtg_times(14, nil, "cracky"), uses=0, maxlevel=4},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
|
@ -115,7 +115,7 @@ minetest.register_tool("exchangeclone:red_matter_pickaxe", {
|
||||||
damage_groups = {fleshy=9},
|
damage_groups = {fleshy=9},
|
||||||
punch_attack_uses = 0,
|
punch_attack_uses = 0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
cracky = {times={[1]=0.27, [2]=0.13, [3]=0.07}, uses=0, maxlevel=5},
|
cracky = {times = exchangeclone.get_mtg_times(16, nil, "cracky"), uses=0, maxlevel=5},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
|
|
|
@ -87,9 +87,9 @@ minetest.register_tool("exchangeclone:red_katar", {
|
||||||
damage_groups = {fleshy=28},
|
damage_groups = {fleshy=28},
|
||||||
punch_attack_uses = 0,
|
punch_attack_uses = 0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
exchangeclone_dirt = {times={[1]=0.15, [2]=0.15, [3]=0.15}, uses=0, maxlevel=4},
|
exchangeclone_dirt = {times=exchangeclone.get_mtg_times(64, nil, "crumbly"), uses=0, maxlevel=4},
|
||||||
snappy = {times={[1]=0.5, [2]=0.3, [3]=0.15}, uses=0, maxlevel=5},
|
snappy = {times=exchangeclone.get_mtg_times(64, nil, "snappy"), uses=0, maxlevel=5},
|
||||||
choppy = {times={[1]=0.5, [2]=0.3, [3]=0.15}, uses=0, maxlevel=5},
|
choppy = {times=exchangeclone.get_mtg_times(64, nil, "choppy"), uses=0, maxlevel=5},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sound = { breaks = "default_tool_breaks" },
|
sound = { breaks = "default_tool_breaks" },
|
||||||
|
@ -214,9 +214,9 @@ minetest.register_tool("exchangeclone:red_morningstar", {
|
||||||
damage_groups = {fleshy=25},
|
damage_groups = {fleshy=25},
|
||||||
punch_attack_uses = 0,
|
punch_attack_uses = 0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
cracky = {times={[1]=0.2, [2]=0.1, [3]=0.05}, uses=0, maxlevel=5},
|
cracky = {exchangeclone.get_mtg_times(64, nil, "cracky"), uses=0, maxlevel=5},
|
||||||
crumbly = {times={[1]=0.2, [2]=0.1, [3]=0.05}, uses=0, maxlevel=5},
|
crumbly = {exchangeclone.get_mtg_times(64, nil, "crumbly"), uses=0, maxlevel=5},
|
||||||
choppy = {times={[1]=0.2, [2]=0.1, [3]=0.05}, uses=0, maxlevel=5},
|
choppy = {exchangeclone.get_mtg_times(64, nil, "choppy"), uses=0, maxlevel=5},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sound = { breaks = "default_tool_breaks" },
|
sound = { breaks = "default_tool_breaks" },
|
||||||
|
|
|
@ -126,10 +126,9 @@ minetest.register_tool("exchangeclone:dark_matter_shovel", {
|
||||||
damage_groups = {fleshy=6},
|
damage_groups = {fleshy=6},
|
||||||
punch_attack_uses = 0,
|
punch_attack_uses = 0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
crumbly = {times={[1]=0.9, [2]=0.45, [3]=0.225}, uses=0, maxlevel=4},
|
crumbly = {times=exchangeclone.get_mtg_times(14, nil, "crumbly"), uses=0, maxlevel=4},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sound = { breaks = "default_tool_breaks" },
|
|
||||||
on_place = shovel_on_place,
|
on_place = shovel_on_place,
|
||||||
on_secondary_use = shovel_on_place,
|
on_secondary_use = shovel_on_place,
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
|
@ -153,10 +152,9 @@ minetest.register_tool("exchangeclone:red_matter_shovel", {
|
||||||
damage_groups = {fleshy=7},
|
damage_groups = {fleshy=7},
|
||||||
punch_attack_uses = 0,
|
punch_attack_uses = 0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
crumbly = {times={[1]=0.6, [2]=0.25, [3]=0.1}, uses=0, maxlevel=5},
|
crumbly = {times=exchangeclone.get_mtg_times(16, nil, "crumbly") maxlevel=5},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sound = { breaks = "default_tool_breaks" },
|
|
||||||
on_place = shovel_on_place,
|
on_place = shovel_on_place,
|
||||||
on_secondary_use = shovel_on_place,
|
on_secondary_use = shovel_on_place,
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
|
|
|
@ -176,7 +176,7 @@ minetest.register_tool("exchangeclone:dark_matter_sword", {
|
||||||
damage_groups = {fleshy=13},
|
damage_groups = {fleshy=13},
|
||||||
punch_attack_uses = 0,
|
punch_attack_uses = 0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
snappy = {times={[1]=0.95, [2]=0.45, [3]=0.15}, uses=0, maxlevel=4},
|
snappy = {times = exchangeclone.get_mtg_times(14, nil, "snappy"), uses=0, maxlevel=4},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
on_secondary_use = exchangeclone.aoe_attack({damage = 12, knockback = 12, radius = 5, cooldown = 0.7}),
|
on_secondary_use = exchangeclone.aoe_attack({damage = 12, knockback = 12, radius = 5, cooldown = 0.7}),
|
||||||
|
@ -201,7 +201,7 @@ minetest.register_tool("exchangeclone:red_matter_sword", {
|
||||||
damage_groups = {fleshy=17},
|
damage_groups = {fleshy=17},
|
||||||
punch_attack_uses = 0,
|
punch_attack_uses = 0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
snappy = {times={[1]=0.6, [2]=0.25, [3]=0.1}, uses=0, maxlevel=5},
|
snappy = {times = exchangeclone.get_mtg_times(16, nil, "snappy"), uses=0, maxlevel=5},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
on_secondary_use = red_matter_sword_action,
|
on_secondary_use = red_matter_sword_action,
|
||||||
|
|
|
@ -1100,21 +1100,49 @@ function exchangeclone.add_range_setting(name, data)
|
||||||
exchangeclone.tool_levels.range[name] = data
|
exchangeclone.tool_levels.range[name] = data
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function calculate_time_from_time(time, speed, efficiency)
|
||||||
|
if not efficiency then return time end
|
||||||
|
local hardness = (2/3)*time*speed
|
||||||
|
speed = speed + efficiency*efficiency + 1
|
||||||
|
return math.ceil(30/(speed/hardness))/20
|
||||||
|
end
|
||||||
|
|
||||||
|
-- A table of estimated hardness values for MTG
|
||||||
|
-- Calculated by finding MTG nodes with the right group, then looking up the Minecraft hardness for them
|
||||||
|
local hacky_workaround = {
|
||||||
|
snappy = {1.5, 0.8, 0.2},
|
||||||
|
cracky = {5, 3, 2},
|
||||||
|
choppy = {5, 3, 2},
|
||||||
|
crumbly = {2, 0.6, 0.5}
|
||||||
|
}
|
||||||
|
|
||||||
|
function exchangeclone.get_mtg_times(speed, efficiency, group)
|
||||||
|
if efficiency then speed = speed + efficiency*efficiency + 1 end
|
||||||
|
local times = {}
|
||||||
|
for i, hardness in ipairs(hacky_workaround[group]) do
|
||||||
|
times[i] = math.ceil(30/(speed/hardness))/20
|
||||||
|
end
|
||||||
|
minetest.log(dump(times))
|
||||||
|
return times
|
||||||
|
end
|
||||||
|
|
||||||
-- Given an item and effiency level, return the groupcaps of the item with that efficiency level.
|
-- Given an item and effiency level, return the groupcaps of the item with that efficiency level.
|
||||||
function exchangeclone.get_groupcaps(item, efficiency)
|
function exchangeclone.get_groupcaps(item, efficiency)
|
||||||
item = ItemStack(item)
|
item = ItemStack(item)
|
||||||
if exchangeclone.mcl then
|
if exchangeclone.mcl then
|
||||||
local thingy = mcl_autogroup.get_groupcaps(item:get_name(), efficiency)
|
local groupcaps = mcl_autogroup.get_groupcaps(item:get_name(), efficiency)
|
||||||
return thingy
|
return groupcaps
|
||||||
else
|
else -- This only works if the tool is the same speed for every group.
|
||||||
local groupcaps = table.copy(minetest.registered_items[item:get_name()].tool_capabilities.groupcaps)
|
local groupcaps = table.copy(minetest.registered_items[item:get_name()].tool_capabilities.groupcaps)
|
||||||
local adjusted_efficiency = 1 -- TODO finish this
|
local next, mcl_diggroups = pairs(item:get_definition()._mcl_diggroups)
|
||||||
|
local _, mcl_group_def = next(mcl_diggroups)
|
||||||
|
local speed = mcl_group_def.speed
|
||||||
|
|
||||||
if not groupcaps then return end
|
if not groupcaps then return end
|
||||||
for group, def in pairs(groupcaps) do
|
for group, def in pairs(groupcaps) do
|
||||||
for level, time in pairs(def.times) do
|
groupcaps[group].times = exchangeclone.get_mtg_times(speed, efficiency, group)
|
||||||
def[level] = time -- TODO finish this
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
return groupcaps
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue