oops; we don't want mod binaries in the repo; demotruck in aftermath mod.
This commit is contained in:
@@ -5,7 +5,7 @@ using OpenRa.Traits;
|
||||
|
||||
namespace OpenRa.Effects
|
||||
{
|
||||
class Bullet : IEffect
|
||||
public class Bullet : IEffect
|
||||
{
|
||||
readonly Player Owner;
|
||||
readonly Actor FiredBy;
|
||||
|
||||
@@ -56,7 +56,8 @@ namespace OpenRa.GameRules
|
||||
static Pair<Assembly, string>[] ModAssemblies =
|
||||
{
|
||||
Pair.New( typeof(ITraitInfo).Assembly, typeof(ITraitInfo).Namespace ),
|
||||
Pair.New( Assembly.LoadFile(Path.GetFullPath(@"mods\ra\OpenRa.Mods.RA.dll")), "OpenRa.Mods.RA" )
|
||||
Pair.New( Assembly.LoadFile(Path.GetFullPath(@"mods\ra\OpenRa.Mods.RA.dll")), "OpenRa.Mods.RA" ),
|
||||
Pair.New( Assembly.LoadFile(Path.GetFullPath(@"mods\aftermath\OpenRa.Mods.Aftermath.dll")), "OpenRa.Mods.Aftermath" )
|
||||
};
|
||||
|
||||
static ITraitInfo LoadTraitInfo(string traitName, MiniYaml my)
|
||||
|
||||
@@ -222,7 +222,6 @@
|
||||
<Compile Include="Traits\Chronoshiftable.cs" />
|
||||
<Compile Include="Traits\ChronoshiftPaletteEffect.cs" />
|
||||
<Compile Include="Traits\Chronosphere.cs" />
|
||||
<Compile Include="Traits\DemoTruck.cs" />
|
||||
<Compile Include="Traits\EngineerCapture.cs" />
|
||||
<Compile Include="Traits\Explodes.cs" />
|
||||
<Compile Include="Traits\ChronoshiftDeploy.cs" />
|
||||
|
||||
@@ -6,7 +6,7 @@ using OpenRa.Effects;
|
||||
|
||||
namespace OpenRa.Traits
|
||||
{
|
||||
class AttackBaseInfo : ITraitInfo
|
||||
public class AttackBaseInfo : ITraitInfo
|
||||
{
|
||||
public readonly string PrimaryWeapon = null;
|
||||
public readonly string SecondaryWeapon = null;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace OpenRa.Traits
|
||||
{
|
||||
class AttackInfo
|
||||
public class AttackInfo
|
||||
{
|
||||
public Actor Attacker;
|
||||
public WarheadInfo Warhead;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace OpenRa.Traits
|
||||
public object Create(Actor self) { return new Chronoshiftable(self); }
|
||||
}
|
||||
|
||||
class Chronoshiftable : IResolveOrder, ISpeedModifier, ITick
|
||||
public class Chronoshiftable : IResolveOrder, ISpeedModifier, ITick
|
||||
{
|
||||
// Return-to-sender logic
|
||||
[Sync]
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace OpenRa.Traits
|
||||
{
|
||||
class ChronosphereInfo : StatelessTraitInfo<Chronosphere> { }
|
||||
|
||||
class Chronosphere : IResolveOrder
|
||||
public class Chronosphere : IResolveOrder
|
||||
{
|
||||
public void ResolveOrder(Actor self, Order order)
|
||||
{
|
||||
|
||||
@@ -6,46 +6,5 @@ using OpenRa.Orders;
|
||||
|
||||
namespace OpenRa.Traits
|
||||
{
|
||||
class DemoTruckInfo : ITraitInfo
|
||||
{
|
||||
public object Create(Actor self) { return new DemoTruck(self); }
|
||||
}
|
||||
|
||||
class DemoTruck : Chronoshiftable, IResolveOrder, INotifyDamage
|
||||
{
|
||||
public DemoTruck(Actor self) : base(self) {}
|
||||
|
||||
public new void ResolveOrder(Actor self, Order order)
|
||||
{
|
||||
// Override chronoshifting action to detonate vehicle
|
||||
var movement = self.traits.GetOrDefault<IMovement>();
|
||||
var chronosphere = Game.world.Actors.Where(a => a.Owner == order.Subject.Owner && a.traits.Contains<Chronosphere>()).FirstOrDefault();
|
||||
if (order.OrderString == "Chronoshift" && movement.CanEnterCell(order.TargetLocation))
|
||||
{
|
||||
self.InflictDamage(chronosphere, self.Health, Rules.WarheadInfo["Super"]);
|
||||
return;
|
||||
}
|
||||
|
||||
base.ResolveOrder(self, order);
|
||||
}
|
||||
|
||||
// Fire primary on death
|
||||
public void Damaged(Actor self, AttackInfo e)
|
||||
{
|
||||
if (e.DamageState == DamageState.Dead)
|
||||
Detonate(self, e.Attacker);
|
||||
}
|
||||
|
||||
public void Detonate(Actor self, Actor detonatedBy)
|
||||
{
|
||||
self.InflictDamage(detonatedBy, self.Health, Rules.WarheadInfo["Super"]);
|
||||
var unit = self.traits.GetOrDefault<Unit>();
|
||||
var altitude = unit != null ? unit.Altitude : 0;
|
||||
int2 detonateLocation = self.CenterLocation.ToInt2();
|
||||
|
||||
Game.world.AddFrameEndTask(
|
||||
w => w.Add( new Bullet( self.Info.Traits.Get<AttackBaseInfo>().PrimaryWeapon, detonatedBy.Owner, detonatedBy,
|
||||
detonateLocation, detonateLocation, altitude, altitude)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,13 +17,13 @@ namespace OpenRa.Traits
|
||||
public interface IIssueOrder { Order IssueOrder( Actor self, int2 xy, MouseInput mi, Actor underCursor ); }
|
||||
public interface IResolveOrder { void ResolveOrder(Actor self, Order order); }
|
||||
|
||||
interface INotifySold { void Sold(Actor self); }
|
||||
interface INotifyDamage { void Damaged(Actor self, AttackInfo e); }
|
||||
interface INotifyBuildComplete { void BuildingComplete (Actor self); }
|
||||
interface INotifyProduction { void UnitProduced(Actor self, Actor other); }
|
||||
public interface INotifySold { void Sold(Actor self); }
|
||||
public interface INotifyDamage { void Damaged(Actor self, AttackInfo e); }
|
||||
public interface INotifyBuildComplete { void BuildingComplete(Actor self); }
|
||||
public interface INotifyProduction { void UnitProduced(Actor self, Actor other); }
|
||||
|
||||
interface IAcceptThief { void OnSteal(Actor self, Actor thief); }
|
||||
interface IAcceptSpy { void OnInfiltrate(Actor self, Actor spy); }
|
||||
public interface IAcceptThief { void OnSteal(Actor self, Actor thief); }
|
||||
public interface IAcceptSpy { void OnInfiltrate(Actor self, Actor spy); }
|
||||
|
||||
interface IProducer
|
||||
{
|
||||
@@ -31,7 +31,7 @@ namespace OpenRa.Traits
|
||||
void SetPrimaryProducer(Actor self, bool isPrimary);
|
||||
}
|
||||
public interface IOccupySpace { IEnumerable<int2> OccupiedCells(); }
|
||||
interface INotifyAttack { void Attacking(Actor self); }
|
||||
public interface INotifyAttack { void Attacking(Actor self); }
|
||||
public interface IRenderModifier { IEnumerable<Renderable> ModifyRender(Actor self, IEnumerable<Renderable> r); }
|
||||
public interface IDamageModifier { float GetDamageModifier(); }
|
||||
public interface ISpeedModifier { float GetSpeedModifier(); }
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace OpenRa.Traits
|
||||
public object Create( Actor self ) { return new Unit( self ); }
|
||||
}
|
||||
|
||||
class Unit : INotifyDamage
|
||||
public class Unit : INotifyDamage
|
||||
{
|
||||
[Sync]
|
||||
public int Facing;
|
||||
|
||||
Reference in New Issue
Block a user