Skip to content

Commit

Permalink
Add selection tiers as inheritable templates
Browse files Browse the repository at this point in the history
  • Loading branch information
dragunoff committed Jul 8, 2019
1 parent 1c03fb9 commit 111cb7d
Show file tree
Hide file tree
Showing 16 changed files with 135 additions and 96 deletions.
47 changes: 31 additions & 16 deletions mods/cnc/rules/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,18 +242,10 @@
Condition: cloak-force-disabled
ValidDamageStates: Critical

^FlatSelectionMode:
Selectable:
PriorityModifiers: Ctrl

^LowPrioritySelectionMode:
Selectable:
PriorityModifiers: Ctrl, Alt

^Vehicle:
Inherits@1: ^ExistsInWorld
Inherits@3: ^SpriteActor
Inherits@SELECTION_MODE: ^FlatSelectionMode
Inherits@selection: ^SelectableCombatUnit
Huntable:
OwnerLostAction:
Action: Kill
Expand Down Expand Up @@ -303,7 +295,7 @@
^Helicopter:
Inherits@1: ^ExistsInWorld
Inherits@3: ^SpriteActor
Inherits@SELECTION_MODE: ^FlatSelectionMode
Inherits@selection: ^SelectableCombatUnit
Huntable:
OwnerLostAction:
Action: Kill
Expand Down Expand Up @@ -361,7 +353,7 @@
^Infantry:
Inherits@1: ^ExistsInWorld
Inherits@3: ^SpriteActor
Inherits@SELECTION_MODE: ^FlatSelectionMode
Inherits@selection: ^SelectableCombatUnit
Huntable:
OwnerLostAction:
Action: Kill
Expand Down Expand Up @@ -528,7 +520,7 @@
Inherits@1: ^ExistsInWorld
Inherits@2: ^SpriteActor
Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
Inherits@SELECTION_MODE: ^FlatSelectionMode
Inherits@selection: ^SelectableCombatUnit
Huntable:
OwnerLostAction:
Action: Kill
Expand Down Expand Up @@ -585,7 +577,7 @@
Inherits@1: ^ExistsInWorld
Inherits@2: ^SpriteActor
Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
Inherits@SELECTION_MODE: ^FlatSelectionMode
Inherits@selection: ^SelectableCombatUnit
Huntable:
Health:
HP: 30000
Expand Down Expand Up @@ -666,7 +658,7 @@
^Ship:
Inherits@1: ^ExistsInWorld
Inherits@3: ^SpriteActor
Inherits@SELECTION_MODE: ^FlatSelectionMode
Inherits@selection: ^SelectableCombatUnit
Huntable:
OwnerLostAction:
Action: Kill
Expand Down Expand Up @@ -697,13 +689,12 @@
Inherits@1: ^ExistsInWorld
Inherits@2: ^SpriteActor
Inherits@shape: ^1x1Shape
Inherits@selection: ^SelectableBuilding
Huntable:
OwnerLostAction:
Action: Kill
SelectionDecorations:
WithSpriteControlGroupDecoration:
Selectable:
Priority: 3
Targetable:
TargetTypes: Ground, C4, Structure
Armor:
Expand Down Expand Up @@ -1143,6 +1134,7 @@

^Defense:
Inherits: ^BaseBuilding
Inherits@selection: ^SelectableCombatBuilding
RenderRangeCircle:
RenderDetectionCircle:
-GivesBuildableArea:
Expand All @@ -1162,3 +1154,26 @@
WithColoredOverlay@IDISABLE:
RequiresCondition: lowpower
Palette: disabled

^SelectableCombatUnit:
Selectable:
Priority: 10
PriorityModifiers: Ctrl

^SelectableSupportUnit:
Selectable:
Priority: 8
PriorityModifiers: Ctrl, Alt

^SelectableEconomicUnit:
Selectable:
Priority: 6
PriorityModifiers: Ctrl, Alt

^SelectableCombatBuilding:
Selectable:
Priority: 4

^SelectableBuilding:
Selectable:
Priority: 2
4 changes: 1 addition & 3 deletions mods/cnc/rules/infantry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ E5:

E6:
Inherits: ^Soldier
Inherits@SELECTION_MODE: ^LowPrioritySelectionMode
Inherits@selection: ^SelectableSupportUnit
Valued:
Cost: 500
Tooltip:
Expand Down Expand Up @@ -190,8 +190,6 @@ E6:
Captures@CAPTURES:
CaptureTypes: building, husk
PlayerExperience: 50
Selectable:
Priority: 5
-AttackFrontal:

RMBO:
Expand Down
1 change: 0 additions & 1 deletion mods/cnc/rules/tech.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ HOSP:
Inherits@shape: ^2x2Shape
Selectable:
Bounds: 48,48
Priority: 0
Building:
Footprint: xx xx
Dimensions: 2,2
Expand Down
10 changes: 3 additions & 7 deletions mods/cnc/rules/vehicles.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MCV:
Inherits: ^Vehicle
Inherits@SELECTION_MODE: ^LowPrioritySelectionMode
Inherits@selection: ^SelectableSupportUnit
Valued:
Cost: 3500
Tooltip:
Expand All @@ -13,7 +13,6 @@ MCV:
BuildDurationModifier: 40
Description: Deploys into another Construction Yard.\n Unarmed
Selectable:
Priority: 4
DecorationBounds: 36,36
Mobile:
Speed: 71
Expand Down Expand Up @@ -44,7 +43,7 @@ MCV:
HARV:
Inherits: ^Tank
Inherits@CLOAK: ^AcceptsCloakCrate
Inherits@SELECTION_MODE: ^LowPrioritySelectionMode
Inherits@selection: ^SelectableEconomicUnit
Valued:
Cost: 1000
Tooltip:
Expand All @@ -58,7 +57,6 @@ HARV:
BuildDurationModifier: 40
Description: Collects Tiberium for processing.\n Unarmed
Selectable:
Priority: 7
DecorationBounds: 36,36
Harvester:
Resources: Tiberium, BlueTiberium
Expand Down Expand Up @@ -683,7 +681,7 @@ MHQ:

