private void InitiateShipProperties() { DropShipUtility.currentShipTracker.AllWorldShips.Add(this); this.ShipNick = NameGenerator.GenerateName(RulePackDef.Named("NamerShipGeneric")); this.compShipCached = this.TryGetComp <CompShip>(); if (this.compShip == null) { Log.Error("DropShip is missing " + nameof(CompProperties_Ship) + "/n Defaulting."); this.compShipCached = new CompShip(); this.drawTickOffset = compShip.sProps.TicksToImpact; } if (this.installedTurrets.Count == 0) { this.InitiateInstalledTurrets(); } }
private bool ShipFull(ShipBase ship, bool firstCheck = true) { //Log.Message("Checking"); CompShip compShip = ship.compShip; if (transferable != null) { if (firstCheck && this.job.count > transferable.CountToTransfer) { return(true); } if (!firstCheck && this.TargetA.Thing.stackCount > transferable.CountToTransfer) { return(true); } return(false); } else { return(true); } }