static public BotEngine.EveOnline.Interface.MemoryStruct.ShipHitpointsAndEnergy AsOld( this IShipHitpointsAndEnergy shipHitpointsAndEnergy) => shipHitpointsAndEnergy == null ? null : new BotEngine.EveOnline.Interface.MemoryStruct.ShipHitpointsAndEnergy { Shield = shipHitpointsAndEnergy.Shield, Armor = shipHitpointsAndEnergy.Armor, Struct = shipHitpointsAndEnergy.Struct, Capacitor = shipHitpointsAndEnergy.Capacitor, };
static public bool EachComponentLessThenOrEqual( this IShipHitpointsAndEnergy o0, IShipHitpointsAndEnergy o1) { if (o0 == o1) { return(true); } if (null == o0 || null == o1) { return(false); } return (o0.Struct <= o1.Struct && o0.Armor <= o1.Armor && o0.Shield <= o1.Shield && o0.Capacitor <= o1.Capacitor); }
static public bool EveryComponentHasValue(this IShipHitpointsAndEnergy o) => null == o ? false : (o.Struct.HasValue && o.Armor.HasValue && o.Shield.HasValue && o.Capacitor.HasValue);