SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

Temporary spritesheets aren't intercepted by content API

tstaples opened this issue ยท 2 comments

commented

The Characters\Farmer\farmer_base.png asset isn't being intercepted by the content API. I both logged everything passed to my mod's CanEdit as well as everything passed to LoadImpl in SMAPI itself and that asset was never found.

commented

@tstaples That's because the player has a separate content manager constructed via CreateTemporary(), which SMAPI can't currently intercept:

public Farmer()
{
    this.farmerTextureManager = Game1.content.CreateTemporary();
    this.farmerRenderer = new FarmerRenderer(this.farmerTextureManager.Load<Texture2D>("Characters\\Farmer\\farmer_" + (this.isMale ? "" : "girl_") + "base"));
    // [...]
}

That's something I'm hoping to address with Chucklefish during the SDV 1.3 alpha, so I'll put this ticket in the backlog for now.

commented

Fixed in the upcoming SMAPI 2.6 for Stardew Valley 1.3.