Customisable mcv crates
This commit is contained in:
@@ -15,6 +15,7 @@ namespace OpenRA.Mods.RA.Crates
|
||||
{
|
||||
class GiveMcvCrateActionInfo : GiveUnitCrateActionInfo
|
||||
{
|
||||
public int NoBaseSelectionShares = 1000;
|
||||
public override object Create(ActorInitializer init) { return new GiveMcvCrateAction(init.self, this); }
|
||||
}
|
||||
|
||||
@@ -26,7 +27,7 @@ namespace OpenRA.Mods.RA.Crates
|
||||
public override int GetSelectionShares(Actor collector)
|
||||
{
|
||||
var hasBase = self.World.Queries.OwnedBy[collector.Owner].WithTrait<BaseBuilding>().Any();
|
||||
return hasBase ? 0 : base.GetSelectionShares(collector);
|
||||
return hasBase ? info.SelectionShares : (info as GiveMcvCrateActionInfo).NoBaseSelectionShares;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +183,8 @@ CRATE:
|
||||
Effect: stealth
|
||||
ExcludedActorTypes: e1,e2,e3,e4,e5,e6,rmbo,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10
|
||||
GiveMcvCrateAction:
|
||||
SelectionShares: 1000
|
||||
SelectionShares: 2
|
||||
NoBaseSelectionShares: 9001
|
||||
Unit: mcv
|
||||
RenderUnit:
|
||||
BelowUnits:
|
||||
|
||||
@@ -252,7 +252,8 @@ CRATE:
|
||||
SelectionShares: 5
|
||||
Effect: parabombs
|
||||
GiveMcvCrateAction:
|
||||
SelectionShares: 1000
|
||||
SelectionShares: 2
|
||||
NoBaseSelectionShares: 9001
|
||||
Unit: mcv
|
||||
GiveUnitCrateAction@jeep:
|
||||
SelectionShares: 7
|
||||
|
||||
Reference in New Issue
Block a user