Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transfer all unbuilt units on death #6363

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

lL1l1
Copy link
Contributor

@lL1l1 lL1l1 commented Jul 22, 2024

Description of the proposed changes

Resolves #6361.

  • Changes the categories for structure transfer from T4s and T3 Arty to all units.
  • Adjusts the stats of the wreckage created when a unit rebuild fails so that the wreckage has the full mass of the failed unit.

Testing done on the proposed changes

Spawn a paragon and some t3 engineers (they dont shoot) then build any unfinished structure or unit from a factory and run the console command to transfer the units to the opposite of the current focused army:

SimLua 
local units = ArmyBrains[GetFocusArmy()]:GetListOfUnits(categories.ALLUNITS)
local SimUtils = import('/lua/SimUtils.lua')
local target = GetFocusArmy() == 2 and {1} or {2}
ForkThread(SimUtils.TransferUnfinishedUnitsAfterDeath, units, target, false)

All structures get shared properly, and unbuilt units in factories turn into wrecks of the same partial cost as the unbuilt unit.

Didn't test performance, I'm not sure how to.

Checklist

  • Changes are annotated, including comments where useful
  • Changes are documented in the changelog for the next game version

units in factories turn into wrecks with the exact mass put into them
@lL1l1 lL1l1 added type: enhancement area: balance related to units balance area: sim Area that is affected by the Simulation of the Game labels Jul 22, 2024
@MrRowey MrRowey merged commit 4cac141 into FAForever:develop Jul 22, 2024
5 checks passed
@Garanas
Copy link
Member

Garanas commented Jul 22, 2024

@MrRowey the hotfix did not happen (yet), do we want this to be part of that?

@MrRowey
Copy link
Member

MrRowey commented Jul 22, 2024

Yes this is fine as it more of a bug fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: balance related to units balance area: sim Area that is affected by the Simulation of the Game type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Part-complete buildings dont transfer in full share
3 participants