Кровавый камень - вечное топливо скакуна и оссуария; сферы чинятся пакетом крови

- Камень в любой ячейке скакуна - вечно полный бак, сферы рядом не тратятся.
- Камень в отсеке топлива гео-оссуария - работает вечно (FuelTypes + removeFuel).
- Кровавая сфера чинится пакетом крови: 250 прочности за пакет (2 пакета - полная).
- Описания сферы, камня, оссуария и скакуна дополнены (13 языков); в описании
  скакуна по-корейски и по-китайски название сферы приведено к принятому в моде.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
AlexCube
2026-10-01 12:10:41 +03:00
co-authored by Claude Opus 5.5
parent a6e3f12eb4
commit d35b77be1b
8 changed files with 85 additions and 33 deletions
+41 -28
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -202,7 +202,7 @@
<property name="LootLabelKey" value="xuiNecroGeoOssuary" />
<property name="ItemIconBackdrop" value="ui_game_symbol_mining" />
<property name="ItemBackgroundColor" value="140,20,20,255" />
<property name="FuelTypes" value="{blood,resourceBloodSphere}" />
<property name="FuelTypes" value="{blood,resourceBloodSphere,resourceBloodStone}" /><!-- камень - вечное топливо (GeoOssuaryPatch.removeFuel) -->
<property name="OutputTypes" value="{os1,blood,1,0,1,resourceRockSmall,resourceRockSmall,1,1,6000,10000,collector_complete_item}{os2,blood,1,0,1,resourceRockSmall,resourceRockSmall,1,1,6000,10000,collector_complete_item}{os3,blood,1,0,1,resourceRockSmall,resourceRockSmall,1,1,6000,10000,collector_complete_item}" />
<property name="Outputs" value="os1,os2,os3" />
<property name="OutputGridHeight" value="1" />
+4
View File
@@ -414,6 +414,10 @@
<!-- true: опустевшая сфера должна исчезать, а не лежать "сломанной" в ожидании
ремонта. Само удаление из слота делает SpendCharge - см. SpatialVaultPickupPatch. -->
<property name="DegradationBreaksAfter" value="true"/>
<!-- Ремонт обычным пакетом крови (01.10: «пусть сферы можно будет чинить обычной ванильной
кровью»): пункт «Починить» в инвентаре; сколько чинит пакет - RepairAmount у
medicalBloodBag в items.xml. Пустая сфера исчезает, чинить можно только початую. -->
<property name="RepairTools" value="medicalBloodBag"/>
<effect_group name="resourceBloodSphere" tiered="false">
<passive_effect name="DegradationMax" operation="base_set" value="500"/>
</effect_group>
+7
View File
@@ -1919,4 +1919,11 @@
</effect_group>
</item>
</append>
<!-- Пакет крови чинит Кровавую сферу (RepairTools сферы, 01.10): 250 из 500 прочности за пакет,
два пакета - полная сфера. У ванили пакет ничего не чинит, свойства новые. Кровь некроманта
наследует пакет (Extends) - ей эти свойства ни на что не влияют: её ремонтом не чинят. -->
<append xpath="/items/item[@name='medicalBloodBag']">
<property name="RepairAmount" value="250"/>
<property name="RepairTime" value="2"/>
</append>
</config>
+26 -4
View File
@@ -53,6 +53,23 @@ namespace NecromancerTome
public static bool IsSphere(ItemValue iv) =>
iv != null && !iv.IsEmpty() && iv.ItemClass != null && iv.ItemClass.Name == BoneSteed.FuelItem;
/// <summary>Кровавый камень - неиссякаемая сфера (01.10: «полная замена сферы»): один камень
/// в любой ячейке - вечный полный бак, сферы рядом с ним не тратятся.</summary>
public const string StoneItem = "resourceBloodStone";
public static bool IsStone(ItemValue iv) =>
iv != null && !iv.IsEmpty() && iv.ItemClass != null && iv.ItemClass.Name == StoneItem;
public static bool HasStone(ItemValue item)
{
if (item == null)
return false;
for (int i = 0; i < item.ModificationCount; i++)
if (IsStone(item.GetModification(i)))
return true;
return false;
}
/// <summary>Остаток сферы 0..1.</summary>
static float Left(ItemValue sphere)
{
@@ -67,6 +84,8 @@ namespace NecromancerTome
ItemValue item = v?.itemValue;
if (item == null)
return 0f;
if (HasStone(item))
return MaxFuel;
float fuel = 0f;
for (int i = 0; i < item.ModificationCount; i++)
{
@@ -81,6 +100,8 @@ namespace NecromancerTome
public static float Burn(Vehicle v, float amount)
{
ItemValue item = v.itemValue;
if (HasStone(item))
return MaxFuel;
for (int i = 0; i < item.ModificationCount && amount > 0f; i++)
{
ItemValue m = item.GetModification(i);
@@ -225,7 +246,7 @@ namespace NecromancerTome
}
}
/// <summary>В ячейки скакуна - только кровавые сферы с остатком прочности.</summary>
/// <summary>В ячейки скакуна - только кровавые сферы с остатком прочности и кровавые камни.</summary>
[HarmonyPatch(typeof(XUiC_ItemPartStack), "CanSwap")]
public static class Patch_XUiC_ItemPartStack_CanSwap_BoneSteed
{
@@ -235,9 +256,10 @@ namespace NecromancerTome
if (current == null || !BoneSteedFuel.IsSteedItem(current.itemValue))
return true;
ItemValue here = __instance.ItemValue;
__result = BoneSteedFuel.IsSphere(stack.itemValue) &&
stack.itemValue.UseTimes < stack.itemValue.MaxUseTimes &&
(here == null || here.IsEmpty() || BoneSteedFuel.IsSphere(here));
ItemValue add = stack.itemValue;
bool blood = BoneSteedFuel.IsStone(add) ||
BoneSteedFuel.IsSphere(add) && add.UseTimes < add.MaxUseTimes;
__result = blood && (here == null || here.IsEmpty() || BoneSteedFuel.IsSphere(here) || BoneSteedFuel.IsStone(here));
return false;
}
}
+6
View File
@@ -208,6 +208,12 @@ namespace NecromancerTome
if (!GeoOssuary.Is(__instance))
return true;
ItemStack[] fuel = __instance.FuelSlots;
// Кровавый камень в отсеке - вечное топливо (01.10: «полная замена сферы»): не тратится
// ни он, ни сферы рядом.
for (int i = 0; i < fuel.Length; i++)
if (fuel[i] != null && !fuel[i].IsEmpty() && fuel[i].itemValue.ItemClass != null &&
fuel[i].itemValue.ItemClass.Name == BoneSteedFuel.StoneItem)
return false;
for (int i = 0; i < fuel.Length; i++)
{
ItemStack stack = fuel[i];
Binary file not shown.
Binary file not shown.