Gate CityView behind own/spy/spectator and fix spectator city select - #15387
Closed
Fanfblrik wants to merge 1 commit into
Closed
Gate CityView behind own/spy/spectator and fix spectator city select#15387Fanfblrik wants to merge 1 commit into
Fanfblrik wants to merge 1 commit into
Conversation
Follows review on yairm210#15376: CityScreen is only reachable via tryGetCityView, and map selection uses ForeignCityView.canSelectOnMap instead of an isSpectator special-case in CityButton. Co-authored-by: Cursor <cursoragent@cursor.com>
7 tasks
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Contributor
Author
|
Superseded by a rebased PR after master CityScreen/TileView migration conflicts: will link the new PR once created. Made with Cursor |
7 tasks
Contributor
Author
|
Superseded by #15389 (rebased onto current master after CityScreen/TileView migration conflicts). |
Contributor
Author
|
Closed in favor of #15389. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tryGetCityViewwork in RFC: Views #15280. Replaces Gate CityView behind own/spy/spectator and fix spectator city select #15386 (rebased onto current master afterselectedGameView/ FoW unification).CityViewcan only be constructed when the viewer owns the city, has a set-up spy there, or is a spectator (require(canSeeInternals())). UI opensCityScreenthroughtryGetCityView/GameView.tryGetCityView, so an unauthorizedCityScreencannot be created.ForeignCityView.canSelectOnMap()instead of anisSpectator()special-case inCityButton. Spies still cannot select a foreign city as the WorldScreen attacker (bombard), only open it viatryGetCityView.Test plan
CityScreenopensCityScreen, diplomacy/info popup as beforeView/ second click opensCityScreen; first click does not select that city for bombardCityScreenfor allowed cities only