From 54fe4e810358440bc2c899c851ff82983c4bc817 Mon Sep 17 00:00:00 2001 From: DaloLorn Date: Thu, 18 Dec 2025 09:58:47 +0100 Subject: [PATCH 1/3] VSCode tasks should no longer misbehave when paths to the workspace, SDK, or game include spaces. --- .vscode/tasks.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index e829a6064..edc662e93 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -6,54 +6,54 @@ { "label": "Build (final release)", "type": "shell", - "command": "powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -file '${workspaceRoot}\\.scripts\\build.ps1' -srcDirectory '${workspaceRoot}' -sdkPath '${config:xcom.highlander.sdkroot}' -gamePath '${config:xcom.highlander.gameroot}' -config final_release", + "command": "powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -file \"${workspaceRoot}\\.scripts\\build.ps1\" -srcDirectory \"${workspaceRoot}\" -sdkPath \"${config:xcom.highlander.sdkroot}\" -gamePath \"${config:xcom.highlander.gameroot}\" -config final_release", "group": "build", "problemMatcher": [] }, { "label": "Build (cooked)", "type": "shell", - "command": "powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -file '${workspaceRoot}\\.scripts\\build.ps1' -srcDirectory '${workspaceRoot}' -sdkPath '${config:xcom.highlander.sdkroot}' -gamePath '${config:xcom.highlander.gameroot}' -config default", + "command": "powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -file \"${workspaceRoot}\\.scripts\\build.ps1\" -srcDirectory \"${workspaceRoot}\" -sdkPath \"${config:xcom.highlander.sdkroot}\" -gamePath \"${config:xcom.highlander.gameroot}\" -config default", "group": "build", "problemMatcher": [] }, { "label": "Build (debug)", "type": "shell", - "command": "powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -file '${workspaceRoot}\\.scripts\\build.ps1' -srcDirectory '${workspaceRoot}' -sdkPath '${config:xcom.highlander.sdkroot}' -gamePath '${config:xcom.highlander.gameroot}' -config debug", + "command": "powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -file \"${workspaceRoot}\\.scripts\\build.ps1\" -srcDirectory \"${workspaceRoot}\" -sdkPath \"${config:xcom.highlander.sdkroot}\" -gamePath \"${config:xcom.highlander.gameroot}\" -config debug", "group": "build", "problemMatcher": [] }, { "label": "Build (compiletest)", "type": "shell", - "command": "powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -file '${workspaceRoot}\\.scripts\\build.ps1' -srcDirectory '${workspaceRoot}' -sdkPath '${config:xcom.highlander.sdkroot}' -gamePath '${config:xcom.highlander.gameroot}' -config compiletest", + "command": "powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -file \"${workspaceRoot}\\.scripts\\build.ps1\" -srcDirectory \"${workspaceRoot}\" -sdkPath \"${config:xcom.highlander.sdkroot}\" -gamePath \"${config:xcom.highlander.gameroot}\" -config compiletest", "group": "build", "problemMatcher": [] }, { "label": "Build for workshop stable version", "type": "shell", - "command": "powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -file '${workspaceRoot}\\.scripts\\build.ps1' -srcDirectory '${workspaceRoot}' -sdkPath '${config:xcom.highlander.sdkroot}' -gamePath '${config:xcom.highlander.gameroot}' -config stable", + "command": "powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -file \"${workspaceRoot}\\.scripts\\build.ps1\" -srcDirectory \"${workspaceRoot}\" -sdkPath \"${config:xcom.highlander.sdkroot}\" -gamePath \"${config:xcom.highlander.gameroot}\" -config stable", "group": "build", "problemMatcher": [] }, { "label": "runGame", "type": "shell", - "command": "powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -file '${workspaceRoot}\\.scripts\\run.ps1' -gamePath '${config:xcom.highlander.gameroot}'", + "command": "powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -file \"${workspaceRoot}\\.scripts\\run.ps1\" -gamePath \"${config:xcom.highlander.gameroot}\"", "problemMatcher": [] }, { "label": "runUnrealEditor", "type": "shell", - "command": "powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -file '${workspaceRoot}\\.scripts\\runUnrealEditor.ps1' -sdkPath '${config:xcom.highlander.sdkroot}'", + "command": "powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -file \"${workspaceRoot}\\.scripts\\runUnrealEditor.ps1\" -sdkPath \"${config:xcom.highlander.sdkroot}\"", "problemMatcher": [] }, { "label": "updateVersions", "type": "shell", - "command": "powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -file '${workspaceRoot}\\.scripts\\update_version.ps1' -ps '${workspaceRoot}\\VERSION.ps1' -srcDirectory '${workspaceRoot}' -no_cache", + "command": "powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -file \"${workspaceRoot}\\.scripts\\update_version.ps1\" -ps \"${workspaceRoot}\\VERSION.ps1\" -srcDirectory \"${workspaceRoot}\" -no_cache", "problemMatcher": [] }, { @@ -70,6 +70,6 @@ }, "command": "python ..\\..\\.scripts\\make_docs.py .\\test_src --outdir .\\test_output --docsdir .\\test_tags --dumpelt .\\test_output\\CHL_Event_Compiletest.uc | % {$_.replace('\\', '/')} | Out-File .\\test_output\\stdout.log -Encoding ASCII", "problemMatcher": [] - }, + } ] } \ No newline at end of file From 037759f3115e382c112ada60b7f3942eda88bc0f Mon Sep 17 00:00:00 2001 From: DaloLorn Date: Sun, 12 Apr 2026 09:46:16 +0200 Subject: [PATCH 2/3] Added VSCode workspaces to gitignore, on the grounds that a good workspace contains user-specific information. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7e29421a1..ba852a4a0 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ # Project specific user settings .vscode/settings.json +*.code-workspace # Python *.pyc From 91e0d14e810b8c81a277e6deb1abef78704bd01e Mon Sep 17 00:00:00 2001 From: DaloLorn Date: Sun, 12 Apr 2026 14:02:44 +0200 Subject: [PATCH 3/3] [#1566] Added EditMitigationMessages. --- .../X2Action_ApplyWeaponDamageToUnit.uc | 63 ++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/X2WOTCCommunityHighlander/Src/XComGame/Classes/X2Action_ApplyWeaponDamageToUnit.uc b/X2WOTCCommunityHighlander/Src/XComGame/Classes/X2Action_ApplyWeaponDamageToUnit.uc index aeded216e..23b3a338b 100644 --- a/X2WOTCCommunityHighlander/Src/XComGame/Classes/X2Action_ApplyWeaponDamageToUnit.uc +++ b/X2WOTCCommunityHighlander/Src/XComGame/Classes/X2Action_ApplyWeaponDamageToUnit.uc @@ -2,7 +2,7 @@ // Used by the visualizer system to control a Visualization Actor //----------------------------------------------------------- class X2Action_ApplyWeaponDamageToUnit extends X2Action - dependson(XComAnimNodeBlendDynamic) + dependson(XComAnimNodeBlendDynamic, XComLWTuple) config(Animation); var X2AbilityTemplate AbilityTemplate; //The template for the ability that is affecting us @@ -752,12 +752,73 @@ simulated state Executing simulated function ShowMitigationMessage(EWidgetColor DisplayColor) { local int CurrentArmor; + // Begin Issue #1566 + /// HL-Docs: feature:EditMitigationMessages; issue:1566; tags:tactical + /// This feature allows mods to add or replace flyovers related to armor mitigation, + /// e.g. to display extra mitigation from an AdjustArmorMitigation + /// callback. + /// + /// Note that mods overriding X2Action_ApplyWeaponDamageToUnit::ShowMitigationMessage + /// might not emit or respect the associated event. + /// + /// ```event + /// EventID: EditMitigationMessages + /// EventData: [inout int CurrentArmor, out array ExtraMessages] + /// EventSource: X2Action_ApplyWeaponDamageToUnit + /// NewGameState: AssociatedState + /// ``` + /// + /// Listeners should format their response tuples as: + /// + /// - ResponseID: ExtraMitigationMessage + /// - ResponseData: [string MessageText, int MessageAmount] + /// + /// You can also modify CurrentArmor (e.g. setting it to 0 to suppress the vanilla flyover), + /// but this might result in unexpected behavior if other listeners depend on it. + local XComLWTuple EditMitigationMessagesTuple; + local Object Message; + local XComLWTuple MessageTuple; + local XComLWTValue Text, Amount; + // End Issue #1566 + CurrentArmor = UnitState.GetArmorMitigationForUnitFlag(); + // Begin Issue #1566 + EditMitigationMessagesTuple = new class'XComLWTuple'; + EditMitigationMessagesTuple.Id = 'EditMitigationMessages'; + EditMitigationMessagesTuple.Data.Add(2); + EditMitigationMessagesTuple.Data[0].kind = XComLWTVInt; + EditMitigationMessagesTuple.Data[0].i = CurrentArmor; + EditMitigationMessagesTuple.Data[1].kind = XComLWTVArrayObjects; + `XEVENTMGR.TriggerEvent('EditMitigationMessages', EditMitigationMessagesTuple, self, StateChangeContext.AssociatedState); + CurrentArmor = EditMitigationMessagesTuple.Data[0].i; + // End Issue #1566 + //The flyover shows the armor amount that exists after shred has been applied. if (CurrentArmor > 0) { class'UIWorldMessageMgr'.static.DamageDisplay(m_vHitLocation, Unit.GetVisualizedStateReference(), class'XGLocalizedData'.default.ArmorMitigation, UnitPawn.m_eTeamVisibilityFlags, , CurrentArmor, /*modifier*/, /*crit*/, eWDT_Armor, DisplayColor); } + + // Begin Issue #1566 + foreach EditMitigationMessagesTuple.Data[1].ao(Message) + { + MessageTuple = XComLWTuple(Message); + if (MessageTuple == none || MessageTuple.Id != 'ExtraMitigationMessage' || MessageTuple.Data.Length != 2) + { + continue; + } + + Text = MessageTuple.Data[0]; + Amount = MessageTuple.Data[1]; + if (Text.kind != XComLWTVString || Amount.kind != XComLWTVInt) + { + continue; + } + + // No content validation here, assume the message only got sent if it wanted to be. + class'UIWorldMessageMgr'.static.DamageDisplay(m_vHitLocation, Unit.GetVisualizedStateReference(), Text.s, UnitPawn.m_eTeamVisibilityFlags, , Amount.i, /*modifier*/, /*crit*/, eWDT_Armor, DisplayColor); + } + // End Issue #1566 } simulated function ShowShieldedMessage(EWidgetColor DisplayColor)