Guest User

Fix for BobsOres

a guest
Jun 7th, 2019
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.00 KB | None | 0 0
  1. if not bobmods then bobmods = {} end
  2. if not bobmods.ores then bobmods.ores = {} end
  3. if not bobmods.gems then bobmods.gems = {} end
  4. if not bobmods.ores.settings then bobmods.ores.settings = {} end
  5.  
  6. data:extend(
  7. {
  8.   {
  9.     type = "item-subgroup",
  10.     name = "bob-ores",
  11.     group = "intermediate-products",
  12.     order = "b-a"
  13.   },
  14.   {
  15.     type = "resource-category",
  16.     name = "water"
  17.   }
  18. }
  19. )
  20.  
  21.  
  22.  
  23. bobmods.ores.settings.UnsortedGemOre = settings.startup["bobmods-ores-unsortedgemore"].value
  24. bobmods.ores.settings.GemsFromOtherOres = settings.startup["bobmods-ores-gemsfromotherores"].value
  25. bobmods.ores.settings.GemProbability = settings.startup["bobmods-ores-gemprobability"].value
  26.  
  27. bobmods.ores.settings.LeadGivesNickel = settings.startup["bobmods-ores-leadgivesnickel"].value
  28. bobmods.ores.settings.LeadNickelRatio = settings.startup["bobmods-ores-leadnickelratio"].value
  29.  
  30. bobmods.ores.settings.NickelGivesCobalt = settings.startup["bobmods-ores-nickelgivescobalt"].value
  31. bobmods.ores.settings.NickelCobaltRatio = settings.startup["bobmods-ores-nickelcobaltratio"].value
  32.  
  33. bobmods.gems.RubyRatio = settings.startup["bobmods-gems-rubyratio"].value
  34. bobmods.gems.SapphireRatio = settings.startup["bobmods-gems-sapphireratio"].value
  35. bobmods.gems.EmeraldRatio = settings.startup["bobmods-gems-emeraldratio"].value
  36. bobmods.gems.AmethystRatio = settings.startup["bobmods-gems-amethystratio"].value
  37. bobmods.gems.TopazRatio = settings.startup["bobmods-gems-topazratio"].value
  38. bobmods.gems.DiamondRatio = settings.startup["bobmods-gems-diamondratio"].value
  39.  
  40. require("prototypes.gems") -- must be after gem changes are defined.
  41. require("prototypes.tin-ore")
  42. require("prototypes.lead-ore")
  43. require("prototypes.quartz")
  44. require("prototypes.silver-ore")
  45. require("prototypes.zinc-ore")
  46. require("prototypes.gold-ore")
  47. require("prototypes.bauxite")
  48. require("prototypes.rutile")
  49. require("prototypes.tungsten-ore")
  50. require("prototypes.thorium-ore")
  51.  
  52. require("prototypes.nickel-ore")
  53. require("prototypes.cobalt-ore")
  54. require("prototypes.sulfur")
  55. require("prototypes.gem-ore")
  56.  
  57. require("prototypes.fluids")
  58.  
  59.  
  60. for i, ore in pairs(bobmods.ores) do
  61.   bobmods.lib.resource.generate_data_stage(ore)
  62. end
  63.  
  64.  
  65.  
  66. if settings.startup["bobmods-ores-enablebauxite"].value == true then
  67.   bobmods.ores.bauxite.create_autoplace()
  68. end
  69. if settings.startup["bobmods-ores-enablecobaltore"].value == true then
  70.   bobmods.ores.cobalt.create_autoplace()
  71. end
  72. if settings.startup["bobmods-ores-enablegemsore"].value == true then
  73.   bobmods.ores.gems.create_autoplace()
  74. end
  75. if settings.startup["bobmods-ores-enablegoldore"].value == true then
  76.   bobmods.ores.gold.create_autoplace()
  77. end
  78. if settings.startup["bobmods-ores-enableleadore"].value == true then
  79.   bobmods.ores.lead.create_autoplace()
  80. end
  81. if settings.startup["bobmods-ores-enablenickelore"].value == true then
  82.   bobmods.ores.nickel.create_autoplace()
  83. end
  84. if settings.startup["bobmods-ores-enablequartz"].value == true then
  85.   bobmods.ores.quartz.create_autoplace()
  86. end
  87. if settings.startup["bobmods-ores-enablerutile"].value == true then
  88.   bobmods.ores.rutile.create_autoplace()
  89. end
  90. if settings.startup["bobmods-ores-enablesilverore"].value == true then
  91.   bobmods.ores.silver.create_autoplace()
  92. end
  93. if settings.startup["bobmods-ores-enablesulfur"].value == true then
  94.   bobmods.ores.sulfur.create_autoplace()
  95. end
  96. if settings.startup["bobmods-ores-enabletinore"].value == true then
  97.   bobmods.ores.tin.create_autoplace()
  98. end
  99. if settings.startup["bobmods-ores-enabletungstenore"].value == true then
  100.   bobmods.ores.tungsten.create_autoplace()
  101. end
  102. if settings.startup["bobmods-ores-enablezincore"].value == true then
  103.   bobmods.ores.zinc.create_autoplace()
  104. end
  105. if settings.startup["bobmods-ores-enablewaterores"].value == true then
  106.   bobmods.ores.water.create_autoplace()
  107.   bobmods.ores.lithia_water.create_autoplace()
  108. end
  109. if settings.startup["bobmods-ores-enablethoriumore"].value == true then
  110.   bobmods.ores.thorium.create_autoplace()
  111. end
  112.  
  113.  
  114.  
  115. data.raw.item["copper-ore"].stack_size = 200
  116. --data.raw.item["copper-ore"].icon = "__bobores__/graphics/icons/copper-ore.png"
  117. if data.raw.resource["copper-ore"] then
  118. --  data.raw.resource["copper-ore"].icon = "__bobores__/graphics/icons/copper-ore.png"
  119. end
  120.  
  121. data.raw.item["iron-ore"].stack_size = 200
  122. --data.raw.item["iron-ore"].icon = "__bobores__/graphics/icons/iron-ore.png"
  123. if data.raw.resource["iron-ore"] then
  124. --  data.raw.resource["iron-ore"].icon = "__bobores__/graphics/icons/iron-ore.png"
  125. end
  126.  
  127. data.raw.item["stone"].stack_size = 200
  128. --data.raw.item["stone"].icon = "__bobores__/graphics/icons/stone.png"
  129. if data.raw.resource["stone"] then
  130.  -- data.raw.resource["stone"].icon = "__bobores__/graphics/icons/stone.png"
  131. end
  132.  
  133. data.raw.item["coal"].stack_size = 200
  134. --data.raw.item["coal"].icon = "__bobores__/graphics/icons/coal.png"
  135. if data.raw.resource["coal"] then
  136. --  data.raw.resource["coal"].icon = "__bobores__/graphics/icons/coal.png"
  137. end
  138.  
  139. data.raw.item["uranium-ore"].stack_size = 200
  140. data.raw.item["sulfur"].stack_size = 200
Advertisement
Add Comment
Please, Sign In to add comment