Пример #1
0
 public void FinalizeOrder()
 {
     UnityEngine.Debug.Log("Finalizing order");
     RecalcDeliveryTime();
     Ordered = SolHourStamp.Now();
     RedHomestead.Persistence.Game.Current.Player.BankAccount -= GrandTotal;
 }
Пример #2
0
        internal SolsAndHours SolHoursIntoFuture(SolHourStamp futureDayHour)
        {
            UnityEngine.Debug.Log(String.Format("Getting future from Sol {0} and Hour {1} to Sol {2} and Hour {3}", this.Sol, this.Hour, futureDayHour.Sol, futureDayHour.Hour));

            int   daysInFuture  = futureDayHour.Sol - this.Sol;
            float hoursInFuture = futureDayHour.Hour - this.Hour;

            UnityEngine.Debug.Log(String.Format("{0} sols and {1} hours in future", daysInFuture, hoursInFuture));

            if (daysInFuture == 1 && hoursInFuture < 0)
            {
                return(new SolsAndHours(0, Mathf.RoundToInt(SunOrbit.MartianHoursPerDay + hoursInFuture)));
            }
            else
            {
                return(new SolsAndHours(daysInFuture, Mathf.RoundToInt(hoursInFuture)));
            }
        }
Пример #3
0
 public string TimeUntilETA()
 {
     return(SolHourStamp.Now().SolHoursIntoFuture(ETA).ToString());
 }
Пример #4
0
 private void RecalcDeliveryTime()
 {
     ETA = SolHourStamp.FromFractionalHours(Game.Current.Environment.CurrentSol, Game.Current.Environment.CurrentHour,
                                            this.Via.ShippingTimeHours(this.Vendor.DistanceFromPlayerKilometersRounded));
     UnityEngine.Debug.Log(ETA);
 }
Пример #5
0
        internal static SolsAndHours SolHoursFromNow(float additionalFractionalHours)
        {
            var cheat = SolHourStamp.FromFractionalHours(0, 0, additionalFractionalHours);

            return(new SolsAndHours(cheat.Sol, cheat.Hour));
        }