2019-10-07 22:40:05 +02:00
|
|
|
--Flamethrower Turret Nerf
|
|
|
|
local function on_research_finished(event)
|
|
|
|
local research = event.research
|
|
|
|
local force_name = research.force.name
|
2019-10-31 11:13:47 +02:00
|
|
|
if research.name == "military" then
|
2019-10-07 22:40:05 +02:00
|
|
|
if not global.flamethrower_damage then global.flamethrower_damage = {} end
|
2020-05-03 14:00:16 +02:00
|
|
|
global.flamethrower_damage[force_name] = -0.65
|
2019-10-07 22:40:05 +02:00
|
|
|
game.forces[force_name].set_turret_attack_modifier("flamethrower-turret", global.flamethrower_damage[force_name])
|
2020-04-08 20:28:02 +02:00
|
|
|
game.forces[force_name].set_ammo_damage_modifier("flamethrower", global.flamethrower_damage[force_name])
|
2019-10-07 22:40:05 +02:00
|
|
|
end
|
2020-04-08 20:28:02 +02:00
|
|
|
|
2019-10-07 22:40:05 +02:00
|
|
|
if string.sub(research.name, 0, 18) == "refined-flammables" then
|
2019-10-30 18:29:15 +02:00
|
|
|
global.flamethrower_damage[force_name] = global.flamethrower_damage[force_name] + 0.10
|
2020-04-08 20:28:02 +02:00
|
|
|
game.forces[force_name].set_turret_attack_modifier("flamethrower-turret", global.flamethrower_damage[force_name])
|
2019-10-07 22:40:05 +02:00
|
|
|
game.forces[force_name].set_ammo_damage_modifier("flamethrower", global.flamethrower_damage[force_name])
|
2020-04-08 20:28:02 +02:00
|
|
|
end
|
2019-10-07 22:40:05 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
local event = require 'utils.event'
|
2020-04-08 20:28:02 +02:00
|
|
|
event.add(defines.events.on_research_finished, on_research_finished)
|