Guest User

factorio electric-modular-offshore-pump

a guest
May 3rd, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.28 KB | None | 0 0
  1.  
  2. local name = 'electric-modular-offshore-pump'
  3.  
  4. local entity_picture = '__BurnerOffshorePump__/graphics/entity/'..name..'.png'
  5. local icon = '__BurnerOffshorePump__/graphics/icons/'..name..'.png'
  6.  
  7.  
  8. local placeholder = table.deepcopy(data.raw["offshore-pump"]["offshore-pump"])
  9. placeholder.name = name..'-placeholder'
  10. placeholder.minable = {mining_time = 1, result = name}
  11. placeholder.pumping_speed = 80 -- 5 is 300 fluids/s, vanilla has 20 and 1200
  12. -- placeholder.localised_name = {'burner bop placeholder'}
  13. -- placeholder.localised_name = {'entity.burner-offshore-pump'}
  14. placeholder.localised_name = {'entity-name.electric-modular-offshore-pump'}
  15. placeholder.max_health = 400
  16.  
  17.  
  18.  
  19. local item = {
  20. type = "item",
  21. name = name,
  22. icon = icon,
  23. icon_size = 32,
  24. subgroup = "extraction-machine",
  25. order = "b[fluids]-c3[electric-modular-offshore-pump]",
  26. place_result = name..'-placeholder',
  27. stack_size = 20,
  28. localised_name = {'entity-name.'..name}
  29. }
  30.  
  31. local recipe = {
  32. type = "recipe",
  33. name = name,
  34. ingredients =
  35. {
  36. {"advanced-circuit", 5},
  37. {"pipe", 20},
  38. {"iron-gear-wheel", 10},
  39. {"steel-plate", 20}
  40. },
  41. result = name
  42. }
  43.  
  44. local entity = {
  45. type = "assembling-machine",
  46. name = name,
  47. icon = icon,
  48. icon_size = 32,
  49. flags = {"placeable-player", "placeable-off-grid"},
  50.  
  51. minable = {mining_time = 0.2, result = name},
  52. placeable_by = {item = name, count = 1},
  53.  
  54. max_health = 400,
  55. dying_explosion = "medium-explosion",
  56. corpse = "medium-remnants",
  57. alert_icon_shift = util.by_pixel(-3, -12),
  58. resistances = {{type = "fire", percent = 70}},
  59. fluid_boxes = {fluid_box =
  60. {
  61. base_area = 1,
  62. base_level = 1,
  63. pipe_covers = pipecoverspictures(),
  64. production_type = "output",
  65. filter = "water",
  66. pipe_connections =
  67. {
  68. {
  69. position = {0, 1},
  70. type = "output"
  71. }
  72. }
  73. }, off_when_no_fluid_recipe = false},
  74. collision_box = {{-0.6, -1.05}, {0.6, 0.3}},
  75. selection_box = {{-1, -1.49}, {1, 0.49}},
  76. animation =
  77. {
  78. north =
  79. {
  80. filename = entity_picture,
  81. priority = "high",
  82. shift = {0.90625, 0.0625},
  83. width = 160,
  84. height = 102
  85. },
  86. east =
  87. {
  88. filename = entity_picture,
  89. priority = "high",
  90. shift = {0.90625, 0.0625},
  91. x = 160,
  92. width = 160,
  93. height = 102
  94. },
  95. south =
  96. {
  97. filename = entity_picture,
  98. priority = "high",
  99. shift = {0.90625, 0.65625},
  100. x = 320,
  101. width = 160,
  102. height = 102
  103. },
  104. west =
  105. {
  106. filename = entity_picture,
  107. priority = "high",
  108. shift = {1.0, 0.0625},
  109. x = 480,
  110. width = 160,
  111. height = 102
  112. }
  113. },
  114. open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 },
  115. close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 },
  116. vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
  117. working_sound =
  118. {
  119. sound =
  120. {
  121. {
  122. filename = "__base__/sound/assembling-machine-t2-1.ogg",
  123. volume = 0.8
  124. },
  125. {
  126. filename = "__base__/sound/assembling-machine-t2-2.ogg",
  127. volume = 0.8
  128. }
  129. },
  130. idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 },
  131. apparent_volume = 1.5
  132. },
  133. crafting_categories = {"bop-fluids-making"},
  134. fixed_recipe = "bop-make-water",
  135. crafting_speed = 4,
  136. energy_source =
  137. -- {
  138. -- type = "burner",
  139. -- fuel_category = "chemical",
  140. -- effectivity = 1,
  141. -- fuel_inventory_size = 1,
  142. -- emissions_per_minute = 3
  143. -- },
  144. {
  145. type = "electric",
  146. usage_priority = "secondary-input",
  147. emissions_per_minute = 2
  148. },
  149.  
  150. energy_usage = "3900kW",
  151.  
  152. order = "b-o-p",
  153. trigger_created_entity = true,
  154.  
  155. module_specification =
  156. {
  157. module_slots = 2
  158. },
  159. allowed_effects = {"consumption", "speed", "productivity", "pollution"}
  160. }
  161.  
  162.  
  163.  
  164.  
  165.  
  166. data:extend ({placeholder, item, recipe, entity})
Advertisement
Add Comment
Please, Sign In to add comment