Which it looks like it won't, if somehow the improvementInProgress is NOT in the list of potentialTileImprovements.
Only case I can think of is: You captured an enemy city with a civ--unique improvement in the middle of construction. So fixed that as well.
* AutoPlay initial hack
* Removed extra changes
* Added canceling AutoPlay and its own button
* Victory screen showing up stops AutoPlay
* Removed AutomateTurn for the spectator
* Right Clicking AutoPlay Button starts AutoPlay immediately
* Renamed NextTurnMenu to AutoPlayMenu
* AutoPlay can now only begin on the players turn
* Added specific unit actions AutoPlay
* AutoPlay stops on VictoryScreen and GreatPersonPickerScreen
* AutoPlay now stops when loading a new game
* Hovering the mouse over the AutoPlayStatusButton now stops AutoPlay
* Removed temporary right click NextTurnButton functionality
* Removed multi-turn AutoPlay from multiplayer games
* Loading a multiplayer game now stops AutoPlay
* AutoPlayStatusButton persists over reloading WorldScreen
* Victory popup now stops autoplay
* AutoPlay now automatically picks great person
* Full AutoPlay now captures cities
* Added settings.isAutoPlaying and fixed bug with closing game in the middle of AutoPlaying a turn
* AutoPlay now correctly stops when a victory screen is shown
* AutoPlay now automates city constructions without autoAssignCityProduction being on
* Reordered NextTurnAction
* Removed extra condition for displaying AutoPlay text on next turn button
* Moved AutoPlay settings to new tab
* Changed AutoPlay slider
* Refactored Settings to have AutoPlay to be in a new subclass
* Added an show AutoPlay button setting, commented out unimplemented settings
* Opening the exit game window stops autoPlay
* Made cyclopedia entry
* Added translations
* AutoPlayStatusButton now ends with a new line
* Commented out extra code and removed extra import statements
* Fixed UncivSlider Change
* Fixed merge conflicts
* Settlers no longer stuck in endless loops wanting to found cities on tiles they can't reach @tuvus
* Support for Leader voices (#10395)
* Prepare Leader Voices: Framework
* Leader Voices: Hooks and corresponding text field comments
* Leader Voices: wiki
* Leader Voices: oops, comments
* Decouple voice play calls to make global modification easier
* Move voices to own folder and give them a separate volume setting
* Oops, template needed too
* Oops, wiki needed too
* Resolved#10366 - City centers don't provide resources you don't have tech to extract
* Add a TriggerUponDiscoveringTile unique type (#10523)
* Add a TriggerUponDiscoveringTile unique type
* Add a check for trigger presence
* Add gain stat modified by speed and improvement speed by filter uniques (#10443)
* Add gain stat modified by speed and improvement speed by filter uniques
* Fix rulesets
* Remove nonfunctional leftover resource text
* Reword improvement unqiue as suggested
* Add the SellBuilding Unique (#10514)
* Restored the SellBuilding Unique
* Rephrased SellBuilding unique
* Version rollout (#10530)
* Bump version and create initial changelog entry
* Update Brazilian_Portuguese.properties (#10528)
* Update French.properties (#10524)
* Update Italian.properties (#10522)
* Update Polish.properties (#10521)
* Update Polish.properties
* Added Fastlane_short_description
* Update Malay.properties (#10520)
Translated line 33 to line 325.
Not at all finished.
This time though I didn't mess up.
---------
Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Mikhail <151419244+MetaFBMI@users.noreply.github.com>
* Better performance for 'best tile to found city' (minimized canReach calls) @tuvus
* 4.9.0
* [Translation] Add back "general" unit types (#10526)
* Add back "general" unit types
These entries have been removed from translation files, making them untranslated in-game (in Civilopedia articles)
* Revert changes in template.properties
* Fix missing unit type translations
Fix by @SomeTroglodyte
* Changed some parts of GameSettings back to master.
* Changed right clicking to call startAutoPlay instead of setting it itself
* Fixed some !isHuman() conditions to also include full AutoPlay and refactored some other AutoPlay code
---------
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com>
Co-authored-by: Sergey <serdav74@inbox.ru>
Co-authored-by: SeventhM <127357473+SeventhM@users.noreply.github.com>
Co-authored-by: PLynx <pawelrys2011@gmail.com>
Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Mikhail <151419244+MetaFBMI@users.noreply.github.com>
* Initial refactor
* Moved checking if a tile has an enemy to a new method
* Rewrote getDistanceToEnemyUnit
* changed the position of the logic of checking if the enemy is still there
* Changed some of the other methods to use the ThreatManager getClosestEnemy()
* Added a new getTilesWithEnemyUnitsInDistance method
* Added a new getEnemyMilitaryUnitsInDistance method
* Converted a few lines to use ThreatManager
* Changed Air units to use threat manager
* Fixed tileWithEnemy error
* distanceToClosestEnemyTiles now clears at the start of every turn
* Added blank lines to end of ThreatManager.kt
* Renamed tilesInRange to tilesWithEnemyUnitsInRange
* Changed ArrayList return to a MutableList
* Removed ClosestEnemyTileData being a data class
* Improved commenting
* Improved commenting2
* getEnemyMilitaryUnitsInDistance now uses a flatMap and moved getDangerousTiles to threat manager
* Created a new helper method getEnemyUnitsOnTiles
* Renamed clearThreatData to clear
* Added shortcut if maxDist is less than or equal to distanceSearched
* Fixed distanceWithNoEnemies in getTilesWithEnemyUnitsInDistance
* Fixed notFoundDistance being higher than maxDistance when takeLargerValues is false
* Added some ThreatManager tests
* Added some more ThreatManager tests
* Removed visible map after use
* getTilesWithEnemyUnitsInDistance doesn't search distances <= tileData.distanceSearched (previously was <)
* Added 3 more tests
---------
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Rescue Bosnian.properties
* Rename and revert
* Let's minimize diff size for completionPercentages.properties from now on
* One generate translations run on Bosnian
* Add the Flag
* Add the LocaleCode
* Fix illegally tranzlahtedd placeholders
* Simplify MapOverlayToggleButton signature and let the instances use individually moddable images
* Gimp sources of new images (all from existing attributions)
* New images and atlas
* ignore trigger condtional uniques
* Have UniqueTriggerActivation only add the buildings of its unique
* (minor optimization) move where we find the free building
* Once again I forget about imports
* Centralize shift and control key detection (Unit multiselect now with right-shift too)
* Lint of an ugly curly brace placement - otherwise the original was fine
* Answer open question in comment
* Follow a Gdx 1.12 deprecation
* Another clarifying comment - on ScrollPane's built-in potential surprise that the constructor calls its own overridable public methods
* Initial console, with 1 command :D
* add/remove city tiles
* add/remove units!
* Added command history, accessible with up and down keys
* 'add promotion' cli command
* 'remove promotion' cli command
* Enumified
* Converted enums into classes - enums are weirdly restricted in all kinds of uncomfortable ways
* Added autocomplete!
* Add back "general" unit types
These entries have been removed from translation files, making them untranslated in-game (in Civilopedia articles)
* Revert changes in template.properties
* Fix missing unit type translations
Fix by @SomeTroglodyte
* Add gain stat modified by speed and improvement speed by filter uniques
* Fix rulesets
* Remove nonfunctional leftover resource text
* Reword improvement unqiue as suggested
* Prepare Leader Voices: Framework
* Leader Voices: Hooks and corresponding text field comments
* Leader Voices: wiki
* Leader Voices: oops, comments
* Decouple voice play calls to make global modification easier
* Move voices to own folder and give them a separate volume setting
* Oops, template needed too
* Oops, wiki needed too
* UncivGame is a pure class file again, GUI split off
* Purify GameSettings step 1 - non-multiplayer nested classes
* Purify GameSettings step 2 - multiplayer nested classes
* Purify GameParameters - BaseRuleset to own file
* Rework WindowState to centralize minimum/maximum treatment
* Rename MultiplayerTurnNotifierDesktop to UncivWindowListener
* Clarifications on what the WindowListener actually does (and now the attention-getting does something on non-Windows too)
* Change "took tile damage" notification to select the poor victim
* Convenience constructor for NotificationAction:MapUnitAction
* More verbose Kdoc for MapUnitAction
* Merged Original AIDiplomacyBalancing changes to this branch
* Fixed being over supply resulting in the civ not attacking
* Fixed "War with allies" motivation not being added
* Drop AndroidTvLauncher - unused
* Additional memory info on Android CrashScreen
* Refactor getModsAndBaseRuleset - reduce clones and put base first
* Add Permanent audiovisual Mods to CrashScreen report
* Add a secret Debug option to intentionally crash Unciv
* Make "Secret" debug OptionsPopup page available on Android w/o physical keyboard
* Add AndroidTvLauncher back in
---------
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Refactor: move UI functions from Building to BuildingDescriptions
* Move Nation "unique building" diff code to BuildingDescriptions, fix hidden ignore, equalize to how BaseUnitDescriptions.getDifferences works
* Fix translation errors for difference description "Lost ability"
* River yields moddable and Civilopedia entry
* Improve text and better fresh water explanations
* Map editor exclusion as Unique, for River and previously hardcoded Improvements
* Map editor brush to Civilopedia link, starting locations cleaned
* Some SeventhM input applied
* Reword River/Lakes/Oasis civilopediaText and comments again
* Let WorldScreenTopBarStats scale itself down when content exceeds available width
* Refactor scale mapper functionality into reusable ScalingTableWrapper
* Use ScalingTableWrapper on WorldScreenTopBarResources too
* Oops, they're now equal, but technically it should be prefWidth now, and the comment is moot
* Added Human and AI filters, separated civFilter from nationFilter (very similar and yet slightly different)
* Changed "Human" and "AI" to "Human player" and "AI player"
* Fix "AskForAssistance" Quest notification untranslatable
* Extend DiplomacyAction to allow showing the TradeTable of the other civ
* Make "trade ends" notifications clickable
* Make entries in Trade page of Empire Overview clickable
* Highlight selected civ in DiplomacyScreen, moddable
* A little proactive comment
* Completely rewrote settler settle logic
* Added back original file to eligible locations
* Improved settling
* Fixed not finding cities in range
* Fixed settle AI not filtering impassible tiles.
* Fixed the possibility that there is no best tile within range.
* Fixed minimum city range being to low and causing an error
* Found the real fix for when there is no path to a tile to settle
* Adjusted tile ranking values
* Inverted sorting order to be from highest to lowest
* Fixed using tile instead of rankTile
* Fixed settle AI only looking at the current tile
* Changed behavior of settle AI at the start of the game
* Reduced the impact of being near a city
* Evaluation now assumes that a lighthouse is build while on a coast
* Settle highlight now sorts correctly
* Changed the weight of being near a city again
* Settle AI now prefers moving to the best tile when no viable tiles were in close distance
* Fixed an annoying bug where the settle does not value a city consistently for ranking
* Fixed a newer version of the unreachable tile error again
* Increased the distance to consider cities by one
* Tiles to settle now do not contain duplicate unique luxury resource values
* Increased coast tile value
* Removed only AI benefiting from ranking unexplored tiles
* Changed nearbyCities.any to a for loop
* Changed filter and sorting order
* Move rankTile to its own function
* Moved valuing tiles by distance to city to its own function
* Filtering tiles now creates a new map
* First settler no longer explores for a better location
* Removed bestTile rank from the return
* Changed BestTilesToFoundCity to return a separate class holding the return data
* Removed some trailing whitespace
* RekMod-inspired: StatPercentFromReligionFollowers does work on FounderBelief target
* RekMod-inspired: Make StatPercentFromReligionFollowers check correct Religion
* RekMod-inspired: Prep: flags on ImprovementBuildingProblem
* RekMod-inspired: Don't offer e.g. Kampong Ayer to non-Brunei Workboats
* Update "filtering Uniques" documentation
Each error has in fact 2 determiners: What the error *severity* is (probably ok, warning, error) and what the *scope* is (error regardless of what ruleset we're in, error because of the specific ruleset)
Having the warning be as part of the scope is...problematic, but that's for phase 2, this is just a rename
* Added AI Unit retreat behaviour
* Reduced highest value to allow for variation
* Fixed distance calculations
* Tiles farther away are now checked first
* Units no longer try to retreat when at a far distance
* Changed unit priority values to account for unit health for retreating
* Units don't retreat while at peace
* canUnitSwapToReachableTile no longer removes the units from their tiles.
* Decreased retreat trigger range
* Renamed tryRetreat to trySwapRetreat to match its current functionality
* Allow typing Y and N in file names in Linux custom save file dialog
* Fix default custom save location suggestion on X11
* Minor linting
* Allow clean reactivation of custom buttons after cancelling the file chooser
* User-Cancel support on Android and non-X11 desktop
* Block custom save for online multiplayer games
* Fix X11 custom save remembering location
* Fix X11 custom save "Save" button enabling, forbid potentially bad names
* Add overwrite confirmation to X11 custom save
* Redefine how local saving of online multiplayer games is blocked
* Verbose exception for the original RekMod's Civilian crash
* Make ConstructImprovementInstantly validation gameInfo-agnostic
* Helpers to encapsulate repetitive Conditional test patterns, eliminating ruleset(), all ruleset access guarded
* Make ConditionalFirstCivToResearch actually work on Policies - ???
* Linting
* Revert params accessor helpers and reduce ConditionalFirstCivToResearch to tech only
* Implement ConditionalFirstCivToAdopt for nicer symmetry
* Fixed cities being sold for at most 1000 gold
* Replaced evaluateBuy/SellCost with evaluateBuy/SellCostWithInflation
* Fixed goldInflation being multiplied instead of divided
* Increased inflation modifier, lowering it's impact
* Changed inflation values to be lower
* Moved return value to be inline again (it was moved for testing)
* Added two new Conditional Uniques
These are:
- <when above [amount] gold>
- <when below [amount] gold>
* Added Remove Building unique
It has two parameters: buildingFilter and cityFilter
* Minor example update
* Applied the corrections proposed by SomeTroglodyte
* Update uniques.md
* Slightly changed an unique text
Removed "in" word from the unique
* Updated the Stat Conditional to support more stats
Now supports more stockpileable Stats
- Gold
- Faith
- Culture
- Science
* Added the game speed-adjusted conditionals
Now there are 5 uniques in my pull request
* Integrated the Stat and Resource Conditionals
Requested by @yairm210
* Applied the suggestions of @yairm210
* Applied the suggestions of @yairm210 again
I hope my PR is ready to merge
* Bump version and create initial changelog entry
* Update Catalan.properties (#10310)
* Fix Manufactory name (#10306)
* Fix Manufactory name
Like, why on earth was it called the same as the factory??
* Update Spanish.properties
* Update Spanish.properties
* Update Japanese.properties (#10269)
* Update Japanese.properties
* Update Japanese.properties
---------
Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: North Field <56919414+Harukin1030@users.noreply.github.com>
* Fix consuming resources not being affected by condtionals
* Add requirements from buildings back in
* one too many parenthesis
* Whoops, forgot a bracket
* Fix Iconstruction
* Accidental font regression
* Address suggested changes
* Fix font "symbols" not showing
* Move Fonts.kt to sub-package
* Re-sort imports
* Move top-level constants to prepare split
* Split Fonts.kt each existing class to its own file
* Split off FontRulesetIcons
* Linting and comments
* Try to respect actual font layout, so fontSizeMultiplier works for ruleset icons too
* Replace font-based nation symbol in top bar with statically sized actor
* Reuse getReadonlyPixmap in extractPixmapFromTextureRegion
* Tweak topbar selected civ vertical align to be more pleasing to the human eye
* FasterUIDevelopment missing implementation of FontMetricsCommon
* Address hardcoded pixel coordinates comment
* Readability and comment cleanup
* More readability changes
* Extend MusicController to allow one extra 'overlay' track
* Reduce CityAmbiencePlayer to a proxy for MusicController's 'overlay'
* Treat all the LongLine complaints
* Test Free Buildings
* Flip the order of logging free buildings to avoid loops with stat buildings
* unprivate constructionComplete for the notification and add validating the queue to addBuilding
* reimplement #10142
* Switch free buildings in cityFilter to also use constructionComplete for consistency
Problem was that updating the select box was inconsistent
Simplified by
- Separating 'do we have maps' and 'do we have recent maps' logic from the loading of all maps
- Map loading done in one continuous thread not one-per-map
- Only the map-loading thread triggers selectbox load