feat: 添加卵囊建筑,实现基于通量的孵化和幼虫交互功能。

This commit is contained in:
2025-12-23 18:05:11 +08:00
parent 23302daac7
commit 5de8bad8d1
4 changed files with 24 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -92,6 +92,18 @@ namespace ArachnaeSwarm
{
base.Tick();
// 清理无效的幼虫引用
if (assignedLarva != null)
{
if (assignedLarva.Dead || assignedLarva.Destroyed ||
assignedLarva.CurJobDef == null ||
assignedLarva.CurJobDef.defName != "ARA_OperateIncubator" ||
assignedLarva.CurJob?.targetA.Thing != this)
{
assignedLarva = null;
}
}
if (larvaOperateTicksRemaining > 0)
{
larvaOperateTicksRemaining--;

View File

@@ -202,6 +202,18 @@ namespace ArachnaeSwarm
{
base.Tick();
// 清理无效的幼虫引用
if (assignedLarva != null)
{
if (assignedLarva.Dead || assignedLarva.Destroyed ||
assignedLarva.CurJobDef == null ||
assignedLarva.CurJobDef.defName != "ARA_OperateIncubator" ||
assignedLarva.CurJob?.targetA.Thing != this)
{
assignedLarva = null;
}
}
if (larvaOperateTicksRemaining > 0)
{
larvaOperateTicksRemaining--;