public Kinematics(VRage.Game.ModAPI.Ingame.IMyEntity anchor, VRage.Game.ModAPI.Ingame.IMyEntity reference) { if(anchor == null) throw new Exception("Kinematics: anchor is null"); this._anchor = anchor; this._reference = reference; if(reference == null) _transition = this._anchor.WorldMatrix; else _transition = this._anchor.WorldMatrix * MatrixD.Invert(this._reference.WorldMatrix); this._stateCurrent = this._stateLast = _transition; this._transitionLinearLast = this._transitionAngularLast = this._transitionLinearCurrent = this._transitionAngularCurrent = VectorZero; this._velocityLinearCurrent = this._velocityAngularCurrent = this._velocityLinearLast = this._velocityAngularLast = VectorZero; this._accelerationLinearCurrent = this._accelerationAngularCurrent = this._accelerationLinearLast = this._accelerationAngularLast = VectorZero; this._jerkLinearCurrent = this._jerkAngularCurrent = this._jerkLinearLast = this._jerkAngularLast = VectorZero; }
private bool isMainCargo(IMyEntity b) { if (b is IMyCargoContainer) { return(true); } if (COUNT_CONNECTORS && b is IMyShipConnector) { return(true); } if (COUNT_SORTERS && b is IMyConveyorSorter) { return(true); } if (COUNT_PROCESSING) { if (b is IMyRefinery || b is IMyGasGenerator) { return(true); } } return(TREAT_OVERFLOW_AS_MAIN && internalIsOverflowContainer(b)); }
private static bool NoPlayerNearby(VRage.Game.ModAPI.Ingame.IMyEntity baseRc) { return(DebugConvoys || !DuckUtils.IsAnyPlayerNearPosition(baseRc.GetPosition(), 1000)); }
private bool internalIsOverflowContainer(IMyEntity b) { return(b is IMyTerminalBlock && !(b is IMyCargoContainer) && isOverflowContainer(b as IMyTerminalBlock)); }
private static Sandbox.ModAPI.Ingame.IMyTerminalBlock TAPI_GetShieldBlock(VRage.Game.ModAPI.Ingame.IMyEntity arg) => TAPI_GetShieldBlock(arg as IMyEntity);
private static bool TAPI_ProtectedByShield(VRage.Game.ModAPI.Ingame.IMyEntity arg) => TAPI_ProtectedByShield(arg as IMyEntity);
private static bool TAPI_EntityBypass(Sandbox.ModAPI.Ingame.IMyTerminalBlock arg1, VRage.Game.ModAPI.Ingame.IMyEntity arg2, bool arg3) => TAPI_EntityBypass(arg1 as IMyTerminalBlock, arg2 as IMyEntity, arg3);