Rename UnitUpgradeCrateAction to GrantUpgradeCrateAction.
This commit is contained in:
@@ -627,6 +627,22 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
|||||||
node.Key = "KillsSelf";
|
node.Key = "KillsSelf";
|
||||||
node.Value.Nodes.Add(new MiniYamlNode("RemoveInstead", new MiniYaml("true")));
|
node.Value.Nodes.Add(new MiniYamlNode("RemoveInstead", new MiniYaml("true")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (depth == 1 && node.Key.StartsWith("UnitUpgradeCrateAction"))
|
||||||
|
{
|
||||||
|
var parts = node.Key.Split('@');
|
||||||
|
node.Key = "GrantUpgradeCrateAction";
|
||||||
|
if (parts.Length > 1)
|
||||||
|
node.Key += "@" + parts[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (depth == 1 && node.Key.StartsWith("-UnitUpgradeCrateAction"))
|
||||||
|
{
|
||||||
|
var parts = node.Key.Split('@');
|
||||||
|
node.Key = "-GrantUpgradeCrateAction";
|
||||||
|
if (parts.Length > 1)
|
||||||
|
node.Key += "@" + parts[1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
|
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.RA.Crates
|
namespace OpenRA.Mods.RA.Crates
|
||||||
{
|
{
|
||||||
[Desc("Grants an upgrade to the collector.")]
|
[Desc("Grants an upgrade to the collector.")]
|
||||||
public class UnitUpgradeCrateActionInfo : CrateActionInfo
|
public class GrantUpgradeCrateActionInfo : CrateActionInfo
|
||||||
{
|
{
|
||||||
[Desc("The upgrades to apply.")]
|
[Desc("The upgrades to apply.")]
|
||||||
public readonly string[] Upgrades = { };
|
public readonly string[] Upgrades = { };
|
||||||
@@ -28,15 +28,15 @@ namespace OpenRA.Mods.RA.Crates
|
|||||||
[Desc("The maximum number of extra collectors to grant the crate action to.", "-1 = no limit")]
|
[Desc("The maximum number of extra collectors to grant the crate action to.", "-1 = no limit")]
|
||||||
public readonly int MaxExtraCollectors = 4;
|
public readonly int MaxExtraCollectors = 4;
|
||||||
|
|
||||||
public override object Create(ActorInitializer init) { return new UnitUpgradeCrateAction(init.self, this); }
|
public override object Create(ActorInitializer init) { return new GrantUpgradeCrateAction(init.self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UnitUpgradeCrateAction : CrateAction
|
public class GrantUpgradeCrateAction : CrateAction
|
||||||
{
|
{
|
||||||
readonly Actor self;
|
readonly Actor self;
|
||||||
readonly UnitUpgradeCrateActionInfo info;
|
readonly GrantUpgradeCrateActionInfo info;
|
||||||
|
|
||||||
public UnitUpgradeCrateAction(Actor self, UnitUpgradeCrateActionInfo info)
|
public GrantUpgradeCrateAction(Actor self, GrantUpgradeCrateActionInfo info)
|
||||||
: base(self, info)
|
: base(self, info)
|
||||||
{
|
{
|
||||||
this.self = self;
|
this.self = self;
|
||||||
@@ -127,7 +127,6 @@
|
|||||||
<Compile Include="Effects\Beacon.cs" />
|
<Compile Include="Effects\Beacon.cs" />
|
||||||
<Compile Include="Player\PlaceBeacon.cs" />
|
<Compile Include="Player\PlaceBeacon.cs" />
|
||||||
<Compile Include="MenuPaletteEffect.cs" />
|
<Compile Include="MenuPaletteEffect.cs" />
|
||||||
<Compile Include="Crates\UnitUpgradeCrateAction.cs" />
|
|
||||||
<Compile Include="EjectOnDeath.cs" />
|
<Compile Include="EjectOnDeath.cs" />
|
||||||
<Compile Include="Air\FallsToEarth.cs" />
|
<Compile Include="Air\FallsToEarth.cs" />
|
||||||
<Compile Include="Air\Fly.cs" />
|
<Compile Include="Air\Fly.cs" />
|
||||||
@@ -568,6 +567,7 @@
|
|||||||
<Compile Include="UpgradeManager.cs" />
|
<Compile Include="UpgradeManager.cs" />
|
||||||
<Compile Include="KillsSelf.cs" />
|
<Compile Include="KillsSelf.cs" />
|
||||||
<Compile Include="Warheads\GrantUpgradeWarhead.cs" />
|
<Compile Include="Warheads\GrantUpgradeWarhead.cs" />
|
||||||
|
<Compile Include="Crates\GrantUpgradeCrateAction.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
|
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
|
||||||
|
|||||||
@@ -568,7 +568,7 @@ Rules:
|
|||||||
-GiveMcvCrateAction:
|
-GiveMcvCrateAction:
|
||||||
-GiveCashCrateAction:
|
-GiveCashCrateAction:
|
||||||
-ExplodeCrateAction@fire:
|
-ExplodeCrateAction@fire:
|
||||||
-UnitUpgradeCrateAction@cloak:
|
-GrantUpgradeCrateAction@cloak:
|
||||||
ScriptTriggers:
|
ScriptTriggers:
|
||||||
|
|
||||||
Sequences:
|
Sequences:
|
||||||
|
|||||||
@@ -650,7 +650,7 @@ Rules:
|
|||||||
-GiveMcvCrateAction:
|
-GiveMcvCrateAction:
|
||||||
-GiveCashCrateAction:
|
-GiveCashCrateAction:
|
||||||
-ExplodeCrateAction@fire:
|
-ExplodeCrateAction@fire:
|
||||||
-UnitUpgradeCrateAction@cloak:
|
-GrantUpgradeCrateAction@cloak:
|
||||||
|
|
||||||
Sequences:
|
Sequences:
|
||||||
|
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ Rules:
|
|||||||
-GiveMcvCrateAction:
|
-GiveMcvCrateAction:
|
||||||
-RevealMapCrateAction:
|
-RevealMapCrateAction:
|
||||||
-HideMapCrateAction:
|
-HideMapCrateAction:
|
||||||
-UnitUpgradeCrateAction@cloak:
|
-GrantUpgradeCrateAction@cloak:
|
||||||
-ExplodeCrateAction@nuke:
|
-ExplodeCrateAction@nuke:
|
||||||
-ExplodeCrateAction@boom:
|
-ExplodeCrateAction@boom:
|
||||||
-ExplodeCrateAction@fire:
|
-ExplodeCrateAction@fire:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ CRATE:
|
|||||||
ExplodeCrateAction@fire:
|
ExplodeCrateAction@fire:
|
||||||
Weapon: Napalm.Crate
|
Weapon: Napalm.Crate
|
||||||
SelectionShares: 5
|
SelectionShares: 5
|
||||||
UnitUpgradeCrateAction@cloak:
|
GrantUpgradeCrateAction@cloak:
|
||||||
SelectionShares: 5
|
SelectionShares: 5
|
||||||
Effect: cloak
|
Effect: cloak
|
||||||
Upgrades: cloak
|
Upgrades: cloak
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ CRATE:
|
|||||||
Units: e1,e1,e4,e4,e3,e3,e3
|
Units: e1,e1,e4,e4,e3,e3,e3
|
||||||
ValidRaces: soviet
|
ValidRaces: soviet
|
||||||
TimeDelay: 4500
|
TimeDelay: 4500
|
||||||
UnitUpgradeCrateAction@invuln:
|
GrantUpgradeCrateAction@invuln:
|
||||||
SelectionShares: 5
|
SelectionShares: 5
|
||||||
Effect: invuln
|
Effect: invuln
|
||||||
Notification: ironcur9.aud
|
Notification: ironcur9.aud
|
||||||
|
|||||||
Reference in New Issue
Block a user