Skip to content

[Visual Bug]: Traveling Merchant Indicator does not make sure to tell the truth #469

@agilbert1412

Description

@agilbert1412

Mod Version

v2.3.1

Multiplayer

Single Player

Visual Settings

UI Scale: 100%, Zoom: 100%

SMAPI Log

No response

Description

Issue

The Traveling merchant indicator appears to be hard coded to fridays and sundays, instead of checking dynamically if the traveling merchant actually is there for the current day.

This is an issue because mods that change the merchant days end up being minorly-incompatible with UIIS2, because the tracking is accidentally lying about the days.

How to fix?

in Forest.cs, the following method exists

public bool ShouldTravelingMerchantVisitToday()

In this mod, in ShowTravelingMerchant.cs, simply calling this method would fix the problem, as mods that change the days would presumably patch the aforementioned method.

  private void UpdateTravelingMerchant()
  {
    int dayOfWeek = Game1.dayOfMonth % 7;
    _travelingMerchantIsHere = ((Forest)(Game1.getLocationFromName("Forest")).ShouldTravelingMerchantVisitToday();

    _travelingMerchantIsVisited = false;
  }

Metadata

Metadata

Assignees

Labels

bug (visual)A visual element isn't being displayed properly.triage

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions