Rebased. (+1 squashed commits)

Squashed commits:

[43010a0] Fixes. (+1 squashed commits)

Squashed commits:

[94ee90e] Fixes. (+1 squashed commits)

Squashed commits:

[ef827c7] Style cop updates. Updates to LevelUp, Cloak, and UnitUpgrade to allow multiple units within range, plus maximum extra unit limit. (+1 squashed commits)

Squashed commits:

[2103b01] Dupe crate action updates and fixes. (+2 squashed commit)

Squashed commit:

[0f4df4a] Added DuplicateUnitCrateAction.

[2787fa1] Clarity update. (+1 squashed commits)

Squashed commits:

[93ddc3b] Crate updates.
+Multiple units per crate allowed.
+Allow time delay on crate actions.
This commit is contained in:
UberWaffe
2014-07-10 20:55:02 +02:00
parent 582c1016e9
commit 94b1f53ebf
16 changed files with 374 additions and 63 deletions

View File

@@ -17,15 +17,22 @@ namespace OpenRA.Mods.RA
public class CrateActionInfo : ITraitInfo
{
[Desc("Chance of getting this crate, assuming the collector is compatible.")]
public int SelectionShares = 10;
public readonly int SelectionShares = 10;
[Desc("An animation defined in sequence yaml(s) to draw.")]
public string Effect = null;
public readonly string Effect = null;
[Desc("Palette to draw the animation in.")]
public string Palette = "effect";
public readonly string Palette = "effect";
[Desc("Audio clip to play when the crate is collected.")]
public string Notification = null;
[ActorReference]
public string[] ExcludedActorTypes = { };
public readonly string Notification = null;
[Desc("The earliest time (in ticks) that this crate action can occur on.")]
public readonly int TimeDelay = 0;
[Desc("Actor types that this crate action will not occur for.")]
[ActorReference] public string[] ExcludedActorTypes = { };
public virtual object Create(ActorInitializer init) { return new CrateAction(init.self, this); }
}
@@ -43,6 +50,9 @@ namespace OpenRA.Mods.RA
public int GetSelectionSharesOuter(Actor collector)
{
if (self.World.WorldTick < info.TimeDelay)
return 0;
if (info.ExcludedActorTypes.Contains(collector.Info.Name))
return 0;