Beispiel #1
0
 private static void PlacedObject_FromString(On.PlacedObject.orig_FromString orig, PlacedObject self, string[] s)
 {
     try
     {
         orig(self, s);
     }
     catch (Exception e)
     {
         CustomWorldMod.Log("Error loading placed objects " + e, true);
     }
 }
Beispiel #2
0
        private static void PlacedObject_FromString(On.PlacedObject.orig_FromString orig, PlacedObject self, string[] s)
        {
            try
            {
                orig(self, s);
            }
            catch (Exception e)
            {
                CustomWorldMod.Log($"Error loading placed objects {e}", true);
                Debug.LogError("[CustomRegions] " + e);
                CustomWorldMod.crashPlacedObjects = true;
            }

            /*
             * // Log error
             * Menu.PauseMenu pause = (CustomWorldMod.rainWorldInstance.processManager.currentMainLoop as RainWorldGame).pauseMenu;
             * string textError = "Error while loading placedObjects, you might be missing .dll dependencies";
             * Menu.MenuLabel errorLabel = new Menu.MenuLabel(pause, pause.pages[0], textError, new Vector2(50f, (CustomWorldMod.rainWorldInstance.options.ScreenSize.y - 20f)), default(Vector2), true);
             * errorLabel.label.color = Color.red;
             * pause.pages[0].subObjects.Add(errorLabel);
             */
        }