Lookup Anything

Lookup Anything

242k Downloads

EditMap breaks Robin's community upgrade warps.

DolphinIsNotaFish opened this issue ยท 1 comments

commented

There's a potential Content Patcher bug related to Robin's community upgrade that give shortcuts all over the maps

Reproduction Steps:

  1. In content.json, use an Includeaction that has a fulfilled When field pointing to another .json file.
  2. The included .json file contains an EditMap action targeting Maps/Forest.

Issue:
After applying the edit to the Forest map, the special warp from the Forest to the Beach stops working.

Addendum:
If the EditMap targets Maps/Beach instead, it seems to break the warp from the Beach to the Forest as well.

Log File
https://smapi.io/log/4ddbaf0ca40542228daca27e3f835191

Example mod reproducing the issue
Robin Community Upgrade Test.zip

Sample save with the shortcuts unlocked
Gregor_367335705.zip

commented

Additional note:

By applying this harmony prefix on Forest.showCommunityUpgradeShortcuts to make Forest.hasShownCCUpgrade always false, the issue described is resolved.

private static void Forest_showCommunityUpgradeShortcuts_Prefix(ref bool ___hasShownCCUpgrade)
{
    ModEntry.Log($"showCommunityUpgradeShortcuts: {___hasShownCCUpgrade}, will set this to false", LogLevel.Info);
    ___hasShownCCUpgrade = false;
}

It's not clear why this is the case, since normally calling Forest.MakeMapModifications(force: true) should achieve the same effect of switching Forest.hasShownCCUpgrade.