Одержимость: лог блока падали после еды - что стоит на месте и что осталось рядом
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
25019f5791
commit
fbbf9a4220
@@ -942,6 +942,7 @@ namespace NecromancerTome
|
||||
{
|
||||
_carrionBlocks.Remove(pos);
|
||||
_world.SetBlocksRPC(new List<BlockChangeInfo> { new BlockChangeInfo(pos, BlockValue.Air, MarchingCubes.DensityAir) });
|
||||
LogCarrionLeft(_world, pos);
|
||||
}
|
||||
Debug.Log("[NecromancerTome] Possession: падаль " + what + " исчезла");
|
||||
}
|
||||
@@ -979,6 +980,26 @@ namespace NecromancerTome
|
||||
", мяса у падали " + Mathf.CeilToInt(EatMeat(0f)));
|
||||
}
|
||||
|
||||
/// <summary>Диагностика (тест 13.10: «останки визуально не исчезли» после «доедено»): что стоит на месте съеденного
|
||||
/// блока сразу после замены и какие блоки падали остались в 2 блоках вокруг - одна куча может быть из нескольких.</summary>
|
||||
static void LogCarrionLeft(World _world, Vector3i _pos)
|
||||
{
|
||||
string near = "";
|
||||
for (int x = -2; x <= 2; x++)
|
||||
for (int y = -2; y <= 2; y++)
|
||||
for (int z = -2; z <= 2; z++)
|
||||
{
|
||||
Vector3i p = new Vector3i(_pos.x + x, _pos.y + y, _pos.z + z);
|
||||
BlockValue bv = _world.GetBlock(p);
|
||||
if (!bv.isair && IsCarrionBlock(bv.type))
|
||||
{
|
||||
near += " " + bv.Block.GetBlockName() + (bv.ischild ? "(часть)" : "") + "@" + p;
|
||||
}
|
||||
}
|
||||
Debug.Log("[NecromancerTome] Possession: после еды на " + _pos + " - " + _world.GetBlock(_pos).Block.GetBlockName() +
|
||||
", падаль рядом:" + (near.Length > 0 ? near : " нет"));
|
||||
}
|
||||
|
||||
/// <summary>Запас мяса текущей падали плюс _delta; первый укус - запас с нуля: у трупа - полное
|
||||
/// здоровье при жизни, у блока - его прочность (MaxDamage минус уже нанесённый урон).</summary>
|
||||
static float EatMeat(float _delta)
|
||||
|
||||
Reference in New Issue
Block a user