Скакун: без слота покраски (краситель размножался)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
AlexCube
2026-10-01 11:32:01 +03:00
co-authored by Claude Opus 5.5
parent 3cd5706e7f
commit 7b315cda6b
3 changed files with 16 additions and 1 deletions
+16 -1
View File
@@ -202,7 +202,22 @@ namespace NecromancerTome
public static void Finalizer(Vehicle __instance) public static void Finalizer(Vehicle __instance)
{ {
Loading = false; Loading = false;
if (BoneSteed.Is(__instance.entity)) if (!BoneSteed.Is(__instance.entity))
return;
// Слота покраски у скакуна нет (01.10: в нём сам собой появлялся коричневый краситель,
// вынимался и появлялся снова). Ваниль в SetItemValue заводит его заново, если пусто,
// поэтому снимаем каждый раз после неё. Что там лежало - в лог, для поиска источника.
ItemValue iv = __instance.itemValue;
if (iv.CosmeticModCount > 0)
{
for (int i = 0; i < iv.CosmeticModCount; i++)
{
ItemValue c = iv.GetCosmeticMod(i);
if (c != null && !c.IsEmpty())
Debug.Log("[NecromancerTome] BoneSteed: в слоте покраски было '" + c.ItemClass?.Name + "' - снято");
}
iv.ResizeCosmeticMods(0);
}
Debug.Log("[NecromancerTome] BoneSteed: ячеек " + __instance.itemValue.ModificationCount + Debug.Log("[NecromancerTome] BoneSteed: ячеек " + __instance.itemValue.ModificationCount +
", топливо " + BoneSteedFuel.FuelOf(__instance).ToString("0.#") + "/" + BoneSteedFuel.MaxFuel + ", топливо " + BoneSteedFuel.FuelOf(__instance).ToString("0.#") + "/" + BoneSteedFuel.MaxFuel +
", здоровье " + __instance.entity.Health + "/" + __instance.GetMaxHealth() + ", здоровье " + __instance.entity.Health + "/" + __instance.GetMaxHealth() +
Binary file not shown.
Binary file not shown.