Хват для нитей: основа 68, поза рук мода, нож в левой руке
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
bf334c5c44
commit
ed4015ecee
+20
-1
@@ -23,7 +23,10 @@ namespace NecromancerTome
|
||||
public static class HandHolds
|
||||
{
|
||||
public const string HandItem = "meleeHandPlayer";
|
||||
public const int None = 0, Deny = 1, PifPaf = 2;
|
||||
public const int None = 0, Deny = 1, PifPaf = 2, Thread = 3;
|
||||
/// <summary>Хват для нитей - не сразу: снимок замороженных костей должен быть в покое хвата 68, после доставания.</summary>
|
||||
const float ThreadDelay = 0.6f;
|
||||
static float _threadSince = -1f;
|
||||
|
||||
/// <summary>Дальность и конус выбора зомби для «отрицания».</summary>
|
||||
public const float DenyRange = 25f;
|
||||
@@ -59,6 +62,17 @@ namespace NecromancerTome
|
||||
|
||||
public static int Current(EntityPlayerLocal _player)
|
||||
{
|
||||
if (_player != null && _player.inventory?.holdingItem?.Name == CinerariumThreads.ThreadKnifeName &&
|
||||
!SnakeMode.Active && !MindPalace.Active && !Possession.Active && !_player.IsDead())
|
||||
{
|
||||
if (_threadSince < 0f)
|
||||
{
|
||||
_threadSince = Time.time;
|
||||
}
|
||||
bool ready = Time.time - _threadSince >= ThreadDelay && !(_player.Hand != null && _player.Hand.isSwitching);
|
||||
return ready ? Thread : None;
|
||||
}
|
||||
_threadSince = -1f;
|
||||
if (_player == null || _player.Buffs == null || !IsHand(_player.inventory?.holdingItem) ||
|
||||
SnakeMode.Active || MindPalace.Active || Possession.Active || _player.IsDead())
|
||||
{
|
||||
@@ -104,9 +118,14 @@ namespace NecromancerTome
|
||||
{
|
||||
HandPose.PresetPifPaf();
|
||||
}
|
||||
else if (want == Thread)
|
||||
{
|
||||
HandPose.PresetThread();
|
||||
}
|
||||
else
|
||||
{
|
||||
HandPose.Enabled = false;
|
||||
HandPose.KnifeToLeft = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user