From 4e02ee19b4ab9d7d4f9a5d0f228ff61750411cba Mon Sep 17 00:00:00 2001 From: Hipposgrumm <60556345+Hipposgrumm@users.noreply.github.com> Date: Sun, 28 Jul 2024 12:59:04 -0600 Subject: [PATCH] Fix Mutt Textures not immediately Updating (#12) * Math Blaster Mutts will now correctly have their textures changed immediately out of the incubator. --- src/Controllers/Common/ContentController.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Controllers/Common/ContentController.cs b/src/Controllers/Common/ContentController.cs index fd328be..b50138e 100644 --- a/src/Controllers/Common/ContentController.cs +++ b/src/Controllers/Common/ContentController.cs @@ -634,18 +634,19 @@ 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 - 7 => "MonsterAlien01.unity3d/BlasterMythieGreenTex", // MonsterAlien01 + 5 => "EyeClops.unity3d/EyeClopsBrainRedTex", // EyeClops + 6 => "RodeoLizard.unity3d/BlueLizardTex", // RodeoLizard + 7 => "MonsterAlien01.unity3d/BlasterMythieGreenTex", // MonsterAlien01 11 => "SpaceGriffin.unity3d/SpaceGriffinNormalBlueTex", // SpaceGriffin 10 => "Tweeter.unity3d/TweeterMuttNormalPurple", // Tweeter - _ => "null" // Anything with any other ID shouldn't exist. + _ => "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();