feat: 添加卵囊建筑及其孵化、通量控制和幼虫交互系统。

This commit is contained in:
2025-12-25 15:33:52 +08:00
parent 2cacc468db
commit 2a14049b76
6 changed files with 12 additions and 4 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -294,7 +294,7 @@ namespace ArachnaeSwarm
l.CurJobDef.defName != "ARA_OperateIncubator" || l.CurJobDef.defName != "ARA_OperateIncubator" ||
l.CurJob?.targetA.Thing != parent); l.CurJob?.targetA.Thing != parent);
bool hasFuel = (FuelComp?.Fuel ?? 10f) > 0.01f; bool hasFuel = (FuelComp?.Fuel ?? 0f) > 0.01f;
// 自动模式调节 // 自动模式调节
if (IsAutoMode && parent.IsHashIntervalTick(250) && IsIncubating) if (IsAutoMode && parent.IsHashIntervalTick(250) && IsIncubating)

View File

@@ -310,7 +310,7 @@ namespace ArachnaeSwarm
l.CurJobDef.defName != "ARA_OperateIncubator" || l.CurJobDef.defName != "ARA_OperateIncubator" ||
l.CurJob?.targetA.Thing != parent); l.CurJob?.targetA.Thing != parent);
bool hasFuel = (FuelComp?.Fuel ?? 10f) > 0.01f; bool hasFuel = (FuelComp?.Fuel ?? 0f) > 0.01f;
if (IsAutoMode && parent.IsHashIntervalTick(250) && IsIncubating) if (IsAutoMode && parent.IsHashIntervalTick(250) && IsIncubating)
{ {

View File

@@ -131,8 +131,12 @@ namespace ArachnaeSwarm
FuelComp.ConsumeFuel(fuelPerTick); FuelComp.ConsumeFuel(fuelPerTick);
} }
// 检查是否休眠(通量过低 或 燃料不足)
bool hasFuel = (FuelComp?.Fuel ?? 0f) > 0.01f;
bool effectivelyDormant = IsDormant || !hasFuel;
// 休眠状态处理 // 休眠状态处理
if (IsDormant) if (effectivelyDormant)
{ {
// 休眠时品质下降10%/天) // 休眠时品质下降10%/天)
float qualityDecay = (qualityTotal * 0.1f) / 60000f; float qualityDecay = (qualityTotal * 0.1f) / 60000f;

View File

@@ -238,7 +238,11 @@ namespace ArachnaeSwarm
FuelComp.ConsumeFuel(fuelPerTick); FuelComp.ConsumeFuel(fuelPerTick);
} }
if (IsDormant) // 检查是否休眠(通量过低 或 燃料不足)
bool hasFuel = (FuelComp?.Fuel ?? 0f) > 0.01f;
bool effectivelyDormant = IsDormant || !hasFuel;
if (effectivelyDormant)
{ {
float qualityDecay = (qualityTotal * 0.1f) / 60000f; float qualityDecay = (qualityTotal * 0.1f) / 60000f;
qualityProgress = Mathf.Max(0f, qualityProgress - qualityDecay); qualityProgress = Mathf.Max(0f, qualityProgress - qualityDecay);