SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

No ObjectsChanged event fired in mines

yuri-moens opened this issue ยท 1 comments

commented

Describe the bug
When subscribing to the LocationEvents.ObjectsChanged events, no such event is being fired when adding/removing objects inside the mines. I had a look through the code and I believe it is because of this line in WatcherCore:

this.LocationsWatcher = new WorldLocationsTracker((ObservableCollection<GameLocation>)Game1.locations);

Game1.locations does not seem to contain the mineshaft locations, only the static location with the cart and dwarf.

To Reproduce

  1. Subscribe to LocationEvents.ObjectsChanged events
  2. Go to the mines, enter any level and add any object or destroy a rock.
  3. No event gets fired.
commented

Fixed in develop for the upcoming SMAPI 2.9. Thanks for reporting it!