private void DrawBackground(Building_RogueAI parent) { CompProperties_Overlays.GraphicOverlay background = Props.background; GraphicData gdRogueAI = background.graphicDataDefault; gdRogueAI.Graphic.Draw(parent.DrawPos + new Vector3(0, -1, 0), parent.Rotation, parent, 0f); }
public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { Building_RogueAI rogueAI = t as Building_RogueAI; if (rogueAI != null) { return(new Job(WTH_DefOf.WTH_HackRogueAI, rogueAI)); } return(null); }
private void DrawEye(Building_RogueAI parent) { CompProperties_Overlays.GraphicOverlay overlay = Props.GetEyeOverlay(parent.goingRogue ? Building_RogueAI.Mood.Mad : parent.CurMoodCategory); GraphicData gdEye = overlay.graphicDataDefault; Vector3 drawPosEye = parent.DrawPos; drawPosEye.y += 0.046875f; drawPosEye += overlay.offsetDefault; SetAnimationOffset(ref drawPosEye); gdEye.Graphic.Draw(drawPosEye, parent.Rotation, parent, 0f); }
public override void PostDraw() { base.PostDraw(); Building_RogueAI parent = this.parent as Building_RogueAI; DrawBackground(parent); if (ShowEye) { DrawEye(parent); } }
public override bool HasJobOnThing(Pawn pawn, Thing t, bool forced = false) { Building_RogueAI rogueAI = t as Building_RogueAI; if (rogueAI != null && rogueAI.goingRogue) { LocalTargetInfo target = rogueAI; if (pawn.CanReserveAndReach(target, PathEndMode.ClosestTouch, Danger.Deadly, 10, 1, null, forced)) { return(true); } } return(false); }