mirror of
https://github.com/veden/Rampant.git
synced 2024-12-28 21:08:22 +02:00
FACTO-65: Removed squad refunds above squad limit from vanilla or
other mods
This commit is contained in:
parent
12ffd0b2f3
commit
35be753879
@ -8,6 +8,7 @@ Version: 3.0.0
|
||||
- Added surface minime_dummy_dungeon and minime-preview-character to exclusion list
|
||||
- Increased unit spawner cooldown by 2x
|
||||
- Added point loss on unit death
|
||||
- Removed squad refunds when vanilla AI or other mods create enemy unit groups above the squad limit
|
||||
Bugfixes:
|
||||
- Fixed Krastorio2 on_force_created playerforces being nil
|
||||
- Fixed enemy map scan creating bases unnecessarily
|
||||
|
21
control.lua
21
control.lua
@ -765,10 +765,6 @@ local function onUnitGroupCreated(event)
|
||||
|
||||
if not settler and (universe.squadCount > universe.AI_MAX_SQUAD_COUNT) then
|
||||
group.destroy()
|
||||
base.unitPoints = base.unitPoints + AI_SQUAD_COST
|
||||
if universe.aiPointsPrintGainsToChat then
|
||||
game.print(map.surface.name .. ": Points: +" .. AI_SQUAD_COST .. ". [Squad Refund] Total: " .. string.format("%.2f", base.unitPoints))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
@ -794,10 +790,6 @@ local function onUnitGroupCreated(event)
|
||||
|
||||
if not settler and (universe.squadCount > universe.AI_MAX_SQUAD_COUNT) then
|
||||
group.destroy()
|
||||
base.unitPoints = base.unitPoints + AI_SQUAD_COST
|
||||
if universe.aiPointsPrintGainsToChat then
|
||||
game.print(map.surface.name .. ": Points: +" .. AI_SQUAD_COST .. ". [Squad Refund] Total: " .. string.format("%.2f", base.unitPoints))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
@ -826,26 +818,17 @@ local function onGroupFinishedGathering(event)
|
||||
map.activeSurface = true
|
||||
local squad = universe.groupNumberToSquad[group.group_number]
|
||||
if squad then
|
||||
local base = squad.base
|
||||
if squad.settler then
|
||||
if (universe.builderCount < universe.AI_MAX_BUILDER_COUNT) then
|
||||
squadDispatch(map, squad, event.tick)
|
||||
else
|
||||
group.destroy()
|
||||
base.unitPoints = base.unitPoints + AI_SETTLER_COST
|
||||
if universe.aiPointsPrintGainsToChat then
|
||||
game.print(map.surface.name .. ": Points: +" .. AI_SETTLER_COST .. ". [Settler Refund] Total: " .. string.format("%.2f", base.unitPoints))
|
||||
end
|
||||
end
|
||||
else
|
||||
if (universe.squadCount < universe.AI_MAX_SQUAD_COUNT) then
|
||||
squadDispatch(map, squad, event.tick)
|
||||
else
|
||||
group.destroy()
|
||||
base.unitPoints = base.unitPoints + AI_SQUAD_COST
|
||||
if universe.aiPointsPrintGainsToChat then
|
||||
game.print(map.surface.name .. ": Points: +" .. AI_SQUAD_COST .. ". [Squad Refund] Total: " .. string.format("%.2f", base.unitPoints))
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
@ -857,10 +840,6 @@ local function onGroupFinishedGathering(event)
|
||||
|
||||
if not settler and (universe.squadCount > universe.AI_MAX_SQUAD_COUNT) then
|
||||
group.destroy()
|
||||
base.unitPoints = base.unitPoints + AI_SQUAD_COST
|
||||
if universe.aiPointsPrintGainsToChat then
|
||||
game.print(map.surface.name .. ": Points: +" .. AI_SQUAD_COST .. ". [Squad Refund] Total: " .. string.format("%.2f", base.unitPoints))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user