Beispiel #1
0
        // ===================== Inspect panel =====================
        public override string GetInspectString()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append(base.GetInspectString());

            if (Find.TickManager.TicksGame >= this.takeOffTick)
            {
                stringBuilder.Append("Taking off ASAP");
            }
            else
            {
                stringBuilder.Append("Planned take-off: " + Util_Misc.GetTicksAsStringInDaysHours(this.takeOffTick - Find.TickManager.TicksGame));
            }

            return(stringBuilder.ToString());
        }
Beispiel #2
0
        // ===================== Inspect panel =====================
        public override string GetInspectString()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append(base.GetInspectString());

            if (this.powerComp.PowerOn == false)
            {
                stringBuilder.AppendLine();
                stringBuilder.Append("Orbital link down");
                return(stringBuilder.ToString());
            }

            // Goodwill.
            stringBuilder.AppendLine();
            stringBuilder.Append("MiningCo. goodwill: " + Util_Faction.MiningCoFaction.GoodwillWith(Faction.OfPlayer));
            if (Util_Faction.MiningCoFaction.GoodwillWith(Faction.OfPlayer) <= -80)
            {
                stringBuilder.Append(" (hostile)");
            }

            if ((Util_Misc.Partnership.feeInSilver[this.Map] > 0) ||
                (Util_Misc.Partnership.globalGoodwillFeeInSilver > 0))
            {
                stringBuilder.AppendLine();
                stringBuilder.Append("Partnership fee unpaid");
                return(stringBuilder.ToString());
            }

            // Cargo periodic/requested supply.
            stringBuilder.AppendLine();
            stringBuilder.Append("Periodic/requested supply: ");
            if ((this.lastPeriodicSupplyTick > 0) &&
                (Find.TickManager.TicksGame >= this.lastPeriodicSupplyTick) &&
                ((Find.TickManager.TicksGame - this.lastPeriodicSupplyTick) < (FlyingSpaceshipLanding.horizontalTrajectoryDurationInTicks + FlyingSpaceshipLanding.verticalTrajectoryDurationInTicks)))
            {
                stringBuilder.Append("in approach");
            }
            else if (this.landingPadIsAvailable == false)
            {
                stringBuilder.Append("no landing pad");
            }
            else
            {
                string remainingTimeAsString = Util_Misc.GetTicksAsStringInDaysHours(Util_Misc.Partnership.nextPeriodicSupplyTick[this.Map] - Find.TickManager.TicksGame);
                stringBuilder.Append("ETA " + remainingTimeAsString);
            }
            stringBuilder.Append("/");
            if ((this.lastRequestedSupplyTick > 0) &&
                (Find.TickManager.TicksGame >= this.lastRequestedSupplyTick) &&
                ((Find.TickManager.TicksGame - this.lastRequestedSupplyTick) < (FlyingSpaceshipLanding.horizontalTrajectoryDurationInTicks + FlyingSpaceshipLanding.verticalTrajectoryDurationInTicks)))
            {
                stringBuilder.Append("in approach");
            }
            else if (this.landingPadIsAvailable == false)
            {
                stringBuilder.Append("no landing pad");
            }
            else if (Find.TickManager.TicksGame >= Util_Misc.Partnership.nextRequestedSupplyMinTick[this.Map])
            {
                stringBuilder.Append("available");
            }
            else
            {
                string remainingTimeAsString = Util_Misc.GetTicksAsStringInDaysHours(Util_Misc.Partnership.nextRequestedSupplyMinTick[this.Map] - Find.TickManager.TicksGame);
                stringBuilder.Append("ETA " + remainingTimeAsString);
            }

            // Medical supply.
            stringBuilder.AppendLine();
            stringBuilder.Append("Medical supply: ");
            if ((this.lastMedicalSupplyTick > 0) &&
                (Find.TickManager.TicksGame >= this.lastMedicalSupplyTick) &&
                ((Find.TickManager.TicksGame - this.lastMedicalSupplyTick) < (FlyingSpaceshipLanding.horizontalTrajectoryDurationInTicks + FlyingSpaceshipLanding.verticalTrajectoryDurationInTicks)))
            {
                stringBuilder.Append("in approach");
            }
            else if (this.landingPadIsAvailable == false)
            {
                stringBuilder.Append("no landing pad");
            }
            else if (Find.TickManager.TicksGame >= Util_Misc.Partnership.nextMedicalSupplyMinTick[this.Map])
            {
                stringBuilder.Append("available");
            }
            else
            {
                string remainingTimeAsString = Util_Misc.GetTicksAsStringInDaysHours(Util_Misc.Partnership.nextMedicalSupplyMinTick[this.Map] - Find.TickManager.TicksGame);
                stringBuilder.Append("ETA " + remainingTimeAsString);
            }

            // Air strike
            stringBuilder.AppendLine();
            if (Find.TickManager.TicksGame >= Util_Misc.Partnership.nextAirstrikeMinTick[this.Map])
            {
                stringBuilder.Append("Air strike: available");
            }
            else
            {
                string remainingTimeAsString = Util_Misc.GetTicksAsStringInDaysHours(Util_Misc.Partnership.nextAirstrikeMinTick[this.Map] - Find.TickManager.TicksGame);
                stringBuilder.Append("Air strike: available in " + remainingTimeAsString);
            }
            return(stringBuilder.ToString());
        }