Fix Mutt Textures not immediately Updating (#12)

* Math Blaster Mutts will now correctly have their textures changed immediately out of the incubator.
This commit is contained in:
Hipposgrumm 2024-07-28 12:59:04 -06:00 committed by Robert Paciorek
parent 8336e16fec
commit 4e02ee19b4

View File

@ -634,7 +634,8 @@ public class ContentController : Controller {
return Ok(false);
}
if (petData.Texture != null && petData.Texture.StartsWith("RS_SHARED/Larva.unity3d/LarvaTex") && petData.GrowthState.GrowthStateID>4) {
petData = UpdateDragon(dragon, petData);
if (petData.Texture != null && petData.Texture.StartsWith("RS_SHARED/Larva.unity3d/LarvaTex") && petData.GrowthState.GrowthStateID > 4) {
petData.Texture = "RS_SHARED/" + petData.PetTypeID switch {
5 => "EyeClops.unity3d/EyeClopsBrainRedTex", // EyeClops
6 => "RodeoLizard.unity3d/BlueLizardTex", // RodeoLizard
@ -644,8 +645,8 @@ public class ContentController : Controller {
_ => "null" // Anything with any other ID shouldn't exist.
};
}
dragon.RaisedPetData = XmlUtil.SerializeXml(petData);
dragon.RaisedPetData = XmlUtil.SerializeXml(UpdateDragon(dragon, petData));
ctx.Update(dragon);
ctx.SaveChanges();