Merge pull request #5640 from Mailaender/editor-tick
Separated Tick and TickRender more cleanly
This commit is contained in:
@@ -23,9 +23,12 @@ namespace OpenRA.Graphics
|
|||||||
|
|
||||||
int frame = 0;
|
int frame = 0;
|
||||||
bool backwards = false;
|
bool backwards = false;
|
||||||
bool tickAlways;
|
|
||||||
string name;
|
string name;
|
||||||
|
|
||||||
|
readonly int defaultTick = 40; // 25 fps == 40 ms
|
||||||
|
bool tickAlways;
|
||||||
|
|
||||||
public string Name { get { return name; } }
|
public string Name { get { return name; } }
|
||||||
|
|
||||||
readonly SequenceProvider sequenceProvider;
|
readonly SequenceProvider sequenceProvider;
|
||||||
@@ -66,6 +69,12 @@ namespace OpenRA.Graphics
|
|||||||
return Render(pos, WVec.Zero, 0, palette, 1f);
|
return Render(pos, WVec.Zero, 0, palette, 1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Initialize(string sequenceName)
|
||||||
|
{
|
||||||
|
CurrentSequence = sequenceProvider.GetSequence(name, sequenceName);
|
||||||
|
tickAlways = true;
|
||||||
|
}
|
||||||
|
|
||||||
public void Play(string sequenceName)
|
public void Play(string sequenceName)
|
||||||
{
|
{
|
||||||
PlayThen(sequenceName, null);
|
PlayThen(sequenceName, null);
|
||||||
@@ -149,7 +158,7 @@ namespace OpenRA.Graphics
|
|||||||
while (timeUntilNextFrame <= 0)
|
while (timeUntilNextFrame <= 0)
|
||||||
{
|
{
|
||||||
tickFunc();
|
tickFunc();
|
||||||
timeUntilNextFrame += CurrentSequence != null ? CurrentSequence.Tick : 40; // 25 fps == 40 ms
|
timeUntilNextFrame += CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
* available to you under the terms of the GNU General Public License
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -102,15 +102,15 @@ namespace OpenRA.Network
|
|||||||
var client = orderManager.LobbyInfo.ClientWithIndex(clientId);
|
var client = orderManager.LobbyInfo.ClientWithIndex(clientId);
|
||||||
if (client != null)
|
if (client != null)
|
||||||
{
|
{
|
||||||
var pause = order.TargetString == "Pause";
|
var pauseState = order.TargetString == "Pause" ? World.PauseState.Paused : World.PauseState.Active;
|
||||||
if (orderManager.world.Paused != pause && !world.LobbyInfo.IsSinglePlayer)
|
if (orderManager.world.Paused != pauseState && !world.LobbyInfo.IsSinglePlayer)
|
||||||
{
|
{
|
||||||
var pausetext = "The game is {0} by {1}".F(pause ? "paused" : "un-paused", client.Name);
|
var pausetext = "The game is {0} by {1}.".F(pauseState == World.PauseState.Paused ? "paused" : "un-paused", client.Name);
|
||||||
Game.AddChatLine(Color.White, "", pausetext);
|
Game.AddChatLine(Color.White, "", pausetext);
|
||||||
}
|
}
|
||||||
|
|
||||||
orderManager.world.Paused = pause;
|
orderManager.world.Paused = pauseState;
|
||||||
orderManager.world.PredictedPaused = pause;
|
orderManager.world.PredictedPaused = pauseState;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace OpenRA.Traits
|
|||||||
public class DebugPauseState : ISync
|
public class DebugPauseState : ISync
|
||||||
{
|
{
|
||||||
World world;
|
World world;
|
||||||
[Sync] public bool Paused { get { return world.Paused; } }
|
[Sync] public bool Paused { get { return world.Paused == World.PauseState.Paused; } }
|
||||||
public DebugPauseState(World world) { this.world = world; }
|
public DebugPauseState(World world) { this.world = world; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
OpenRA.Game/Traits/Render/RenderSprites.cs
Executable file → Normal file
7
OpenRA.Game/Traits/Render/RenderSprites.cs
Executable file → Normal file
@@ -31,7 +31,7 @@ namespace OpenRA.Traits
|
|||||||
public virtual object Create(ActorInitializer init) { return new RenderSprites(init.self); }
|
public virtual object Create(ActorInitializer init) { return new RenderSprites(init.self); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RenderSprites : IRender, ITick, INotifyOwnerChanged, INotifyEffectiveOwnerChanged
|
public class RenderSprites : IRender, ITickRender, INotifyOwnerChanged, INotifyEffectiveOwnerChanged
|
||||||
{
|
{
|
||||||
class AnimationWrapper
|
class AnimationWrapper
|
||||||
{
|
{
|
||||||
@@ -126,8 +126,11 @@ namespace OpenRA.Traits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Tick(Actor self)
|
public virtual void TickRender(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
foreach (var a in anims.Values)
|
foreach (var a in anims.Values)
|
||||||
a.Animation.Animation.Tick();
|
a.Animation.Animation.Tick();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ namespace OpenRA.Widgets
|
|||||||
var key = Hotkey.FromKeyInput(e);
|
var key = Hotkey.FromKeyInput(e);
|
||||||
|
|
||||||
if (key == Game.Settings.Keys.PauseKey && World.LocalPlayer != null) // Disable pausing for spectators
|
if (key == Game.Settings.Keys.PauseKey && World.LocalPlayer != null) // Disable pausing for spectators
|
||||||
World.SetPauseState(!World.Paused);
|
World.SetPauseState(World.Paused != World.PauseState.Paused);
|
||||||
else if (key == Game.Settings.Keys.SelectAllUnitsKey)
|
else if (key == Game.Settings.Keys.SelectAllUnitsKey)
|
||||||
{
|
{
|
||||||
var ownUnitsOnScreen = SelectActorsInBox(World, worldRenderer.Viewport.TopLeft, worldRenderer.Viewport.BottomRight,
|
var ownUnitsOnScreen = SelectActorsInBox(World, worldRenderer.Viewport.TopLeft, worldRenderer.Viewport.BottomRight,
|
||||||
|
|||||||
@@ -203,8 +203,9 @@ namespace OpenRA
|
|||||||
public event Action<Actor> ActorAdded = _ => { };
|
public event Action<Actor> ActorAdded = _ => { };
|
||||||
public event Action<Actor> ActorRemoved = _ => { };
|
public event Action<Actor> ActorRemoved = _ => { };
|
||||||
|
|
||||||
public bool Paused { get; internal set; }
|
public enum PauseState { Active, Paused, Editor }
|
||||||
public bool PredictedPaused { get; internal set; }
|
public PauseState Paused { get; internal set; }
|
||||||
|
public PauseState PredictedPaused { get; internal set; }
|
||||||
public bool PauseStateLocked { get; set; }
|
public bool PauseStateLocked { get; set; }
|
||||||
public bool IsShellmap = false;
|
public bool IsShellmap = false;
|
||||||
public int WorldTick { get; private set; }
|
public int WorldTick { get; private set; }
|
||||||
@@ -215,17 +216,17 @@ namespace OpenRA
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
IssueOrder(Order.PauseGame(paused));
|
IssueOrder(Order.PauseGame(paused));
|
||||||
PredictedPaused = paused;
|
PredictedPaused = paused ? PauseState.Paused : PauseState.Active;;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetLocalPauseState(bool paused)
|
public void SetLocalPauseState(PauseState paused)
|
||||||
{
|
{
|
||||||
Paused = PredictedPaused = paused;
|
Paused = PredictedPaused = paused;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Tick()
|
public void Tick()
|
||||||
{
|
{
|
||||||
if (!Paused && (!IsShellmap || Game.Settings.Game.ShowShellmap))
|
if (Paused != PauseState.Paused && (!IsShellmap || Game.Settings.Game.ShowShellmap))
|
||||||
{
|
{
|
||||||
WorldTick++;
|
WorldTick++;
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
|
|
||||||
public void OptionsClicked()
|
public void OptionsClicked()
|
||||||
{
|
{
|
||||||
var cachedPause = world.PredictedPaused;
|
var cachedPause = world.PredictedPaused == World.PauseState.Paused;
|
||||||
|
|
||||||
ingameRoot.IsVisible = () => false;
|
ingameRoot.IsVisible = () => false;
|
||||||
if (world.LobbyInfo.IsSinglePlayer)
|
if (world.LobbyInfo.IsSinglePlayer)
|
||||||
|
|||||||
@@ -1,71 +0,0 @@
|
|||||||
#region Copyright & License Information
|
|
||||||
/*
|
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
|
||||||
* available to you under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation. For more information,
|
|
||||||
* see COPYING.
|
|
||||||
*/
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using OpenRA.Mods.RA.Buildings;
|
|
||||||
using OpenRA.Mods.RA.Render;
|
|
||||||
using OpenRA.Traits;
|
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA.Activities
|
|
||||||
{
|
|
||||||
class MakeAnimation : Activity
|
|
||||||
{
|
|
||||||
readonly bool Reversed;
|
|
||||||
readonly Action OnComplete;
|
|
||||||
RenderBuilding rb;
|
|
||||||
|
|
||||||
public MakeAnimation(Actor self, Action onComplete) : this(self, false, onComplete) {}
|
|
||||||
public MakeAnimation(Actor self, bool reversed, Action onComplete)
|
|
||||||
{
|
|
||||||
Reversed = reversed;
|
|
||||||
OnComplete = onComplete;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool complete = false;
|
|
||||||
bool started = false;
|
|
||||||
|
|
||||||
public override Activity Tick(Actor self)
|
|
||||||
{
|
|
||||||
if (self.IsDead())
|
|
||||||
return NextActivity;
|
|
||||||
|
|
||||||
if (started)
|
|
||||||
{
|
|
||||||
// Don't break the actor if someone has overriden the animation prematurely
|
|
||||||
if (rb.DefaultAnimation.CurrentSequence.Name != "make")
|
|
||||||
{
|
|
||||||
complete = true;
|
|
||||||
OnComplete();
|
|
||||||
}
|
|
||||||
return complete ? NextActivity : this;
|
|
||||||
}
|
|
||||||
|
|
||||||
started = true;
|
|
||||||
rb = self.Trait<RenderBuilding>();
|
|
||||||
if (Reversed)
|
|
||||||
{
|
|
||||||
// TODO: These don't belong here
|
|
||||||
var bi = self.Info.Traits.GetOrDefault<BuildingInfo>();
|
|
||||||
if (bi != null)
|
|
||||||
foreach (var s in bi.SellSounds)
|
|
||||||
Sound.PlayToPlayer(self.Owner, s, self.CenterPosition);
|
|
||||||
|
|
||||||
rb.PlayCustomAnimBackwards(self, "make", () => { OnComplete(); complete = true;});
|
|
||||||
}
|
|
||||||
else
|
|
||||||
rb.PlayCustomAnimThen(self, "make", () => { OnComplete(); complete = true;});
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Cannot be cancelled
|
|
||||||
public override void Cancel(Actor self) { }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -76,8 +76,8 @@ namespace OpenRA.Mods.RA.Activities
|
|||||||
init.Add(new RuntimeCargoInit(cargo.Passengers.ToArray()));
|
init.Add(new RuntimeCargoInit(cargo.Passengers.ToArray()));
|
||||||
|
|
||||||
var a = w.CreateActor(ToActor, init);
|
var a = w.CreateActor(ToActor, init);
|
||||||
foreach (var nt in self.TraitsImplementing<INotifyTransformed>())
|
foreach (var nt in self.TraitsImplementing<INotifyTransform>())
|
||||||
nt.OnTransformed(a);
|
nt.AfterTransform(a);
|
||||||
|
|
||||||
if (selected)
|
if (selected)
|
||||||
w.Selection.Add(w, a);
|
w.Selection.Add(w, a);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.RA
|
|||||||
public override object Create(ActorInitializer init) { return new AttackGarrisoned(init.self, this); }
|
public override object Create(ActorInitializer init) { return new AttackGarrisoned(init.self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AttackGarrisoned : AttackFollow, INotifyPassengerEntered, INotifyPassengerExited, IRender
|
public class AttackGarrisoned : AttackFollow, INotifyPassengerEntered, INotifyPassengerExited, IRender, ITickRender
|
||||||
{
|
{
|
||||||
public readonly FirePort[] Ports;
|
public readonly FirePort[] Ports;
|
||||||
|
|
||||||
@@ -183,9 +183,10 @@ namespace OpenRA.Mods.RA
|
|||||||
yield return r;
|
yield return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Tick(Actor self)
|
public void TickRender(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
base.Tick(self);
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
// Take a copy so that Tick() can remove animations
|
// Take a copy so that Tick() can remove animations
|
||||||
foreach (var m in muzzles.ToList())
|
foreach (var m in muzzles.ToList())
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ namespace OpenRA.Mods.RA.Buildings
|
|||||||
|
|
||||||
public readonly string[] BuildSounds = { "placbldg.aud", "build5.aud" };
|
public readonly string[] BuildSounds = { "placbldg.aud", "build5.aud" };
|
||||||
public readonly string[] SellSounds = { "cashturn.aud" };
|
public readonly string[] SellSounds = { "cashturn.aud" };
|
||||||
|
public readonly string[] UndeploySounds = { "cashturn.aud" };
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new Building(init, this); }
|
public object Create(ActorInitializer init) { return new Building(init, this); }
|
||||||
|
|
||||||
@@ -99,7 +100,7 @@ namespace OpenRA.Mods.RA.Buildings
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Building : INotifyDamage, IOccupySpace, INotifyCapture, INotifyBuildComplete, INotifySold, ISync, ITechTreePrerequisite, INotifyAddedToWorld, INotifyRemovedFromWorld
|
public class Building : INotifyDamage, IOccupySpace, INotifyCapture, INotifyBuildComplete, INotifySold, INotifyTransform, ISync, ITechTreePrerequisite, INotifyAddedToWorld, INotifyRemovedFromWorld
|
||||||
{
|
{
|
||||||
public readonly BuildingInfo Info;
|
public readonly BuildingInfo Info;
|
||||||
public bool BuildComplete { get; private set; }
|
public bool BuildComplete { get; private set; }
|
||||||
@@ -185,7 +186,21 @@ namespace OpenRA.Mods.RA.Buildings
|
|||||||
Locked = false;
|
Locked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Selling(Actor self) { BuildComplete = false; }
|
public void Selling(Actor self)
|
||||||
|
{
|
||||||
|
foreach (var s in Info.SellSounds)
|
||||||
|
Sound.PlayToPlayer(self.Owner, s, self.CenterPosition);
|
||||||
|
|
||||||
|
BuildComplete = false;
|
||||||
|
}
|
||||||
public void Sold(Actor self) { }
|
public void Sold(Actor self) { }
|
||||||
|
|
||||||
|
public void BeforeTransform(Actor self)
|
||||||
|
{
|
||||||
|
foreach (var s in Info.UndeploySounds)
|
||||||
|
Sound.PlayToPlayer(self.Owner, s, self.CenterPosition);
|
||||||
|
}
|
||||||
|
public void OnTransform(Actor self) { }
|
||||||
|
public void AfterTransform(Actor self) { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
class ChronoshiftPaletteEffectInfo : TraitInfo<ChronoshiftPaletteEffect> { }
|
class ChronoshiftPaletteEffectInfo : TraitInfo<ChronoshiftPaletteEffect> { }
|
||||||
|
|
||||||
public class ChronoshiftPaletteEffect : IPaletteModifier, ITick
|
public class ChronoshiftPaletteEffect : IPaletteModifier, ITickRender
|
||||||
{
|
{
|
||||||
const int chronoEffectLength = 60;
|
const int chronoEffectLength = 60;
|
||||||
int remainingFrames;
|
int remainingFrames;
|
||||||
@@ -27,8 +27,11 @@ namespace OpenRA.Mods.RA
|
|||||||
remainingFrames = chronoEffectLength;
|
remainingFrames = chronoEffectLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Tick(Actor self)
|
public void TickRender(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
if (remainingFrames > 0)
|
if (remainingFrames > 0)
|
||||||
remainingFrames--;
|
remainingFrames--;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
* available to you under the terms of the GNU General Public License
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
public class CloakPaletteEffectInfo : TraitInfo<CloakPaletteEffect> { }
|
public class CloakPaletteEffectInfo : TraitInfo<CloakPaletteEffect> { }
|
||||||
|
|
||||||
public class CloakPaletteEffect : IPaletteModifier, ITick
|
public class CloakPaletteEffect : IPaletteModifier, ITickRender
|
||||||
{
|
{
|
||||||
float t = 0;
|
float t = 0;
|
||||||
string paletteName = "cloak";
|
string paletteName = "cloak";
|
||||||
@@ -41,8 +41,11 @@ namespace OpenRA.Mods.RA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Tick(Actor self)
|
public void TickRender(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
t += 0.25f;
|
t += 0.25f;
|
||||||
if (t >= 256) t = 0;
|
if (t >= 256) t = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
case "pause":
|
case "pause":
|
||||||
world.IssueOrder(new Order("PauseGame", null, false)
|
world.IssueOrder(new Order("PauseGame", null, false)
|
||||||
{ TargetString = world.Paused ? "UnPause" : "Pause" });
|
{ TargetString = world.Paused == World.PauseState.Paused ? "UnPause" : "Pause" });
|
||||||
break;
|
break;
|
||||||
case "surrender":
|
case "surrender":
|
||||||
world.IssueOrder(new Order("Surrender", world.LocalPlayer.PlayerActor, false));
|
world.IssueOrder(new Order("Surrender", world.LocalPlayer.PlayerActor, false));
|
||||||
|
|||||||
0
OpenRA.Mods.RA/Effects/Bullet.cs
Executable file → Normal file
0
OpenRA.Mods.RA/Effects/Bullet.cs
Executable file → Normal file
0
OpenRA.Mods.RA/Effects/Missile.cs
Executable file → Normal file
0
OpenRA.Mods.RA/Effects/Missile.cs
Executable file → Normal file
0
OpenRA.Mods.RA/Effects/NukeLaunch.cs
Executable file → Normal file
0
OpenRA.Mods.RA/Effects/NukeLaunch.cs
Executable file → Normal file
0
OpenRA.Mods.RA/Effects/RepairIndicator.cs
Executable file → Normal file
0
OpenRA.Mods.RA/Effects/RepairIndicator.cs
Executable file → Normal file
@@ -23,11 +23,14 @@ namespace OpenRA.Mods.RA
|
|||||||
public object Create(ActorInitializer init) { return new LightPaletteRotator(this); }
|
public object Create(ActorInitializer init) { return new LightPaletteRotator(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class LightPaletteRotator : ITick, IPaletteModifier
|
class LightPaletteRotator : ITickRender, IPaletteModifier
|
||||||
{
|
{
|
||||||
float t = 0;
|
float t = 0;
|
||||||
public void Tick(Actor self)
|
public void TickRender(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
t += .5f;
|
t += .5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
class NukePaletteEffectInfo : TraitInfo<NukePaletteEffect> { }
|
class NukePaletteEffectInfo : TraitInfo<NukePaletteEffect> { }
|
||||||
|
|
||||||
public class NukePaletteEffect : IPaletteModifier, ITick
|
public class NukePaletteEffect : IPaletteModifier, ITickRender
|
||||||
{
|
{
|
||||||
const int nukeEffectLength = 20;
|
const int nukeEffectLength = 20;
|
||||||
int remainingFrames;
|
int remainingFrames;
|
||||||
@@ -27,8 +27,11 @@ namespace OpenRA.Mods.RA
|
|||||||
remainingFrames = nukeEffectLength;
|
remainingFrames = nukeEffectLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Tick(Actor self)
|
public void TickRender(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
if (remainingFrames > 0)
|
if (remainingFrames > 0)
|
||||||
remainingFrames--;
|
remainingFrames--;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,7 +100,6 @@
|
|||||||
<Compile Include="Activities\Infiltrate.cs" />
|
<Compile Include="Activities\Infiltrate.cs" />
|
||||||
<Compile Include="Activities\LayMines.cs" />
|
<Compile Include="Activities\LayMines.cs" />
|
||||||
<Compile Include="Activities\Leap.cs" />
|
<Compile Include="Activities\Leap.cs" />
|
||||||
<Compile Include="Activities\MakeAnimation.cs" />
|
|
||||||
<Compile Include="Activities\MoveAdjacentTo.cs" />
|
<Compile Include="Activities\MoveAdjacentTo.cs" />
|
||||||
<Compile Include="Activities\RAHarvesterDockSequence.cs" />
|
<Compile Include="Activities\RAHarvesterDockSequence.cs" />
|
||||||
<Compile Include="Activities\Rearm.cs" />
|
<Compile Include="Activities\Rearm.cs" />
|
||||||
@@ -519,6 +518,7 @@
|
|||||||
<Compile Include="Lint\CheckMapCordon.cs" />
|
<Compile Include="Lint\CheckMapCordon.cs" />
|
||||||
<Compile Include="World\ResourceLayer.cs" />
|
<Compile Include="World\ResourceLayer.cs" />
|
||||||
<Compile Include="Parachutable.cs" />
|
<Compile Include="Parachutable.cs" />
|
||||||
|
<Compile Include="Render\WithMakeAnimation.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
|
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
|
||||||
|
|||||||
@@ -54,6 +54,9 @@ namespace OpenRA.Mods.RA.Orders
|
|||||||
|
|
||||||
IEnumerable<Order> InnerOrder(World world, CPos xy, MouseInput mi)
|
IEnumerable<Order> InnerOrder(World world, CPos xy, MouseInput mi)
|
||||||
{
|
{
|
||||||
|
if (world.Paused == World.PauseState.Paused)
|
||||||
|
yield break;
|
||||||
|
|
||||||
if (mi.Button == MouseButton.Left)
|
if (mi.Button == MouseButton.Left)
|
||||||
{
|
{
|
||||||
var topLeft = xy - FootprintUtils.AdjustForBuildingSize(BuildingInfo);
|
var topLeft = xy - FootprintUtils.AdjustForBuildingSize(BuildingInfo);
|
||||||
|
|||||||
@@ -140,7 +140,10 @@ namespace OpenRA.Mods.RA
|
|||||||
public void Killed(Actor killed, AttackInfo e) { if (killed == self) ClearQueue(); }
|
public void Killed(Actor killed, AttackInfo e) { if (killed == self) ClearQueue(); }
|
||||||
public void Selling(Actor self) { }
|
public void Selling(Actor self) { }
|
||||||
public void Sold(Actor self) { ClearQueue(); }
|
public void Sold(Actor self) { ClearQueue(); }
|
||||||
|
|
||||||
|
public void BeforeTransform(Actor self) { }
|
||||||
public void OnTransform(Actor self) { ClearQueue(); }
|
public void OnTransform(Actor self) { ClearQueue(); }
|
||||||
|
public void AfterTransform(Actor self) { }
|
||||||
|
|
||||||
void CacheProduceables(Actor playerActor)
|
void CacheProduceables(Actor playerActor)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
{
|
{
|
||||||
public class RenderBuildingInfo : RenderSimpleInfo, Requires<BuildingInfo>, IPlaceBuildingDecoration
|
public class RenderBuildingInfo : RenderSimpleInfo, Requires<BuildingInfo>, IPlaceBuildingDecoration
|
||||||
{
|
{
|
||||||
public readonly bool HasMakeAnimation = true;
|
|
||||||
public readonly bool PauseOnLowPower = false;
|
public readonly bool PauseOnLowPower = false;
|
||||||
|
|
||||||
public override object Create(ActorInitializer init) { return new RenderBuilding(init, this);}
|
public override object Create(ActorInitializer init) { return new RenderBuilding(init, this);}
|
||||||
@@ -34,9 +33,11 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RenderBuilding : RenderSimple, INotifyDamageStateChanged
|
public class RenderBuilding : RenderSimple, INotifyDamageStateChanged, INotifyBuildComplete
|
||||||
{
|
{
|
||||||
RenderBuildingInfo info;
|
RenderBuildingInfo info;
|
||||||
|
bool buildComplete;
|
||||||
|
bool skipMakeAnimation;
|
||||||
|
|
||||||
public RenderBuilding(ActorInitializer init, RenderBuildingInfo info)
|
public RenderBuilding(ActorInitializer init, RenderBuildingInfo info)
|
||||||
: this(init, info, () => 0) { }
|
: this(init, info, () => 0) { }
|
||||||
@@ -46,23 +47,32 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
{
|
{
|
||||||
var self = init.self;
|
var self = init.self;
|
||||||
this.info = info;
|
this.info = info;
|
||||||
|
skipMakeAnimation = init.Contains<SkipMakeAnimsInit>();
|
||||||
|
|
||||||
|
DefaultAnimation.Initialize(NormalizeSequence(self, "idle"));
|
||||||
|
|
||||||
// Work around a bogus crash
|
|
||||||
DefaultAnimation.PlayRepeating(NormalizeSequence(self, "idle"));
|
|
||||||
self.Trait<IBodyOrientation>().SetAutodetectedFacings(DefaultAnimation.CurrentSequence.Facings);
|
self.Trait<IBodyOrientation>().SetAutodetectedFacings(DefaultAnimation.CurrentSequence.Facings);
|
||||||
|
|
||||||
// Can't call Complete() directly from ctor because other traits haven't been inited yet
|
|
||||||
if (self.Info.Traits.Get<RenderBuildingInfo>().HasMakeAnimation && !init.Contains<SkipMakeAnimsInit>())
|
|
||||||
self.QueueActivity(new MakeAnimation(self, () => Complete(self)));
|
|
||||||
else
|
|
||||||
self.QueueActivity(new CallFunc(() => Complete(self)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Complete(Actor self)
|
public override void TickRender(WorldRenderer wr, Actor self)
|
||||||
|
{
|
||||||
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
|
base.TickRender(wr, self);
|
||||||
|
|
||||||
|
if (buildComplete)
|
||||||
|
return;
|
||||||
|
|
||||||
|
buildComplete = true;
|
||||||
|
if (!self.HasTrait<WithMakeAnimation>() || skipMakeAnimation)
|
||||||
|
foreach (var notify in self.TraitsImplementing<INotifyBuildComplete>())
|
||||||
|
notify.BuildingComplete(self);
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void BuildingComplete(Actor self)
|
||||||
{
|
{
|
||||||
DefaultAnimation.PlayRepeating(NormalizeSequence(self, "idle"));
|
DefaultAnimation.PlayRepeating(NormalizeSequence(self, "idle"));
|
||||||
foreach (var x in self.TraitsImplementing<INotifyBuildComplete>())
|
|
||||||
x.BuildingComplete(self);
|
|
||||||
|
|
||||||
if (info.PauseOnLowPower)
|
if (info.PauseOnLowPower)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA.Render
|
namespace OpenRA.Mods.RA.Render
|
||||||
{
|
{
|
||||||
|
[Desc("Used for tesla coil and obelisk.")]
|
||||||
public class RenderBuildingChargeInfo : RenderBuildingInfo
|
public class RenderBuildingChargeInfo : RenderBuildingInfo
|
||||||
{
|
{
|
||||||
[Desc("Sound to play when building charges.")]
|
[Desc("Sound to play when building charges.")]
|
||||||
@@ -19,7 +20,6 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
public override object Create(ActorInitializer init) { return new RenderBuildingCharge(init, this); }
|
public override object Create(ActorInitializer init) { return new RenderBuildingCharge(init, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* used for tesla and obelisk */
|
|
||||||
public class RenderBuildingCharge : RenderBuilding
|
public class RenderBuildingCharge : RenderBuilding
|
||||||
{
|
{
|
||||||
RenderBuildingChargeInfo info;
|
RenderBuildingChargeInfo info;
|
||||||
@@ -33,8 +33,7 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
public void PlayCharge(Actor self)
|
public void PlayCharge(Actor self)
|
||||||
{
|
{
|
||||||
Sound.Play(info.ChargeAudio, self.CenterPosition);
|
Sound.Play(info.ChargeAudio, self.CenterPosition);
|
||||||
DefaultAnimation.PlayThen(NormalizeSequence(self, info.ChargeSequence),
|
PlayCustomAnim(self, info.ChargeSequence);
|
||||||
() => DefaultAnimation.PlayRepeating(NormalizeSequence(self, "idle")));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
playerResources = init.self.Owner.PlayerActor.Trait<PlayerResources>();
|
playerResources = init.self.Owner.PlayerActor.Trait<PlayerResources>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BuildingComplete(Actor self)
|
public override void BuildingComplete(Actor self)
|
||||||
{
|
{
|
||||||
var animation = (self.GetDamageState() >= DamageState.Heavy) ? "damaged-idle" : "idle";
|
var animation = (self.GetDamageState() >= DamageState.Heavy) ? "damaged-idle" : "idle";
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using OpenRA.Graphics;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA.Render
|
namespace OpenRA.Mods.RA.Render
|
||||||
@@ -21,7 +22,7 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
public override object Create(ActorInitializer init) { return new RenderBuildingWall(init, this); }
|
public override object Create(ActorInitializer init) { return new RenderBuildingWall(init, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class RenderBuildingWall : RenderBuilding, INotifyBuildComplete, INotifyAddedToWorld, INotifyRemovedFromWorld
|
class RenderBuildingWall : RenderBuilding, INotifyAddedToWorld, INotifyRemovedFromWorld, ITick
|
||||||
{
|
{
|
||||||
readonly RenderBuildingWallInfo info;
|
readonly RenderBuildingWallInfo info;
|
||||||
int adjacent = 0;
|
int adjacent = 0;
|
||||||
@@ -33,9 +34,10 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
this.info = info;
|
this.info = info;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BuildingComplete(Actor self)
|
public override void BuildingComplete(Actor self)
|
||||||
{
|
{
|
||||||
DefaultAnimation.PlayFetchIndex(info.Sequence, () => adjacent);
|
DefaultAnimation.PlayFetchIndex(info.Sequence, () => adjacent);
|
||||||
|
UpdateNeighbours(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DamageStateChanged(Actor self, AttackInfo e)
|
public override void DamageStateChanged(Actor self, AttackInfo e)
|
||||||
@@ -43,10 +45,16 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
DefaultAnimation.PlayFetchIndex(NormalizeSequence(DefaultAnimation, e.DamageState, info.Sequence), () => adjacent);
|
DefaultAnimation.PlayFetchIndex(NormalizeSequence(DefaultAnimation, e.DamageState, info.Sequence), () => adjacent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Tick(Actor self)
|
public override void TickRender(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
base.Tick(self);
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
|
base.TickRender(wr, self);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Tick(Actor self)
|
||||||
|
{
|
||||||
if (!dirty)
|
if (!dirty)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class RenderBuildingWarFactory : RenderBuilding, INotifyBuildComplete, ITick, INotifyProduction, INotifySold, ISync
|
class RenderBuildingWarFactory : RenderBuilding, INotifyBuildComplete, ITickRender, INotifyProduction, INotifySold, ISync
|
||||||
{
|
{
|
||||||
Animation roof;
|
Animation roof;
|
||||||
[Sync] bool isOpen;
|
[Sync] bool isOpen;
|
||||||
@@ -55,16 +55,20 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
() => !buildComplete, offset));
|
() => !buildComplete, offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BuildingComplete( Actor self )
|
public override void BuildingComplete(Actor self)
|
||||||
{
|
{
|
||||||
roof.Play(NormalizeSequence(self,
|
roof.Play(NormalizeSequence(self,
|
||||||
self.GetDamageState() > DamageState.Heavy ? "damaged-idle-top" : "idle-top"));
|
self.GetDamageState() > DamageState.Heavy ? "damaged-idle-top" : "idle-top"));
|
||||||
buildComplete = true;
|
buildComplete = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Tick(Actor self)
|
public override void TickRender(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
base.Tick(self);
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
|
base.TickRender(wr, self);
|
||||||
|
|
||||||
if (isOpen && !self.World.ActorMap.GetUnitsAt(openExit).Any( a => a != self ))
|
if (isOpen && !self.World.ActorMap.GetUnitsAt(openExit).Any( a => a != self ))
|
||||||
{
|
{
|
||||||
isOpen = false;
|
isOpen = false;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
using OpenRA.Graphics;
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA.Render
|
namespace OpenRA.Mods.RA.Render
|
||||||
{
|
{
|
||||||
@@ -31,8 +32,11 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
intendedSprite = disguise.AsSprite;
|
intendedSprite = disguise.AsSprite;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Tick(Actor self)
|
public override void TickRender(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
if (disguise.AsSprite != intendedSprite)
|
if (disguise.AsSprite != intendedSprite)
|
||||||
{
|
{
|
||||||
intendedSprite = disguise.AsSprite;
|
intendedSprite = disguise.AsSprite;
|
||||||
@@ -40,7 +44,7 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
UpdatePalette();
|
UpdatePalette();
|
||||||
}
|
}
|
||||||
|
|
||||||
base.Tick(self);
|
base.TickRender(wr, self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,15 +35,18 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
new Animation(self.World, image);
|
new Animation(self.World, image);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Tick(Actor self)
|
public override void TickRender(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
var desiredState = harv.Fullness * (info.ImagesByFullness.Length - 1) / 100;
|
var desiredState = harv.Fullness * (info.ImagesByFullness.Length - 1) / 100;
|
||||||
var desiredImage = info.ImagesByFullness[desiredState];
|
var desiredImage = info.ImagesByFullness[desiredState];
|
||||||
|
|
||||||
if (DefaultAnimation.Name != desiredImage)
|
if (DefaultAnimation.Name != desiredImage)
|
||||||
DefaultAnimation.ChangeImage(desiredImage, "idle");
|
DefaultAnimation.ChangeImage(desiredImage, "idle");
|
||||||
|
|
||||||
base.Tick(self);
|
base.TickRender(wr, self);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Harvested(Actor self, ResourceType resource)
|
public void Harvested(Actor self, ResourceType resource)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
* available to you under the terms of the GNU General Public License
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
using OpenRA.Graphics;
|
||||||
using OpenRA.Mods.RA.Effects;
|
using OpenRA.Mods.RA.Effects;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
@@ -79,9 +80,12 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
Attacking(self, target);
|
Attacking(self, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Tick(Actor self)
|
public override void TickRender(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
base.Tick(self);
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
|
base.TickRender(wr, self);
|
||||||
|
|
||||||
if ((State == AnimationState.Moving || dirty) && !move.IsMoving)
|
if ((State == AnimationState.Moving || dirty) && !move.IsMoving)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
* available to you under the terms of the GNU General Public License
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
using OpenRA.Graphics;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA.Render
|
namespace OpenRA.Mods.RA.Render
|
||||||
@@ -43,13 +44,16 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
return base.AllowIdleAnimation(self) && !sc.Panicking;
|
return base.AllowIdleAnimation(self) && !sc.Panicking;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Tick (Actor self)
|
public override void TickRender(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
if (wasPanic != sc.Panicking)
|
if (wasPanic != sc.Panicking)
|
||||||
dirty = true;
|
dirty = true;
|
||||||
|
|
||||||
wasPanic = sc.Panicking;
|
wasPanic = sc.Panicking;
|
||||||
base.Tick(self);
|
base.TickRender(wr, self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using OpenRA.Graphics;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA.Render
|
namespace OpenRA.Mods.RA.Render
|
||||||
@@ -41,7 +42,7 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
|
|
||||||
public bool ShouldBeOpen()
|
public bool ShouldBeOpen()
|
||||||
{
|
{
|
||||||
if (self.CenterPosition.Z > 0 || move.IsMoving)
|
if (self.CenterPosition.Z > 0 || move.IsMoving || cargo.CurrentAdjacentCells == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return cargo.CurrentAdjacentCells.Any(c => self.World.Map.Contains(c)
|
return cargo.CurrentAdjacentCells.Any(c => self.World.Map.Contains(c)
|
||||||
@@ -70,14 +71,17 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
PlayCustomAnimBackwards(self, info.OpenAnim, null);
|
PlayCustomAnimBackwards(self, info.OpenAnim, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Tick(Actor self)
|
public override void TickRender(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
if (ShouldBeOpen())
|
if (ShouldBeOpen())
|
||||||
Open();
|
Open();
|
||||||
else
|
else
|
||||||
Close();
|
Close();
|
||||||
|
|
||||||
base.Tick(self);
|
base.TickRender(wr, self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using OpenRA.Graphics;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA.Render
|
namespace OpenRA.Mods.RA.Render
|
||||||
@@ -34,13 +35,16 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
.Single(a => a.Info.Name == info.Armament);
|
.Single(a => a.Info.Name == info.Armament);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Tick(Actor self)
|
public override void TickRender(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
var sequence = (armament.IsReloading ? "empty-" : "") + (attack.IsAttacking ? "aim" : "idle");
|
var sequence = (armament.IsReloading ? "empty-" : "") + (attack.IsAttacking ? "aim" : "idle");
|
||||||
if (sequence != DefaultAnimation.CurrentSequence.Name)
|
if (sequence != DefaultAnimation.CurrentSequence.Name)
|
||||||
DefaultAnimation.ReplaceAnim(sequence);
|
DefaultAnimation.ReplaceAnim(sequence);
|
||||||
|
|
||||||
base.Tick(self);
|
base.TickRender(wr, self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
67
OpenRA.Mods.RA/Render/WithMakeAnimation.cs
Normal file
67
OpenRA.Mods.RA/Render/WithMakeAnimation.cs
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation. For more information,
|
||||||
|
* see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using OpenRA.Graphics;
|
||||||
|
using OpenRA.Mods.RA.Activities;
|
||||||
|
using OpenRA.Mods.RA.Buildings;
|
||||||
|
using OpenRA.Mods.RA.Render;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.RA.Render
|
||||||
|
{
|
||||||
|
public class WithMakeAnimationInfo : ITraitInfo, Requires<RenderBuildingInfo>
|
||||||
|
{
|
||||||
|
[Desc("Sequence name to use")]
|
||||||
|
public readonly string Sequence = "make";
|
||||||
|
|
||||||
|
public object Create(ActorInitializer init) { return new WithMakeAnimation(init, this); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class WithMakeAnimation : ITickRender
|
||||||
|
{
|
||||||
|
WithMakeAnimationInfo info;
|
||||||
|
RenderBuilding building;
|
||||||
|
bool buildComplete;
|
||||||
|
|
||||||
|
public WithMakeAnimation(ActorInitializer init, WithMakeAnimationInfo info)
|
||||||
|
{
|
||||||
|
building = init.self.Trait<RenderBuilding>();
|
||||||
|
this.info = info;
|
||||||
|
buildComplete = init.Contains<SkipMakeAnimsInit>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void TickRender(WorldRenderer wr, Actor self)
|
||||||
|
{
|
||||||
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (self.IsDead() || buildComplete)
|
||||||
|
return;
|
||||||
|
|
||||||
|
buildComplete = true;
|
||||||
|
|
||||||
|
building.PlayCustomAnimThen(self, info.Sequence, () =>
|
||||||
|
{
|
||||||
|
foreach (var notify in self.TraitsImplementing<INotifyBuildComplete>())
|
||||||
|
notify.BuildingComplete(self);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Reverse(Actor self, Activity activity)
|
||||||
|
{
|
||||||
|
building.PlayCustomAnimBackwards(self, info.Sequence, () => {
|
||||||
|
building.PlayCustomAnim(self, info.Sequence); // avoids visual glitches as we wait for the actor to get destroyed
|
||||||
|
self.QueueActivity(activity);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
public object Create(ActorInitializer init) { return new WithMuzzleFlash(init.self, this); }
|
public object Create(ActorInitializer init) { return new WithMuzzleFlash(init.self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class WithMuzzleFlash : INotifyAttack, IRender, ITick
|
class WithMuzzleFlash : INotifyAttack, IRender, ITickRender
|
||||||
{
|
{
|
||||||
Dictionary<Barrel, bool> visible = new Dictionary<Barrel, bool>();
|
Dictionary<Barrel, bool> visible = new Dictionary<Barrel, bool>();
|
||||||
Dictionary<Barrel, AnimationWithOffset> anims = new Dictionary<Barrel, AnimationWithOffset>();
|
Dictionary<Barrel, AnimationWithOffset> anims = new Dictionary<Barrel, AnimationWithOffset>();
|
||||||
@@ -95,8 +95,11 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Tick(Actor self)
|
public void TickRender(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
foreach (var a in anims.Values)
|
foreach (var a in anims.Values)
|
||||||
a.Animation.Tick();
|
a.Animation.Tick();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
* available to you under the terms of the GNU General Public License
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -34,14 +34,15 @@ namespace OpenRA.Mods.RA
|
|||||||
if (!self.Trait<Building>().Lock())
|
if (!self.Trait<Building>().Lock())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
self.CancelActivity();
|
||||||
|
|
||||||
foreach (var ns in self.TraitsImplementing<INotifySold>())
|
foreach (var ns in self.TraitsImplementing<INotifySold>())
|
||||||
ns.Selling(self);
|
ns.Selling(self);
|
||||||
|
|
||||||
self.CancelActivity();
|
var makeAnimation = self.TraitOrDefault<WithMakeAnimation>();
|
||||||
|
if (makeAnimation != null)
|
||||||
var rb = self.TraitOrDefault<RenderBuilding>();
|
makeAnimation.Reverse(self, new Sell());
|
||||||
if (rb != null && self.Info.Traits.Get<RenderBuildingInfo>().HasMakeAnimation)
|
else
|
||||||
self.QueueActivity(new MakeAnimation(self, true, () => rb.PlayCustomAnim(self, "make")));
|
|
||||||
self.QueueActivity(new Sell());
|
self.QueueActivity(new Sell());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
* available to you under the terms of the GNU General Public License
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using OpenRA.GameRules;
|
using OpenRA.GameRules;
|
||||||
|
using OpenRA.Graphics;
|
||||||
using OpenRA.Mods.RA.Render;
|
using OpenRA.Mods.RA.Render;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
@@ -52,6 +53,7 @@ namespace OpenRA.Mods.RA
|
|||||||
public override void Tick(Actor self)
|
public override void Tick(Actor self)
|
||||||
{
|
{
|
||||||
base.Tick(self);
|
base.Tick(self);
|
||||||
|
|
||||||
if (IsProne && --remainingProneTime == 0)
|
if (IsProne && --remainingProneTime == 0)
|
||||||
LocalOffset = WVec.Zero;
|
LocalOffset = WVec.Zero;
|
||||||
}
|
}
|
||||||
@@ -98,13 +100,17 @@ namespace OpenRA.Mods.RA
|
|||||||
return base.AllowIdleAnimation(self) && !tc.IsProne;
|
return base.AllowIdleAnimation(self) && !tc.IsProne;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Tick(Actor self)
|
public override void TickRender(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
if (wasProne != tc.IsProne)
|
if (wasProne != tc.IsProne)
|
||||||
dirty = true;
|
dirty = true;
|
||||||
|
|
||||||
wasProne = tc.IsProne;
|
wasProne = tc.IsProne;
|
||||||
base.Tick(self);
|
|
||||||
|
base.TickRender(wr, self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
* available to you under the terms of the GNU General Public License
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -47,8 +47,7 @@ namespace OpenRA.Mods.RA
|
|||||||
}
|
}
|
||||||
|
|
||||||
public interface INotifyParachuteLanded { void OnLanded(); }
|
public interface INotifyParachuteLanded { void OnLanded(); }
|
||||||
public interface INotifyTransform { void OnTransform(Actor self); }
|
public interface INotifyTransform { void BeforeTransform(Actor self); void OnTransform(Actor self); void AfterTransform(Actor toActor); }
|
||||||
public interface INotifyTransformed { void OnTransformed(Actor toActor); }
|
|
||||||
public interface INotifyAttack { void Attacking(Actor self, Target target, Armament a, Barrel barrel); }
|
public interface INotifyAttack { void Attacking(Actor self, Target target, Armament a, Barrel barrel); }
|
||||||
public interface INotifyChat { bool OnChat(string from, string message); }
|
public interface INotifyChat { bool OnChat(string from, string message); }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,11 +88,15 @@ namespace OpenRA.Mods.RA
|
|||||||
if (self.HasTrait<IFacing>())
|
if (self.HasTrait<IFacing>())
|
||||||
self.QueueActivity(new Turn(info.Facing));
|
self.QueueActivity(new Turn(info.Facing));
|
||||||
|
|
||||||
var rb = self.TraitOrDefault<RenderBuilding>();
|
foreach (var nt in self.TraitsImplementing<INotifyTransform>())
|
||||||
if (rb != null && self.Info.Traits.Get<RenderBuildingInfo>().HasMakeAnimation)
|
nt.BeforeTransform(self);
|
||||||
self.QueueActivity(new MakeAnimation(self, true, () => rb.PlayCustomAnim(self, "make")));
|
|
||||||
|
|
||||||
self.QueueActivity(new Transform(self, info.IntoActor) { Offset = info.Offset, Facing = info.Facing, Sounds = info.TransformSounds, Race = race });
|
var transform = new Transform(self, info.IntoActor) { Offset = info.Offset, Facing = info.Facing, Sounds = info.TransformSounds, Race = race };
|
||||||
|
var makeAnimation = self.TraitOrDefault<WithMakeAnimation>();
|
||||||
|
if (makeAnimation != null)
|
||||||
|
makeAnimation.Reverse(self, transform);
|
||||||
|
else
|
||||||
|
self.QueueActivity(transform);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResolveOrder(Actor self, Order order)
|
public void ResolveOrder(Actor self, Order order)
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.RA
|
|||||||
public object Create(ActorInitializer init) { return new WaterPaletteRotation(init.world, this); }
|
public object Create(ActorInitializer init) { return new WaterPaletteRotation(init.world, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class WaterPaletteRotation : ITick, IPaletteModifier
|
class WaterPaletteRotation : ITickRender, IPaletteModifier
|
||||||
{
|
{
|
||||||
float t = 0;
|
float t = 0;
|
||||||
|
|
||||||
@@ -36,7 +36,13 @@ namespace OpenRA.Mods.RA
|
|||||||
this.info = info;
|
this.info = info;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Tick(Actor self) { t += .25f; }
|
public void TickRender(WorldRenderer wr, Actor self)
|
||||||
|
{
|
||||||
|
if (wr.world.Paused == World.PauseState.Paused)
|
||||||
|
return;
|
||||||
|
|
||||||
|
t += .25f;
|
||||||
|
}
|
||||||
|
|
||||||
uint[] temp = new uint[7]; /* allocating this on the fly actually hurts our profile */
|
uint[] temp = new uint[7]; /* allocating this on the fly actually hurts our profile */
|
||||||
|
|
||||||
|
|||||||
@@ -27,12 +27,12 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
{
|
{
|
||||||
var startTick = Ui.LastTickTime;
|
var startTick = Ui.LastTickTime;
|
||||||
// Blink the status line
|
// Blink the status line
|
||||||
status.IsVisible = () => (world.Paused || world.Timestep != Game.Timestep)
|
status.IsVisible = () => (world.Paused == World.PauseState.Paused || world.Timestep != Game.Timestep)
|
||||||
&& (Ui.LastTickTime - startTick) / 1000 % 2 == 0;
|
&& (Ui.LastTickTime - startTick) / 1000 % 2 == 0;
|
||||||
|
|
||||||
status.GetText = () =>
|
status.GetText = () =>
|
||||||
{
|
{
|
||||||
if (world.Paused || world.Timestep == 0)
|
if (world.Paused == World.PauseState.Paused || world.Timestep == 0)
|
||||||
return "Paused";
|
return "Paused";
|
||||||
|
|
||||||
if (world.Timestep == 1)
|
if (world.Timestep == 1)
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
optionsBG.Visible ^= true;
|
optionsBG.Visible ^= true;
|
||||||
if (optionsBG.Visible)
|
if (optionsBG.Visible)
|
||||||
{
|
{
|
||||||
cachedPause = world.PredictedPaused;
|
cachedPause = world.PredictedPaused == World.PauseState.Paused;
|
||||||
|
|
||||||
if (world.LobbyInfo.IsSinglePlayer)
|
if (world.LobbyInfo.IsSinglePlayer)
|
||||||
world.SetPauseState(true);
|
world.SetPauseState(true);
|
||||||
|
|||||||
0
OpenRA.Mods.RA/Widgets/SupportPowerBinWidget.cs
Executable file → Normal file
0
OpenRA.Mods.RA/Widgets/SupportPowerBinWidget.cs
Executable file → Normal file
@@ -252,6 +252,20 @@ namespace OpenRA.Utility
|
|||||||
node.Key = "StoresResources";
|
node.Key = "StoresResources";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make animation is now it's own trait
|
||||||
|
if (engineVersion < 20140621)
|
||||||
|
{
|
||||||
|
if (depth == 1 && (node.Key.StartsWith("RenderBuilding")))
|
||||||
|
node.Value.Nodes.RemoveAll(n => n.Key == "HasMakeAnimation");
|
||||||
|
|
||||||
|
if (node.Value.Nodes.Any(n => n.Key.StartsWith("RenderBuilding"))
|
||||||
|
&& !node.Value.Nodes.Any(n => n.Key == "RenderBuildingWall")
|
||||||
|
&& !node.Value.Nodes.Any(n => n.Key == "WithMakeAnimation"))
|
||||||
|
{
|
||||||
|
node.Value.Nodes.Add(new MiniYamlNode("WithMakeAnimation", new MiniYaml("")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ParachuteAttachment was merged into Parachutable
|
// ParachuteAttachment was merged into Parachutable
|
||||||
if (engineVersion < 20140701)
|
if (engineVersion < 20140701)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -355,6 +355,7 @@
|
|||||||
LuaScriptEvents:
|
LuaScriptEvents:
|
||||||
Demolishable:
|
Demolishable:
|
||||||
ScriptTriggers:
|
ScriptTriggers:
|
||||||
|
WithMakeAnimation:
|
||||||
|
|
||||||
^BaseBuilding:
|
^BaseBuilding:
|
||||||
Inherits: ^Building
|
Inherits: ^Building
|
||||||
@@ -395,6 +396,7 @@
|
|||||||
StartsRevealed: true
|
StartsRevealed: true
|
||||||
LuaScriptEvents:
|
LuaScriptEvents:
|
||||||
ScriptTriggers:
|
ScriptTriggers:
|
||||||
|
WithMakeAnimation:
|
||||||
|
|
||||||
^TechBuilding:
|
^TechBuilding:
|
||||||
Inherits: ^CivBuilding
|
Inherits: ^CivBuilding
|
||||||
@@ -418,6 +420,7 @@
|
|||||||
Palette: terrain
|
Palette: terrain
|
||||||
EditorAppearance:
|
EditorAppearance:
|
||||||
UseTerrainPalette: true
|
UseTerrainPalette: true
|
||||||
|
WithMakeAnimation:
|
||||||
|
|
||||||
^CivFieldHusk:
|
^CivFieldHusk:
|
||||||
AppearsOnRadar:
|
AppearsOnRadar:
|
||||||
@@ -436,6 +439,7 @@
|
|||||||
StartsRevealed: true
|
StartsRevealed: true
|
||||||
LuaScriptEvents:
|
LuaScriptEvents:
|
||||||
ScriptTriggers:
|
ScriptTriggers:
|
||||||
|
WithMakeAnimation:
|
||||||
|
|
||||||
^Wall:
|
^Wall:
|
||||||
AppearsOnRadar:
|
AppearsOnRadar:
|
||||||
@@ -456,7 +460,6 @@
|
|||||||
LineBuildNode:
|
LineBuildNode:
|
||||||
Types: wall
|
Types: wall
|
||||||
RenderBuildingWall:
|
RenderBuildingWall:
|
||||||
HasMakeAnimation: false
|
|
||||||
Palette: staticterrain
|
Palette: staticterrain
|
||||||
GivesExperience:
|
GivesExperience:
|
||||||
EditorAppearance:
|
EditorAppearance:
|
||||||
@@ -493,6 +496,7 @@
|
|||||||
StartsRevealed: true
|
StartsRevealed: true
|
||||||
LuaScriptEvents:
|
LuaScriptEvents:
|
||||||
ScriptTriggers:
|
ScriptTriggers:
|
||||||
|
WithMakeAnimation:
|
||||||
|
|
||||||
^TibTree:
|
^TibTree:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
@@ -510,6 +514,7 @@
|
|||||||
FrozenUnderFog:
|
FrozenUnderFog:
|
||||||
StartsRevealed: true
|
StartsRevealed: true
|
||||||
LuaScriptEvents:
|
LuaScriptEvents:
|
||||||
|
WithMakeAnimation:
|
||||||
|
|
||||||
^Rock:
|
^Rock:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
@@ -529,6 +534,7 @@
|
|||||||
StartsRevealed: true
|
StartsRevealed: true
|
||||||
LuaScriptEvents:
|
LuaScriptEvents:
|
||||||
ScriptTriggers:
|
ScriptTriggers:
|
||||||
|
WithMakeAnimation:
|
||||||
|
|
||||||
^Husk:
|
^Husk:
|
||||||
Health:
|
Health:
|
||||||
|
|||||||
@@ -94,4 +94,5 @@ MISS:
|
|||||||
Cost: 2000
|
Cost: 2000
|
||||||
Bib:
|
Bib:
|
||||||
HasMinibib: Yes
|
HasMinibib: Yes
|
||||||
|
WithMakeAnimation:
|
||||||
|
|
||||||
|
|||||||
@@ -67,19 +67,16 @@ T01:
|
|||||||
EditorTilesetFilter:
|
EditorTilesetFilter:
|
||||||
ExcludeTilesets: DESERT
|
ExcludeTilesets: DESERT
|
||||||
|
|
||||||
|
|
||||||
T02:
|
T02:
|
||||||
Inherits: ^Tree
|
Inherits: ^Tree
|
||||||
EditorTilesetFilter:
|
EditorTilesetFilter:
|
||||||
ExcludeTilesets: DESERT
|
ExcludeTilesets: DESERT
|
||||||
|
|
||||||
|
|
||||||
T03:
|
T03:
|
||||||
Inherits: ^Tree
|
Inherits: ^Tree
|
||||||
EditorTilesetFilter:
|
EditorTilesetFilter:
|
||||||
ExcludeTilesets: DESERT
|
ExcludeTilesets: DESERT
|
||||||
|
|
||||||
|
|
||||||
T04:
|
T04:
|
||||||
Inherits: ^Tree
|
Inherits: ^Tree
|
||||||
|
|
||||||
@@ -88,19 +85,16 @@ T05:
|
|||||||
EditorTilesetFilter:
|
EditorTilesetFilter:
|
||||||
ExcludeTilesets: DESERT
|
ExcludeTilesets: DESERT
|
||||||
|
|
||||||
|
|
||||||
T06:
|
T06:
|
||||||
Inherits: ^Tree
|
Inherits: ^Tree
|
||||||
EditorTilesetFilter:
|
EditorTilesetFilter:
|
||||||
ExcludeTilesets: DESERT
|
ExcludeTilesets: DESERT
|
||||||
|
|
||||||
|
|
||||||
T07:
|
T07:
|
||||||
Inherits: ^Tree
|
Inherits: ^Tree
|
||||||
EditorTilesetFilter:
|
EditorTilesetFilter:
|
||||||
ExcludeTilesets: DESERT
|
ExcludeTilesets: DESERT
|
||||||
|
|
||||||
|
|
||||||
T08:
|
T08:
|
||||||
Inherits: ^Tree
|
Inherits: ^Tree
|
||||||
Building:
|
Building:
|
||||||
|
|||||||
@@ -280,4 +280,5 @@
|
|||||||
Pieces: 3, 7
|
Pieces: 3, 7
|
||||||
Range: 2c0, 5c0
|
Range: 2c0, 5c0
|
||||||
ScriptTriggers:
|
ScriptTriggers:
|
||||||
|
WithMakeAnimation:
|
||||||
|
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ SPICEBLOOM:
|
|||||||
RadarColorFromTerrain:
|
RadarColorFromTerrain:
|
||||||
Terrain: Spice
|
Terrain: Spice
|
||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
|
WithMakeAnimation:
|
||||||
|
|
||||||
CAMERA:
|
CAMERA:
|
||||||
Immobile:
|
Immobile:
|
||||||
|
|||||||
@@ -426,7 +426,6 @@ CONCRETEB:
|
|||||||
TargetableBuilding:
|
TargetableBuilding:
|
||||||
TargetTypes: Ground
|
TargetTypes: Ground
|
||||||
RenderBuildingWall:
|
RenderBuildingWall:
|
||||||
HasMakeAnimation: false
|
|
||||||
Image: walla
|
Image: walla
|
||||||
EditorAppearance:
|
EditorAppearance:
|
||||||
RelativeToTopLeft: yes
|
RelativeToTopLeft: yes
|
||||||
@@ -476,7 +475,6 @@ WALL:
|
|||||||
RenderRangeCircle:
|
RenderRangeCircle:
|
||||||
-RenderBuilding:
|
-RenderBuilding:
|
||||||
RenderBuildingWall:
|
RenderBuildingWall:
|
||||||
HasMakeAnimation: false
|
|
||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
QuantizedFacings: 32
|
QuantizedFacings: 32
|
||||||
WithTurret:
|
WithTurret:
|
||||||
@@ -528,7 +526,6 @@ WALL:
|
|||||||
RenderRangeCircle:
|
RenderRangeCircle:
|
||||||
-RenderBuilding:
|
-RenderBuilding:
|
||||||
RenderBuildingWall:
|
RenderBuildingWall:
|
||||||
HasMakeAnimation: false
|
|
||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
QuantizedFacings: 32
|
QuantizedFacings: 32
|
||||||
WithTurret:
|
WithTurret:
|
||||||
@@ -720,7 +717,6 @@ PALACEC:
|
|||||||
Footprint: xxx xxx
|
Footprint: xxx xxx
|
||||||
Dimensions: 3,2
|
Dimensions: 3,2
|
||||||
RenderBuilding:
|
RenderBuilding:
|
||||||
HasMakeAnimation: false
|
|
||||||
|
|
||||||
HEAVYC:
|
HEAVYC:
|
||||||
Inherits: ^HEAVY
|
Inherits: ^HEAVY
|
||||||
|
|||||||
@@ -274,6 +274,7 @@
|
|||||||
DamagedSound: kaboom1.aud
|
DamagedSound: kaboom1.aud
|
||||||
DestroyedSound: kaboom22.aud
|
DestroyedSound: kaboom22.aud
|
||||||
RenderBuilding:
|
RenderBuilding:
|
||||||
|
WithMakeAnimation:
|
||||||
WithBuildingExplosion:
|
WithBuildingExplosion:
|
||||||
RepairableBuilding:
|
RepairableBuilding:
|
||||||
EngineerRepairable:
|
EngineerRepairable:
|
||||||
@@ -324,7 +325,6 @@
|
|||||||
TargetableBuilding:
|
TargetableBuilding:
|
||||||
TargetTypes: Ground, DetonateAttack
|
TargetTypes: Ground, DetonateAttack
|
||||||
RenderBuildingWall:
|
RenderBuildingWall:
|
||||||
HasMakeAnimation: false
|
|
||||||
Palette: terrain
|
Palette: terrain
|
||||||
GivesExperience:
|
GivesExperience:
|
||||||
EditorAppearance:
|
EditorAppearance:
|
||||||
@@ -352,6 +352,7 @@
|
|||||||
Name: Civilian Building
|
Name: Civilian Building
|
||||||
ProximityCaptor:
|
ProximityCaptor:
|
||||||
Types: CivilianBuilding
|
Types: CivilianBuilding
|
||||||
|
-WithMakeAnimation:
|
||||||
-AcceptsSupplies:
|
-AcceptsSupplies:
|
||||||
-GivesBuildableArea:
|
-GivesBuildableArea:
|
||||||
-Sellable:
|
-Sellable:
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
LuaScriptEvents:
|
LuaScriptEvents:
|
||||||
Demolishable:
|
Demolishable:
|
||||||
ScriptTriggers:
|
ScriptTriggers:
|
||||||
|
WithMakeAnimation:
|
||||||
|
|
||||||
^Wall:
|
^Wall:
|
||||||
AppearsOnRadar:
|
AppearsOnRadar:
|
||||||
@@ -65,7 +66,6 @@
|
|||||||
TargetableBuilding:
|
TargetableBuilding:
|
||||||
TargetTypes: Ground, C4
|
TargetTypes: Ground, C4
|
||||||
RenderBuildingWall:
|
RenderBuildingWall:
|
||||||
HasMakeAnimation: no
|
|
||||||
GivesExperience:
|
GivesExperience:
|
||||||
EditorAppearance:
|
EditorAppearance:
|
||||||
RelativeToTopLeft: yes
|
RelativeToTopLeft: yes
|
||||||
|
|||||||
Reference in New Issue
Block a user