exclusive force fire on husks and bridges
This commit is contained in:
@@ -14,6 +14,7 @@ NEW:
|
|||||||
Added an Extras submenu for miscellaneous game extras.
|
Added an Extras submenu for miscellaneous game extras.
|
||||||
Engineers can now regain control over husks.
|
Engineers can now regain control over husks.
|
||||||
Husks are now rendered with a black overlay.
|
Husks are now rendered with a black overlay.
|
||||||
|
Allow force fire to destroy husks.
|
||||||
A player's units, and allied units, now move out of the way when blocking production facilities.
|
A player's units, and allied units, now move out of the way when blocking production facilities.
|
||||||
Added cheat button to grow map resources.
|
Added cheat button to grow map resources.
|
||||||
Fixed units staying selected and contributing to control groups when becoming cloaked or hidden in fog.
|
Fixed units staying selected and contributing to control groups when becoming cloaked or hidden in fog.
|
||||||
|
|||||||
@@ -85,6 +85,11 @@ namespace OpenRA.Traits
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool RequiresForceFire
|
||||||
|
{
|
||||||
|
get { return targetable != null && targetable.RequiresForceFire; }
|
||||||
|
}
|
||||||
|
|
||||||
// Representative position - see Positions for the full set of targetable positions.
|
// Representative position - see Positions for the full set of targetable positions.
|
||||||
public WPos CenterPosition
|
public WPos CenterPosition
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -233,6 +233,7 @@ namespace OpenRA.Traits
|
|||||||
string[] TargetTypes { get; }
|
string[] TargetTypes { get; }
|
||||||
IEnumerable<WPos> TargetablePositions(Actor self);
|
IEnumerable<WPos> TargetablePositions(Actor self);
|
||||||
bool TargetableBy(Actor self, Actor byActor);
|
bool TargetableBy(Actor self, Actor byActor);
|
||||||
|
bool RequiresForceFire { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface INotifyStanceChanged
|
public interface INotifyStanceChanged
|
||||||
|
|||||||
@@ -199,6 +199,9 @@ namespace OpenRA.Mods.RA
|
|||||||
if (modifiers.HasModifier(TargetModifiers.ForceMove))
|
if (modifiers.HasModifier(TargetModifiers.ForceMove))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (target.RequiresForceFire)
|
||||||
|
return false;
|
||||||
|
|
||||||
var targetableRelationship = negativeDamage ? Stance.Ally : Stance.Enemy;
|
var targetableRelationship = negativeDamage ? Stance.Ally : Stance.Enemy;
|
||||||
|
|
||||||
var owner = target.Type == TargetType.FrozenActor ? target.FrozenActor.Owner : target.Actor.Owner;
|
var owner = target.Type == TargetType.FrozenActor ? target.FrozenActor.Owner : target.Actor.Owner;
|
||||||
|
|||||||
@@ -18,8 +18,10 @@ namespace OpenRA.Mods.RA
|
|||||||
public class TargetableBuildingInfo : ITraitInfo, ITargetableInfo, Requires<BuildingInfo>
|
public class TargetableBuildingInfo : ITraitInfo, ITargetableInfo, Requires<BuildingInfo>
|
||||||
{
|
{
|
||||||
public readonly string[] TargetTypes = { };
|
public readonly string[] TargetTypes = { };
|
||||||
|
|
||||||
public string[] GetTargetTypes() { return TargetTypes; }
|
public string[] GetTargetTypes() { return TargetTypes; }
|
||||||
|
|
||||||
|
public bool RequiresForceFire = false;
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new TargetableBuilding(init.self, this); }
|
public object Create(ActorInitializer init) { return new TargetableBuilding(init.self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,5 +43,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
return building.OccupiedCells().Select(c => c.First.CenterPosition);
|
return building.OccupiedCells().Select(c => c.First.CenterPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool RequiresForceFire { get { return info.RequiresForceFire; } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,10 @@ namespace OpenRA.Mods.RA
|
|||||||
public class TargetableUnitInfo : ITraitInfo, ITargetableInfo
|
public class TargetableUnitInfo : ITraitInfo, ITargetableInfo
|
||||||
{
|
{
|
||||||
public readonly string[] TargetTypes = { };
|
public readonly string[] TargetTypes = { };
|
||||||
|
|
||||||
public string[] GetTargetTypes() { return TargetTypes; }
|
public string[] GetTargetTypes() { return TargetTypes; }
|
||||||
|
|
||||||
|
public bool RequiresForceFire = false;
|
||||||
|
|
||||||
public virtual object Create(ActorInitializer init) { return new TargetableUnit(init.self, this); }
|
public virtual object Create(ActorInitializer init) { return new TargetableUnit(init.self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,5 +48,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
yield return self.CenterPosition;
|
yield return self.CenterPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool RequiresForceFire { get { return info.RequiresForceFire; } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -514,6 +514,9 @@
|
|||||||
Burns:
|
Burns:
|
||||||
Interval: 2
|
Interval: 2
|
||||||
TargetableUnit:
|
TargetableUnit:
|
||||||
|
RequiresForceFire: yes
|
||||||
|
TargetTypes: Ground
|
||||||
|
AutoTargetIgnore:
|
||||||
Capturable:
|
Capturable:
|
||||||
Type: husk
|
Type: husk
|
||||||
AllowAllies: yes
|
AllowAllies: yes
|
||||||
@@ -542,6 +545,7 @@
|
|||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Bridge
|
Name: Bridge
|
||||||
TargetableBuilding:
|
TargetableBuilding:
|
||||||
|
RequiresForceFire: yes
|
||||||
TargetTypes: Ground, Water
|
TargetTypes: Ground, Water
|
||||||
BelowUnits:
|
BelowUnits:
|
||||||
Health:
|
Health:
|
||||||
|
|||||||
@@ -98,6 +98,9 @@
|
|||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
LuaScriptEvents:
|
LuaScriptEvents:
|
||||||
TargetableUnit:
|
TargetableUnit:
|
||||||
|
TargetTypes: Ground
|
||||||
|
RequiresForceFire: yes
|
||||||
|
AutoTargetIgnore:
|
||||||
Capturable:
|
Capturable:
|
||||||
Type: husk
|
Type: husk
|
||||||
AllowAllies: yes
|
AllowAllies: yes
|
||||||
|
|||||||
@@ -430,6 +430,9 @@
|
|||||||
Chronoshiftable:
|
Chronoshiftable:
|
||||||
LuaScriptEvents:
|
LuaScriptEvents:
|
||||||
TargetableUnit:
|
TargetableUnit:
|
||||||
|
TargetTypes: Ground
|
||||||
|
RequiresForceFire: yes
|
||||||
|
AutoTargetIgnore:
|
||||||
Capturable:
|
Capturable:
|
||||||
Type: husk
|
Type: husk
|
||||||
AllowAllies: yes
|
AllowAllies: yes
|
||||||
@@ -468,6 +471,7 @@
|
|||||||
BelowUnits:
|
BelowUnits:
|
||||||
TargetableBuilding:
|
TargetableBuilding:
|
||||||
TargetTypes: Ground, Water
|
TargetTypes: Ground, Water
|
||||||
|
RequiresForceFire: yes
|
||||||
Building:
|
Building:
|
||||||
Footprint: ____ ____
|
Footprint: ____ ____
|
||||||
Dimensions: 4,2
|
Dimensions: 4,2
|
||||||
|
|||||||
Reference in New Issue
Block a user