Exemplo n.º 1
0
        public IEnumerable <Gizmo> GetGizmosPAL()
        {
            const int num = 93840735;

            var stayHome = PawnConverted.GetCommandStayHome(num);

            stayHome.toggleAction   = ToggleStayHome;
            stayHome.isActive       = () => StayHome;
            stayHome.disabled       = false; // TODO: controlledMechanoids.Count == 0;
            stayHome.disabledReason = txtNoBots;
            yield return(stayHome);

            // yield return
            //     new Command_Action
            //     {
            //         icon = this.texUI_PawnPrisoner,
            //         defaultDesc = this.txtSwitch2Prisoner,
            //         hotKey = KeyBindingDefOf.Misc5,
            //         activateSound = SoundDef.Named("Click"),
            //         action = new Action(this.JumpTarget1),
            //         disabled = power != null && !power.get_PowerOn(),
            //         disabledReason = this.txtOffline,
            //         groupKey = num + 1
            //     };
        }
Exemplo n.º 2
0
        public bool Connect(PawnConverted newPawn)
        {
            if (Destroyed || !HasPower)
            {
                return(false);
            }

            if (controlledMechanoids.Contains(newPawn))
            {
                return(true);
            }
            if (controlledMechanoids.Count >= level)
            {
                return(false);
            }

            controlledMechanoids.Add(newPawn);
            power.PowerOutput = -500; //-100 * controlledMechanoids.Count;
            return(true);
        }
 public static IEnumerable <Hediff> GetDamages(PawnConverted converted)
 {
     return(converted.health.hediffSet.hediffs.Where(h => h.def.defName != "Offline" && IsDamagedEnough(h, converted.fullRepair)));
 }