From f52620f6fc02ea116a64959861520e6238d56399 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Wed, 26 Jan 2011 10:02:24 +1300 Subject: [PATCH] add ISync to all traits that have [Sync] members --- OpenRA.Game/Sync.cs | 1 + OpenRA.Game/Traits/Health.cs | 2 +- OpenRA.Game/Traits/Player/DeveloperMode.cs | 2 +- OpenRA.Game/Traits/Player/PlayerResources.cs | 8 ++++---- OpenRA.Game/Traits/SharesCell.cs | 3 ++- OpenRA.Mods.Cnc/PoisonedByTiberium.cs | 2 +- OpenRA.Mods.RA/Air/Aircraft.cs | 10 +++++----- OpenRA.Mods.RA/AttackBase.cs | 2 +- OpenRA.Mods.RA/AttackMove.cs | 2 +- OpenRA.Mods.RA/Buildings/Building.cs | 2 +- OpenRA.Mods.RA/Buildings/CanPowerDown.cs | 2 +- OpenRA.Mods.RA/Buildings/PowerManager.cs | 6 +++--- OpenRA.Mods.RA/Buildings/RepairableBuilding.cs | 6 +++--- OpenRA.Mods.RA/Burns.cs | 2 +- OpenRA.Mods.RA/CashTrickler.cs | 2 +- OpenRA.Mods.RA/ChronoshiftDeploy.cs | 2 +- OpenRA.Mods.RA/Chronoshiftable.cs | 2 +- OpenRA.Mods.RA/Cloak.cs | 2 +- OpenRA.Mods.RA/Crate.cs | 2 +- OpenRA.Mods.RA/GainsExperience.cs | 2 +- OpenRA.Mods.RA/Harvester.cs | 4 ++-- OpenRA.Mods.RA/Husk.cs | 2 +- OpenRA.Mods.RA/IronCurtainable.cs | 2 +- OpenRA.Mods.RA/LimitedAmmo.cs | 2 +- OpenRA.Mods.RA/Mine.cs | 2 +- OpenRA.Mods.RA/Minelayer.cs | 2 +- OpenRA.Mods.RA/Move/Mobile.cs | 2 +- OpenRA.Mods.RA/OreRefinery.cs | 2 +- OpenRA.Mods.RA/Player/ClassicProductionQueue.cs | 6 +++--- OpenRA.Mods.RA/ProximityCapturable.cs | 2 +- OpenRA.Mods.RA/RallyPoint.cs | 2 +- OpenRA.Mods.RA/Render/RenderBuildingWarFactory.cs | 2 +- OpenRA.Mods.RA/SelfHealing.cs | 2 +- OpenRA.Mods.RA/StoresOre.cs | 2 +- OpenRA.Mods.RA/Strategic/StrategicPoint.cs | 2 +- OpenRA.Mods.RA/Strategic/StrategicVictoryConditions.cs | 2 +- OpenRA.Mods.RA/SupportPowers/GpsPower.cs | 2 +- OpenRA.Mods.RA/TakeCover.cs | 2 +- OpenRA.Mods.RA/Turreted.cs | 2 +- OpenRA.Mods.RA/UnitStances/UnitStance.cs | 2 +- OpenRA.Mods.RA/UnitStances/UnitStanceDefensive.cs | 2 +- 41 files changed, 56 insertions(+), 54 deletions(-) diff --git a/OpenRA.Game/Sync.cs b/OpenRA.Game/Sync.cs index 86c83dc59a..996bcd166e 100755 --- a/OpenRA.Game/Sync.cs +++ b/OpenRA.Game/Sync.cs @@ -17,6 +17,7 @@ using OpenRA.FileFormats; namespace OpenRA { public class SyncAttribute : Attribute { } + public interface ISync { } /* marker interface */ public static class Sync { diff --git a/OpenRA.Game/Traits/Health.cs b/OpenRA.Game/Traits/Health.cs index b0ed272441..3a6995e8b2 100755 --- a/OpenRA.Game/Traits/Health.cs +++ b/OpenRA.Game/Traits/Health.cs @@ -23,7 +23,7 @@ namespace OpenRA.Traits public enum DamageState { Undamaged, Light, Medium, Heavy, Critical, Dead }; - public class Health + public class Health : ISync { public readonly HealthInfo Info; diff --git a/OpenRA.Game/Traits/Player/DeveloperMode.cs b/OpenRA.Game/Traits/Player/DeveloperMode.cs index 27f6f08cf0..c2b7b50649 100644 --- a/OpenRA.Game/Traits/Player/DeveloperMode.cs +++ b/OpenRA.Game/Traits/Player/DeveloperMode.cs @@ -25,7 +25,7 @@ namespace OpenRA.Traits public object Create (ActorInitializer init) { return new DeveloperMode(this); } } - public class DeveloperMode : IResolveOrder + public class DeveloperMode : IResolveOrder, ISync { DeveloperModeInfo Info; [Sync] public bool FastCharge; diff --git a/OpenRA.Game/Traits/Player/PlayerResources.cs b/OpenRA.Game/Traits/Player/PlayerResources.cs index 249cd84a49..e833840ea6 100644 --- a/OpenRA.Game/Traits/Player/PlayerResources.cs +++ b/OpenRA.Game/Traits/Player/PlayerResources.cs @@ -26,7 +26,7 @@ namespace OpenRA.Traits { public object Create(ActorInitializer init) { return new DebugResourceCash(init.self); } } - public class DebugResourceCash + public class DebugResourceCash : ISync { readonly Actor self; public DebugResourceCash(Actor self){this.self = self;} @@ -37,7 +37,7 @@ namespace OpenRA.Traits { public object Create(ActorInitializer init) { return new DebugResourceOre(init.self); } } - public class DebugResourceOre + public class DebugResourceOre : ISync { readonly Actor self; public DebugResourceOre(Actor self){this.self = self;} @@ -48,14 +48,14 @@ namespace OpenRA.Traits { public object Create(ActorInitializer init) { return new DebugResourceOreCapacity(init.self); } } - public class DebugResourceOreCapacity + public class DebugResourceOreCapacity : ISync { readonly Actor self; public DebugResourceOreCapacity(Actor self){this.self = self;} [Sync] public int foo { get { return self.Trait().OreCapacity; } } } - public class PlayerResources : ITick + public class PlayerResources : ITick, ISync { readonly Player Owner; int AdviceInterval; diff --git a/OpenRA.Game/Traits/SharesCell.cs b/OpenRA.Game/Traits/SharesCell.cs index 4229c39b39..dc59764ced 100755 --- a/OpenRA.Game/Traits/SharesCell.cs +++ b/OpenRA.Game/Traits/SharesCell.cs @@ -15,7 +15,8 @@ namespace OpenRA.Traits { public object Create(ActorInitializer init) { return new SharesCell(init); } } - public class SharesCell : IOffsetCenterLocation + + public class SharesCell : IOffsetCenterLocation, ISync { [Sync] public int Position; diff --git a/OpenRA.Mods.Cnc/PoisonedByTiberium.cs b/OpenRA.Mods.Cnc/PoisonedByTiberium.cs index f62885380a..4dcbf3f93a 100644 --- a/OpenRA.Mods.Cnc/PoisonedByTiberium.cs +++ b/OpenRA.Mods.Cnc/PoisonedByTiberium.cs @@ -24,7 +24,7 @@ namespace OpenRA.Mods.Cnc public object Create(ActorInitializer init) { return new PoisonedByTiberium(this); } } - class PoisonedByTiberium : ITick + class PoisonedByTiberium : ITick, ISync { PoisonedByTiberiumInfo info; [Sync] int poisonTicks; diff --git a/OpenRA.Mods.RA/Air/Aircraft.cs b/OpenRA.Mods.RA/Air/Aircraft.cs index 9aba36a8ff..fab016cd05 100755 --- a/OpenRA.Mods.RA/Air/Aircraft.cs +++ b/OpenRA.Mods.RA/Air/Aircraft.cs @@ -19,7 +19,7 @@ namespace OpenRA.Mods.RA.Air { public object Create(ActorInitializer init) { return new DebugAircraftFacing(init.self); } } - public class DebugAircraftFacing + public class DebugAircraftFacing : ISync { readonly Actor self; public DebugAircraftFacing(Actor self){this.self = self;} @@ -30,7 +30,7 @@ namespace OpenRA.Mods.RA.Air { public object Create(ActorInitializer init) { return new DebugAircraftSubPxX(init.self); } } - public class DebugAircraftSubPxX + public class DebugAircraftSubPxX : ISync { readonly Actor self; public DebugAircraftSubPxX(Actor self){this.self = self;} @@ -41,7 +41,7 @@ namespace OpenRA.Mods.RA.Air { public object Create(ActorInitializer init) { return new DebugAircraftSubPxY(init.self); } } - public class DebugAircraftSubPxY + public class DebugAircraftSubPxY : ISync { readonly Actor self; public DebugAircraftSubPxY(Actor self){this.self = self;} @@ -52,7 +52,7 @@ namespace OpenRA.Mods.RA.Air { public object Create(ActorInitializer init) { return new DebugAircraftAltitude(init.self); } } - public class DebugAircraftAltitude + public class DebugAircraftAltitude : ISync { readonly Actor self; public DebugAircraftAltitude(Actor self){this.self = self;} @@ -74,7 +74,7 @@ namespace OpenRA.Mods.RA.Air public virtual object Create( ActorInitializer init ) { return new Aircraft( init , this ); } } - public class Aircraft : IMove, IFacing, IOccupySpace + public class Aircraft : IMove, IFacing, IOccupySpace, ISync { protected readonly Actor self; [Sync] diff --git a/OpenRA.Mods.RA/AttackBase.cs b/OpenRA.Mods.RA/AttackBase.cs index 47c4dac568..32ef09d81c 100644 --- a/OpenRA.Mods.RA/AttackBase.cs +++ b/OpenRA.Mods.RA/AttackBase.cs @@ -41,7 +41,7 @@ namespace OpenRA.Mods.RA public abstract object Create(ActorInitializer init); } - public abstract class AttackBase : IIssueOrder, IResolveOrder, ITick, IExplodeModifier, IOrderVoice + public abstract class AttackBase : IIssueOrder, IResolveOrder, ITick, IExplodeModifier, IOrderVoice, ISync { [Sync] int nextScanTime = 0; diff --git a/OpenRA.Mods.RA/AttackMove.cs b/OpenRA.Mods.RA/AttackMove.cs index f4b85f5aab..ec4f598aa0 100644 --- a/OpenRA.Mods.RA/AttackMove.cs +++ b/OpenRA.Mods.RA/AttackMove.cs @@ -21,7 +21,7 @@ namespace OpenRA.Mods.RA public readonly bool JustMove = false; } - class AttackMove : IResolveOrder, IOrderVoice, ITick + class AttackMove : IResolveOrder, IOrderVoice, ITick, ISync { [Sync] public int2 TargetLocation = int2.Zero; diff --git a/OpenRA.Mods.RA/Buildings/Building.cs b/OpenRA.Mods.RA/Buildings/Building.cs index 9f17263dd5..9d8dd849e8 100755 --- a/OpenRA.Mods.RA/Buildings/Building.cs +++ b/OpenRA.Mods.RA/Buildings/Building.cs @@ -61,7 +61,7 @@ namespace OpenRA.Mods.RA.Buildings } } - public class Building : INotifyDamage, IResolveOrder, IOccupySpace, INotifyCapture + public class Building : INotifyDamage, IResolveOrder, IOccupySpace, INotifyCapture, ISync { readonly Actor self; public readonly BuildingInfo Info; diff --git a/OpenRA.Mods.RA/Buildings/CanPowerDown.cs b/OpenRA.Mods.RA/Buildings/CanPowerDown.cs index 4d9a493be4..667db5d761 100755 --- a/OpenRA.Mods.RA/Buildings/CanPowerDown.cs +++ b/OpenRA.Mods.RA/Buildings/CanPowerDown.cs @@ -17,7 +17,7 @@ namespace OpenRA.Mods.RA.Buildings public object Create(ActorInitializer init) { return new CanPowerDown(init); } } - public class CanPowerDown : IResolveOrder, IDisable + public class CanPowerDown : IResolveOrder, IDisable, ISync { [Sync] bool disabled = false; diff --git a/OpenRA.Mods.RA/Buildings/PowerManager.cs b/OpenRA.Mods.RA/Buildings/PowerManager.cs index d26ed43232..510312a264 100755 --- a/OpenRA.Mods.RA/Buildings/PowerManager.cs +++ b/OpenRA.Mods.RA/Buildings/PowerManager.cs @@ -17,9 +17,9 @@ namespace OpenRA.Mods.RA.Buildings { public readonly int AdviceInterval = 250; public object Create(ActorInitializer init) { return new PowerManager(init, this); } - } - - public class PowerManager : ITick + } + + public class PowerManager : ITick, ISync { PowerManagerInfo Info; Player Player; diff --git a/OpenRA.Mods.RA/Buildings/RepairableBuilding.cs b/OpenRA.Mods.RA/Buildings/RepairableBuilding.cs index 208ed3f21b..0cf4e08f5e 100755 --- a/OpenRA.Mods.RA/Buildings/RepairableBuilding.cs +++ b/OpenRA.Mods.RA/Buildings/RepairableBuilding.cs @@ -20,9 +20,9 @@ namespace OpenRA.Mods.RA.Buildings public readonly float RepairRate = 0.016f; public readonly int RepairStep = 7; public object Create(ActorInitializer init) { return new RepairableBuilding(init.self, this); } - } - - public class RepairableBuilding : ITick, IResolveOrder + } + + public class RepairableBuilding : ITick, IResolveOrder, ISync { [Sync] bool isRepairing = false; diff --git a/OpenRA.Mods.RA/Burns.cs b/OpenRA.Mods.RA/Burns.cs index fd8bb12987..e42530b546 100644 --- a/OpenRA.Mods.RA/Burns.cs +++ b/OpenRA.Mods.RA/Burns.cs @@ -20,7 +20,7 @@ namespace OpenRA.Mods.RA public readonly int Interval = 8; } - class Burns : ITick + class Burns : ITick, ISync { [Sync] int ticks; diff --git a/OpenRA.Mods.RA/CashTrickler.cs b/OpenRA.Mods.RA/CashTrickler.cs index f5192426c7..f25d10046d 100644 --- a/OpenRA.Mods.RA/CashTrickler.cs +++ b/OpenRA.Mods.RA/CashTrickler.cs @@ -18,7 +18,7 @@ namespace OpenRA.Mods.RA public readonly int Amount = 3; } - class CashTrickler : ITick + class CashTrickler : ITick, ISync { [Sync] int ticks; diff --git a/OpenRA.Mods.RA/ChronoshiftDeploy.cs b/OpenRA.Mods.RA/ChronoshiftDeploy.cs index a9b33d15a1..34e6a2f94f 100644 --- a/OpenRA.Mods.RA/ChronoshiftDeploy.cs +++ b/OpenRA.Mods.RA/ChronoshiftDeploy.cs @@ -21,7 +21,7 @@ namespace OpenRA.Mods.RA public readonly int ChargeTime = 120; // Seconds } - class ChronoshiftDeploy : IIssueOrder, IResolveOrder, ITick, IPips, IOrderVoice + class ChronoshiftDeploy : IIssueOrder, IResolveOrder, ITick, IPips, IOrderVoice, ISync { // Recharge logic [Sync] diff --git a/OpenRA.Mods.RA/Chronoshiftable.cs b/OpenRA.Mods.RA/Chronoshiftable.cs index b90378775a..96babb4b4e 100755 --- a/OpenRA.Mods.RA/Chronoshiftable.cs +++ b/OpenRA.Mods.RA/Chronoshiftable.cs @@ -15,7 +15,7 @@ namespace OpenRA.Mods.RA { class ChronoshiftableInfo : TraitInfo { } - public class Chronoshiftable : ITick + public class Chronoshiftable : ITick, ISync { // Return-to-sender logic [Sync] diff --git a/OpenRA.Mods.RA/Cloak.cs b/OpenRA.Mods.RA/Cloak.cs index 3431b9973b..01f68463d8 100644 --- a/OpenRA.Mods.RA/Cloak.cs +++ b/OpenRA.Mods.RA/Cloak.cs @@ -37,7 +37,7 @@ namespace OpenRA.Mods.RA public object Create(ActorInitializer init) { return new Cloak(init.self, this); } } - public class Cloak : IRenderModifier, INotifyDamage, INotifyAttack, ITick, IVisibilityModifier, IRadarColorModifier + public class Cloak : IRenderModifier, INotifyDamage, INotifyAttack, ITick, IVisibilityModifier, IRadarColorModifier, ISync { [Sync] int remainingTime; diff --git a/OpenRA.Mods.RA/Crate.cs b/OpenRA.Mods.RA/Crate.cs index 69a327943f..2098e5d4cd 100644 --- a/OpenRA.Mods.RA/Crate.cs +++ b/OpenRA.Mods.RA/Crate.cs @@ -34,7 +34,7 @@ namespace OpenRA.Mods.RA } // ITeleportable is required for paradrop - class Crate : ITick, IOccupySpace, ITeleportable, ICrushable + class Crate : ITick, IOccupySpace, ITeleportable, ICrushable, ISync { readonly Actor self; [Sync] diff --git a/OpenRA.Mods.RA/GainsExperience.cs b/OpenRA.Mods.RA/GainsExperience.cs index e4dbbb2d7e..d264b4715f 100644 --- a/OpenRA.Mods.RA/GainsExperience.cs +++ b/OpenRA.Mods.RA/GainsExperience.cs @@ -26,7 +26,7 @@ namespace OpenRA.Mods.RA public object Create(ActorInitializer init) { return new GainsExperience(init.self, this); } } - public class GainsExperience : IFirepowerModifier, ISpeedModifier, IDamageModifier, IRenderModifier + public class GainsExperience : IFirepowerModifier, ISpeedModifier, IDamageModifier, IRenderModifier, ISync { readonly Actor self; readonly int[] Levels; diff --git a/OpenRA.Mods.RA/Harvester.cs b/OpenRA.Mods.RA/Harvester.cs index c6fe246b6b..e7e63f39da 100644 --- a/OpenRA.Mods.RA/Harvester.cs +++ b/OpenRA.Mods.RA/Harvester.cs @@ -30,8 +30,8 @@ namespace OpenRA.Mods.RA } public class Harvester : IIssueOrder, IResolveOrder, IPips, - IRenderModifier, IExplodeModifier, IOrderVoice, - ISpeedModifier + IRenderModifier, IExplodeModifier, IOrderVoice, + ISpeedModifier, ISync { Dictionary contents = new Dictionary(); diff --git a/OpenRA.Mods.RA/Husk.cs b/OpenRA.Mods.RA/Husk.cs index c7cfba4e12..b318ec7d00 100644 --- a/OpenRA.Mods.RA/Husk.cs +++ b/OpenRA.Mods.RA/Husk.cs @@ -18,7 +18,7 @@ namespace OpenRA.Mods.RA public object Create( ActorInitializer init ) { return new Husk( init ); } } - class Husk : IOccupySpace, IFacing + class Husk : IOccupySpace, IFacing, ISync { [Sync] int2 location; diff --git a/OpenRA.Mods.RA/IronCurtainable.cs b/OpenRA.Mods.RA/IronCurtainable.cs index a30e2ab8ef..bad12881a6 100644 --- a/OpenRA.Mods.RA/IronCurtainable.cs +++ b/OpenRA.Mods.RA/IronCurtainable.cs @@ -16,7 +16,7 @@ namespace OpenRA.Mods.RA { class IronCurtainableInfo : TraitInfo { } - class IronCurtainable : IDamageModifier, ITick + class IronCurtainable : IDamageModifier, ITick, ISync { [Sync] int RemainingTicks = 0; diff --git a/OpenRA.Mods.RA/LimitedAmmo.cs b/OpenRA.Mods.RA/LimitedAmmo.cs index 4ce834522e..4409703c49 100644 --- a/OpenRA.Mods.RA/LimitedAmmo.cs +++ b/OpenRA.Mods.RA/LimitedAmmo.cs @@ -21,7 +21,7 @@ namespace OpenRA.Mods.RA public object Create(ActorInitializer init) { return new LimitedAmmo(this); } } - public class LimitedAmmo : INotifyAttack, IPips + public class LimitedAmmo : INotifyAttack, IPips, ISync { [Sync] int ammo; diff --git a/OpenRA.Mods.RA/Mine.cs b/OpenRA.Mods.RA/Mine.cs index bd97f48a89..524f800422 100644 --- a/OpenRA.Mods.RA/Mine.cs +++ b/OpenRA.Mods.RA/Mine.cs @@ -24,7 +24,7 @@ namespace OpenRA.Mods.RA public object Create(ActorInitializer init) { return new Mine(init, this); } } - class Mine : ICrushable, IOccupySpace + class Mine : ICrushable, IOccupySpace, ISync { readonly Actor self; readonly MineInfo info; diff --git a/OpenRA.Mods.RA/Minelayer.cs b/OpenRA.Mods.RA/Minelayer.cs index e44e8b66dd..0fcb0137e9 100644 --- a/OpenRA.Mods.RA/Minelayer.cs +++ b/OpenRA.Mods.RA/Minelayer.cs @@ -27,7 +27,7 @@ namespace OpenRA.Mods.RA public readonly string[] RearmBuildings = { "fix" }; } - class Minelayer : IIssueOrder, IResolveOrder, IPostRenderSelection + class Minelayer : IIssueOrder, IResolveOrder, IPostRenderSelection, ISync { /* [Sync] when sync can cope with arrays! */ public int2[] minefield = null; diff --git a/OpenRA.Mods.RA/Move/Mobile.cs b/OpenRA.Mods.RA/Move/Mobile.cs index d84fedd9be..2dd0c2d35f 100755 --- a/OpenRA.Mods.RA/Move/Mobile.cs +++ b/OpenRA.Mods.RA/Move/Mobile.cs @@ -101,7 +101,7 @@ namespace OpenRA.Mods.RA.Move } } - public class Mobile : IIssueOrder, IResolveOrder, IOrderVoice, IOccupySpace, IMove, IFacing, INudge + public class Mobile : IIssueOrder, IResolveOrder, IOrderVoice, IOccupySpace, IMove, IFacing, INudge, ISync { public readonly Actor self; public readonly MobileInfo Info; diff --git a/OpenRA.Mods.RA/OreRefinery.cs b/OpenRA.Mods.RA/OreRefinery.cs index 0598b7df6c..85d2d083c7 100644 --- a/OpenRA.Mods.RA/OreRefinery.cs +++ b/OpenRA.Mods.RA/OreRefinery.cs @@ -34,7 +34,7 @@ namespace OpenRA.Mods.RA public virtual object Create(ActorInitializer init) { return new OreRefinery(init.self, this); } } - public class OreRefinery : ITick, IAcceptOre, INotifyDamage, INotifySold, INotifyCapture, IPips, IExplodeModifier + public class OreRefinery : ITick, IAcceptOre, INotifyDamage, INotifySold, INotifyCapture, IPips, IExplodeModifier, ISync { readonly Actor self; readonly OreRefineryInfo Info; diff --git a/OpenRA.Mods.RA/Player/ClassicProductionQueue.cs b/OpenRA.Mods.RA/Player/ClassicProductionQueue.cs index f0ea537858..aa1b7a130a 100755 --- a/OpenRA.Mods.RA/Player/ClassicProductionQueue.cs +++ b/OpenRA.Mods.RA/Player/ClassicProductionQueue.cs @@ -18,9 +18,9 @@ namespace OpenRA.Mods.RA public class ClassicProductionQueueInfo : ProductionQueueInfo, ITraitPrerequisite, ITraitPrerequisite, ITraitPrerequisite { public override object Create(ActorInitializer init) { return new ClassicProductionQueue(init.self, this); } - } - - public class ClassicProductionQueue : ProductionQueue + } + + public class ClassicProductionQueue : ProductionQueue, ISync { public ClassicProductionQueue( Actor self, ClassicProductionQueueInfo info ) : base(self, self, info as ProductionQueueInfo) {} diff --git a/OpenRA.Mods.RA/ProximityCapturable.cs b/OpenRA.Mods.RA/ProximityCapturable.cs index e69a8db810..7b7fd37c51 100644 --- a/OpenRA.Mods.RA/ProximityCapturable.cs +++ b/OpenRA.Mods.RA/ProximityCapturable.cs @@ -13,7 +13,7 @@ namespace OpenRA.Mods.RA public object Create(ActorInitializer init) { return new ProximityCapturable(init.self, this); } } - public class ProximityCapturable : ITick + public class ProximityCapturable : ITick, ISync { [Sync] public Player Owner { get { return Captured ? Self.Owner : OriginalOwner; } } diff --git a/OpenRA.Mods.RA/RallyPoint.cs b/OpenRA.Mods.RA/RallyPoint.cs index 553d7df2f4..d77e44bc55 100755 --- a/OpenRA.Mods.RA/RallyPoint.cs +++ b/OpenRA.Mods.RA/RallyPoint.cs @@ -23,7 +23,7 @@ namespace OpenRA.Mods.RA public object Create(ActorInitializer init) { return new RallyPoint(init.self); } } - public class RallyPoint : IIssueOrder, IResolveOrder + public class RallyPoint : IIssueOrder, IResolveOrder, ISync { [Sync] public int2 rallyPoint; diff --git a/OpenRA.Mods.RA/Render/RenderBuildingWarFactory.cs b/OpenRA.Mods.RA/Render/RenderBuildingWarFactory.cs index c9a6f66247..a3a592d973 100755 --- a/OpenRA.Mods.RA/Render/RenderBuildingWarFactory.cs +++ b/OpenRA.Mods.RA/Render/RenderBuildingWarFactory.cs @@ -37,7 +37,7 @@ namespace OpenRA.Mods.RA.Render } } - class RenderWarFactory : RenderBuilding, INotifyBuildComplete, INotifyDamage, ITick, INotifyProduction, INotifySold + class RenderWarFactory : RenderBuilding, INotifyBuildComplete, INotifyDamage, ITick, INotifyProduction, INotifySold, ISync { public Animation roof; [Sync] diff --git a/OpenRA.Mods.RA/SelfHealing.cs b/OpenRA.Mods.RA/SelfHealing.cs index 9a32734b6f..15c3ad803b 100644 --- a/OpenRA.Mods.RA/SelfHealing.cs +++ b/OpenRA.Mods.RA/SelfHealing.cs @@ -19,7 +19,7 @@ namespace OpenRA.Mods.RA public readonly float HealIfBelow = .5f; } - class SelfHealing : ITick + class SelfHealing : ITick, ISync { [Sync] int ticks; diff --git a/OpenRA.Mods.RA/StoresOre.cs b/OpenRA.Mods.RA/StoresOre.cs index df5e433624..5abca6404c 100644 --- a/OpenRA.Mods.RA/StoresOre.cs +++ b/OpenRA.Mods.RA/StoresOre.cs @@ -21,7 +21,7 @@ namespace OpenRA.Mods.RA public object Create(ActorInitializer init) { return new StoresOre(init.self, this); } } - class StoresOre : IPips, INotifyCapture, INotifyDamage, IExplodeModifier, IStoreOre + class StoresOre : IPips, INotifyCapture, INotifyDamage, IExplodeModifier, IStoreOre, ISync { readonly StoresOreInfo Info; diff --git a/OpenRA.Mods.RA/Strategic/StrategicPoint.cs b/OpenRA.Mods.RA/Strategic/StrategicPoint.cs index d798664b66..37b4a47acb 100644 --- a/OpenRA.Mods.RA/Strategic/StrategicPoint.cs +++ b/OpenRA.Mods.RA/Strategic/StrategicPoint.cs @@ -13,7 +13,7 @@ namespace OpenRA.Mods.RA public object Create(ActorInitializer init) { return new StrategicPoint(init.self, this); } } - public class StrategicPoint : INotifyCapture, ITick + public class StrategicPoint : INotifyCapture, ITick, ISync { [Sync] public Actor Self; [Sync] public bool Critical; diff --git a/OpenRA.Mods.RA/Strategic/StrategicVictoryConditions.cs b/OpenRA.Mods.RA/Strategic/StrategicVictoryConditions.cs index 783f2c1fe3..8cf3e54c41 100644 --- a/OpenRA.Mods.RA/Strategic/StrategicVictoryConditions.cs +++ b/OpenRA.Mods.RA/Strategic/StrategicVictoryConditions.cs @@ -28,7 +28,7 @@ namespace OpenRA.Mods.RA public object Create(ActorInitializer init) { return new StrategicVictoryConditions(init.self, this); } } - public class StrategicVictoryConditions : ITick + public class StrategicVictoryConditions : ITick, ISync { [Sync] public Actor Self; public StrategicVictoryConditionsInfo Info; diff --git a/OpenRA.Mods.RA/SupportPowers/GpsPower.cs b/OpenRA.Mods.RA/SupportPowers/GpsPower.cs index 9c99e1cb09..6cbbe15f07 100755 --- a/OpenRA.Mods.RA/SupportPowers/GpsPower.cs +++ b/OpenRA.Mods.RA/SupportPowers/GpsPower.cs @@ -22,7 +22,7 @@ namespace OpenRA.Mods.RA public override object Create(ActorInitializer init) { return new GpsPower(init.self, this); } } - class GpsPower : SupportPower, INotifyDamage + class GpsPower : SupportPower, INotifyDamage, ISync { public GpsPower(Actor self, GpsPowerInfo info) : base(self, info) { } diff --git a/OpenRA.Mods.RA/TakeCover.cs b/OpenRA.Mods.RA/TakeCover.cs index 899d8554ee..44e4e78725 100644 --- a/OpenRA.Mods.RA/TakeCover.cs +++ b/OpenRA.Mods.RA/TakeCover.cs @@ -17,7 +17,7 @@ namespace OpenRA.Mods.RA class TakeCoverInfo : TraitInfo, ITraitPrerequisite { } // infantry prone behavior - class TakeCover : ITick, INotifyDamage, IDamageModifier, ISpeedModifier + class TakeCover : ITick, INotifyDamage, IDamageModifier, ISpeedModifier, ISync { const int defaultProneTime = 100; /* ticks, =4s */ const float proneDamage = .5f; diff --git a/OpenRA.Mods.RA/Turreted.cs b/OpenRA.Mods.RA/Turreted.cs index 1b5a698ca2..4d844a890e 100755 --- a/OpenRA.Mods.RA/Turreted.cs +++ b/OpenRA.Mods.RA/Turreted.cs @@ -20,7 +20,7 @@ namespace OpenRA.Mods.RA public object Create(ActorInitializer init) { return new Turreted(init, this); } } - public class Turreted : ITick + public class Turreted : ITick, ISync { [Sync] public int turretFacing = 0; diff --git a/OpenRA.Mods.RA/UnitStances/UnitStance.cs b/OpenRA.Mods.RA/UnitStances/UnitStance.cs index a37342a078..35a0497692 100644 --- a/OpenRA.Mods.RA/UnitStances/UnitStance.cs +++ b/OpenRA.Mods.RA/UnitStances/UnitStance.cs @@ -23,7 +23,7 @@ namespace OpenRA.Mods.RA #endregion } - public abstract class UnitStance : ITick, IResolveOrder, ISelectionColorModifier, IPostRenderSelection + public abstract class UnitStance : ITick, IResolveOrder, ISelectionColorModifier, IPostRenderSelection, ISync { [Sync] public int NextScanTime; diff --git a/OpenRA.Mods.RA/UnitStances/UnitStanceDefensive.cs b/OpenRA.Mods.RA/UnitStances/UnitStanceDefensive.cs index 6337c69796..af82f306ae 100644 --- a/OpenRA.Mods.RA/UnitStances/UnitStanceDefensive.cs +++ b/OpenRA.Mods.RA/UnitStances/UnitStanceDefensive.cs @@ -16,7 +16,7 @@ namespace OpenRA.Mods.RA /// /// Will fire only when fired upon /// - public class UnitStanceDefensive : UnitStance, INotifyDamage + public class UnitStanceDefensive : UnitStance, INotifyDamage, ISync { public enum ETargetType {