Exemplo n.º 1
0
 private void Start()
 {
     BeforeMapGeneration?.Invoke();
     UserLayer.gameObject.SetActive(false);
     Scenes = GetSceneAreas().ToList();
     InitBoundary();
     GetSceneComponents();
     SwitchToEditorMap();
     foreach (var scene in Scenes)
     {
         foreach (var block in scene.Blocks)
         {
             blockInScene.Set(block.Position, scene);
         }
     }
     AfterMapGeneration?.Invoke();
 }
Exemplo n.º 2
0
        public void CallAfterMapGeneration(DeepWoods deepWoods)
        {
            if (AfterMapGeneration == null)
            {
                return;
            }

            foreach (Action <IDeepWoodsLocation> callback in AfterMapGeneration.GetInvocationList())
            {
                try
                {
                    callback(deepWoods);
                }
                catch (Exception e)
                {
                    ModEntry.Log("[THIS IS NOT A BUG IN DEEPWOODS] Exception caught while calling callback from another mod: " + e, StardewModdingAPI.LogLevel.Warn);
                }
            }
        }