Orb burn time = 1600, orb value, more values
This commit is contained in:
parent
6cffa33026
commit
92e0c0d4c9
23
README.md
23
README.md
|
@ -1,12 +1,10 @@
|
|||
# Element Exchange
|
||||
[![ContentDB](https://content.minetest.net/packages/thepython10110/exchangeclone/shields/downloads/)](https://content.minetest.net/packages/thepython10110/exchangeclone/)
|
||||
![GitHub license](https://img.shields.io/github/license/thepython10110/minetest_exchangeclone)
|
||||
![GitHub issues](https://img.shields.io/github/issues/thepython10110/minetest_exchangeclone)
|
||||
|
||||
A [Minetest](https://www.minetest.net/) mod to exchange nodes into other nodes. This is mod is inspired by the "Equivalent Exchange" mod for MineCraft, and forked and modified from [Element Exchange](https://github.com/enchant97/minetest_element_exchange). In other words, most of the code is not mine.
|
||||
A [Minetest](https://www.minetest.net/) mod to exchange nodes into other nodes. This is mod is inspired by the "Equivalent Exchange" mod for MineCraft, and forked and modified from [Element Exchange](https://github.com/enchant97/minetest_element_exchange). In other words, a lot of the code is not mine.
|
||||
|
||||
![In Game Screenshot](screenshot.png)
|
||||
|
||||
[GitHub repo](https://github.com/thepython10110/exchangeclone)
|
||||
|
||||
## Features
|
||||
- Orb that holds energy (left click while holding it to show charge)
|
||||
- Collector that collects energy from the sun
|
||||
|
@ -17,14 +15,13 @@ A [Minetest](https://www.minetest.net/) mod to exchange nodes into other nodes.
|
|||
You can change the default values in the Minetest settings under `mods > exchangeclone`.
|
||||
|
||||
## New features added by ThePython10110
|
||||
* Working on support for MineClone, including hoppers (all features work, just need to add energy values).
|
||||
* Shift-clicking works (ListRings).
|
||||
* Fixed a bug where items could be placed in the output slot of the Element Constructor.
|
||||
* Added the ability to add energy values by group (hopefully)
|
||||
## Features that may be added in the future
|
||||
* Energy Condenser similar to that in Equivalent Exchange
|
||||
* Philosopher's Stone, Dark Matter, Red Matter, etc.
|
||||
* Basically, various things
|
||||
* Working on support for MineClone, including hoppers (all features work, just need to add energy values)
|
||||
* Shift-clicking works (`listring`s)
|
||||
* Fixed a bug where items could be placed in the output slot of the Element Constructor
|
||||
* Added the ability to add energy values by group
|
||||
* Damaged tools now give less energy (based on wear)
|
||||
* Orbs now can be turned into energy (based on how much is stored)
|
||||
I plan to add more features from Equivalent Exchange (Energy Condenser, Philosopher's Stone, dark matter, etc.), but I don't actually own MineCraft, meaning I will probably make some minor mistakes, since all I have to go on is the internet. Please report any issues on the [GitHub issues page](https://github.com/thepython10110/exchangeclone/issues).
|
||||
|
||||
## Original License
|
||||
Copyright (C) 2021 Leo Spratt
|
||||
|
|
|
@ -53,10 +53,17 @@ local function on_timer(pos, elapsed)
|
|||
if not inv:is_empty("dst") and not inv:is_empty("main") then
|
||||
-- remove one item from fuel inventory
|
||||
local fuel_stack = inv:get_stack("main", 1)
|
||||
local energy_value = get_item_energy(fuel_stack:get_name())
|
||||
if fuel_stack:get_name() == "exchangeclone:exchange_orb" then
|
||||
local energy_value = (fuel_stack:get_meta():get_int("stored_charge") or 0) + 8452 --8452 = energy cost of orb
|
||||
else
|
||||
local energy_value = get_item_energy(fuel_stack:get_name())
|
||||
end
|
||||
local wear = fuel_stack:get_wear()
|
||||
if wear then
|
||||
energy_value = energy_value * (wear / 65536)
|
||||
end
|
||||
fuel_stack:set_count(fuel_stack:get_count() - 1)
|
||||
inv:set_stack("main", 1, fuel_stack)
|
||||
|
||||
-- only get 1 orb as we can only use one
|
||||
local dest_orb = inv:get_stack("dst", 1)
|
||||
local stored = dest_orb:get_meta():get_int("stored_charge") or 0
|
||||
|
|
48
energy.lua
48
energy.lua
|
@ -282,17 +282,28 @@ local energy_values = {
|
|||
stick = 3,
|
||||
flint = 4,
|
||||
cactus = 8,
|
||||
vine = 8,
|
||||
cobweb = 12,
|
||||
ladder = 14,
|
||||
},
|
||||
["mcl_bows"] = {
|
||||
arrow = 14,
|
||||
},
|
||||
["mcl_fishing"] = {
|
||||
fishing_rod = 12,
|
||||
fishing_rod_enchanted = 24,
|
||||
},
|
||||
["mcl_throwing"] = {
|
||||
snowball = 0,
|
||||
},
|
||||
["mcl_bamboo"] = {
|
||||
bamboo_mosaic = 8,
|
||||
bamboo_plank = 8
|
||||
},
|
||||
["mcl_furnaces"] = {
|
||||
furnace = 8
|
||||
},
|
||||
["mcl_farming"] = {
|
||||
hoe_stone = 10
|
||||
},
|
||||
["mcl_stairs"] = {
|
||||
slab_redsandstone = 2,
|
||||
slab_redsandstonesmooth2 = 2,
|
||||
|
@ -308,6 +319,7 @@ local energy_values = {
|
|||
stair_red_nether_brick = 6
|
||||
},
|
||||
["mcl_flowers"] = {
|
||||
waterlily = 16,
|
||||
},
|
||||
["mcl_mangrove"] = {
|
||||
mangrove_wood = 8
|
||||
|
@ -361,17 +373,6 @@ local energy_values = {
|
|||
cauldron = 0
|
||||
},
|
||||
["mesecons_button"] = {
|
||||
button_acaciawood_off = 2,
|
||||
button_bamboo_off = 2,
|
||||
button_birchwood_off = 2,
|
||||
button_crimson_hyphae_wood_off = 2,
|
||||
button_darkwood_off = 2,
|
||||
button_junglewood_off = 2,
|
||||
button_mangrove_wood_off = 2,
|
||||
button_sprucewood_off = 2,
|
||||
button_stone_off = 2,
|
||||
button_warped_hyphae_wood_off = 2,
|
||||
button_wood_off = 2
|
||||
},
|
||||
["mesecons_pressureplates"] = {
|
||||
pressure_plate_stone_off = 2
|
||||
|
@ -385,14 +386,31 @@ local energy_values = {
|
|||
nether_brick_fence_gate = 4
|
||||
},
|
||||
["mcl_tools"] = {
|
||||
sword_stone = 6
|
||||
sword_stone = 6,
|
||||
shovel_stone = 9,
|
||||
pickaxe_stone = 11,
|
||||
axe_stone = 11,
|
||||
sword_stone_enchanted = 12,
|
||||
shovel_stone_enchanted = 18,
|
||||
pickaxe_stone_enchanted = 22,
|
||||
axe_stone_enchanted = 22,
|
||||
},
|
||||
["mcl_mobitems"] = {
|
||||
string = 12,
|
||||
},
|
||||
["mcl_torches"] = {
|
||||
torch = 9,
|
||||
},
|
||||
["group"] = {
|
||||
sandstone = 3,
|
||||
stone_brick = 1,
|
||||
wood = 8,
|
||||
wood_slab = 4,
|
||||
|
||||
button = 2,
|
||||
dye = 8,
|
||||
fence_wood = 12,
|
||||
wood_stairs = 12,
|
||||
flower = 16,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue