Exemple #1
0
 public void SetObservingDock(Dock d)
 {
     if (d == null)
     {
         SelfShutOff();
         return;
     }
     else
     {
         if (dockSystem == null)
         {
             dockSystem = DockSystem.GetCurrent();
         }
         observingDock = d; isObserving = true;
         UIWorkbuildingObserver uwb = WorkBuilding.workbuildingObserver;
         if (uwb == null)
         {
             uwb = UIWorkbuildingObserver.InitializeWorkbuildingObserverScript();
         }
         else
         {
             uwb.gameObject.SetActive(true);
         }
         uwb.SetObservingPlace(observingDock);
         if (tradingListPanel.activeSelf)
         {
             PrepareTradingPanel();
         }
         else
         {
             PrepareImmigrationPanel();
         }
         dockInfoLabel.text = observingDock.UI_GetInfo();
     }
 }
Exemple #2
0
 override public void Prepare()
 {
     PrepareWorkbuilding();
     if (dockSystem == null)
     {
         dockSystem = DockSystem.GetCurrent();
     }
 }
Exemple #3
0
    private void FinishShipService(Ship s)
    {
        DockSystem.GetCurrent().HandleShip(this, s, colony);
        servicingShip   = null;
        maintainingShip = false;
        s.Undock();

        shipArrivingTimer = shipArrivingTime;
    }
Exemple #4
0
 new private void OnEnable()
 {
     if (dockSystem == null)
     {
         dockSystem = DockSystem.GetCurrent();
     }
     transform.SetAsLastSibling();
     UpdateResourceButtons();
     UIController.current.ChangeActiveWindow(ActiveWindowMode.TradePanel);
     if (!subscribedToUpdate)
     {
         UIController.current.statusUpdateEvent += StatusUpdate;
         subscribedToUpdate = true;
     }
 }
Exemple #5
0
    public void ShipLoading(Ship s)
    {
        if (loadingShip == null)
        {
            loadingTimer = LOADING_TIME;
            loadingShip  = s;
            if (announceNewShips)
            {
                GameLogUI.MakeAnnouncement(Localization.GetAnnouncementString(GameAnnouncements.ShipArrived));
            }
            return;
        }
        availableVolume = workersCount * WORK_PER_WORKER;
        DockSystem.GetCurrent().HandleShip(this, s, colony);
        loadingShip     = null;
        maintainingShip = false;
        s.Undock();

        shipArrivingTimer = GameConstants.GetShipArrivingTimer();
    }
Exemple #6
0
 public void SetObservingDock(Dock d)
 {
     if (d == null)
     {
         SelfShutOff();
         return;
     }
     else
     {
         if (dockSystem == null)
         {
             dockSystem = DockSystem.GetCurrent();
         }
         observingDock = d; isObserving = true;
         UIWorkbuildingObserver uwb = WorkBuilding.workbuildingObserver;
         if (uwb == null)
         {
             uwb = UIWorkbuildingObserver.InitializeWorkbuildingObserverScript();
         }
         else
         {
             uwb.gameObject.SetActive(true);
         }
         uwb.SetObservingWorkBuilding(observingDock);
         if (tradingListPanel.activeSelf)
         {
             PrepareTradingPanel();
         }
         else
         {
             PrepareImmigrationPanel();
         }
         if (observingDock.correctLocation)
         {
             nextShipTimer.text = observingDock.shipArrivingTimer.ToString();
         }
     }
 }