This commit is contained in:
2026-02-28 11:50:54 +08:00
parent 60cde0317d
commit bd4843bc89
19 changed files with 1212 additions and 367 deletions

View File

@@ -1,5 +1,6 @@
using System.Collections.Generic;
using RimWorld;
using System.Collections.Generic;
using System.Runtime.Remoting.Messaging;
using UnityEngine;
using Verse;
@@ -23,10 +24,20 @@ namespace WulaFallenEmpire
public override void CompTick()
{
base.CompTick();
if (!parent.Spawned || !enabled)
if (!enabled)
return;
if (parent is Pawn pawn && (pawn.IsSelfShutdown() || !pawn.Awake() || pawn.Dead || pawn.Downed || !pawn.Spawned || pawn.Destroyed))
return;
//对于mechunit需要判定有没有驾驶员
var MechPilotComp = parent.TryGetComp<CompMechPilotHolder>();
if (MechPilotComp != null && !MechPilotComp.HasPilots)
{
return;
}
ticksUntilNextDamage--;
if (ticksUntilNextDamage <= 0)
{