Advertisement
tylkas

Patch for "Terraforming" v0.12.3 (MudRaker)

Mar 7th, 2016
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.18 KB | None | 0 0
  1. diff --git a/config.lua b/config.lua
  2. index 97e8344..acc031b 100644
  3. --- a/config.lua
  4. +++ b/config.lua
  5. @@ -1,6 +1,6 @@
  6.  MOD_VERSION = "0.12.3"         -- Mod version number
  7.  BASE_CRAFTING_SPEED = 0.5      -- Affects all terraforming machines (default is 0.5)
  8. -FUEL_INVENTORY_SIZE = 2                -- Affects normal bridge builder and moat digger only (default is 2)
  9. +FUEL_INVENTORY_SIZE = 1                -- Affects normal bridge builder and moat digger only (default is 2)
  10.  MODULE_SLOTS = 2                       -- Affects basic & prefabrication terraforming machines (default is 2)
  11.  LOGISTIC_MODULE_SLOTS = 3      -- Affects logistics terraforming machines (default is 3)
  12.  LOGISTIC_RECIPE_COUNT = 5      -- How many multiples of recipe to order at once via logistics
  13.  
  14.  
  15. diff --git a/control.lua b/control.lua
  16. index 6162481..27a8ab4 100644
  17. --- a/control.lua
  18. +++ b/control.lua
  19. @@ -651,6 +651,17 @@ function move_entity (e, delta, addrecipe)
  20.         local newfuel = e.get_inventory(defines.inventory.fuel)
  21.         newmodules.insert { name="speed-module", 2 }   -- has two module slots so fill both
  22.         newfuel.insert { name="solid-fuel", count=50 } -- use a full stack to be sure nothing else goes in here
  23. +
  24. +        newmodules.clear()
  25. +        newfuel.clear()
  26. +        for i, v in pairs(modules) do
  27. +                newmodules.insert {name=i, count=v}
  28. +        end
  29. +        for i, v in pairs(fuel) do
  30. +                newfuel.insert {name=i, count=v}
  31. +        end
  32. +
  33.         for i, v in pairs(inv) do
  34.                 e.insert {name=i, count=v}
  35.         end
  36. @@ -661,14 +672,7 @@ function move_entity (e, delta, addrecipe)
  37.                         end
  38.                 end
  39.         end
  40. -       newmodules.clear()
  41. -       newfuel.clear()
  42. -       for i, v in pairs(modules) do
  43. -               newmodules.insert {name=i, count=v}
  44. -       end
  45. -       for i, v in pairs(fuel) do
  46. -               newfuel.insert {name=i, count=v}
  47. -       end
  48. +
  49.         -- Restore items in the output inventory ... but only if they are not the terraformer recipe itself.
  50.         -- Only supports one output result (which must be first) and the terraformer recipe.
  51.         local newout = e.get_output_inventory()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement