Add property requirements to safe traits
This commit is contained in:
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
class ExplodeCrateActionInfo : CrateActionInfo
|
||||
{
|
||||
[Desc("The weapon to fire upon collection.")]
|
||||
[WeaponReference] public string Weapon = null;
|
||||
[WeaponReference, FieldLoader.Require] public string Weapon = null;
|
||||
|
||||
public override object Create(ActorInitializer init) { return new ExplodeCrateAction(init.Self, this); }
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
class GiveUnitCrateActionInfo : CrateActionInfo
|
||||
{
|
||||
[Desc("The list of units to spawn.")]
|
||||
[ActorReference]
|
||||
[ActorReference, FieldLoader.Require]
|
||||
public readonly string[] Units = { };
|
||||
|
||||
[Desc("Races that are allowed to trigger this action")]
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Grants an upgrade to the collector.")]
|
||||
public class GrantUpgradeCrateActionInfo : CrateActionInfo
|
||||
{
|
||||
[UpgradeGrantedReference]
|
||||
[UpgradeGrantedReference, FieldLoader.Require]
|
||||
[Desc("The upgrades to apply.")]
|
||||
public readonly string[] Upgrades = { };
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
class SupportPowerCrateActionInfo : CrateActionInfo
|
||||
{
|
||||
[Desc("Which proxy actor, which grants the support power, to spawn.")]
|
||||
[ActorReference] public readonly string Proxy = null;
|
||||
[ActorReference, FieldLoader.Require] public readonly string Proxy = null;
|
||||
|
||||
public override object Create(ActorInitializer init) { return new SupportPowerCrateAction(init.Self, this); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user