Skip to main content

ForestResetPatches.DeleteOldCaches

A static class in TavernLib, TavernLib.Patches.

Postfixes ForestGenerator's explicit Load method to delete forest and river cache files named after any other seed, left over from a reset. Server.

Methods​

MemberWhat it is
static void Postfix(ForestGenerator __instance, ForestGeneratorSaveData data)Deletes the forest's cache files whose seed isn't the loaded one. Logs a warning if that fails.
static MethodBase TargetMethod()Finds ForestGenerator's explicit Load method that takes ForestGeneratorSaveData.