public override void Initialize()
 {
     this._systemWidget = new SystemWidget(this.App, this.App.UI.Path(this.ID, "starDetailsCard"));
     StarSystemInfo starSystemInfo = this._app.GameDatabase.GetStarSystemInfo(this._systemID);
     this._app.UI.SetText(this._app.UI.Path(this.ID, "intel_desc"), this._descriptor);
     this._app.UI.SetPropertyString(this._app.UI.Path(this.ID, "playerAvatar"), "sprite", Path.GetFileNameWithoutExtension(this._targetPlayer.AvatarAssetPath));
     this._app.UI.SetPropertyString(this._app.UI.Path(this.ID, "playerBadge"), "sprite", Path.GetFileNameWithoutExtension(this._targetPlayer.BadgeAssetPath));
     this._app.UI.SetVisible(this._app.UI.Path(this.ID, "system_map"), true);
     this._app.UI.SetVisible(this._app.UI.Path(this.ID, "gameStarSystemViewport"), false);
     this._app.UI.AddItem(this._app.UI.Path(this.ID, "gameViewportList"), "", 0, App.Localize("@SYSTEMDETAILS_SYS_MAP"));
     this._app.UI.AddItem(this._app.UI.Path(this.ID, "gameViewportList"), "", 1, "System");
     this._app.UI.SetSelection(this._app.UI.Path(this.ID, "gameViewportList"), 0);
     this._crits = new GameObjectSet(this._app);
     this._camera = new OrbitCameraController(this._app);
     this._sky = new Sky(this._app, SkyUsage.InSystem, this._systemID);
     this._starsystem = new Kerberos.Sots.GameStates.StarSystem(this.App, 1f, this._systemID, Vector3.Zero, true, (CombatSensor)null, false, 0, false, true);
     this._starsystem.SetAutoDrawEnabled(false);
     this._starsystem.SetCamera(this._camera);
     this._starsystem.SetInputEnabled(true);
     this._starsystem.PostObjectAddObjects((IGameObject)this._sky);
     foreach (IGameObject state in this._starsystem.Crits.Objects.Where<IGameObject>((Func<IGameObject, bool>)(x =>
        {
        if (!(x is StellarBody))
            return x is StarModel;
        return true;
        })))
         state.PostSetProp("AutoDrawEnabled", false);
     this._crits.Add((IEnumerable<IGameObject>)new IGameObject[3]
     {
     (IGameObject) this._camera,
     (IGameObject) this._sky,
     (IGameObject) this._starsystem
     });
     this._app.UI.Send((object)"SetGameObject", (object)this._app.UI.Path(this.ID, "gameStarSystemViewport"), (object)this._starsystem.ObjectID);
     this._critsInitialized = false;
     this._camera.PostSetLook(new Vector3(0.0f, 0.0f, 0.0f));
     this._camera.PostSetPosition(new Vector3(0.0f, 100000f, 0.0f));
     this._camera.MaxDistance = 500000f;
     this._camera.MinDistance = 100000f;
     StarSystemUI.SyncSystemDetailsWidget(this._app, this._app.UI.Path(this.ID, "system_details"), this._systemID, false, true);
     StarSystemMapUI.Sync(this._app, this._systemID, this._app.UI.Path(this.ID, "system_map"), true);
     this._currentFilterMode = DialogSystemIntel.PlanetFilterMode.AllPlanets;
     this._planetWidgets = new List<PlanetWidget>();
     this.SetSyncedSystem(starSystemInfo);
     this._systemWidget.Sync(this._systemID);
 }
