Use a electric-energy-interface can avoid us from generating fluids forever. Here's my patch:
data:extend({
{
type = "electric-energy-interface",
name = "or_power",
localised_name = {"entity-name.oil_rig"},
icon = "cargo-ships/graphics/icons/oil_rig.png",
icon_size = 96,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = nil, minable = false},
max_health = 500,
corpse = nil,
collision_box = nil,
selection_box = nil,
collision_mask= {},
enable_gui = false,
allow_copy_paste = false,
energy_source = {
type = "electric",
buffer_capacity = "10GJ", --attempt to fix no power icon
usage_priority = "primary-output",
input_flow_limit = "0kW",
output_flow_limit = "1000kW",
},
energy_production = "10GW", --attempt to fix no power icon
energy_usage = "0kW",
picture = {
filename = "cargo-ships/graphics/blank.png",
priority = "extra-high",
width = 1,
height = 1,
},
working_sound = data.raw["generator"]["steam-engine"].working_sound
}
})
As a result relate events are no longer needed.