Add MergeCaptureTraits update rule.

This commit is contained in:
Paul Chote
2018-10-06 21:41:10 +00:00
committed by abcdefg30
parent a4405009c8
commit ccad3bd185
27 changed files with 308 additions and 55 deletions

View File

@@ -590,6 +590,7 @@
<Compile Include="Traits\World\WeatherOverlay.cs" /> <Compile Include="Traits\World\WeatherOverlay.cs" />
<Compile Include="Traits\World\ActorSpawnManager.cs" /> <Compile Include="Traits\World\ActorSpawnManager.cs" />
<Compile Include="Traits\ActorSpawner.cs" /> <Compile Include="Traits\ActorSpawner.cs" />
<Compile Include="UpdateRules\Rules\20180923\MergeCaptureTraits.cs" />
<Compile Include="UtilityCommands\CheckYaml.cs" /> <Compile Include="UtilityCommands\CheckYaml.cs" />
<Compile Include="UtilityCommands\ConvertPngToShpCommand.cs" /> <Compile Include="UtilityCommands\ConvertPngToShpCommand.cs" />
<Compile Include="UtilityCommands\ConvertSpriteToPngCommand.cs" /> <Compile Include="UtilityCommands\ConvertSpriteToPngCommand.cs" />

View File

@@ -0,0 +1,154 @@
#region Copyright & License Information
/*
* Copyright 2007-2018 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
namespace OpenRA.Mods.Common.UpdateRules.Rules
{
public class MergeCaptureTraits : UpdateRule
{
public override string Name { get { return "Merge and overhaul Captures traits"; } }
public override string Description
{
get
{
return "The internal and external capturing traits have been merged, and a new\n" +
"CaptureManager trait has been added to help manage interactions between\n" +
"actors and multiple trait instances. The Sabotage logic has also\n" +
"moved from the Capturable trait to the Captures trait.\n" +
"The External* traits are renamed, and the CaptureManager added wherever\n" +
"the Capturable or Captures trait is used. The locations modified are\n" +
"listed for inspection and manual cleanup";
}
}
readonly List<string> captureManagerLocations = new List<string>();
readonly List<string> externalDelayLocations = new List<string>();
readonly List<string> sabotageLocations = new List<string>();
public override IEnumerable<string> AfterUpdate(ModData modData)
{
if (captureManagerLocations.Any())
yield return "The Captures and Capturable traits now depend on the\n" +
"new CaptureManager trait. This trait has automatically been added\n" +
"in the following definitions:\n" + UpdateUtils.FormatMessageList(captureManagerLocations) +
"\nYou may wish to review these definitions and delete any redundant\n" +
"instances that have already been inherited from a parent template.";
if (sabotageLocations.Any())
yield return "The sabotage logic has been disabled by default, which affects\n" +
"the following definitions:\n" + UpdateUtils.FormatMessageList(sabotageLocations) +
"\nThe sabotage logic is now defined on the Captures trait, via the \n" +
"SabotageThreshold field. You may need to define additional capture types\n" +
"and Capturable traits if you wish to use multiple capture thresholds.";
if (externalDelayLocations.Any())
yield return "The following actors have had their capture delays reset to 15 seconds:\n" +
UpdateUtils.FormatMessageList(sabotageLocations) +
"\nThe capture delay is now defined on the Captures trait, via the\n" +
"CaptureDelay field. You may need to define additional capture types\n" +
"and Capturable traits if you wish to use multiple capture delays.";
captureManagerLocations.Clear();
sabotageLocations.Clear();
externalDelayLocations.Clear();
}
public override IEnumerable<string> UpdateActorNode(ModData modData, MiniYamlNode actorNode)
{
var reportLocation = "{0} ({1})".F(actorNode.Key, actorNode.Location.Filename);
var captureManager = actorNode.LastChildMatching("CaptureManager") ?? new MiniYamlNode("CaptureManager", "");
var usesCaptureManager = false;
// Migrate External*
foreach (var c in actorNode.ChildrenMatching("ExternalCapturable"))
{
c.RenameKey("Capturable");
if (c.RemoveNodes("CaptureCompleteTime") > 0)
externalDelayLocations.Add(reportLocation);
}
foreach (var c in actorNode.ChildrenMatching("ExternalCaptures"))
{
c.RenameKey("Captures");
if (c.Key.StartsWith("-"))
continue;
c.AddNode("CaptureDelay", 375);
var consumeNode = c.LastChildMatching("ConsumeActor");
if (consumeNode != null)
consumeNode.RenameKey("ConsumedByCapture");
else
c.AddNode("ConsumedByCapture", false);
var conditionNode = c.LastChildMatching("CapturingCondition");
if (conditionNode != null)
conditionNode.MoveNode(c, captureManager);
var cursorNode = c.LastChildMatching("CaptureCursor");
if (cursorNode != null)
cursorNode.RenameKey("EnterCursor");
else
c.AddNode("EnterCursor", "ability");
var cursorBlockedNode = c.LastChildMatching("CaptureBlockedCursor");
if (cursorBlockedNode != null)
cursorBlockedNode.RenameKey("EnterBlockedCursor");
else
c.AddNode("EnterBlockedCursor", "move-blocked");
}
var addBlinker = false;
foreach (var c in actorNode.ChildrenMatching("ExternalCapturableBar"))
{
c.RenameKey("CapturableProgressBar");
addBlinker = true;
}
if (addBlinker)
actorNode.AddNode("CapturableProgressBlink", "");
// Remove any CaptureThreshold nodes and restore the "building" default
// These run on converted External* traits too
foreach (var traitNode in actorNode.ChildrenMatching("Capturable"))
{
if (!traitNode.Key.StartsWith("-"))
usesCaptureManager = true;
if (traitNode.RemoveNodes("CaptureThreshold") + traitNode.RemoveNodes("Sabotage") > 0)
sabotageLocations.Add(reportLocation);
if (!traitNode.Key.StartsWith("-") && traitNode.LastChildMatching("Types") == null)
traitNode.AddNode("Types", "building");
}
foreach (var traitNode in actorNode.ChildrenMatching("Captures"))
{
if (!traitNode.Key.StartsWith("-"))
usesCaptureManager = true;
if (traitNode.LastChildMatching("CaptureTypes") == null)
traitNode.AddNode("CaptureTypes", "building");
}
if (usesCaptureManager && actorNode.LastChildMatching("CaptureManager") == null)
{
actorNode.AddNode(captureManager);
captureManagerLocations.Add(reportLocation);
}
yield break;
}
}
}

View File

@@ -92,6 +92,7 @@ namespace OpenRA.Mods.Common.UpdateRules
new RenameEditorTilesetFilter(), new RenameEditorTilesetFilter(),
new DefineNotificationDefaults(), new DefineNotificationDefaults(),
new MergeRearmAndRepairAnimation(), new MergeRearmAndRepairAnimation(),
new MergeCaptureTraits(),
}) })
}; };

View File

@@ -97,5 +97,6 @@ RMBO:
MISS: MISS:
Tooltip: Tooltip:
Name: Prison Name: Prison
CaptureManager:
Capturable: Capturable:
CaptureThreshold: 100 Types: building

View File

@@ -96,5 +96,6 @@ RMBO:
MISS: MISS:
Tooltip: Tooltip:
Name: Prison Name: Prison
CaptureManager:
Capturable: Capturable:
CaptureThreshold: 100 Types: building

View File

@@ -138,7 +138,7 @@ HPAD.IN:
ProvidesPrerequisite: ProvidesPrerequisite:
Prerequisite: hpad Prerequisite: hpad
Capturable: Capturable:
CaptureThreshold: 100 Types: building
Building: Building:
Footprint: x_ xx Footprint: x_ xx
BuildSounds: placbldg.aud, build5.aud BuildSounds: placbldg.aud, build5.aud

View File

@@ -158,7 +158,7 @@ FACTOUT.IN:
ProvidesPrerequisite: ProvidesPrerequisite:
Prerequisite: fact Prerequisite: fact
Capturable: Capturable:
CaptureThreshold: 100 Types: building
MoneyCrate: MoneyCrate:
Inherits: ^Crate Inherits: ^Crate
@@ -175,7 +175,7 @@ NUKEOUT.IN:
ProvidesPrerequisite: ProvidesPrerequisite:
Prerequisite: anypower Prerequisite: anypower
Capturable: Capturable:
CaptureThreshold: 100 Types: building
PROCOUT.IN: PROCOUT.IN:
Inherits: PROC Inherits: PROC
@@ -186,7 +186,7 @@ PROCOUT.IN:
ProvidesPrerequisite: ProvidesPrerequisite:
Prerequisite: proc Prerequisite: proc
Capturable: Capturable:
CaptureThreshold: 100 Types: building
TRAN.IN: TRAN.IN:
Inherits: TRAN Inherits: TRAN

View File

@@ -186,7 +186,7 @@ FACTOUT.IN:
ProvidesPrerequisite: ProvidesPrerequisite:
Prerequisite: fact Prerequisite: fact
Capturable: Capturable:
CaptureThreshold: 100 Types: building
MoneyCrate: MoneyCrate:
Inherits: ^Crate Inherits: ^Crate
@@ -203,7 +203,7 @@ NUKEOUT.IN:
ProvidesPrerequisite: ProvidesPrerequisite:
Prerequisite: anypower Prerequisite: anypower
Capturable: Capturable:
CaptureThreshold: 100 Types: building
PROCOUT.IN: PROCOUT.IN:
Inherits: PROC Inherits: PROC
@@ -214,7 +214,7 @@ PROCOUT.IN:
ProvidesPrerequisite: ProvidesPrerequisite:
Prerequisite: proc Prerequisite: proc
Capturable: Capturable:
CaptureThreshold: 100 Types: building
TRAN.IN: TRAN.IN:
Inherits: TRAN Inherits: TRAN

View File

@@ -162,7 +162,7 @@ NUKEOUT.IN:
ProvidesPrerequisite: ProvidesPrerequisite:
Prerequisite: anypower Prerequisite: anypower
Capturable: Capturable:
CaptureThreshold: 100 Types: building
PROCOUT.IN: PROCOUT.IN:
Inherits: PROC Inherits: PROC
@@ -173,7 +173,7 @@ PROCOUT.IN:
ProvidesPrerequisite: ProvidesPrerequisite:
Prerequisite: proc Prerequisite: proc
Capturable: Capturable:
CaptureThreshold: 100 Types: building
RMBO.easy: RMBO.easy:
Inherits: RMBO Inherits: RMBO

View File

@@ -745,8 +745,9 @@
EngineerRepairable: EngineerRepairable:
Sellable: Sellable:
SellSounds: cashturn.aud SellSounds: cashturn.aud
CaptureManager:
Capturable: Capturable:
CaptureThreshold: 55 Types: building-sabotage
WithMakeAnimation: WithMakeAnimation:
WithBuildingRepairDecoration: WithBuildingRepairDecoration:
Image: allyrepair Image: allyrepair
@@ -787,7 +788,9 @@
Inherits: ^CivBuilding Inherits: ^CivBuilding
OwnerLostAction: OwnerLostAction:
Action: ChangeOwner Action: ChangeOwner
CaptureManager:
Capturable: Capturable:
Types: building
CaptureNotification: CaptureNotification:
Notification: CivilianBuildingCaptured Notification: CivilianBuildingCaptured
RepairableBuilding: RepairableBuilding:
@@ -1008,9 +1011,9 @@
Targetable: Targetable:
RequiresForceFire: yes RequiresForceFire: yes
TargetTypes: Ground, Husk TargetTypes: Ground, Husk
CaptureManager:
Capturable: Capturable:
Types: husk Types: husk
CaptureThreshold: 100
ValidStances: Enemy, Neutral, Ally ValidStances: Enemy, Neutral, Ally
TransformOnCapture: TransformOnCapture:
ForceHealthPercentage: 25 ForceHealthPercentage: 25

View File

@@ -174,7 +174,12 @@ E6:
PipType: Yellow PipType: Yellow
EngineerRepair: EngineerRepair:
RepairsBridges: RepairsBridges:
Captures: CaptureManager:
Captures@SABOTAGE:
CaptureTypes: building-sabotage
SabotageThreshold: 55
PlayerExperience: 50
Captures@CAPTURES:
CaptureTypes: building, husk CaptureTypes: building, husk
PlayerExperience: 50 PlayerExperience: 50
Selectable: Selectable:

View File

@@ -386,8 +386,9 @@
Adjacent: 3 Adjacent: 3
GivesBuildableArea: GivesBuildableArea:
AreaTypes: building AreaTypes: building
CaptureManager:
Capturable: Capturable:
CaptureThreshold: 100 Types: building
SoundOnDamageTransition: SoundOnDamageTransition:
DamagedSounds: EXPLSML1.WAV DamagedSounds: EXPLSML1.WAV
DestroyedSounds: EXPLHG1.WAV DestroyedSounds: EXPLHG1.WAV

View File

@@ -41,8 +41,9 @@ engineer:
Mobile: Mobile:
Speed: 31 Speed: 31
EngineerRepair: EngineerRepair:
CaptureManager:
Captures: Captures:
CaptureTypes: building, husk CaptureTypes: building
PlayerExperience: 50 PlayerExperience: 50
-RevealOnFire: -RevealOnFire:
Voiced: Voiced:

View File

@@ -14,11 +14,27 @@ World:
normal: Normal normal: Normal
Default: easy Default: easy
^Building: FCOM:
Capturable: Capturable:
CaptureThreshold: 25 Types: ~disabled
^TechBuilding: HOSP:
Capturable:
Types: ~disabled
MISS:
Capturable:
Types: ~disabled
FCOM:
Capturable:
Types: ~disabled
BIO:
Capturable:
Types: ~disabled
OILB:
Capturable: Capturable:
Types: ~disabled Types: ~disabled
@@ -29,9 +45,10 @@ powerproxy.paratroopers:
HACKE6: HACKE6:
Inherits: E6 Inherits: E6
-RepairsBridges: -RepairsBridges:
-ExternalCaptures:
Captures: Captures:
CaptureTypes: building -ConsumedByCapture:
-EnterCursor:
-EnterBlockedCursor:
Targetable: Targetable:
RequiresCondition: !jail RequiresCondition: !jail
Targetable@PRISONER: Targetable@PRISONER:

View File

@@ -14,11 +14,27 @@ World:
normal: Normal normal: Normal
Default: easy Default: easy
^Building: FCOM:
Capturable: Capturable:
CaptureThreshold: 25 Types: ~disabled
^TechBuilding: HOSP:
Capturable:
Types: ~disabled
MISS:
Capturable:
Types: ~disabled
FCOM:
Capturable:
Types: ~disabled
BIO:
Capturable:
Types: ~disabled
OILB:
Capturable: Capturable:
Types: ~disabled Types: ~disabled
@@ -29,9 +45,10 @@ powerproxy.paratroopers:
HACKE6: HACKE6:
Inherits: E6 Inherits: E6
-RepairsBridges: -RepairsBridges:
-ExternalCaptures:
Captures: Captures:
CaptureTypes: building -ConsumedByCapture:
-EnterCursor:
-EnterBlockedCursor:
WithInfantryBody: WithInfantryBody:
Targetable: Targetable:
RequiresCondition: !jail RequiresCondition: !jail

View File

@@ -59,8 +59,12 @@ SPY.Strong:
Range: 6c0 Range: 6c0
Infiltrates: Infiltrates:
Types: MissionObjective Types: MissionObjective
ExternalCaptures: CaptureManager:
Captures:
CaptureTypes: MissionObjective CaptureTypes: MissionObjective
ConsumedByCapture: False
EnterCursor: ability
EnterBlockedCursor: move-blocked
Passenger: Passenger:
DOG.Patrol: DOG.Patrol:
@@ -87,9 +91,8 @@ TRUK.Hijackable:
Targetable: Targetable:
TargetTypes: Ground, Repair, Vehicle, NoAutoTarget TargetTypes: Ground, Repair, Vehicle, NoAutoTarget
-Huntable: -Huntable:
ExternalCapturable: Capturable:
Types: MissionObjective Types: MissionObjective
CaptureCompleteTime: 1
-DeliversCash: -DeliversCash:
RenderSprites: RenderSprites:
Image: TRUK Image: TRUK

View File

@@ -32,8 +32,8 @@ MISS:
Name: Soviet Air Force HQ Name: Soviet Air Force HQ
Capturable: Capturable:
Types: building Types: building
CaptureThreshold: 100
ValidStances: Enemy ValidStances: Enemy
CaptureManager:
E6.MOD: E6.MOD:
Inherits: E6 Inherits: E6
@@ -41,9 +41,9 @@ E6.MOD:
Prerequisites: ~barracks Prerequisites: ~barracks
Captures: Captures:
CaptureTypes: building CaptureTypes: building
Sabotage: False
RenderSprites: RenderSprites:
Image: e6 Image: e6
CaptureManager:
E6: E6:
Buildable: Buildable:

View File

@@ -101,8 +101,8 @@ AFAC:
GenericStancePrefix: false GenericStancePrefix: false
-TooltipDescription@ally: -TooltipDescription@ally:
-TooltipDescription@other: -TooltipDescription@other:
-ExternalCapturable: Capturable:
-ExternalCapturableBar: Types: ~disabled
-EngineerRepairable: -EngineerRepairable:
-GpsDot: -GpsDot:
RenderSprites: RenderSprites:
@@ -117,8 +117,8 @@ CCEN:
GenericName: Control Center GenericName: Control Center
GenericVisibility: Enemy, Ally, Neutral GenericVisibility: Enemy, Ally, Neutral
GenericStancePrefix: false GenericStancePrefix: false
-ExternalCapturable: Capturable:
-ExternalCapturableBar: Types: ~disabled
-EngineerRepairable: -EngineerRepairable:
GpsPower: GpsPower:
Prerequisites: ~disabled Prerequisites: ~disabled

View File

@@ -91,9 +91,11 @@ FCOM:
RevealsShroud@GAPGEN: RevealsShroud@GAPGEN:
Range: 4c0 Range: 4c0
WithBuildingBib: WithBuildingBib:
ExternalCapturable: CaptureManager:
CaptureCompleteTime: 30 Capturable:
ExternalCapturableBar: Types: building
CapturableProgressBar:
CapturableProgressBlink:
GivesBuildableArea: GivesBuildableArea:
AreaTypes: building AreaTypes: building
BaseProvider: BaseProvider:
@@ -118,8 +120,11 @@ HOSP:
Dimensions: 2,2 Dimensions: 2,2
Health: Health:
HP: 80000 HP: 80000
ExternalCapturable: CaptureManager:
ExternalCapturableBar: Capturable:
Types: building
CapturableProgressBar:
CapturableProgressBlink:
EngineerRepairable: EngineerRepairable:
Tooltip: Tooltip:
Name: Hospital Name: Hospital
@@ -407,8 +412,11 @@ MISS:
Description: Capture to give visual range. Description: Capture to give visual range.
ValidStances: Neutral, Enemy ValidStances: Neutral, Enemy
WithBuildingBib: WithBuildingBib:
ExternalCapturable: CaptureManager:
ExternalCapturableBar: Capturable:
Types: building
CapturableProgressBar:
CapturableProgressBlink:
EngineerRepairable: EngineerRepairable:
WithDeathAnimation: WithDeathAnimation:
DeathSequence: dead DeathSequence: dead
@@ -429,8 +437,11 @@ BIO:
Dimensions: 2,2 Dimensions: 2,2
RevealsShroud: RevealsShroud:
Range: 4c0 Range: 4c0
ExternalCapturable: CaptureManager:
ExternalCapturableBar: CapturableProgressBlink:
Capturable:
Types: building
CapturableProgressBar:
EngineerRepairable: EngineerRepairable:
Tooltip: Tooltip:
Name: Biological Lab Name: Biological Lab
@@ -465,8 +476,11 @@ OILB:
HP: 80000 HP: 80000
RevealsShroud: RevealsShroud:
Range: 4c0 Range: 4c0
ExternalCapturable: CaptureManager:
ExternalCapturableBar: Capturable:
Types: building
CapturableProgressBar:
CapturableProgressBlink:
EngineerRepairable: EngineerRepairable:
CashTrickler: CashTrickler:
Interval: 375 Interval: 375

View File

@@ -266,9 +266,9 @@
Guardable: Guardable:
Tooltip: Tooltip:
GenericName: Vehicle GenericName: Vehicle
CaptureManager:
Capturable: Capturable:
Types: vehicle Types: vehicle
CaptureThreshold: 100
CancelActivity: True CancelActivity: True
CaptureNotification: CaptureNotification:
Notification: UnitStolen Notification: UnitStolen
@@ -648,8 +648,12 @@
EngineerRepairable: EngineerRepairable:
AcceptsDeliveredCash: AcceptsDeliveredCash:
WithMakeAnimation: WithMakeAnimation:
ExternalCapturable: CaptureManager:
ExternalCapturableBar: BeingCapturedCondition: being-captured
Capturable:
Types: building
CapturableProgressBar:
CapturableProgressBlink:
SpawnActorsOnSell: SpawnActorsOnSell:
ActorTypes: e1,e1,e1,tecn,tecn ActorTypes: e1,e1,e1,tecn,tecn
MustBeDestroyed: MustBeDestroyed:
@@ -657,6 +661,7 @@
GpsDot: GpsDot:
String: Structure String: Structure
Sellable: Sellable:
RequiresCondition: !being-captured
SellSounds: cashturn.aud SellSounds: cashturn.aud
WithBuildingRepairDecoration: WithBuildingRepairDecoration:
Image: allyrepair Image: allyrepair
@@ -922,9 +927,9 @@
AllowedTerrain: Clear, Rough, Road, Ore, Gems, Beach AllowedTerrain: Clear, Rough, Road, Ore, Gems, Beach
Burns: Burns:
Damage: 200 Damage: 200
CaptureManager:
Capturable: Capturable:
Types: husk Types: husk
CaptureThreshold: 100
ValidStances: Enemy, Neutral, Ally ValidStances: Enemy, Neutral, Ally
TransformOnCapture: TransformOnCapture:
ForceHealthPercentage: 25 ForceHealthPercentage: 25

View File

@@ -240,9 +240,14 @@ E6:
PipType: Yellow PipType: Yellow
EngineerRepair: EngineerRepair:
RepairsBridges: RepairsBridges:
ExternalCaptures: CaptureManager:
Captures:
CaptureTypes: building CaptureTypes: building
PlayerExperience: 25 PlayerExperience: 25
CaptureDelay: 375
ConsumedByCapture: False
EnterCursor: ability
EnterBlockedCursor: move-blocked
Voiced: Voiced:
VoiceSet: EngineerVoice VoiceSet: EngineerVoice
Selectable: Selectable:
@@ -430,6 +435,7 @@ MECH:
ForceTargetStances: None ForceTargetStances: None
AttackFrontal: AttackFrontal:
Voice: Move Voice: Move
CaptureManager:
Captures: Captures:
CaptureTypes: husk CaptureTypes: husk
PlayerExperience: 25 PlayerExperience: 25
@@ -536,6 +542,7 @@ HIJACKER:
Range: 5c0 Range: 5c0
Passenger: Passenger:
PipType: Blue PipType: Blue
CaptureManager:
Captures: Captures:
CaptureTypes: vehicle CaptureTypes: vehicle
PlayerExperience: 50 PlayerExperience: 50

View File

@@ -184,6 +184,7 @@ SPEN:
ExitCell: 2,0 ExitCell: 2,0
ProductionTypes: Ship ProductionTypes: Ship
Production: Production:
PauseOnCondition: being-captured
Produces: Ship, Submarine Produces: Ship, Submarine
PrimaryBuilding: PrimaryBuilding:
PrimaryCondition: primary PrimaryCondition: primary
@@ -301,6 +302,7 @@ SYRD:
ExitCell: 2,0 ExitCell: 2,0
ProductionTypes: Ship, Boat ProductionTypes: Ship, Boat
Production: Production:
PauseOnCondition: being-captured
Produces: Ship, Boat Produces: Ship, Boat
PrimaryBuilding: PrimaryBuilding:
PrimaryCondition: primary PrimaryCondition: primary
@@ -974,6 +976,7 @@ WEAP:
SpawnOffset: 213,-128,0 SpawnOffset: 213,-128,0
ExitCell: 1,2 ExitCell: 1,2
Production: Production:
PauseOnCondition: being-captured
Produces: Vehicle Produces: Vehicle
ProvidesPrerequisite@allies: ProvidesPrerequisite@allies:
Factions: allies, england, france, germany Factions: allies, england, france, germany
@@ -1100,6 +1103,7 @@ FACT:
Range: 4c0 Range: 4c0
WithBuildingBib: WithBuildingBib:
Production: Production:
PauseOnCondition: being-captured
Produces: Building, Defense Produces: Building, Defense
Valued: Valued:
Cost: 2500 Cost: 2500
@@ -1109,13 +1113,13 @@ FACT:
ActorTypes: e1,e1,e1,tecn,tecn,e6 ActorTypes: e1,e1,e1,tecn,tecn,e6
BaseBuilding: BaseBuilding:
Transforms: Transforms:
PauseOnCondition: chrono-vortex PauseOnCondition: chrono-vortex || being-captured
IntoActor: mcv IntoActor: mcv
Offset: 1,1 Offset: 1,1
Facing: 96 Facing: 96
RequiresCondition: factundeploy RequiresCondition: factundeploy
Sellable: Sellable:
RequiresCondition: !chrono-vortex RequiresCondition: !chrono-vortex && !being-captured
GrantConditionOnPrerequisite@GLOBALFACTUNDEPLOY: GrantConditionOnPrerequisite@GLOBALFACTUNDEPLOY:
Condition: factundeploy Condition: factundeploy
Prerequisites: global-factundeploy Prerequisites: global-factundeploy
@@ -1125,6 +1129,7 @@ FACT:
ProductionType: Defense ProductionType: Defense
Color: 8A8A8A Color: 8A8A8A
BaseProvider: BaseProvider:
PauseOnCondition: being-captured
Range: 16c0 Range: 16c0
WithBuildingPlacedAnimation: WithBuildingPlacedAnimation:
RequiresCondition: !chrono-vortex RequiresCondition: !chrono-vortex
@@ -1288,6 +1293,7 @@ HPAD:
Facing: 224 Facing: 224
RallyPoint: RallyPoint:
Production: Production:
PauseOnCondition: being-captured
Produces: Aircraft, Helicopter Produces: Aircraft, Helicopter
Reservable: Reservable:
ProductionBar: ProductionBar:
@@ -1377,6 +1383,7 @@ AFLD:
MoveIntoWorld: false MoveIntoWorld: false
RallyPoint: RallyPoint:
Production: Production:
PauseOnCondition: being-captured
Produces: Aircraft, Plane Produces: Aircraft, Plane
Reservable: Reservable:
ProvidesPrerequisite@soviet: ProvidesPrerequisite@soviet:
@@ -1647,6 +1654,7 @@ BARR:
ExitCell: 0,2 ExitCell: 0,2
ProductionTypes: Soldier, Infantry ProductionTypes: Soldier, Infantry
Production: Production:
PauseOnCondition: being-captured
Produces: Infantry, Soldier Produces: Infantry, Soldier
PrimaryBuilding: PrimaryBuilding:
PrimaryCondition: primary PrimaryCondition: primary
@@ -1727,6 +1735,7 @@ KENN:
ExitCell: -1,0 ExitCell: -1,0
ProductionTypes: Dog, Infantry ProductionTypes: Dog, Infantry
Production: Production:
PauseOnCondition: being-captured
Produces: Infantry, Dog Produces: Infantry, Dog
PrimaryBuilding: PrimaryBuilding:
PrimaryCondition: primary PrimaryCondition: primary
@@ -1785,6 +1794,7 @@ TENT:
ExitCell: 0,2 ExitCell: 0,2
ProductionTypes: Soldier, Infantry ProductionTypes: Soldier, Infantry
Production: Production:
PauseOnCondition: being-captured
Produces: Infantry, Soldier Produces: Infantry, Soldier
PrimaryBuilding: PrimaryBuilding:
PrimaryCondition: primary PrimaryCondition: primary

View File

@@ -19,11 +19,15 @@ World:
Scripts: sunstroke.lua Scripts: sunstroke.lua
GAOLDCC2: GAOLDCC2:
CaptureManager:
Capturable: Capturable:
Types: building
ProvidesPrerequisite@BuildingName: ProvidesPrerequisite@BuildingName:
GAOLDCC3: GAOLDCC3:
CaptureManager:
Capturable: Capturable:
Types: building
ProvidesPrerequisite@BuildingName: ProvidesPrerequisite@BuildingName:
4TNK: 4TNK:

View File

@@ -751,7 +751,9 @@ CAARMR:
Palette: player Palette: player
ProvidesPrerequisite: ProvidesPrerequisite:
Prerequisite: barracks.upgraded Prerequisite: barracks.upgraded
CaptureManager:
Capturable: Capturable:
Types: building
ThrowsShrapnel@SMALL: ThrowsShrapnel@SMALL:
Pieces: 6, 9 Pieces: 6, 9
ThrowsShrapnel@LARGE: ThrowsShrapnel@LARGE:
@@ -794,7 +796,9 @@ CAHOSP:
HP: 80000 HP: 80000
RenderSprites: RenderSprites:
Palette: player Palette: player
CaptureManager:
Capturable: Capturable:
Types: building
CaptureNotification: CaptureNotification:
ProvidesPrerequisite@BuildingName: ProvidesPrerequisite@BuildingName:
ThrowsShrapnel@SMALL: ThrowsShrapnel@SMALL:

View File

@@ -350,7 +350,9 @@
Inherits@2: ^EmpDisable Inherits@2: ^EmpDisable
GivesBuildableArea: GivesBuildableArea:
AreaTypes: building AreaTypes: building
CaptureManager:
Capturable: Capturable:
Types: building
RepairableBuilding: RepairableBuilding:
RepairStep: 700 RepairStep: 700
PlayerExperience: 25 PlayerExperience: 25
@@ -737,9 +739,9 @@
Voice: Move Voice: Move
HiddenUnderFog: HiddenUnderFog:
ActorLostNotification: ActorLostNotification:
CaptureManager:
Capturable: Capturable:
Types: Vehicle Types: Vehicle
CaptureThreshold: 100
CancelActivity: True CancelActivity: True
Guard: Guard:
Voice: Move Voice: Move

View File

@@ -126,6 +126,7 @@ MHIJACK:
Mobile: Mobile:
Speed: 99 Speed: 99
-Crushable: -Crushable:
CaptureManager:
Captures: Captures:
CaptureTypes: Vehicle CaptureTypes: Vehicle
PlayerExperience: 50 PlayerExperience: 50

View File

@@ -58,6 +58,7 @@ ENGINEER:
EngineerRepair: EngineerRepair:
RepairsBridges: RepairsBridges:
RepairNotification: BridgeRepaired RepairNotification: BridgeRepaired
CaptureManager:
Captures: Captures:
CaptureTypes: building CaptureTypes: building
PlayerExperience: 50 PlayerExperience: 50