Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/config.lua b/config.lua
- index 97e8344..acc031b 100644
- --- a/config.lua
- +++ b/config.lua
- @@ -1,6 +1,6 @@
- MOD_VERSION = "0.12.3" -- Mod version number
- BASE_CRAFTING_SPEED = 0.5 -- Affects all terraforming machines (default is 0.5)
- -FUEL_INVENTORY_SIZE = 2 -- Affects normal bridge builder and moat digger only (default is 2)
- +FUEL_INVENTORY_SIZE = 1 -- Affects normal bridge builder and moat digger only (default is 2)
- MODULE_SLOTS = 2 -- Affects basic & prefabrication terraforming machines (default is 2)
- LOGISTIC_MODULE_SLOTS = 3 -- Affects logistics terraforming machines (default is 3)
- LOGISTIC_RECIPE_COUNT = 5 -- How many multiples of recipe to order at once via logistics
- diff --git a/control.lua b/control.lua
- index 6162481..27a8ab4 100644
- --- a/control.lua
- +++ b/control.lua
- @@ -651,6 +651,17 @@ function move_entity (e, delta, addrecipe)
- local newfuel = e.get_inventory(defines.inventory.fuel)
- newmodules.insert { name="speed-module", 2 } -- has two module slots so fill both
- newfuel.insert { name="solid-fuel", count=50 } -- use a full stack to be sure nothing else goes in here
- +
- + newmodules.clear()
- + newfuel.clear()
- + for i, v in pairs(modules) do
- + newmodules.insert {name=i, count=v}
- + end
- + for i, v in pairs(fuel) do
- + newfuel.insert {name=i, count=v}
- + end
- +
- for i, v in pairs(inv) do
- e.insert {name=i, count=v}
- end
- @@ -661,14 +672,7 @@ function move_entity (e, delta, addrecipe)
- end
- end
- end
- - newmodules.clear()
- - newfuel.clear()
- - for i, v in pairs(modules) do
- - newmodules.insert {name=i, count=v}
- - end
- - for i, v in pairs(fuel) do
- - newfuel.insert {name=i, count=v}
- - end
- +
- -- Restore items in the output inventory ... but only if they are not the terraformer recipe itself.
- -- Only supports one output result (which must be first) and the terraformer recipe.
- local newout = e.get_output_inventory()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement