From 6307e51991cc7b0ed6291a6e31f4313a31213a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Thu, 21 Mar 2013 19:04:30 +0100 Subject: [PATCH] put NextAutoTargetScanTime into syncreport.log --- OpenRA.Mods.RA/AutoTarget.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/AutoTarget.cs b/OpenRA.Mods.RA/AutoTarget.cs index 552473e420..0d5fd4aada 100644 --- a/OpenRA.Mods.RA/AutoTarget.cs +++ b/OpenRA.Mods.RA/AutoTarget.cs @@ -33,7 +33,7 @@ namespace OpenRA.Mods.RA readonly AutoTargetInfo Info; readonly AttackBase attack; - [Sync] int nextScanTime = 0; + [Sync] public int nextScanTime = 0; public UnitStance stance; [Sync] public int stanceNumber { get { return (int)stance; } } public UnitStance predictedStance; /* NOT SYNCED: do not refer to this anywhere other than UI code */ @@ -149,4 +149,16 @@ namespace OpenRA.Mods.RA public DebugRetiliateAgainstAggressor(Actor self){ a = self.Trait(); } [Sync] public int Aggressor { get { return a.AggressorID; } } } + + public class DebugNextAutoTargetScanTimeInfo : ITraitInfo, Requires + { + public object Create(ActorInitializer init) { return new DebugNextAutoTargetScanTime(init.self); } + } + + public class DebugNextAutoTargetScanTime : ISync + { + readonly AutoTarget a; + public DebugNextAutoTargetScanTime(Actor self){ a = self.Trait(); } + [Sync] public int NextAutoTargetScanTime { get { return a.nextScanTime; } } + } }