Exemple #2
0
        public override void Initialize()
        {
            this._sky        = new Sky(this._app, SkyUsage.StarMap, 0);
            this._crits      = new GameObjectSet(this._app);
            this._planetView = this._crits.Add <PlanetView>();
            this._crits.Add((IGameObject)this._sky);
            OrbitalObjectInfo orbitalObjectInfo = this._app.GameDatabase.GetOrbitalObjectInfo(this._planetID);
            StarSystemInfo    starSystemInfo    = this._app.GameDatabase.GetStarSystemInfo(orbitalObjectInfo.StarSystemID);

            this._app.UI.SetText("gameColonyName", orbitalObjectInfo.Name);
            this._enteredColonyName = orbitalObjectInfo.Name;
            this._app.UI.SetVisible(this._app.UI.Path(this.ID, "btnAbandon"), false);
            this._app.UI.SetText(this._app.UI.Path("colonyCreateTitle"), (this._homeworld ? App.Localize("@UI_STARMAP_HOMEWORLD_ESTABLISHED") : App.Localize("@UI_STARMAP_COLONY_ESTABLISHED")) + " - " + starSystemInfo.Name);
            this._cameraReduced                 = new OrbitCameraController(this._app);
            this._cameraReduced.MinDistance     = 2.5f;
            this._cameraReduced.MaxDistance     = 100f;
            this._cameraReduced.DesiredDistance = 50f;
            this._cameraReduced.DesiredYaw      = MathHelper.DegreesToRadians(45f);
            this._cameraReduced.DesiredPitch    = -MathHelper.DegreesToRadians(25f);
            this._cameraReduced.SnapToDesiredPosition();
            this._starmapReduced = new StarMap(this._app, this._app.Game, this._sky);
            this._starmapReduced.Initialize(this._crits);
            this._starmapReduced.SetCamera(this._cameraReduced);
            this._starmapReduced.FocusEnabled = false;
            this._starmapReduced.SetFocus((IGameObject)this._starmapReduced.Systems.Reverse[starSystemInfo.ID]);
            this._starmapReduced.Select((IGameObject)this._starmapReduced.Systems.Reverse[starSystemInfo.ID]);
            this._starmapReduced.SelectEnabled = false;
            this._starmapReduced.PostSetProp("MissionTarget", (object)this._starmapReduced.Systems.Reverse[starSystemInfo.ID].ObjectID, (object)true);
            this._starmapReduced.PostSetProp("CullCenter", this._app.GameDatabase.GetStarSystemInfo(starSystemInfo.ID).Origin);
            this._starmapReduced.PostSetProp("CullRadius", 15f);
            this._app.UI.Send((object)"SetGameObject", (object)this._app.UI.Path(this.ID, "gameStarMapViewport"), (object)this._starmapReduced.ObjectID);
            this.CachePlanet(this._app.GameDatabase.GetPlanetInfo(this._planetID));
            this._planetView.PostSetProp("Planet", this._cachedPlanet != null ? this._cachedPlanet.ObjectID : 0);
            this._app.UI.Send((object)"SetGameObject", (object)this._app.UI.Path(this.ID, "system_details.Planet_panel"), (object)this._planetView.ObjectID);
            StarSystemMapUI.Sync(this._app, orbitalObjectInfo.StarSystemID, this._app.UI.Path(this.ID, "system_map"), true);
            StarSystemUI.SyncSystemDetailsWidget(this._app, "colony_event_dialog.system_details", orbitalObjectInfo.StarSystemID, true, true);
            StarSystemUI.SyncPlanetDetailsControl(this._app.Game, this._app.UI.Path(this.ID, "system_details"), this._planetID);
            StarSystemUI.SyncColonyDetailsWidget(this._app.Game, this._app.UI.Path(this.ID, "colony_details"), orbitalObjectInfo.ID, "");
            this._app.UI.SetVisible(this._app.UI.Path(this.ID, "system_map"), true);
            this._app.UI.SetVisible(this._app.UI.Path(this.ID, "gameStarMapViewport"), false);
            this._app.UI.AddItem(this._app.UI.Path(this.ID, "gameViewportList"), "", 0, App.Localize("@SYSTEMDETAILS_SYS_MAP"));
            this._app.UI.AddItem(this._app.UI.Path(this.ID, "gameViewportList"), "", 1, App.Localize("@SYSTEMDETAILS_STAR_MAP"));
            this._app.UI.SetSelection(this._app.UI.Path(this.ID, "gameViewportList"), 0);
            this._crits.Activate();
        }
