diff --git a/OpenRA.Game/Traits/AI/EmitInfantryOnSell.cs b/OpenRA.Game/Traits/AI/EmitInfantryOnSell.cs index c9938c845f..ac292bd824 100644 --- a/OpenRA.Game/Traits/AI/EmitInfantryOnSell.cs +++ b/OpenRA.Game/Traits/AI/EmitInfantryOnSell.cs @@ -26,7 +26,6 @@ namespace OpenRA.Traits.AI var hpFraction = Math.Max(info.MinHpFraction, hp / self.GetMaxHP()); var dudesValue = (int)(hpFraction * info.ValueFraction * cost); var eligibleLocations = Footprint.Tiles(self).ToList(); - // todo: fix this for unbuildables in ActorTypes, like civilians. var actorTypes = info.ActorTypes.Select(a => new { Name = a, Cost = Rules.Info[a].Traits.Get().Cost }).ToArray(); while (eligibleLocations.Count > 0 && actorTypes.Any(a => a.Cost <= dudesValue)) diff --git a/mods/cnc/defaults.yaml b/mods/cnc/defaults.yaml index f864fcc7dc..e49bb475f9 100644 --- a/mods/cnc/defaults.yaml +++ b/mods/cnc/defaults.yaml @@ -53,6 +53,8 @@ DestroyedSound: xplobig4.aud RenderBuilding: CriticalBuildingState: + EmitInfantryOnSell: + ActorTypes: c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,e1,e1,e1,e1,e1,e1,e1 ^Tree: Category: Building diff --git a/mods/cnc/infantry.yaml b/mods/cnc/infantry.yaml index f411a9f4c3..740529a3c1 100644 --- a/mods/cnc/infantry.yaml +++ b/mods/cnc/infantry.yaml @@ -54,4 +54,153 @@ E3: PrimaryWeapon: Rockets PrimaryOffset: 0,0,0,-10 FireDelay: 5 - TakeCover: \ No newline at end of file + TakeCover: + +C1: + Inherits: ^Infantry + Selectable: + Voice: CivilianMaleVoice + Bounds: 12,17,0,-9 + Valued: + Cost: 70 + Description: Technician + Unit: + HP: 20 + Sight: 2 + Speed: 4 + AttackBase: + PrimaryWeapon: Pistol + +C2: + Inherits: ^Infantry + Selectable: + Voice: CivilianFemaleVoice + Bounds: 12,17,0,-9 + Valued: + Cost: 70 + Description: Technician + Unit: + HP: 20 + Sight: 2 + Speed: 4 + AttackBase: + PrimaryWeapon: Pistol + +C3: + Inherits: ^Infantry + Selectable: + Voice: CivilianMaleVoice + Bounds: 12,17,0,-9 + Valued: + Cost: 70 + Description: Technician + Unit: + HP: 20 + Sight: 2 + Speed: 4 + AttackBase: + PrimaryWeapon: Pistol + +C4: + Inherits: ^Infantry + Selectable: + Voice: CivilianFemaleVoice + Bounds: 12,17,0,-9 + Valued: + Cost: 70 + Description: Technician + Unit: + HP: 20 + Sight: 2 + Speed: 4 + AttackBase: + PrimaryWeapon: Pistol + +C5: + Inherits: ^Infantry + Selectable: + Voice: CivilianMaleVoice + Bounds: 12,17,0,-9 + Valued: + Cost: 70 + Description: Technician + Unit: + HP: 20 + Sight: 2 + Speed: 4 + AttackBase: + PrimaryWeapon: Pistol + +C6: + Inherits: ^Infantry + Selectable: + Voice: CivilianMaleVoice + Bounds: 12,17,0,-9 + Valued: + Cost: 70 + Description: Technician + Unit: + HP: 20 + Sight: 2 + Speed: 4 + AttackBase: + PrimaryWeapon: Pistol + +C7: + Inherits: ^Infantry + Selectable: + Voice: CivilianMaleVoice + Bounds: 12,17,0,-9 + Valued: + Cost: 70 + Description: Technician + Unit: + HP: 20 + Sight: 2 + Speed: 4 + AttackBase: + PrimaryWeapon: Pistol +C8: + Inherits: ^Infantry + Selectable: + Voice: CivilianMaleVoice + Bounds: 12,17,0,-9 + Valued: + Cost: 70 + Description: Technician + Unit: + HP: 20 + Sight: 2 + Speed: 4 + AttackBase: + PrimaryWeapon: Pistol + +C9: + Inherits: ^Infantry + Selectable: + Voice: CivilianMaleVoice + Bounds: 12,17,0,-9 + Valued: + Cost: 70 + Description: Technician + Unit: + HP: 20 + Sight: 2 + Speed: 4 + AttackBase: + PrimaryWeapon: Pistol + +C10: + Inherits: ^Infantry + Selectable: + Voice: CivilianMaleVoice + Bounds: 12,17,0,-9 + Valued: + Cost: 70 + Description: Technician + Unit: + HP: 20 + Sight: 2 + Speed: 4 + AttackBase: + PrimaryWeapon: Pistol