Squash compiler warnings

This commit is contained in:
Paul Chote
2011-04-07 21:26:57 +12:00
parent b0425aff3b
commit aba14eec23
11 changed files with 17 additions and 27 deletions

View File

@@ -18,7 +18,6 @@ namespace OpenRA.Mods.RA.Effects
class CashTick : IEffect
{
string s;
int lifetime;
int remaining;
int velocity;
float2 pos;
@@ -27,7 +26,6 @@ namespace OpenRA.Mods.RA.Effects
public CashTick(int value, int lifetime, int velocity, float2 pos, Color color)
{
this.color = color;
this.lifetime = lifetime;
this.velocity = velocity;
s = "{0}${1}".F(value < 0 ? "-" : "+", value);
this.pos = pos - 0.5f*Game.Renderer.TinyBoldFont.Measure(s).ToFloat2();

View File

@@ -18,15 +18,13 @@ namespace OpenRA.Mods.RA.Effects
class SatelliteLaunch : IEffect
{
int frame = 0;
Actor a;
Animation doors = new Animation("atek");
float2 doorOffset = new float2(-4,0);
int2 pos;
float2 pos;
public SatelliteLaunch(Actor a)
{
this.a = a;
pos = a.CenterLocation;
pos = a.CenterLocation - .5f * doors.Image.size + doorOffset;
doors.PlayThen("active",
() => a.World.AddFrameEndTask(w => w.Remove(this)));
}
@@ -37,14 +35,13 @@ namespace OpenRA.Mods.RA.Effects
if (++frame == 19)
{
world.AddFrameEndTask(w => w.Add(new GpsSatellite(pos - .5f * doors.Image.size + doorOffset)));
world.AddFrameEndTask(w => w.Add(new GpsSatellite(pos)));
}
}
public IEnumerable<Renderable> Render()
{
yield return new Renderable(doors.Image,
pos - .5f * doors.Image.size + doorOffset, "effect", (int)doorOffset.Y);
yield return new Renderable(doors.Image, pos, "effect", (int)doorOffset.Y);
}
}
}

View File

@@ -25,11 +25,9 @@ namespace OpenRA.Mods.RA
class SupplyTruck : IIssueOrder, IResolveOrder, IOrderVoice
{
int payload;
SupplyTruckInfo Info;
public SupplyTruck(SupplyTruckInfo info)
{
payload = info.Payload;
Info = info;
}
@@ -58,7 +56,7 @@ namespace OpenRA.Mods.RA
self.SetTargetLine(Target.FromOrder(order), Color.Yellow);
self.CancelActivity();
self.QueueActivity(new Enter(order.TargetActor));
self.QueueActivity(new DonateSupplies(order.TargetActor, payload));
self.QueueActivity(new DonateSupplies(order.TargetActor, Info.Payload));
}
}

View File

@@ -30,8 +30,8 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
return true;
};
var installed = Rules.Music.Count(m => m.Value.Exists) > 1;
/*
var installed = Rules.Music.Count(m => m.Value.Exists) > 1;
// Hack around some mix packages including hellmarch for ra
bg.GetWidget("BUTTON_INSTALL").IsVisible = () => !installed;
bg.GetWidget("BUTTON_INSTALL").OnMouseUp = mi => {