예제 #1
0
        public override void Entry(IModHelper helper)
        {
            instance    = this;
            Log.Monitor = Monitor;

            Helper.Events.GameLoop.UpdateTicked += UpdateAnimations;
            Helper.Events.GameLoop.SaveCreated  += (s, e) => findTargetsCounter = 1;
            Helper.Events.GameLoop.SaveLoaded   += (s, e) => findTargetsCounter = 1;
            Helper.Events.GameLoop.DayStarted   += (s, e) => findTargetsCounter = 1;

            helper.Content.AssetEditors.Add(watcher = new WatchForUpdatesAssetEditor());
        }
예제 #2
0
        public override void Entry(IModHelper helper)
        {
            instance    = this;
            Log.Monitor = Monitor;

            Helper.Events.GameLoop.UpdateTicked += UpdateAnimations;

            Action updateTargets = () =>
            {
                foreach (var screen in screenState.GetActiveValues())
                {
                    screen.Value.findTargetsCounter = 1;
                }
            };

            Helper.Events.GameLoop.SaveCreated += (s, e) => updateTargets();
            Helper.Events.GameLoop.SaveLoaded  += (s, e) => updateTargets();
            Helper.Events.GameLoop.DayStarted  += (s, e) => updateTargets();

            helper.Content.AssetEditors.Add(watcher = new WatchForUpdatesAssetEditor());

            helper.ConsoleCommands.Add("cpa", "...", OnCommand);
        }