Mercurial > repos > IBDev-IBBoard.WarFoundry.API
diff API/WarFoundryCore.cs @ 463:cbeee87dc2d3
Re #58: Remove LogNotifier from API
* Remove LogNotifier from API - mostly unnecessary logging
Also:
* Formatting auto-corrected
* LoadFile() "try...catch {silently dispose}" removed. Code shouldn't be throwing those errors and needs to be handled elsewhere if it does
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 17 Mar 2012 20:02:32 +0000 |
parents | c32bb2a53b87 |
children |
line wrap: on
line diff
--- a/API/WarFoundryCore.cs Tue Mar 06 20:31:31 2012 +0000 +++ b/API/WarFoundryCore.cs Sat Mar 17 20:02:32 2012 +0000 @@ -1,9 +1,7 @@ // This file (WarFoundryCore.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2007, 2008, 2009 IBBoard. // // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. - using System; -using IBBoard.Logging; using IBBoard.WarFoundry.API.Objects; namespace IBBoard.WarFoundry.API @@ -16,6 +14,7 @@ } public static readonly int INFINITY = -1; + public static event GameSystemChangedDelegate GameSystemChanged; public static event ArmyChangedDelegate ArmyChanged; @@ -27,21 +26,12 @@ get { return system; } set { - if (system==null || !system.Equals(value)) + if (system == null || !system.Equals(value)) { GameSystem oldSystem = system; system = value; - - if (system==null) - { - LogNotifier.Debug(typeof(WarFoundryCore), "Game system set to null"); - } - else - { - LogNotifier.DebugFormat(typeof(WarFoundryCore), "Game system set to {0} with ID {1}", system.Name, system.ID); - } - if (GameSystemChanged!=null) + if (GameSystemChanged != null) { GameSystemChanged(oldSystem, system); } @@ -57,7 +47,7 @@ get { return currentArmy; } set { - if (currentArmy==null || !currentArmy.Equals(value)) + if (currentArmy == null || !currentArmy.Equals(value)) { Army oldArmy = currentArmy; @@ -71,7 +61,7 @@ currentArmy = null; } - if (ArmyChanged!=null) + if (ArmyChanged != null) { ArmyChanged(oldArmy, currentArmy); }