Сумка одержимого зомби: 2 ячейки, Tab; при выходе - мешком, при гибели - мешком с меткой
ZombieBag: своя сумка на одно вселение у зомби с видом от первого лица (число ячеек по виду, пока 2), окно как у сумки волка; пишется в отдельный файл сейва, остаток после вылета выпадает у тела при следующем вселении. Мешок и метка - общие с сумкой волка (WolfBag.DropSack/AddWaypoint). Подсказка Tab - 13 языков. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c98e3f8b74
commit
eb6c5fb4f1
@@ -497,7 +497,7 @@ namespace NecromancerTome
|
||||
/// <summary>Метка на карте и компасе - как игра ставит метку транспорта (XUiC_MapArea.RefreshVehiclePositionWaypoint),
|
||||
/// но обычная, не «последнее место сущности»: номер мешка после перезахода другой. Метка - в списке меток игрока,
|
||||
/// сохраняется игрой вместе с ним; удалить можно и вручную.</summary>
|
||||
static void AddWaypoint(Vector3 _at)
|
||||
public static void AddWaypoint(Vector3 _at, string _name = WaypointName)
|
||||
{
|
||||
EntityPlayerLocal p = GameManager.Instance?.World?.GetPrimaryPlayer();
|
||||
if (p?.Waypoints == null)
|
||||
@@ -508,7 +508,7 @@ namespace NecromancerTome
|
||||
w.pos = World.worldToBlockPos(_at);
|
||||
w.icon = WaypointIcon;
|
||||
w.ownerId = Platform.PlatformManager.InternalLocalUserIdentifier;
|
||||
w.name.Update(WaypointName, Platform.PlatformManager.MultiPlatform.User.PlatformUserId);
|
||||
w.name.Update(_name, Platform.PlatformManager.MultiPlatform.User.PlatformUserId);
|
||||
w.bUsingLocalizationId = true;
|
||||
p.Waypoints.Collection.Add(w);
|
||||
w.navObject = NavObjectManager.Instance.RegisterNavObject("waypoint", w.pos.ToVector3(), w.icon);
|
||||
@@ -530,7 +530,7 @@ namespace NecromancerTome
|
||||
for (int i = list.Count - 1; i >= 0; i--)
|
||||
{
|
||||
Waypoint w = list[i];
|
||||
if (w.name.Text == WaypointName && (w.pos.ToVector3() - _at).sqrMagnitude < 3f * 3f)
|
||||
if ((w.name.Text == WaypointName || w.name.Text == ZombieBag.WaypointName) && (w.pos.ToVector3() - _at).sqrMagnitude < 3f * 3f)
|
||||
{
|
||||
p.Waypoints.Collection.Remove(w);
|
||||
if (w.navObject != null)
|
||||
@@ -542,6 +542,9 @@ namespace NecromancerTome
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Мешок с предметами на земле (и для сумки одержимого зомби, ZombieBag).</summary>
|
||||
public static void DropSack(Vector3 _at, List<ItemStack> _items) => Drop(_at, _items);
|
||||
|
||||
static void Drop(Vector3 _at, List<ItemStack> _items)
|
||||
{
|
||||
GameManager.Instance.DropContentInLootContainerServer(-1, "DroppedLootContainer", _at + Vector3.up * 0.5f, _items.ToArray());
|
||||
@@ -574,7 +577,7 @@ namespace NecromancerTome
|
||||
{
|
||||
public static void Postfix(XUiC_BagStorageWindowGroup __instance)
|
||||
{
|
||||
bool wolf = WolfBag.WindowOpen && Possession.Active;
|
||||
bool wolf = (WolfBag.WindowOpen || ZombieBag.WindowOpen) && Possession.Active;
|
||||
if (wolf)
|
||||
{
|
||||
__instance.xui.playerUI.windowManager.Close("backpack");
|
||||
|
||||
Reference in New Issue
Block a user