1
0
mirror of https://github.com/veden/Rampant.git synced 2025-01-14 02:23:01 +02:00

FACTO-284: Fixed compression number not always appearing on unit group

This commit is contained in:
Aaron Veden 2023-04-01 19:21:47 -07:00
parent d29e558d97
commit 52e026357d
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84
2 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,7 @@ Version: 3.2.2
Bugfixes:
- Fixed invalid unit group in gathering when the AI hasn't awakened
- Fixed invalid reference to chunkToTurrets on removing map chunk
- Fixed occasionally compression number wouldn't appear on unit group
---------------------------------------------------------------------------------------------------
Version: 3.2.1

View File

@ -270,6 +270,7 @@ function Squad.compressSquad(squad)
end
local compressedTotal = 0
local totalTypes = 0
local entityToTag
for _, entity in pairs(members) do
local entityName = entity.name
local count = compressionSet[entityName]
@ -277,8 +278,10 @@ function Squad.compressSquad(squad)
totalTypes = totalTypes + 1
if totalTypes > 6 then
entity.destroy()
compressedTotal = compressedTotal + 1
compressionSet[entityName] = 1
else
entityToTag = entity
compressionSet[entityName] = 0
end
else
@ -290,7 +293,7 @@ function Squad.compressSquad(squad)
local query = Queries.renderText
query.surface = group.surface
query.text = compressedTotal
query.target = members[1]
query.target = entityToTag
squad.compressionText = rendering.draw_text(query)
squad.compressionSet = compressionSet
squad.canBeCompressed = false