Update all code styles

This commit is contained in:
Cooldude2606
2024-09-28 01:56:54 +01:00
parent 5e2a62ab27
commit 292c1a1b68
194 changed files with 9817 additions and 9703 deletions

View File

@@ -10,35 +10,35 @@ end)
local function res_queue(force, by_script)
local res_q = force.research_queue
local res = force.technologies['mining-productivity-4']
local res = force.technologies["mining-productivity-4"]
if #res_q < config.queue_amount then
for i=1, config.queue_amount - #res_q do
for i = 1, config.queue_amount - #res_q do
force.add_research(res)
if not (by_script) then
game.print{'expcom-res.inf-q', res.name, res.level + i}
game.print{ "expcom-res.inf-q", res.name, res.level + i }
end
end
end
end
Commands.new_command('auto-research', {'expcom-res.description-ares'}, 'Automatically queue up research')
:add_alias('ares')
:register(function(player)
research.res_queue_enable = not research.res_queue_enable
Commands.new_command("auto-research", { "expcom-res.description-ares" }, "Automatically queue up research")
:add_alias("ares")
:register(function(player)
research.res_queue_enable = not research.res_queue_enable
if research.res_queue_enable then
res_queue(player.force, true)
end
if research.res_queue_enable then
res_queue(player.force, true)
end
game.print{'expcom-res.res', player.name, research.res_queue_enable}
return Commands.success
end)
game.print{ "expcom-res.res", player.name, research.res_queue_enable }
return Commands.success
end)
Event.add(defines.events.on_research_finished, function(event)
if research.res_queue_enable then
if event.research.force.rockets_launched > 0 and event.research.force.technologies['mining-productivity-4'].level > 4 then
if event.research.force.rockets_launched > 0 and event.research.force.technologies["mining-productivity-4"].level > 4 then
res_queue(event.research.force, event.by_script)
end
end