From e3cdff0323a719250ac2219f86695e1fdd706302 Mon Sep 17 00:00:00 2001 From: AlexCube Date: Thu, 22 Oct 2026 22:45:29 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D1=82=D0=B5=D1=80=D0=B2=D1=8F=D1=82?= =?UTF-8?q?=D0=BD=D0=B8=D0=BA=20=D1=81=20=D0=BD=D0=BE=D1=88=D0=B5=D0=B9:?= =?UTF-8?q?=20=D0=BA=D1=83=D1=80=D0=B8=D1=86=D0=B0/=D0=BA=D1=80=D0=BE?= =?UTF-8?q?=D0=BB=D0=B8=D0=BA=20=D0=B2=D1=8B=D1=88=D0=B5=20=D0=B2=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=B3=D1=82=D1=8F=D1=85,=20Shift=20=D0=BD=D0=B5=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B7=D0=B3=D0=BE=D0=BD=D1=8F=D0=B5=D1=82=20(#74)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CarryGap -0.06 -> -0.15 м; с ношей разгон и планирование по Shift выключены (перегружен). Подбор без перезапуска - necrocarry gap|run. DLL закоммитится вместе с оссуарием (#66). Co-Authored-By: Claude Opus 5.5 --- HarmonySrc/Possession.cs | 13 +++++++--- HarmonySrc/VultureCarryCommand.cs | 41 +++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 HarmonySrc/VultureCarryCommand.cs diff --git a/HarmonySrc/Possession.cs b/HarmonySrc/Possession.cs index 4595220..865f14b 100644 --- a/HarmonySrc/Possession.cs +++ b/HarmonySrc/Possession.cs @@ -106,8 +106,12 @@ namespace NecromancerTome /// угол из PlaceCamera затирался). public static float ZoomFov = -1f; /// Зазор между когтями стервятника и спиной ноши, м; минус - когти впиваются в спину - /// (тест 08.10: «курица висит под стервятником, а не в его когтях»). - public const float CarryGap = -0.06f; + /// (тест 08.10: «курица висит под стервятником, а не в его когтях»). 22.10: -0.06 -> -0.15 («поднимай курицу и кролика + /// ещё выше. Иначе они не достают до лап»). Подбор без перезапуска - necrocarry gap. + public static float CarryGap = -0.15f; + /// С ношей Shift не разгоняет (22.10: «он не может разгоняться по шифту, ибо перегружен»). Выключатель - + /// necrocarry run on|off. + public static bool CarryNoRun = true; /// Цель рывка под прицелом сейчас (каждый кадр) - обычный прицел игры краснеет (AimTint). public static EntityAlive FlyAim; static float _flyDashUntil; @@ -961,7 +965,8 @@ namespace NecromancerTome dir += Vector3.down; } bool moving = dir.sqrMagnitude > 0.01f; - float accel = _flyRun ? FlyAccelRun * _v.moveSpeedAggro : FlyAccel * _v.moveSpeed; + bool run = _flyRun && !(CarryNoRun && _carry != null); // с ношей - перегружен, без разгона + float accel = run ? FlyAccelRun * _v.moveSpeedAggro : FlyAccel * _v.moveSpeed; if (moving) { _v.motion = _v.motion * 0.9f + dir.normalized * (accel * 0.1f); @@ -976,7 +981,7 @@ namespace NecromancerTome _v.SetRotation(new Vector3(0f, _bodyYaw, 0f)); if (_v.emodel != null && _v.emodel.avatarController != null) { - _v.glidingCurrentPercent = Mathf.MoveTowards(_v.glidingCurrentPercent, _flyRun && moving ? 1f : 0f, 0.06f); + _v.glidingCurrentPercent = Mathf.MoveTowards(_v.glidingCurrentPercent, run && moving ? 1f : 0f, 0.06f); _v.emodel.avatarController.UpdateFloat("Gliding", _v.glidingCurrentPercent); } // «Вниз» на земле посадке не мешает: Ctrl - переключатель, и с ним стервятник не сел бы никогда. diff --git a/HarmonySrc/VultureCarryCommand.cs b/HarmonySrc/VultureCarryCommand.cs new file mode 100644 index 0000000..6bf4e3a --- /dev/null +++ b/HarmonySrc/VultureCarryCommand.cs @@ -0,0 +1,41 @@ +using System.Collections.Generic; +using System.Globalization; +using UnityEngine; + +namespace NecromancerTome +{ + /// Ноша одержимого стервятника (курица, кролик): высота под лапами и запрет разгона с грузом (22.10.2026). + public class ConsoleCmdNecroCarry : ConsoleCmdAbstract + { + public override string[] getCommands() => new[] { "necrocarry" }; + public override string getDescription() => "NecromancerTome: ноша стервятника - gap <м, минус - выше>|run on|off|show"; + + void Out(string _s) + { + SdtdConsole.Instance.Output(_s); + Debug.Log("[NecromancerTome] necrocarry: " + _s); + } + + public override void Execute(List _params, CommandSenderInfo _senderInfo) + { + string cmd = _params.Count > 0 ? _params[0] : "show"; + switch (cmd) + { + case "gap": + if (_params.Count > 1 && float.TryParse(_params[1].Replace(',', '.'), NumberStyles.Float, CultureInfo.InvariantCulture, out float g)) + { + Possession.CarryGap = Mathf.Clamp(g, -0.6f, 0.3f); + } + break; + case "run": + if (_params.Count > 1 && (_params[1] == "on" || _params[1] == "off")) + { + Possession.CarryNoRun = _params[1] == "on"; + } + break; + } + Out("gap " + Possession.CarryGap.ToString("0.###", CultureInfo.InvariantCulture) + ", без разгона с ношей - " + + (Possession.CarryNoRun ? "да" : "нет")); + } + } +}