OpenRA / ra2

A Red Alert 2 mod for the OpenRA game engine
GNU General Public License v3.0
973 stars 161 forks source link

Update mod to release-20210321 #778

Closed penev92 closed 3 years ago

penev92 commented 3 years ago

This updates the ModSDK scripts, the targeted engine, the custom code and the mod setup & rules to the current OpenRA release (release-20210321).

At the time of opening it has 29 commits and a lot of changed files, so it will look intimidating, but I've put in a lot of effort to split everything into easily reviewable commits, order them nicely and give each one a proper long description that should make things a lot easier.

I cannot stress this enough - REVIEW BY COMMITS! and read each one's description.

P.S.: The last batch of YAML updates - Manual rule updates PART 1-4 were done based on the output of the Utility's --update-mod command, ofc, which you can find here for reference:

update.log ``` AddPipDecorationTraits: Add decoration traits for selection pips. Updating mod... COMPLETE Updating system maps... COMPLETE Manual changes are required to complete this update: * Custom pip Images and Palettes are now defined on the individual With*PipsDecoration traits. You should review the following definitions and manually define the Image and Palette properties as required: * cawsh12: WithCargoPipsDecoration (rules/civilian-structures.yaml) * cmin: WithHarvesterPipsDecoration (rules/allied-vehicles.yaml) * fv: WithCargoPipsDecoration (rules/allied-vehicles.yaml) * harv: WithHarvesterPipsDecoration (rules/soviet-vehicles.yaml) * htk: WithCargoPipsDecoration (rules/soviet-vehicles.yaml) * bus: WithCargoPipsDecoration (rules/civilian-vehicles.yaml) * limo: WithCargoPipsDecoration (rules/civilian-vehicles.yaml) * lcrf: WithCargoPipsDecoration (rules/allied-naval.yaml) * sapc: WithCargoPipsDecoration (rules/soviet-naval.yaml) * shad: WithCargoPipsDecoration (rules/aircraft.yaml) * orca: WithAmmoPipsDecoration (rules/aircraft.yaml) * hornet: WithAmmoPipsDecoration (rules/aircraft.yaml) * asw: WithAmmoPipsDecoration (rules/aircraft.yaml) * Some passenger types define custom cargo pips. Review the following definitions: * cawsh12 (rules/civilian-structures.yaml) * fv (rules/allied-vehicles.yaml) * htk (rules/soviet-vehicles.yaml) * bus (rules/civilian-vehicles.yaml) * limo (rules/civilian-vehicles.yaml) * lcrf (rules/allied-naval.yaml) * sapc (rules/soviet-naval.yaml) * shad (rules/aircraft.yaml) and, if required, add the following to the WithCargoPipsDecoration traits: CustomPipSequences: blue: pip-blue yellow: pip-yellow green: pip-green red: pip-red * Review the following definitions: * cmin (rules/allied-vehicles.yaml) * harv (rules/soviet-vehicles.yaml) and, if required, add the following to the WithHarvesterPipsDecoration traits: ResourceSequences: Ore: pip-yellow Gems: pip-red ModernizeDecorationTraits: Modernize SelectionDecorations and With*Decoration traits. Updating mod... COMPLETE Updating system maps... COMPLETE Manual changes are required to complete this update: * The way that decorations are positioned relative to the selection box has changed. Review the following definitions and define Margin properties as required: * ^GainsExperience (rules/defaults.yaml): * WithDecoration@VETERAN * WithDecoration@ELITE * ^Building (rules/defaults.yaml): * WithBuildingRepairDecoration * ^Infantry (rules/defaults.yaml): * WithTextControlGroupDecoration * ^Vehicle (rules/defaults.yaml): * WithTextControlGroupDecoration * ^Aircraft (rules/defaults.yaml): * WithTextControlGroupDecoration * dog (rules/allied-infantry.yaml): * -WithDecoration@VETERAN * -WithDecoration@ELITE * spy (rules/allied-infantry.yaml): * WithDecoration@disguise * shk (rules/soviet-infantry.yaml): * -WithAmmoPipsDecoration * gapile (rules/allied-structures.yaml): * WithTextDecoration@primary * gaairc (rules/allied-structures.yaml): * WithTextDecoration@primary * gaweap (rules/allied-structures.yaml): * WithTextDecoration@primary * gayard (rules/allied-structures.yaml): * WithTextDecoration@primary * nahand (rules/soviet-structures.yaml): * WithTextDecoration@primary * naweap (rules/soviet-structures.yaml): * WithTextDecoration@primary * nayard (rules/soviet-structures.yaml): * WithTextDecoration@primary * cawsh12 (rules/civilian-structures.yaml): * WithCargoPipsDecoration * cmin (rules/allied-vehicles.yaml): * WithHarvesterPipsDecoration * fv (rules/allied-vehicles.yaml): * WithCargoPipsDecoration * harv (rules/soviet-vehicles.yaml): * WithHarvesterPipsDecoration * htk (rules/soviet-vehicles.yaml): * WithCargoPipsDecoration * bus (rules/civilian-vehicles.yaml): * WithCargoPipsDecoration * limo (rules/civilian-vehicles.yaml): * WithCargoPipsDecoration * lcrf (rules/allied-naval.yaml): * WithCargoPipsDecoration * sapc (rules/soviet-naval.yaml): * WithCargoPipsDecoration * shad (rules/aircraft.yaml): * WithCargoPipsDecoration * orca (rules/aircraft.yaml): * WithAmmoPipsDecoration * hornet (rules/aircraft.yaml): * WithAmmoPipsDecoration * asw (rules/aircraft.yaml): * WithAmmoPipsDecoration RenameHealCrateAction: Rename 'HealUnitsCrateAction' to 'HealActorsCrateAction'. Updating mod... COMPLETE Updating system maps... COMPLETE RenameInfiltrationNotifications: Renamed InfiltrateForCash Notification to InfiltratedNotification. Updating mod... COMPLETE Updating system maps... COMPLETE MoveClassicFacingFudge: UseClassicFacingFudge functionality was moved to Cnc-specific sequence/coordinate code. Updating mod... COMPLETE Updating system maps... COMPLETE RenameWithNukeLaunch: Renamed WithNukeLaunchAnimation and Overlay Updating mod... COMPLETE Updating system maps... COMPLETE SpawnActorPowerDefaultEffect: Set SpawnActorPower EffectSequence to it's previous default value. Updating mod... COMPLETE Updating system maps... COMPLETE RemoveConditionManager: ConditionManager trait has been removed. Updating mod... COMPLETE Updating system maps... COMPLETE ConvertSupportPowerRangesToFootprint: Convert support power ranges to footprint Updating mod... COMPLETE Updating system maps... COMPLETE UpdateTilesetColors: Rename Tileset LeftColor and RightColor Updating mod... COMPLETE Updating system maps... COMPLETE UpdateMapInits: Update map actor definitions Updating mod... COMPLETE Updating system maps... COMPLETE CreateFlashPaletteEffectWarhead: Create FlashPaletteEffectWarhead to replace hardcoded nuke flashing. Updating mod... COMPLETE Updating system maps... COMPLETE Manual changes are required to complete this update: * Add a FlashPaletteEffectWarhead to the following weapons: * Weapon `atomic`, used by trait `NukePower` on actor namisl (rules/soviet-structures.yaml) ChangeTargetLineDelayToMilliseconds: Changed DrawLineToTarget.Delay interpretation from ticks to milliseconds. Updating mod... COMPLETE Updating system maps... COMPLETE ReplaceFacingAngles: Increase facing angle resolution Updating mod... COMPLETE Updating system maps... COMPLETE RenameSelfHealing: SelfHealing was renamed as negative SelfHealing is a common usecase. Updating mod... COMPLETE Updating system maps... COMPLETE ReplaceBurns: Replaced Burns with separate render and health change traits. Updating mod... COMPLETE Updating system maps... COMPLETE RemoveMuzzleSplitFacings: Remove Armament.MuzzleSplitFacings. Updating mod... COMPLETE Updating system maps... COMPLETE Manual changes are required to complete this update: * The Armament muzzle effect has been removed from gapill (rules/allied-structures.yaml). If you would like to restore the muzzle effect you must redefine `MuzzleSequence: muzzle` and replace the muzzle0-7 sequence definitions with a single `muzzle` sequence that uses the Combine syntax to assemble the different facing sprites. * The Armament muzzle effect has been removed from nalasr (rules/soviet-structures.yaml). If you would like to restore the muzzle effect you must redefine `MuzzleSequence: muzzle` and replace the muzzle0-7 sequence definitions with a single `muzzle` sequence that uses the Combine syntax to assemble the different facing sprites. * The Armament muzzle effect has been removed from fv (rules/allied-vehicles.yaml). If you would like to restore the muzzle effect you must redefine `MuzzleSequence: mgun_muz` and replace the mgun_muz0-7 sequence definitions with a single `mgun_muz` sequence that uses the Combine syntax to assemble the different facing sprites. * The Armament muzzle effect has been removed from shad (rules/aircraft.yaml). If you would like to restore the muzzle effect you must redefine `MuzzleSequence: muzzle` and replace the muzzle0-7 sequence definitions with a single `muzzle` sequence that uses the Combine syntax to assemble the different facing sprites. RenameStances: Renamed player 'Stances' to 'Relationships'. Updating mod... COMPLETE Updating system maps... COMPLETE RemoveTurnToDock: TurnToDock is removed from the Aircraft trait. Updating mod... COMPLETE Updating system maps... COMPLETE Manual changes are required to complete this update: * TurnToDock is now deprecated. The following actors had TurnToDock enabled: * ^NeutralAircraft (rules/defaults.yaml) * ^Plane (rules/defaults.yaml) * ^SpawnedPlane (rules/defaults.yaml) * ^Husk (rules/defaults.yaml) * ^HelicopterHusk (rules/defaults.yaml) * jumpjet (rules/allied-infantry.yaml) * jumpjet.husk (rules/allied-infantry.yaml) * shad (rules/aircraft.yaml) * shadhusk (rules/aircraft.yaml) * zep (rules/aircraft.yaml) * zephusk (rules/aircraft.yaml) * orca (rules/aircraft.yaml) * orcahusk (rules/aircraft.yaml) * beaghusk (rules/aircraft.yaml) * pdplane (rules/aircraft.yaml) * pdplanehusk (rules/aircraft.yaml) * hornet (rules/aircraft.yaml) * hornethusk (rules/aircraft.yaml) * asw (rules/aircraft.yaml) * aswhusk (rules/aircraft.yaml) If you wish these units to keep their turning behaviour when docking with a host buildingyou will need to define a 'Facing' parameter on the 'Exit' trait of the host building. This changedoes not affect the behaviour for landing on terrain which is governed by TurnToLand. RenameSmudgeSmokeFields: Renamed smoke-related properties on SmudgeLayer. Updating mod... COMPLETE Updating system maps... COMPLETE RenameCircleContrast: Rename 'ContrastColor' to 'BorderColor'. Updating mod... COMPLETE Updating system maps... COMPLETE SplitDamagedByTerrain: Several properties of 'DamagedByTerrain' have been moved to the new 'D2kBuilding' trait. Updating mod... COMPLETE Updating system maps... COMPLETE RemoveLaysTerrain: 'LaysTerrain' has been removed in favor of the new 'D2kBuilding' trait. Updating mod... COMPLETE Updating system maps... COMPLETE ```

As you can see by the commit names I've skipped the second and fifth steps as second ("Review the following definitions and define Margin properties as required") is way too fiddly polish and with the fifth ("TurnToDock is now deprecated. The following actors had TurnToDock enabled") I saw no difference either way (behaviour seemed to match previous version anyway) so I just skipped it.

TODOs:

Remaining TODOs for follow-up PRs include (but may not be limited to):

penev92 commented 3 years ago

Ran the linter and added two commits with fixes for newfound issues. The CI GitHub action now passes :) https://github.com/penev92/ra2/runs/3118515084

penev92 commented 3 years ago

Fixed review comments. The GitHub Actions CI run was successful at https://github.com/penev92/ra2/actions/runs/1064983699

abcdefg30 commented 3 years ago

Typo in the first commit message: removef -> removed

penev92 commented 3 years ago

CI GitHub action passed at https://github.com/penev92/ra2/actions/runs/1300008366