Урна рабочего: изготовление по образцу на станциях по нитям (CinerariumCraft), образец во второй ячейке, нити к станциям, топливо и огонь

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
AlexCube
2026-10-18 00:11:56 +03:00
co-authored by Claude Opus 5.5
parent a5f166c161
commit eba17606d5
9 changed files with 843 additions and 40 deletions
+12 -5
View File
@@ -71,6 +71,13 @@ namespace NecromancerTome
{
return Ferry(_world, _urn);
}
// Урна рабочего - изготовление по образцу на станциях по нитям (CinerariumCraft.cs).
if (_urn.IsWorker)
{
Vector3i? at = CinerariumCraft.Step(_world, _urn, _dry, out _stuck, out Vector3i? from);
LastFrom = from;
return at;
}
Zone z = Scan(_world, _urn);
// 1. Расходники.
foreach (TileEntityCollector c in z.Collectors)
@@ -184,7 +191,7 @@ namespace NecromancerTome
return null;
}
static TEFeatureStorage BoxAt(World _world, Vector3i _p)
internal static TEFeatureStorage BoxAt(World _world, Vector3i _p)
{
return _world.GetTileEntity(_p) is TileEntityComposite c && !c.IsUserAccessing() &&
!c.TryGetSelfOrFeature<TEFeatureCinerarium>(out TEFeatureCinerarium _) &&
@@ -285,7 +292,7 @@ namespace NecromancerTome
return _z.Bag != null && Fits(_z.Bag, _s);
}
static bool Fits(TEFeatureStorage _t, ItemStack _s)
internal static bool Fits(TEFeatureStorage _t, ItemStack _s)
{
for (int i = 0; i < _t.ItemGrid.Length; i++)
{
@@ -519,7 +526,7 @@ namespace NecromancerTome
return false;
}
static void Place(ItemStack _s, IList<TEFeatureStorage> _dst)
internal static void Place(ItemStack _s, IList<TEFeatureStorage> _dst)
{
for (int i = 0; i < _dst.Count && _s.count > 0; i++)
{
@@ -548,13 +555,13 @@ namespace NecromancerTome
}
/// <summary>Ячейка, закреплённая игроком (замок в окне ящика), - не трогать.</summary>
static bool Locked(TEFeatureStorage _src, int _slot)
internal static bool Locked(TEFeatureStorage _src, int _slot)
{
PackedBoolArray locks = _src.ItemGrid.SlotLocks;
return locks != null && _slot < locks.Length && locks[_slot];
}
static void Take(TEFeatureStorage _src, int _slot, int _count)
internal static void Take(TEFeatureStorage _src, int _slot, int _count)
{
ItemStack s = _src.ItemGrid[_slot].Clone();
s.count -= _count;