1
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
|
||||
namespace WulaFallenEmpire
|
||||
{
|
||||
public class JobGiver_DroneSelfShutdown : ThinkNode_JobGiver
|
||||
{
|
||||
protected override Job TryGiveJob(Pawn pawn)
|
||||
{
|
||||
if (!RCellFinder.TryFindNearbyMechSelfShutdownSpot(pawn.Position, pawn, pawn.Map, out var result, allowForbidden: true))
|
||||
{
|
||||
result = pawn.Position;
|
||||
}
|
||||
Job job = JobMaker.MakeJob(JobDefOf.SelfShutdown, result);
|
||||
job.forceSleep = true;
|
||||
return job;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user