OSDN Git Service

VS 1.17 Hot-Fix, minor tweaks
authormelchior <melchior@users.osdn.me>
Sat, 10 Sep 2022 21:19:22 +0000 (17:19 -0400)
committermelchior <melchior@users.osdn.me>
Sat, 10 Sep 2022 21:19:22 +0000 (17:19 -0400)
Automap/AutomapMod.cs
Automap/Data/CommandData.cs
Automap/Data/StatusData.cs
Automap/modinfo.json

index 7b24649..8538f0b 100644 (file)
@@ -35,7 +35,6 @@ namespace Automap
                                ClientAPI.Logger.VerboseDebug("Automap Present!");
                                PrepareClientsideConfig( );
                                _localAutomap = new AutomapSystem(this.ClientAPI, this.Logger,  this.CachedConfiguration);
-                               _automapDialog = new AutomapGUIDialog(ClientAPI, _localAutomap, this.CachedConfiguration);
 
                                ClientAPI.Input.RegisterHotKey(AutomapGUIDialog._automapControlPanelKey, "Automap control panel", GlKeys.M, HotkeyType.GUIOrOtherControls, shiftPressed: true);
                                ClientAPI.Input.SetHotKeyHandler(AutomapGUIDialog._automapControlPanelKey, ToggleAM_Dialog);
@@ -53,6 +52,7 @@ namespace Automap
 
                private bool ToggleAM_Dialog(KeyCombination comb)
                {
+                       _automapDialog = _automapDialog  ?? new AutomapGUIDialog(ClientAPI, _localAutomap, this.CachedConfiguration);
                        if (_automapDialog.IsOpened()) _automapDialog.TryClose();
                        else _automapDialog.TryOpen();
 
@@ -84,6 +84,16 @@ namespace Automap
                this.CachedConfiguration = config;
                }
 
+               public override void Dispose( )
+               {
+               //TAKE OUT THE TRASH!
+               //_localAutomap = null;
+               _automapDialog.Dispose( );
+               _automapDialog = null;
+
+               base.Dispose( );
+               }
+
                internal void PersistParameterChange( )
                {
                //Store altered parameters
index 7f14a30..0535efc 100644 (file)
@@ -81,6 +81,13 @@ namespace Automap
 
                        return false;
                }
+
+               public IAttribute Clone( )
+               {
+               var cloneCmd = new CommandData(this.State);
+               cloneCmd.Notation = this.Notation;
+               return cloneCmd;
+               }
        }
 }
 
index 761bc86..a653174 100644 (file)
@@ -55,6 +55,12 @@ namespace Automap {
                        }
                        return false;
                }
+
+               public IAttribute Clone( )
+               {
+               var statusData = new StatusData(this.TotalUpdates, this.VoidChunks,this.Delta, this.CurrentState);
+               return statusData;
+               }
        }
 }
 
index 22f4de3..bcc745e 100644 (file)
@@ -4,10 +4,10 @@
   "description" : "Automap; Generates a static HTML5 map dynamically, with P.O.I. Tracking & more.",
   "authors": ["Melchior","VeryGoodDog"],
   "contributors":["VeryGoodDog", "Drakker"],
-  "version": "0.1.8-pre.1",
+  "version": "0.1.8-pre.2",
     "side":"Client",
   "dependencies": { 
-       "game": "1.16.5"        
+       "game": "1.17.0"        
   },
   "website": "http://automap.osdn.io/"
 }
\ No newline at end of file