for _, ammo in pairs{data.raw["ammo"]["artillery-shell"], data.raw["fluid-turret"]["flamethrower-turret"].attack_parameters} do local action_delivery = ammo.ammo_type.action.action_delivery action_delivery.source_effects = { action_delivery.source_effects, -- current effect {type = "script", effect_id = "turret-consume-energy"} } -- if not string.match(ammo.name, "unpowered-") then -- -- local e = 160*ammo.speed*um*10 -- local x = table.deepcopy(ammo) -- x.name = "unpowered-"..x.name -- x.speed = 1e-308 -- x.localised_name = {"entity-name." .. ammo.name} -- x.localised_description = {"entity-description." .. ammo.name} -- data:extend({x, -- { -- type = "electric-energy-interface", -- name = ammo.name.."-power", -- icon = ammo.icon, -- icon_size = ammo.icon_size, icon_mipmaps = ammo.icon_mipmaps, -- flags = {"player-creation", "not-deconstructable","not-blueprintable"}, -- max_health = 1, -- resistances = resistances_immune, -- collision_box = ammo.collision_box, -- selection_box = ammo.selection_box, -- drawing_box = ammo.drawing_box, -- selectable_in_game = false, -- energy_source = -- { -- type = "electric", -- buffer_capacity = "800kJ", -- input_flow_limit = "100kW", -- usage_priority = "primary-input", -- drain = "10kW", -- energy_per_shot = "8kJ" -- }, -- energy_production = "0W", -- energy_usage = "60kW", -- } -- }) -- end end