From 6359d329463bfdfaf11abd8c1fdf123926be0623 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 20 May 2018 16:22:23 +0000 Subject: [PATCH] Fix overlapping veterancy/hospital/hazmat indicators in TD. This also changes the hazmat indicator to only be visible when on tiberium, and the hospital indicator to blink while active and only be visible when the infantry is damaged. --- mods/cnc/rules/defaults.yaml | 52 +++++++++++++++++++++++++++++++++--- mods/cnc/rules/infantry.yaml | 6 +++++ mods/cnc/sequences/misc.yaml | 7 +++-- 3 files changed, 60 insertions(+), 5 deletions(-) diff --git a/mods/cnc/rules/defaults.yaml b/mods/cnc/rules/defaults.yaml index ce1ff214ac..97dbcf73c6 100644 --- a/mods/cnc/rules/defaults.yaml +++ b/mods/cnc/rules/defaults.yaml @@ -146,6 +146,38 @@ RequiresCondition: rank-elite ZOffset: 256 +^InfantryExperienceHospitalHazmatOverrides: + WithDecoration@RANK-1: + BlinkInterval: 32 + BlinkPatterns: + hospitalheal && hazmatsuits: On, Off, Off + hospitalheal || hazmatsuits: On, Off + WithDecoration@RANK-2: + BlinkInterval: 32 + BlinkPatterns: + hospitalheal && hazmatsuits: On, Off, Off + hospitalheal || hazmatsuits: On, Off + WithDecoration@RANK-3: + BlinkInterval: 32 + BlinkPatterns: + hospitalheal && hazmatsuits: On, Off, Off + hospitalheal || hazmatsuits: On, Off + WithDecoration@RANK-ELITE: + BlinkInterval: 32 + BlinkPatterns: + hospitalheal && hazmatsuits: On, Off, Off + hospitalheal || hazmatsuits: On, Off + WithDecoration@HAZMAT: + BlinkInterval: 32 + BlinkPatterns: + rank-veteran && hospitalheal: Off, Off, On + rank-veteran || hospitalheal: Off, On + WithDecoration@REDCROSS: + BlinkPatterns: + rank-veteran && hazmatsuits: Off, On, Off + rank-veteran && !hazmatsuits: Off, On + hazmatsuits: On, Off + ^AutoTargetGround: AutoTarget: AttackAnythingCondition: stance-attackanything @@ -354,9 +386,15 @@ DamageInterval: 16 DamageTypes: TiberiumDeath RequiresCondition: !hazmatsuits - GrantConditionOnPrerequisite@BIO: - Condition: hazmatsuits + GrantConditionOnTerrain@HAZMAT: + Condition: ontiberium + TerrainTypes: Tiberium, BlueTiberium + GrantConditionOnPrerequisite@HAZMAT: + Condition: biolab Prerequisites: bio + GrantCondition@HAZMAT: + RequiresCondition: biolab && ontiberium + Condition: hazmatsuits WithDecoration@HAZMAT: Image: pips Sequence: pip-hazmat @@ -381,13 +419,21 @@ DamageCooldown: 125 RequiresCondition: hospitalheal GrantConditionOnPrerequisite@HOSPITAL: - Condition: hospitalheal + Condition: hospital Prerequisites: hosp + GrantConditionOnDamageState@HOSPITAL: + Condition: damaged + ValidDamageStates: Light, Medium, Heavy, Critical + GrantCondition@HOSPITAL: + RequiresCondition: hospital && damaged + Condition: hospitalheal WithDecoration@REDCROSS: Image: pips Sequence: pip-heal ReferencePoint: Bottom, Right RequiresCondition: hospitalheal + BlinkInterval: 32 + BlinkPattern: On, Off DetectCloaked: Range: 2c0 DeathSounds@NORMAL: diff --git a/mods/cnc/rules/infantry.yaml b/mods/cnc/rules/infantry.yaml index eb27c3fcbf..1c7958fc75 100644 --- a/mods/cnc/rules/infantry.yaml +++ b/mods/cnc/rules/infantry.yaml @@ -2,6 +2,7 @@ E1: Inherits: ^Soldier Inherits@EXPERIENCE: ^GainsExperience Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove + Inherits@DECORATIONS: ^InfantryExperienceHospitalHazmatOverrides Valued: Cost: 100 Tooltip: @@ -28,6 +29,7 @@ E2: Inherits: ^Soldier Inherits@EXPERIENCE: ^GainsExperience Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove + Inherits@DECORATIONS: ^InfantryExperienceHospitalHazmatOverrides Valued: Cost: 160 Tooltip: @@ -61,6 +63,7 @@ E3: Inherits: ^Soldier Inherits@EXPERIENCE: ^GainsExperience Inherits@AUTOTARGET: ^AutoTargetAllAssaultMove + Inherits@DECORATIONS: ^InfantryExperienceHospitalHazmatOverrides Valued: Cost: 300 Tooltip: @@ -90,6 +93,7 @@ E4: Inherits: ^Soldier Inherits@EXPERIENCE: ^GainsExperience Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove + Inherits@DECORATIONS: ^InfantryExperienceHospitalHazmatOverrides Valued: Cost: 200 Tooltip: @@ -121,6 +125,7 @@ E5: Inherits: ^Soldier Inherits@EXPERIENCE: ^GainsExperience Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove + Inherits@DECORATIONS: ^InfantryExperienceHospitalHazmatOverrides Valued: Cost: 300 Tooltip: @@ -179,6 +184,7 @@ RMBO: Inherits: ^Soldier Inherits@EXPERIENCE: ^GainsExperience Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove + Inherits@DECORATIONS: ^InfantryExperienceHospitalHazmatOverrides Valued: Cost: 2000 Tooltip: diff --git a/mods/cnc/sequences/misc.yaml b/mods/cnc/sequences/misc.yaml index c38d856446..d5a9d0400f 100644 --- a/mods/cnc/sequences/misc.yaml +++ b/mods/cnc/sequences/misc.yaml @@ -124,6 +124,8 @@ explosion: FlipX: true rank: + Defaults: + Offset: 0, 3 rank-veteran-1: rank-veteran-2: Start: 1 @@ -131,6 +133,7 @@ rank: Start: 2 rank-elite: Start: 3 + Offset: 1, 3 rallypoint: flag: flagfly @@ -257,12 +260,12 @@ pips: pip-blue: Start: 5 pip-heal: pip-heal - Length: * + Offset: -1, 1 groups: pdigits Length: * Offset: 9, 5 pip-hazmat: pip-hazmat - Length: * + Offset: -3, 0 overlay: build-valid-desert: