Compare commits
9 Commits
829991ed39
...
229e191706
Author | SHA1 | Date |
---|---|---|
ThePython | 229e191706 | |
ThePython | 53d6973e10 | |
ThePython | 9ee585f552 | |
ThePython | 065022a926 | |
ThePython | d6c2fdc768 | |
ThePython | f1c222ef1a | |
ThePython | ab1c28c041 | |
ThePython | 233d84d3e2 | |
ThePython | 638fd4666d |
17
README.md
17
README.md
|
@ -1,8 +1,9 @@
|
|||
# ExchangeClone
|
||||
[![ContentDB](https://content.minetest.net/packages/ThePython10110/ExchangeClone/shields/downloads)](https://content.minetest.net/packages/ThePython10110/ExchangeClone)
|
||||
[![ContentDB](https://content.minetest.net/packages/ThePython/exchangeclone/shields/downloads/)](https://content.minetest.net/packages/ThePython/exchangeclone/)
|
||||
|
||||
Allows players to turn items into energy, and energy into items. Supports all items in Minetest Game and MineClone 2, and anything that can be made from them! Also adds a whole bunch of other stuff.
|
||||
|
||||
Welcome to the dev branch! This is the branch I'm currently working on, so it's likely that there are bugs.
|
||||
If you would like to see the latest changes, check out (pun) the dev branch! Beware of bugs.
|
||||
|
||||
ExchangeClone is tested with the latest release of Minetest, Minetest Game, MineClone2, and Mineclonia.
|
||||
|
||||
|
@ -67,14 +68,8 @@ Dependencies: Minetest Game or MineClone.
|
|||
## Changelog
|
||||
<details><summary>Look at this fancy expanding changelog</summary>
|
||||
|
||||
### TODO:
|
||||
* Finish changelog
|
||||
* Finish wiki
|
||||
* Test everything in MTG, MCL2, and MCLA (and 5.7)
|
||||
* Everything breaks properly
|
||||
* Item transfer mods work correctly
|
||||
* Shears seem to work fine (MCL)
|
||||
* Other tools work
|
||||
### v6.1
|
||||
* Damaged tools now give the correct amount of energy (thanks @programmerjake!).
|
||||
|
||||
### v6.0 (The Compatibility Update)
|
||||
This update took a while... there was just so much that had to be done.
|
||||
|
@ -354,4 +349,4 @@ I didn't get to everything I wanted to, mostly because the automatic energy valu
|
|||
* Mercurial Eye
|
||||
* Talisman of Repair
|
||||
* Gem of Eternal Density
|
||||
* Probably other things
|
||||
* Probably other things
|
||||
|
|
|
@ -40,7 +40,7 @@ local function deconstructor_action(pos, elapsed)
|
|||
if not (individual_energy_value and individual_energy_value > 0) then return end
|
||||
local wear = stack:get_wear()
|
||||
if wear and wear > 0 then
|
||||
individual_energy_value = math.max(math.floor(individual_energy_value * (65536 / wear)), 1)
|
||||
individual_energy_value = math.max(math.floor(individual_energy_value * ((65536 - wear)/65536)), 1)
|
||||
end
|
||||
if stack:get_name() == "exchangeclone:exchange_orb" then
|
||||
individual_energy_value = individual_energy_value + exchangeclone.get_orb_itemstack_energy(stack)
|
||||
|
|
|
@ -137,7 +137,7 @@ local function handle_inventory(player, inventory, to_list)
|
|||
if not individual_energy_value or individual_energy_value <= 0 then return end
|
||||
local wear = stack:get_wear()
|
||||
if wear and wear > 1 then
|
||||
individual_energy_value = math.max(math.floor(individual_energy_value * (65536 / wear)), 1)
|
||||
individual_energy_value = math.max(math.floor(individual_energy_value * ((65536 - wear)/65536)), 1)
|
||||
end
|
||||
if itemstring == "exchangeclone:exchange_orb" then
|
||||
individual_energy_value = individual_energy_value + exchangeclone.get_orb_itemstack_energy(stack)
|
||||
|
|
|
@ -44,7 +44,7 @@ end
|
|||
|
||||
--- Gets the energy value of an itemstring or ItemStack
|
||||
--- Handles "group:group_name" syntax (although it goes through every item), returns cheapest item in group
|
||||
function exchangeclone.get_item_energy(item, ignore_wear)
|
||||
function exchangeclone.get_item_energy(item)
|
||||
if (item == "") or not item then return end
|
||||
-- handle groups
|
||||
if type(item) == "string" and item:sub(1,6) == "group:" and exchangeclone.group_values then
|
||||
|
|
Loading…
Reference in New Issue