jessefjxm

Untitled

Mar 29th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.37 KB | None | 0 0
  1. if modSetting("wit-research-charinvslots").value ~= "Disabled" then
  2.  
  3. if not data.raw.technology["character-inventory-slots-1"] then
  4. data:extend({
  5. {
  6. type = "technology", name = "character-inventory-slots-1",
  7. icon = "__base__/graphics/technology/toolbelt.png", icon_size = 128,
  8. effects = {{type = "character-inventory-slots-bonus", modifier = 10}},
  9. unit = {count = 50, ingredients = {{"science-pack-1", 1}}, time = 30},
  10. order = "c-k-f-a"
  11. }
  12. })
  13.  
  14. technology_charinvslots(2, 50, 30)
  15. data.raw.technology["character-inventory-slots-2"].unit.ingredients = {{"science-pack-1", 1}}
  16. technology_charinvslots(3, 50, 30)
  17. data.raw.technology["character-inventory-slots-3"].unit.ingredients = {{"science-pack-1", 1}, {"science-pack-2", 1}}
  18. technology_charinvslots(4, 100, 30)
  19. data.raw.technology["character-inventory-slots-4"].unit.ingredients = {{"science-pack-1", 1}, {"science-pack-2", 1}}
  20. technology_charinvslots(5, 100, 30)
  21. data.raw.technology["character-inventory-slots-5"].unit.ingredients = {{"science-pack-1", 1}, {"science-pack-2", 1}, {"science-pack-3", 1}}
  22. technology_charinvslots(6, 250, 30)
  23. data.raw.technology["character-inventory-slots-6"].unit.ingredients = {{"science-pack-1", 1}, {"science-pack-2", 1}, {"science-pack-3", 1}, {"production-science-pack", 1}}
  24. technology_charinvslots(7, 250, 30)
  25. data.raw.technology["character-inventory-slots-7"].unit.ingredients = {{"science-pack-1", 1}, {"science-pack-2", 1}, {"science-pack-3", 1}, {"production-science-pack", 1}, {"high-tech-science-pack", 1}}
  26.  
  27. data:extend({
  28. {
  29. type = "technology",
  30. name = "character-inventory-slots-8",
  31. icon = "__base__/graphics/technology/toolbelt.png",
  32. icon_size = 128,
  33. effects =
  34. {
  35. {type = "character-inventory-slots-bonus", modifier = 10}
  36. },
  37. prerequisites = {"character-inventory-slots-7"},
  38. unit =
  39. {
  40. count_formula = "(L-7)*1000",
  41. ingredients =
  42. {
  43. {"science-pack-1", 1},
  44. {"science-pack-2", 1},
  45. {"science-pack-3", 1},
  46. {"production-science-pack", 1},
  47. {"high-tech-science-pack", 1},
  48. {"space-science-pack", 1}
  49. },
  50. time = 30
  51. },
  52. max_level = "infinite",
  53. upgrade = true,
  54. order = "c-k-f-h"
  55. }
  56. })
  57. elseif data.raw.technology["character-inventory-slots-4"] then
  58. local last_max_level = tonumber(data.raw.technology["character-inventory-slots-4"].max_level)
  59. local tech = {
  60. type = "technology",
  61. name = "character-inventory-slots-"..(last_max_level+1),
  62. icon = data.raw.technology["character-inventory-slots-4"].icon,
  63. icon_size = data.raw.technology["character-inventory-slots-4"].icon_size,
  64. effects =
  65. {
  66. {type = "character-inventory-slots-bonus", modifier = 10}
  67. },
  68. prerequisites = {"character-inventory-slots-4"},
  69. unit =
  70. {
  71. count_formula = "L^(1.5)*1000",
  72. ingredients =
  73. {
  74. {"science-pack-1", 1},
  75. {"science-pack-2", 1},
  76. {"science-pack-3", 1},
  77. {"production-science-pack", 1},
  78. {"high-tech-science-pack", 1},
  79. {"space-science-pack", 1}
  80. },
  81. time = 30
  82. },
  83. max_level = "infinite",
  84. upgrade = true,
  85. order = "c-k-f-h"
  86. }
  87. if data.raw.item["logistic-science-pack"] then
  88. table.insert(tech.unit.ingredients, {"logistic-science-pack", 1})
  89. end
  90. data:extend({tech})
  91. end
  92.  
  93. end
Add Comment
Please, Sign In to add comment