Нож: хват для нитей - пункт в прежнем меню ножа (человек/змея/чертоги вернулись); хват стриппера убран - держится как обычный нож
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0290a73477
commit
f5be0e7f43
+31
-1
@@ -356,8 +356,22 @@ namespace NecromancerTome
|
||||
}
|
||||
}
|
||||
|
||||
public const int GripThreadIdx = 3;
|
||||
|
||||
public static void OnRadialCommand(XUiC_Radial _sender, int _commandIndex, XUiC_Radial.RadialContextAbs _context)
|
||||
{
|
||||
EntityPlayerLocal pl = _sender.xui.playerUI.entityPlayer;
|
||||
// Хват ножа (16.10, нити цинерария): 3 - хват для нитей; 0 у ножа-для-нитей - обычный хват.
|
||||
if (_commandIndex == GripThreadIdx)
|
||||
{
|
||||
CinerariumThreads.Convert(pl, CinerariumThreads.ThreadKnifeName);
|
||||
return;
|
||||
}
|
||||
if (_commandIndex == 0 && CinerariumThreads.IsThreadKnife(pl?.inventory?.holdingItem))
|
||||
{
|
||||
CinerariumThreads.Convert(pl, CinerariumThreads.KnifeName);
|
||||
return;
|
||||
}
|
||||
if (_commandIndex == 1)
|
||||
{
|
||||
Enter(_sender.xui.playerUI.entityPlayer);
|
||||
@@ -374,7 +388,8 @@ namespace NecromancerTome
|
||||
{
|
||||
public static void Postfix(ItemAction __instance, ref bool __result)
|
||||
{
|
||||
if (!__result && !SnakeMode.Active && !MindPalace.Active && SnakeMode.IsKnife(__instance.item))
|
||||
if (!__result && !SnakeMode.Active && !MindPalace.Active &&
|
||||
(SnakeMode.IsKnife(__instance.item) || CinerariumThreads.IsThreadKnife(__instance.item)))
|
||||
{
|
||||
__result = true;
|
||||
}
|
||||
@@ -389,6 +404,18 @@ namespace NecromancerTome
|
||||
|
||||
public static bool Prefix(ItemAction __instance, XUiC_Radial _xuiRadialWindow, EntityPlayerLocal _epl)
|
||||
{
|
||||
if (CinerariumThreads.IsThreadKnife(__instance.item))
|
||||
{
|
||||
// Нож хватом для нитей: вернуть обычный хват (0) или остаться (3).
|
||||
_xuiRadialWindow.ResetRadialEntries();
|
||||
_xuiRadialWindow.CreateRadialEntry(0, "NecromancersKnife", "ItemIconAtlas", "",
|
||||
Localization.Get("necroKnifeGripNormal"), _highlighted: false);
|
||||
_xuiRadialWindow.CreateRadialEntry(SnakeMode.GripThreadIdx, "resourceSewingKit", "ItemIconAtlas", "",
|
||||
Localization.Get("necroKnifeGripThread"), _highlighted: true);
|
||||
_xuiRadialWindow.SetCommonData(UIUtils.GetButtonIconForAction(_epl.playerInput.Reload),
|
||||
SnakeMode.OnRadialCommand, null, SnakeMode.GripThreadIdx);
|
||||
return false;
|
||||
}
|
||||
if (!SnakeMode.IsKnife(__instance.item))
|
||||
{
|
||||
return true;
|
||||
@@ -417,6 +444,9 @@ namespace NecromancerTome
|
||||
_xuiRadialWindow.CreateRadialEntry(2, SnakeMode.DayIcon, "UIAtlas", "",
|
||||
Localization.Get("necroSnakeModeDay"), _highlighted: false);
|
||||
}
|
||||
// Хват для нитей (16.10: «Есть в игре пиктограмма ниток, катушки?» - набор для шитья) - в любое время суток.
|
||||
_xuiRadialWindow.CreateRadialEntry(SnakeMode.GripThreadIdx, "resourceSewingKit", "ItemIconAtlas", "",
|
||||
Localization.Get("necroKnifeGripThread"), _highlighted: false);
|
||||
_xuiRadialWindow.SetCommonData(UIUtils.GetButtonIconForAction(_epl.playerInput.Reload),
|
||||
SnakeMode.OnRadialCommand, null, 0);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user