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(); } }
override public void Prepare() { PrepareWorkbuilding(); if (dockSystem == null) { dockSystem = DockSystem.GetCurrent(); } }
private void FinishShipService(Ship s) { DockSystem.GetCurrent().HandleShip(this, s, colony); servicingShip = null; maintainingShip = false; s.Undock(); shipArrivingTimer = shipArrivingTime; }
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; } }
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(); }
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(); } } }