@@ -90,6 +90,8 @@ private void PostInitialize(EventArgs args)
9090 {
9191 // these below require that the world be loaded
9292
93+ TShock . Log . Info ( "<map> INFO: math" ) ;
94+
9395 //UInt32Defs and ColorDefs for colors, and background fade in Terrafirma Color Scheme
9496 InitializeMapperDefs ( ) ;
9597 InitializeMapperDefs2 ( ) ;
@@ -101,14 +103,23 @@ private void PostInitialize(EventArgs args)
101103 if ( AutosaveEnabled )
102104 autosavetimer = new Timer ( s => { Autosave ( ) ; } , null , AutosaveInterval * 60000 , Timeout . Infinite ) ;
103105
106+ string path = Environment . CurrentDirectory ;
107+ PropertiesFile file = new PropertiesFile ( path + Path . DirectorySeparatorChar + "map.debug" ) ;
108+ file . Load ( ) ;
109+ var dummy = file . getValue ( "post-init" , true ) ;
110+ file . Save ( ) ;
111+
104112 instance = this ;
105113 initialized = true ;
106114 }
107115
108116 public override void Initialize ( )
109117 {
110118 ServerApi . Hooks . GamePostInitialize . Register ( this , PostInitialize ) ;
119+ //Console.WriteLine("registering map command");
111120 Commands . ChatCommands . Add ( new Command ( "map.create" , MapCommand , "map" ) ) ;
121+ //Console.WriteLine("/map now available");
122+ TShock . Log . Info ( "<map> INFO: map command will not work" ) ;
112123
113124 string pluginFolder = Environment . CurrentDirectory + Path . DirectorySeparatorChar + "map" ;
114125 CreateDirectory ( pluginFolder ) ;
@@ -164,6 +175,15 @@ public static class Mapper
164175 {
165176 public static System . Drawing . Bitmap Map ( int x1 , int y1 , int x2 , int y2 )
166177 {
178+ //Console.WriteLine("API call - Mapper.Map");
179+ TShock . Log . Info ( "<map> INFO: API call" ) ;
180+
181+ string path = Environment . CurrentDirectory ;
182+ PropertiesFile file = new PropertiesFile ( path + Path . DirectorySeparatorChar + "map.debug" ) ;
183+ file . Load ( ) ;
184+ var dummy = file . getValue ( "api-hit" , true ) ;
185+ file . Save ( ) ;
186+
167187 if ( MapPlugin . initialized && ! MapPlugin . instance . isMapping )
168188 {
169189 TSPlayer console = new TSPlayer ( - 1 ) ;
0 commit comments