本文整理汇总了C#中Pawn.IsBurning方法的典型用法代码示例。如果您正苦于以下问题:C# Pawn.IsBurning方法的具体用法?C# Pawn.IsBurning怎么用?C# Pawn.IsBurning使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pawn
的用法示例。
在下文中一共展示了Pawn.IsBurning方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HasJobOnThing
public override bool HasJobOnThing( Pawn pawn, Thing t )
{
#if DEBUG_WORKGIVER
Log.Message("Checking " + t.LabelCap + " for job.");
Log.Message("ManagerStation" + ((t as Building_ManagerStation) != null));
Log.Message("Comp" + (t.TryGetComp<Comp_ManagerStation>() != null));
Log.Message("Incap" + (!pawn.Dead && !pawn.Downed && !pawn.IsBurning() && !t.IsBurning()));
Log.Message("CanReserve and reach" + (pawn.CanReserveAndReach(t, PathEndMode, Danger.Some)));
CompPowerTrader powera = t.TryGetComp<CompPowerTrader>();
Log.Message("Power" + (powera == null || powera.PowerOn));
Log.Message("Job" + (Manager.Get.JobStack.NextJob != null));
#endif
if ( !( t is Building_ManagerStation ) )
{
return false;
}
if ( t.TryGetComp<Comp_ManagerStation>() == null )
{
return false;
}
if ( pawn.Dead ||
pawn.Downed ||
pawn.IsBurning() ||
t.IsBurning() )
{
return false;
}
if ( !pawn.CanReserveAndReach( t, PathEndMode, Danger.Some ) )
{
return false;
}
CompPowerTrader power = t.TryGetComp<CompPowerTrader>();
if ( power != null &&
!power.PowerOn )
{
return false;
}
if ( Manager.Get.JobStack.NextJob != null )
{
return true;
}
return false;
}
示例2: HasJobOnThing
public override bool HasJobOnThing(Pawn pawn, Thing t)
{
if ((t is Building_AquacultureBasin) == false)
{
return false;
}
Building_AquacultureBasin aquacultureBasin = t as Building_AquacultureBasin;
if (pawn.Dead
|| pawn.Downed
|| pawn.IsBurning())
{
return false;
}
if (pawn.CanReserveAndReach(aquacultureBasin, this.PathEndMode, Danger.Some) == false)
{
return false;
}
if (aquacultureBasin.breedingIsFinished)
{
return true;
}
return false;
}
示例3: HasJobOnThing
public override bool HasJobOnThing(Pawn pawn, Thing t)
{
if ((t is Building_LaserFencePylon) == false)
{
return false;
}
if (pawn.CanReserveAndReach(t, PathEndMode.Touch, Danger.Deadly) == false)
{
return false;
}
Building_LaserFencePylon pylon = t as Building_LaserFencePylon;
if (pawn.Dead
|| pawn.Downed
|| pawn.IsBurning())
{
return false;
}
if (pylon.manualSwitchIsPending)
{
return true;
}
return false;
}
示例4: HasJobOnThing
public override bool HasJobOnThing(Pawn pawn, Thing t)
{
if ((t is Building_MechanoidTerraformer) == false)
{
return false;
}
Building_MechanoidTerraformer terraformer = t as Building_MechanoidTerraformer;
if (pawn.Dead
|| pawn.Downed
|| pawn.IsBurning())
{
return false;
}
if ((terraformer.reverseEngineeringState == Building_MechanoidTerraformer.ReverseEngineeringState.Studying)
&& (pawn.skills.GetSkill(SkillDefOf.Research).level >= Building_MechanoidTerraformer.minResearchLevelToStudyArtifact)
&& pawn.CanReserveAndReach(terraformer, this.pathEndMode, Danger.Some)
&& (terraformer.studyIsPaused == false)
&& (terraformer.studyCounter < Building_MechanoidTerraformer.studyCounterTargetValue))
{
return true;
}
else if ((terraformer.reverseEngineeringState == Building_MechanoidTerraformer.ReverseEngineeringState.ReroutingPower)
&& (pawn.skills.GetSkill(SkillDefOf.Research).level >= Building_MechanoidTerraformer.minResearchLevelToReroutePower)
&& pawn.CanReserveAndReach(terraformer, this.pathEndMode, Danger.Some)
&& (terraformer.reroutingIsPaused == false)
&& (terraformer.reroutingCounter < Building_MechanoidTerraformer.reroutingCounterTargetValue))
{
return true;
}
else if ((terraformer.reverseEngineeringState == Building_MechanoidTerraformer.ReverseEngineeringState.ExtractingWeatherController)
&& (pawn.skills.GetSkill(SkillDefOf.Research).level >= Building_MechanoidTerraformer.minResearchLevelToExtractWeatherController)
&& pawn.CanReserveAndReach(terraformer, this.pathEndMode, Danger.Some)
&& (terraformer.extractionIsPaused == false)
&& (terraformer.extractionCounter < Building_MechanoidTerraformer.extractionCounterTargetValue))
{
return true;
}
return false;
}
示例5: HasJobOnThing
public override bool HasJobOnThing(Pawn pawn, Thing t)
{
if ((t is Building_FishingPier) == false)
{
return false;
}
Building_FishingPier fishingPier = t as Building_FishingPier;
if (pawn.Dead
|| pawn.Downed
|| pawn.IsBurning())
{
return false;
}
if (pawn.CanReserveAndReach(fishingPier, this.PathEndMode, Danger.Some) == false)
{
return false;
}
if (fishingPier.fishStock == 0)
{
return false;
}
if ((pawn.equipment.Primary != null)
&& (pawn.equipment.Primary.def == Util_FishIndustry.HarpoonDef))
{
return true;
}
foreach (Apparel apparel in pawn.apparel.WornApparel)
{
if (apparel.def == Util_FishIndustry.FishingRodDef)
{
return true;
}
}
return false;
}
示例6: GetFloatMenuOptions
public override IEnumerable<FloatMenuOption> GetFloatMenuOptions(Pawn pawn)
{
List<FloatMenuOption> list = new List<FloatMenuOption>();
if (pawn.Dead
|| pawn.Downed
|| pawn.IsBurning())
{
FloatMenuOption item = new FloatMenuOption("Cannot use (incapacitated)", null);
yield return item;
yield break;
}
if (pawn.CanReserve(this) == false)
{
FloatMenuOption item = new FloatMenuOption("Cannot use (reserved)", null);
yield return item;
yield break;
}
else if (pawn.CanReach(this, PathEndMode.ClosestTouch, Danger.Some) == false)
{
FloatMenuOption item = new FloatMenuOption("Cannot use (no path)", null);
yield return item;
yield break;
}
else
{
switch (this.reverseEngineeringState)
{
case ReverseEngineeringState.BuildingNotApproched:
Action action = delegate
{
Job job = new Job(DefDatabase<JobDef>.GetNamed(Util_MechanoidTerraformer.JobDefName_ScoutStrangeArtifact), this);
pawn.drafter.TakeOrderedJob(job);
};
FloatMenuOption item = new FloatMenuOption("Scout strange artifact", action);
yield return item;
break;
case ReverseEngineeringState.BuildingNotSecured:
Action action2 = delegate
{
Job job = new Job(DefDatabase<JobDef>.GetNamed(Util_MechanoidTerraformer.JobDefName_SecureStrangeArtifact), this);
pawn.drafter.TakeOrderedJob(job);
};
FloatMenuOption item2 = new FloatMenuOption("Secure strange artifact", action2);
yield return item2;
break;
case ReverseEngineeringState.Studying:
if (pawn.drafter.Drafted)
{
yield break;
}
if (this.studyIsPaused)
{
Action action3 = delegate
{
this.studyIsPaused = false;
if ((pawn.skills.GetSkill(SkillDefOf.Research).TotallyDisabled == false)
&& (pawn.skills.GetSkill(SkillDefOf.Research).level >= minResearchLevelToStudyArtifact))
{
Job job = new Job(DefDatabase<JobDef>.GetNamed(Util_MechanoidTerraformer.JobDefName_StudyStrangeArtifact), this);
pawn.drafter.TakeOrderedJob(job);
}
else
{
Messages.Message(pawn.Name.ToStringShort + " is not skilled enough to study the strange artifact (research level " + minResearchLevelToStudyArtifact + " is required).", MessageSound.RejectInput);
pawn.jobs.StopAll(true);
}
};
FloatMenuOption item3 = new FloatMenuOption("Start study", action3);
yield return item3;
}
else
{
Action action4 = delegate
{
this.studyIsPaused = true;
pawn.jobs.StopAll(true);
};
FloatMenuOption item4 = new FloatMenuOption("Pause study", action4);
yield return item4;
}
break;
case ReverseEngineeringState.StudyCompleted:
if (pawn.drafter.Drafted)
{
yield break;
}
Action action5 = delegate
{
this.reroutingIsPaused = false;
this.reverseEngineeringState = ReverseEngineeringState.ReroutingPower;
if ((pawn.skills.GetSkill(SkillDefOf.Research).TotallyDisabled == false)
&& (pawn.skills.GetSkill(SkillDefOf.Research).level >= minResearchLevelToReroutePower))
{
Job job = new Job(DefDatabase<JobDef>.GetNamed(Util_MechanoidTerraformer.JobDefName_ReroutePower), this);
pawn.drafter.TakeOrderedJob(job);
//.........这里部分代码省略.........
示例7: GetFloatMenuOptions
public override IEnumerable<FloatMenuOption> GetFloatMenuOptions(Pawn myPawn)
{
if (this.Faction == Faction.OfPlayer)
{
return base.GetFloatMenuOptions(myPawn);
}
else
{
List<FloatMenuOption> list = new List<FloatMenuOption>();
CompPowerTrader powerComp = this.TryGetComp<CompPowerTrader>();
if (myPawn.Dead
|| myPawn.Downed
|| myPawn.IsBurning())
{
FloatMenuOption item = new FloatMenuOption("Cannot use (incapacitated)", null);
list.Add(item);
}
if (myPawn.CanReserve(this) == false)
{
FloatMenuOption item = new FloatMenuOption("Cannot use (reserved)", null);
list.Add(item);
}
else if (myPawn.CanReach(this, PathEndMode.ClosestTouch, Danger.Some) == false)
{
FloatMenuOption item = new FloatMenuOption("Cannot use (no path)", null);
list.Add(item);
}
else if (this.IsBurning())
{
FloatMenuOption item = new FloatMenuOption("Cannot use (burning)", null);
list.Add(item);
}
else if (powerComp.PowerOn == false)
{
FloatMenuOption item = new FloatMenuOption("Cannot use (no power)", null);
list.Add(item);
}
else
{
Action action = delegate
{
Job job = new Job(DefDatabase<JobDef>.GetNamed(OG_Util.JobDefName_TryToCaptureOutpost), this);
myPawn.drafter.TakeOrderedJob(job);
};
FloatMenuOption item2 = new FloatMenuOption("Try to capture outpost", action);
list.Add(item2);
}
return list;
}
}