Beispiel #1
0
 public override void OnLoad(SimAirport.Modding.Data.GameState state)
 {
     if (Game.isLoaded)
     {
         server = new TBFlash_Server();
         server.Start();
     }
 }
Beispiel #2
0
        public override void OnLoad(SimAirport.Modding.Data.GameState state)
        {
            if (Game.isLoaded)
            {
                foreach (SmartObject smo in Game.current.objectCache.smartObjects.FindAll(IsBaseClass))
                {
                    Game.Logger.Write(Log.FromPool("\n\n----------BASE CLASS----------"));
                    PrintData(smo);
                    Game.Logger.Write(Log.FromPool("----------END BASE CLASS----------\n\n"));
                }

                foreach (SmartObject smo in Game.current.objectCache.smartObjects.FindAll(IsModClass))
                {
                    Game.Logger.Write(Log.FromPool("\n\n----------MOD CLASS----------"));
                    PrintData(smo);
                    Game.Logger.Write(Log.FromPool("----------END MOD CLASS----------\n\n"));
                }

                /*foreach (KeyValuePair<string, ModDetails> mod in ModLoader.LoadedMods)
                 * {
                 *  Game.Logger.Write(Log.FromPool($"Mod Key----\n{mod.Key}\n----"));
                 * }
                 */
                Game.Logger.Write(Log.FromPool("\n---------GameSerializer.AllSubtypes---------"));
                foreach (Type type in GameSerializer.AllSubtypes(typeof(IJsonSaveable)))
                {
                    Game.Logger.Write(Log.FromPool($"Type: {type}"));
                }
                Game.Logger.Write(Log.FromPool("---------END GameSerializer.AllSubtypes---------\n"));

                /*  Game.Logger.Write(Log.FromPool("\n---------Assembly.GetExportedTypes---------"));
                 * foreach (Type type in typeof(IJsonSaveable).Assembly.GetExportedTypes())
                 * {
                 *  Game.Logger.Write(Log.FromPool($"Exported Type: {type}"));
                 * }
                 * Game.Logger.Write(Log.FromPool("---------END Assembly.GetExportedTypes---------\n"));
                 */
                //               Assembly assem = Assembly.GetAssembly(typeof(IJsonSaveable));
            }
        }