Exemplo n.º 1
0
        private static void ActuallyDeleteSave(SGLoadSavedGameScreen screen, SlotModel slot)
        {
            try
            {
                screen.saveStructure.Delete(slot);
            }
            catch (Exception ex)
            {
                Debug.LogError($"Exception caught: {ex.Message}");
            }

            ReflectionHelper.InvokePrivateMethode(screen, "BringToFront", new object[] { }, new Type[] { });
        }
Exemplo n.º 2
0
        static bool Prefix(
            ref SlotModel slot,
            SGLoadSavedGameScreen __instance)
        {
            SlotModel mostRecentSave = __instance.saveStructure.MostRecentCampaignSave;

            // normal behavior for the most recent save.
            if (slot == mostRecentSave)
            {
                return(true);
            }

            ActuallyDeleteSave(__instance, slot);
            return(false);
        }