コード例 #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[] { });
        }
コード例 #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);
        }