diff options
-rw-r--r-- | README.md | 10 | ||||
-rw-r--r-- | util_execute_cycle.lua | 10 |
2 files changed, 14 insertions, 6 deletions
@@ -31,8 +31,8 @@ Other specialized Digtron blocks include: The Digtron mod only depends on the default mod, but includes optional support for several other mods: -* [https://forum.minetest.net/viewtopic.php?t=15912](doc), an in-game documentation mod. Detailed documentation for all of the Digtron's individual blocks are included as well as pages of general concepts and design tips. -* [https://forum.minetest.net/viewtopic.php?id=2155](pipeworks), a set of pneumatic tubes that allows inventory items to be extracted from or inserted into Digtron inventories. -* [https://forum.minetest.net/viewtopic.php?&t=12379](hopper), a different mod for inserting into and extracting from Digtron inventories. Note that only [https://github.com/minetest-mods/hopper](the most recent version of hopper is Digtron-capable,) earlier versions lack a suitable API. -* [https://forum.minetest.net/viewtopic.php?&t=4870](awards), a mod that adds achievements to the game. Over thirty Digtron-specific achievements are included. -* [https://forum.minetest.net/viewtopic.php?f=11&t=2538](technic), which adds rechargeable batteries and power cables to the game that Digtron can use instead of fuel.
\ No newline at end of file +* [doc](https://forum.minetest.net/viewtopic.php?t=15912), an in-game documentation mod. Detailed documentation for all of the Digtron's individual blocks are included as well as pages of general concepts and design tips. +* [pipeworks](https://forum.minetest.net/viewtopic.php?id=2155), a set of pneumatic tubes that allows inventory items to be extracted from or inserted into Digtron inventories. +* [hopper](https://forum.minetest.net/viewtopic.php?&t=12379), a different mod for inserting into and extracting from Digtron inventories. Note that only [the most recent version of hopper is Digtron-capable,](https://github.com/minetest-mods/hopper) earlier versions lack a suitable API. +* [awards](https://forum.minetest.net/viewtopic.php?&t=4870), a mod that adds achievements to the game. Over thirty Digtron-specific achievements are included. +* [technic](https://forum.minetest.net/viewtopic.php?f=11&t=2538), which adds rechargeable batteries and power cables to the game that Digtron can use instead of fuel. diff --git a/util_execute_cycle.lua b/util_execute_cycle.lua index b294aa2..f82c762 100644 --- a/util_execute_cycle.lua +++ b/util_execute_cycle.lua @@ -208,6 +208,14 @@ digtron.execute_dig_cycle = function(pos, clicker) local test_fuel_needed = test_build_fuel_cost + digging_fuel_cost - fuel_burning local test_fuel_burned = 0 + -- Fix for "no fuel" with fuel available + -- if fuel_burning is <0, then burn the missing fuel + if (fuel_burning<0) then + test_fuel_needed = test_fuel_needed - fuel_burning + fuel_burning = 0 + end + -- End fix + local power_from_cables = 0 if minetest.get_modpath("technic") then local power_inputs = {} @@ -580,4 +588,4 @@ digtron.execute_downward_dig_cycle = function(pos, clicker) node_to_dig, whether_to_dig = layout.nodes_dug:pop() end return pos, status_text, 0 -end
\ No newline at end of file +end |