Advertisement
Guest User

flarestack entitites fixed

a guest
Oct 26th, 2024
140
0
10 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.66 KB | None | 0 0
  1. local ITEM_BURN_RATE_TOOLTIP = {}
  2. if settings.startup["flare-stack-item-rate"].value == 1 then
  3. ITEM_BURN_RATE_TOOLTIP = {"flare-tooltips.item-burn-rate-single", settings.startup["flare-stack-item-rate"].value}
  4. else
  5. ITEM_BURN_RATE_TOOLTIP = {"flare-tooltips.item-burn-rate", settings.startup["flare-stack-item-rate"].value}
  6. end
  7. local FLUID_BURN_RATE_TOOLTIP = {"flare-tooltips.fluid-burn-rate", settings.startup["flare-stack-fluid-rate"].value}
  8.  
  9. data:extend(
  10. {
  11. -- Flare Stack *************************************************************************
  12. {
  13. type = "furnace",
  14. name = "flare-stack",
  15. localised_description = "flare-tooltips.fluid-burn-rate "..settings.startup["flare-stack-fluid-rate"].value,
  16. icon = "__Flare_Stack_SA__/graphics/icon/flare-stack.png",
  17. icon_size = 32,
  18. flags = {"placeable-neutral","player-creation"},
  19. minable = {mining_time = 1, result = "flare-stack"},
  20. fast_replaceable_group = "fluid-incinerator",
  21. max_health = 250,
  22. corpse = "big-remnants",
  23. dying_explosion = "medium-explosion",
  24. collision_box = {{-0.29, -0.29}, {0.29, 0.29}},
  25. selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
  26. -- drawing_box = {{-0.5, -4.0}, {0.5, 0.5}},
  27. crafting_categories = {"flaring"},
  28. crafting_speed = settings.startup["flare-stack-item-rate"].value,
  29. energy_source =
  30. {
  31. type = "electric",
  32. usage_priority = "secondary-input",
  33. emissions_per_minute = { pollution = 8 }
  34. },
  35. energy_usage = "1kW",
  36. ingredient_count = 1,
  37. source_inventory_size = 0,
  38. result_inventory_size = 0,
  39. graphics_set =
  40. {
  41. animation =
  42. {
  43. filename = "__Flare_Stack_SA__/graphics/entity/flare-stack.png",
  44. priority = "extra-high",
  45. width = 160,
  46. height = 160,
  47. shift = {1.5, -1.59375}
  48. },
  49. working_visualisations =
  50. {
  51. {
  52. animation =
  53. {
  54. filename = "__Flare_Stack_SA__/graphics/entity/flare-stack-fire.png",
  55. priority = "extra-high",
  56. frame_count = 29,
  57. width = 48,
  58. height = 105,
  59. shift = {0, -5},
  60. run_mode="backward"
  61. },
  62. light = {intensity = 1, size = 32},
  63. constant_speed = true
  64. }
  65. },
  66. },
  67. vehicle_impact_sound =
  68. {
  69. filename = "__base__/sound/car-metal-impact.ogg",
  70. volume = 0.65
  71. },
  72. working_sound =
  73. {
  74. sound = { filename = "__base__/sound/oil-refinery.ogg" },
  75. idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 },
  76. apparent_volume = 2.5,
  77. },
  78. fluid_boxes =
  79. {
  80. {
  81. production_type = "input",
  82. pipe_covers = pipecoverspictures(),
  83. volume = settings.startup["flare-stack-fluid-rate"].value * 10,
  84. pipe_connections = {{ flow_direction="input", direction = defines.direction.north, position = {0, 0} }},
  85. },
  86. },
  87. },
  88.  
  89. -- Incinerator smoke
  90. -- trivial_smoke {
  91. -- name = "incinerator-smoke",
  92. -- color = {r = 0.3, g = 0.3, b = 0.3, a = 0.3},
  93. -- duration = 150,
  94. -- spread_duration = 100,
  95. -- fade_away_duration = 100,
  96. -- start_scale = 0.4,
  97. -- end_scale = 1.5,
  98. -- affected_by_wind = true
  99. -- }
  100.  
  101. {
  102. type = "trivial-smoke",
  103. name = "incinerator-smoke",
  104. duration = 150,
  105. fade_in_duration = 0,
  106. fade_away_duration = 100,
  107. spread_duration = 100,
  108. start_scale = 0.4,
  109. end_scale = 1.5,
  110. color = {r = 0.3, g = 0.3, b = 0.3, a = 0.3},
  111. cyclic = true,
  112. affected_by_wind = true,
  113. animation =
  114. {
  115. width = 152,
  116. height = 120,
  117. line_length = 5,
  118. frame_count = 60,
  119. shift = {-0.53125, -0.4375},
  120. priority = "high",
  121. animation_speed = 0.25,
  122. filename = "__base__/graphics/entity/smoke/smoke.png",
  123. flags = { "smoke" }
  124. }
  125. }
  126. })
  127.  
  128. -- Incinerator ***************************************************************************
  129. incinerator = (util.table.deepcopy(data.raw["furnace"]["flare-stack"]))
  130. incinerator.name = "incinerator"
  131. incinerator.localised_description = "flare-tooltips.item-burn-rate "..settings.startup["flare-stack-item-rate"].value
  132. incinerator.icon = "__Flare_Stack_SA__/graphics/icon/incinerator.png"
  133. incinerator.minable = {mining_time = 1, result = "incinerator"}
  134. incinerator.fast_replaceable_group = "item-incinerator"
  135. incinerator.crafting_categories = {"incineration"}
  136. incinerator.crafting_speed = settings.startup["flare-stack-item-rate"].value
  137. incinerator.energy_usage = "320kW"
  138. incinerator.working_visualisations = nil
  139. incinerator.graphics_set.animation.filename = "__Flare_Stack_SA__/graphics/entity/incinerator.png"
  140. incinerator.energy_source =
  141. {
  142. type = "burner",
  143. effectivity = 1,
  144. fuel_inventory_size = 1,
  145. emissions_per_minute = { pollution = 8 },
  146. light_flicker =
  147. {
  148. minimum_intensity = 0,
  149. maximum_intensity = 0
  150. },
  151. smoke =
  152. {
  153. {
  154. name = "incinerator-smoke",
  155. deviation = {0.1, 0.1},
  156. frequency = 15,
  157. north_position = {0.0, -4},
  158. south_position = {0.0, -4},
  159. east_position = {0.0, -4},
  160. west_position = {0.0, -4},
  161. starting_vertical_speed = 0.08,
  162. starting_frame_deviation = 60
  163. }
  164. }
  165. }
  166. incinerator.source_inventory_size = 1
  167. incinerator.fluid_boxes = nil
  168.  
  169. -- Electric Incinerator ******************************************************************
  170. eincinerator = (util.table.deepcopy(incinerator))
  171. eincinerator.name = "electric-incinerator"
  172. eincinerator.localised_description = "flare-tooltips.item-burn-rate "..settings.startup["flare-stack-item-rate"].value
  173. eincinerator.icon = "__Flare_Stack_SA__/graphics/icon/electric-incinerator.png"
  174. eincinerator.minable = {mining_time = 1, result = "electric-incinerator"}
  175. eincinerator.fast_replaceable_group = "item-incinerator"
  176. eincinerator.crafting_categories = {"incineration", "fuel-incineration"}
  177. eincinerator.crafting_speed = settings.startup["flare-stack-item-rate"].value
  178. eincinerator.energy_usage = "320kW"
  179. eincinerator.energy_source =
  180. {
  181. type = "electric",
  182. usage_priority = "secondary-input",
  183. emissions_per_minute = { pollution = 8 },
  184. drain = "0W"
  185. }
  186. eincinerator.working_visualisations =
  187. {
  188. {
  189. animation =
  190. {
  191. filename = "__Flare_Stack_SA__/graphics/entity/electric-incinerator-smoke.png",
  192. priority = "extra-high",
  193. frame_count = 29,
  194. width = 48,
  195. height = 105,
  196. shift = {-0.05, -5.65},
  197. animation_speed = 0.4,
  198. scale = 1.5,
  199. run_mode="backward"
  200. },
  201. constant_speed = true
  202. }
  203. }
  204.  
  205. -- Vent Stack ****************************************************************************
  206. ventstack = (util.table.deepcopy(data.raw["furnace"]["flare-stack"]))
  207. ventstack.name = "vent-stack"
  208. ventstack.localised_description = "flare-tooltips.fluid-burn-rate "..settings.startup["flare-stack-fluid-rate"].value
  209. ventstack.icon = "__Flare_Stack_SA__/graphics/icon/vent-stack.png"
  210. ventstack.minable = {mining_time = 1, result = "vent-stack"}
  211. ventstack.fast_replaceable_group = "fluid-incinerator"
  212. ventstack.crafting_categories = {"flaring"}
  213. ventstack.crafting_speed = settings.startup["flare-stack-fluid-rate"].value
  214. ventstack.energy_source.emissions_per_minute = { pollution = 8 }
  215. ventstack.working_visualisations =
  216. {
  217. {
  218. animation =
  219. {
  220. filename = "__Flare_Stack_SA__/graphics/entity/vent-stack-fumes.png",
  221. priority = "extra-high",
  222. frame_count = 29,
  223. width = 48,
  224. height = 105,
  225. shift = {-0.05, -5.65},
  226. animation_speed = 0.5,
  227. scale = 1.5,
  228. run_mode="backward"
  229. },
  230. constant_speed = true
  231. }
  232. }
  233. ventstack.graphics_set.animation.filename = "__Flare_Stack_SA__/graphics/entity/vent-stack.png"
  234.  
  235. data:extend(
  236. {
  237. incinerator,
  238. eincinerator,
  239. ventstack
  240. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement