示例#1
0
        public override void Entry(IModHelper helper)
        {
            oHelper  = helper;
            oManager = new BubbleGuyManager(Path.Combine(helper.DirectoryPath, "saves"), Path.Combine(helper.DirectoryPath, "sprites"), helper, Monitor);
            BubbleChat.Initialize(oManager);
            helper.Events.GameLoop.SaveLoaded += GameLoop_SaveLoaded;

            Harmony harmony = new Harmony(ModManifest.UniqueID);

            harmony.Patch(
                original: AccessTools.Method(typeof(ChatBox), "runCommand", new Type[] { typeof(string) }),
                prefix: new HarmonyMethod(typeof(BubbleChat), nameof(BubbleChat.RunCommand))
                );

            Monitor.Log($"Harmony patch applied", LogLevel.Info);
        }
示例#2
0
 public override void Entry(IModHelper helper)
 {
     //
     //  check for Stardew Web, if installed
     //  do not load this mod
     //
     if (helper.ModRegistry.IsLoaded("prism99.stardewweb"))
     {
         Monitor.Log("Stardew Web is installed, this mod is not needed an will not be loaded.", LogLevel.Info);
     }
     else
     {
         SMAPIHelpers.Initialize(helper, Monitor);
         oManager = new BubbleGuyManager(Path.Combine(helper.DirectoryPath, "saves"), Path.Combine(helper.DirectoryPath, "Sprites"), helper, Monitor, true);
         oManager.StartBubbleChat(ModManifest.UniqueID);
         helper.Events.GameLoop.SaveLoaded += GameLoop_SaveLoaded;
     }
 }
示例#3
0
 public override void Entry(IModHelper helper)
 {
     //
     //  check for Stardew Web, if installed
     //  do not load this mod
     //
     if (helper.ModRegistry.IsLoaded("prism99.stardewweb"))
     {
         Monitor.Log("Stardew Web is installed, this mod is not needed an will not be loaded.", LogLevel.Info);
     }
     else
     {
         SDV_Logger.Init(Monitor, helper.DirectoryPath, true);
         StardewThreadSafeLoader.Initialize(helper);
         SMAPIHelpers.Initialize(helper);
         BubbleGuyStatics.Initialize(helper.DirectoryPath);
         Monitor.Log($"Asset directory: {BubbleGuyStatics.AssetsPath}", LogLevel.Info);
         oManager = new BubbleGuyManager(BubbleGuyStatics.SavesPath, BubbleGuyStatics.AssetsPath, helper, Monitor, true);
         oManager.StartBubbleChat(ModManifest.UniqueID);
     }
 }
示例#4
0
 public BubbleGuyAPI(BubbleGuyManager manager)
 {
     oManager = manager;
 }