mirror of
https://github.com/veden/Rampant.git
synced 2025-01-16 02:33:53 +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
|
- Added surface minime_dummy_dungeon and minime-preview-character to exclusion list
|
||||||
- Increased unit spawner cooldown by 2x
|
- Increased unit spawner cooldown by 2x
|
||||||
- Added point loss on unit death
|
- Added point loss on unit death
|
||||||
|
- Removed squad refunds when vanilla AI or other mods create enemy unit groups above the squad limit
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
- Fixed Krastorio2 on_force_created playerforces being nil
|
- Fixed Krastorio2 on_force_created playerforces being nil
|
||||||
- Fixed enemy map scan creating bases unnecessarily
|
- 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
|
if not settler and (universe.squadCount > universe.AI_MAX_SQUAD_COUNT) then
|
||||||
group.destroy()
|
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
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -794,10 +790,6 @@ local function onUnitGroupCreated(event)
|
|||||||
|
|
||||||
if not settler and (universe.squadCount > universe.AI_MAX_SQUAD_COUNT) then
|
if not settler and (universe.squadCount > universe.AI_MAX_SQUAD_COUNT) then
|
||||||
group.destroy()
|
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
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -826,26 +818,17 @@ local function onGroupFinishedGathering(event)
|
|||||||
map.activeSurface = true
|
map.activeSurface = true
|
||||||
local squad = universe.groupNumberToSquad[group.group_number]
|
local squad = universe.groupNumberToSquad[group.group_number]
|
||||||
if squad then
|
if squad then
|
||||||
local base = squad.base
|
|
||||||
if squad.settler then
|
if squad.settler then
|
||||||
if (universe.builderCount < universe.AI_MAX_BUILDER_COUNT) then
|
if (universe.builderCount < universe.AI_MAX_BUILDER_COUNT) then
|
||||||
squadDispatch(map, squad, event.tick)
|
squadDispatch(map, squad, event.tick)
|
||||||
else
|
else
|
||||||
group.destroy()
|
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
|
end
|
||||||
else
|
else
|
||||||
if (universe.squadCount < universe.AI_MAX_SQUAD_COUNT) then
|
if (universe.squadCount < universe.AI_MAX_SQUAD_COUNT) then
|
||||||
squadDispatch(map, squad, event.tick)
|
squadDispatch(map, squad, event.tick)
|
||||||
else
|
else
|
||||||
group.destroy()
|
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
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -857,10 +840,6 @@ local function onGroupFinishedGathering(event)
|
|||||||
|
|
||||||
if not settler and (universe.squadCount > universe.AI_MAX_SQUAD_COUNT) then
|
if not settler and (universe.squadCount > universe.AI_MAX_SQUAD_COUNT) then
|
||||||
group.destroy()
|
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
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user