TRUCK:
Inherits: ^Vehicle
Inherits@SELECTION_MODE: ^LowPrioritySelectionMode
Inherits@selection: ^SelectableEconomicUnit
Buildable:
Queue: Vehicle.GDI, Vehicle.Nod
BuildPaletteOrder: 35
Expand All @@ -693,8 +691,6 @@ TRUCK:
Cost: 500
Tooltip:
Name: Supply Truck
Selectable:
Priority: 6
Health:
HP: 11000
Armor:
Expand Down
39 changes: 27 additions & 12 deletions mods/d2k/rules/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,18 +163,10 @@
AttackMove:
AssaultMoveCondition: assault-move

^FlatSelectionMode:
Selectable:
PriorityModifiers: Ctrl

^LowPrioritySelectionMode:
Selectable:
PriorityModifiers: Ctrl, Alt

^Vehicle:
Inherits@1: ^ExistsInWorld
Inherits@2: ^SpriteActor
Inherits@SELECTION_MODE: ^FlatSelectionMode
Inherits@selection: ^SelectableCombatUnit
Tooltip:
GenericName: Unit
Huntable:
Expand Down Expand Up @@ -278,7 +270,7 @@
Inherits@1: ^ExistsInWorld
Inherits@2: ^GainsExperience
Inherits@3: ^SpriteActor
Inherits@SELECTION_MODE: ^FlatSelectionMode
Inherits@selection: ^SelectableCombatUnit
Tooltip:
GenericName: Unit
Huntable:
Expand Down Expand Up @@ -373,15 +365,14 @@
^Building:
Inherits@1: ^ExistsInWorld
Inherits@2: ^SpriteActor
Inherits@selection: ^SelectableBuilding
Tooltip:
GenericName: Structure
Huntable:
OwnerLostAction:
Action: Kill
SelectionDecorations:
WithSpriteControlGroupDecoration:
Selectable:
Priority: 2
RevealsShroud:
Targetable:
TargetTypes: Ground, C4, Structure
Expand Down Expand Up @@ -463,6 +454,7 @@

^Defense:
Inherits: ^Building
Inherits@selection: ^SelectableCombatBuilding
WithSpriteTurret:
AttackTurreted:
RenderRangeCircle:
Expand Down Expand Up @@ -528,3 +520,26 @@
WithBuildingRepairDecoration:
Offsets:
powerdown: -10, 0

^SelectableCombatUnit:
Selectable:
Priority: 10
PriorityModifiers: Ctrl

^SelectableSupportUnit:
Selectable:
Priority: 8
PriorityModifiers: Ctrl, Alt

^SelectableEconomicUnit:
Selectable:
Priority: 6
PriorityModifiers: Ctrl, Alt

^SelectableCombatBuilding:
Selectable:
Priority: 4

^SelectableBuilding:
Selectable:
Priority: 2
1 change: 1 addition & 0 deletions mods/d2k/rules/infantry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ light_inf:

engineer:
Inherits: ^Infantry
Inherits@selection: ^SelectableSupportUnit
Buildable:
Queue: Infantry
BuildPaletteOrder: 30
Expand Down
2 changes: 0 additions & 2 deletions mods/d2k/rules/structures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,6 @@ medium_gun_turret:
Selectable:
Bounds: 32,32
DecorationBounds: 32,40,0,-8
Priority: 3
Health:
HP: 27000
Armor:
Expand Down Expand Up @@ -847,7 +846,6 @@ large_gun_turret:
Selectable:
Bounds: 32,32
DecorationBounds: 32,40,0,-8
Priority: 3
Health:
HP: 30000
Armor:
Expand Down
6 changes: 2 additions & 4 deletions mods/d2k/rules/vehicles.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mcv:
Inherits: ^Tank
Inherits@SELECTION_MODE: ^LowPrioritySelectionMode
Inherits@selection: ^SelectableSupportUnit
Buildable:
Prerequisites: repair_pad, upgrade.heavy, ~techlevel.medium
Queue: Armor
Expand All @@ -14,7 +14,6 @@ mcv:
Name: Mobile Construction Vehicle
Selectable:
Class: mcv
Priority: 3
DecorationBounds: 42,42
Health:
HP: 45000
Expand Down Expand Up @@ -51,7 +50,7 @@ mcv:

harvester:
Inherits: ^Tank
Inherits@SELECTION_MODE: ^LowPrioritySelectionMode
Inherits@selection: ^SelectableEconomicUnit
Buildable:
Queue: Armor
Prerequisites: refinery
Expand All @@ -65,7 +64,6 @@ harvester:
Name: Spice Harvester
Selectable:
Class: harvester
Priority: 7
DecorationBounds: 42,42
Harvester:
PipCount: 7
Expand Down
3 changes: 1 addition & 2 deletions mods/ra/maps/fort-lonestar/rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,12 @@ OILB:

MOBILETENT:
Inherits: ^Vehicle
Inherits@SELECTION_MODE: ^LowPrioritySelectionMode
Inherits@selection: ^SelectableSupportUnit
Valued:
Cost: 2000
Tooltip:
Name: Mobile Tent
Selectable:
Priority: 4
DecorationBounds: 21,21
SelectionDecorations:
Health:
Expand Down
Loading

0 comments on commit 111cb7d

Please sign in to comment.