Exemple #3
0
        public override void Initialize()
        {
            this._systemWidget = new SystemWidget(this.App, this.App.UI.Path(this.ID, "starDetailsCard"));
            StarSystemInfo starSystemInfo = this._app.GameDatabase.GetStarSystemInfo(this._systemID);

            this._app.UI.SetPropertyString(this._app.UI.Path(this.ID, "system_title"), "text", App.Localize("@SURVEY_OF") + " " + string.Format(App.Localize("@SURVEY_SYSTEM_THINGY"), (object)starSystemInfo.Name).ToUpperInvariant());
            this._app.UI.SetVisible(this._app.UI.Path(this.ID, "system_map"), true);
            this._app.UI.SetVisible(this._app.UI.Path(this.ID, "gameStarSystemViewport"), false);
            this._app.UI.AddItem(this._app.UI.Path(this.ID, "gameViewportList"), "", 0, App.Localize("@SYSTEMDETAILS_SYS_MAP"));
            this._app.UI.SetSelection(this._app.UI.Path(this.ID, "gameViewportList"), 0);
            StarSystemUI.SyncSystemDetailsWidget(this._app, this._app.UI.Path(this.ID, "system_details"), this._systemID, false, true);
            StarSystemMapUI.Sync(this._app, this._systemID, this._app.UI.Path(this.ID, "system_map"), true);
            this._currentFilterMode = SystemSurveyDialog.PlanetFilterMode.AllPlanets;
            this._planetWidgets     = new List <PlanetWidget>();
            this.SetSyncedSystem(starSystemInfo);
            this._systemWidget.Sync(this._systemID);
            this.UpdateCanPlaceTraps();
        }
Exemple #4
0
        public override void Initialize()
        {
            StarSystemInfo starSystemInfo = this._app.GameDatabase.GetStarSystemInfo(this._systemID);
            ColonyInfo     colonyInfo     = this._app.GameDatabase.GetColonyInfo(this._colonyID);
            PlanetInfo     planetInfo     = this._app.GameDatabase.GetPlanetInfo(colonyInfo.OrbitalObjectID);
            PlayerInfo     playerInfo     = this._app.GameDatabase.GetPlayerInfo(colonyInfo.PlayerID);

            this._playerID = playerInfo.ID;
            this._planetID = colonyInfo.OrbitalObjectID;
            this._app.UI.SetPropertyString(this._app.UI.Path(this.ID, "title"), "text", App.Localize("@UI_INDEPENDENT_CIVILIZATION_FOUND_TITLE").ToUpperInvariant());
            this._app.UI.SetPropertyString(this._app.UI.Path(this.ID, "faction_name"), "text", playerInfo.Name);
            this._app.UI.SetPropertyString(this._app.UI.Path(this.ID, "tech_level"), "text", "");
            this._app.UI.SetPropertyString(this._app.UI.Path(this.ID, "avatar"), "texture", playerInfo.AvatarAssetPath);
            this._app.UI.SetPropertyString(this._app.UI.Path(this.ID, "tech_level"), "text", App.Localize("@UI_INDEPENDENT_TECH_" + playerInfo.Name.ToUpper()));
            StarSystemMapUI.Sync(this._app, this._systemID, this._app.UI.Path(this.ID, "system_map"), true);
            this._app.UI.SetEnabled(this._app.UI.Path(this.ID, "diploButton"), (Kerberos.Sots.StarFleet.StarFleet.CollectAvailableFleets(this._app.Game, this._app.LocalPlayer.ID, this._systemID, MissionType.CONSTRUCT_STN, true).Any <FleetInfo>() ? 1 : 0) != 0);
            this._planetWidgets = new List <PlanetWidget>();
            this.SetSyncedSystem(starSystemInfo, planetInfo);
        }