* Unit tests for "canPathThrough"
* Refactoring of canEnterTiles() and isAtWarWith()
* Do not check isEmpty() twice
* Using of the cached MapUnit uniques
* Enable the Denmark civilization
* Nation unique ability is implemented
* Units unique abilities are implemented
* Unit icons
* Misprint in the tech name is corrected
* Update Tutorials.json
Added tutorial for Natural Wonders
* Enable displaying the Natural Wonders tutorial
* Display the tutorial when the wonder is found automatically
* Minor performance optimization
* Removing debug leftovers
See also 33da0e3a7f
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
* Bring Incas into the main game
(also changes slinger withdraw ability to inheritable)
* Update Nations.json
* ESC/Back handling with multiple popups
* ESC/Back handling with multiple popups
* ESC/Back handling with multiple popups - clearer code
* Bring Incas into the main game
(also changes slinger withdraw ability to inheritable)
* Update Nations.json
* Fix for #2358 JR's catch - crash after selection in nation picker
- events can fire after an actor has already been removed from its stage
* Bring Incas into the main game
(also changes slinger withdraw ability to inheritable)
* Update Nations.json
* Reworked Options Menu: Clarity, No Scroll jump, less repaints
* Reworked Options Menu: Minor cosmetic change
* Reworked Options Menu: Removed test code
* Bring Incas into the main game
(also changes slinger withdraw ability to inheritable)
* Update Nations.json
* Re-think of the New-Installs Language Picker
* Language picker and new installs - reworked how flag is cleared
* Bring Incas into the main game
(also changes slinger withdraw ability to inheritable)
* Update Nations.json
* ScrollPanes steal and release focus automatically
* ScrollPanes steal and release focus automatically: Commented & param names
* Bring Incas into the main game
(also changes slinger withdraw ability to inheritable)
* Update Nations.json
* Back button fix, ESC, and behaviour of them in popups
* ESC/Back now work if there's no exitEvent
* ESC/Back: JackRainy is right, exit prompt now cancellable with same key
* Bring Incas into the main game
(also changes slinger withdraw ability to inheritable)
* Update Nations.json
* Fix: Fortify until healed shouldn't be enabled when Fortify isn't
* Bring Incas into the main game
(also changes slinger withdraw ability to inheritable)
* Update Nations.json
* Discord thread is now a timer and gets notified to shut down
Solved truncated Autosaves: Made it singlethreaded within shutdown.
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Bring Incas into the main game
(also changes slinger withdraw ability to inheritable)
* Update Nations.json
* Small version: remember window size only, and leave positioning to Gdx
* Update Polish.properties (#2275)
* Update Italian.properties (#2276)
* Update French.properties (#2279)
* Traditional Chinese Update (#2283)
Update for the traditional Chinese translations.
* Update translations + notification about generated translation files (#2280)
* Translations
* Notify about successful creation of the files
* A few more translations
* Misprint is corrected
* Translations for Inca
* Translation updates
Co-authored-by: RadioMagnetofonStereofoniczny <remixionmix@gmail.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: RobertGine <61517798+RobertGine@users.noreply.github.com>
Co-authored-by: The Bucketeer <57716526+GeneralWadaling@users.noreply.github.com>
Co-authored-by: Jack Rainy <JackRainy@users.noreply.github.com>
* Ability to place the resources over the terrain features
* Fossils can be found under the forest
* Revert previous commit "Fossils can be found under the forest"
This reverts commit 4e1fcd8c45ffd08090ce4b808d228636bfccfc6b.
* Ignore the vegetation and spawn the resource right under it
* Decrease battery usage: no animation of damage in the health bar
* Decrease battery usage: no WSAD support for Android
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* .gitignore: mods SaveFiles transients
* Simple transposition prevents mod improvements from appearing below roads&removals
should also move modded nations to the top in new game player picker
* Insert the empty lines to split the nations, policies, etc.
* Read the translations from the mod folders
* Refactoring: Get local link to the translations
* Refactoring: Moving percentage calculations into the TranslationFileWriter
* Refactoring: Caching of the generated strings is removed
* Generate the languages files for the mods
* Minor refactoring
* Using local file storage
* Inca abilities for Terrace farm and Great Andean Road
* Language files re-done by manual pull and merge
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* For #2200: Avoid MacOS tripping us
* Second hidden test in packImages
* Clearer message for a specific mod error, UI message for savegames missing mods
* Fixed obsolete imports from rejected experiments
* Tiny lint issue
* Irrelevant change to test push after rebase
* A little more information in civilopedia for improvements and nations
* Differentiate civilopedia and picker use
* Missing lines in translations template
* allTranslationsEndWithASpace test
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Unit can now only be purchased if no other unit of same type is stationed in city center #2081
* #2081
Added unique to landsknecht and changed condition for movement panelty
* Refactored when statement to if
#2081
* Only one plane at a time can be purchased to a maximum of 6 that are NOT transported in a single city
#2081
* removed duplicate code
#2081
* refactor canPurchase() and now track bought units in a city in a mutableList
#2081
* refactor canPurchase() it basicly just tracks if the unit can be placed on the center tile! if it cant then we dont allow the purchase!
#2081
* Changed wording of unique and added translations
#2081
* Changed wording of unique
#2081
* removed unneeded imports
#2081
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Refactoring: Split reading and writing of translation files
* New generator of translation strings from JSONs
* Switch to the new strings generation approach
* Using the regex for similar strings + bugfix for Submarines
* Transfer of the existing translations
* Clean up of the template file and translated files based on it
* Unit tests are updated
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
#2152 is nice but sorts by internal key, thus translations are not
taken into account and cities are sorted by their guid
Also moving larger amounts to the top may not be everyone's taste
so this offers the user a choice
* Make TranslationFileReader as object class
* Generate strings from Tutorials.json
* Simplified storage and loading of the tutorials
* Transfer existing translations
* Snow, Atoll & Ice
* Fix White Hexagon + Small NW refactor
* More Land in Continents #1886
* Atoll can spawn only on Coast
* Added new constants and turned Constant into an object
* Latitude and Longitude utility methods
* New MapGenerator steps
* New MapParameters & MapGenerator cleanup
* Added New Map option to MapEditor menu
* New parameters default values and limits
* archipelagos map type
* Translations & Atlas
* removing unneeded octave displacement
* Fix Archipelago
* Perlin noise parameters & no-elvis in TileMap
* Rebuilt Atlas
Co-authored-by: Eddh <remi.dufour@protonmail.com>
* Rename "translationsByLanguage" folder
* Minor refactoring
* Generate Nations strings
* Use the nations strings while creating the translation files
* Clean up of Nations files
* Transfer existing translations
* Get rid of the nation's translated name
* Transfer just few nations' translations for languages without Nations_Language.json
* Clean up of not used greetings
* Correct marking of not translated strings
* Unique abilities moved to enums
* remove diplomatic victory type WIP
* Address review comments. Translations for unique abilities names aren't used anywhere as far as I can tell, but added them to relevant translation files just in case.
Co-authored-by: nmeze <nicolas.mezeret@gmail.com>
* Issue#2019
Player should not be able to nuke a civilsation that it has a peace treaty with
* wordlscreen is updated when notification shown (#2019)
* Fixed PR comments #2019
* issue #2019
* Fixed PR comments #2019
* Fixed PR comments #2019
* Fixed PR comments #2019
refactoring
* Fixed PR comments #2019
removed unnecessary line
* Initial preparations
* Moving to the separate package
* Calculation and visualization
* Translations
* Using a local function instead of additional class
* Using a local function instead of additional class (part 2)
* Rankings French.properties
* Fixup of the leftover
Co-authored-by: RobertGine <61517798+RobertGine@users.noreply.github.com>
* Update Polish.properties (#1997)
* Update Polish.properties
* Update Polish.properties
This should solve the problem (and correct a small translation error)
* Update Polish.properties
Next corrections, thanks @rprzystasz
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* New french translation (#2014)
* Update Italian.properties (#2016)
* Update German.properties (#2017)
* Update German.properties
* Create Nations_German.json
Start new file for nations translation in german
* Update Nations_German.json
* Extensive correction of French translation (#2022)
* Resolved#1986 - research agreement cost consistency
* Tile stats are shown on a row, rather than on a column (#1946)
* Feature/refactor actions (#2008)
* Fixes Issue #1697 by adding information to the special production constructions.
* Get rid of extra $ sign in the SpecialConstruction tooltips
* Major refactor to use Sequences instead of List to try to improve logic whenever getting a list of tiles at a distance.
* Get rid of extraneous parameter
* get rid of extra exception. slight refactor placeUnitNearTile for readability
* Fix bug of doing intersection instead of union
* Add an extra method to get tiles in distance range
* Refactor the UnitActions to use more sequences and also to grab the actions needed by Automation directly.
* Update based on comments
* Redo to be more easily compared
* use elvis operator for assignment
* resolve merge conflicts
* Fix typo
* Fix one more typo
* Get rid of one more search for great person actions
* Get rid of one more search for pillage action
* Try to realign methods names for better diff
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Resolved#2012 - manually place starting locations are no longer visible in-game
* Extensive correction of French translation
Many, many several little corrections to the French translation. A few mistakes marred gameplay a little bit, but most of them were simple grammar mistakes. But the details are always important.
* Modifications to resolve conflict
* Modifications to resolve conflict (bus)
* Modifications to resolve conflict MK3
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
Co-authored-by: Federico Luongo <fluo392@gmail.com>
Co-authored-by: Kentalot <Kentalot@users.noreply.github.com>
* Updates
Co-authored-by: Freshy <60152907+GreenFreshy@users.noreply.github.com>
Co-authored-by: armandberger <hoel@free.fr>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: CarpeLuxNoctem <61473456+CarpeLuxNoctem@users.noreply.github.com>
Co-authored-by: RobertGine <61517798+RobertGine@users.noreply.github.com>
Co-authored-by: Federico Luongo <fluo392@gmail.com>
Co-authored-by: Kentalot <Kentalot@users.noreply.github.com>
* Place the unit at the current position firstly
* More simple solution
* Try to place unit with traceability taken into account
* Return money and notify about the problem
* Popup dialog instead of notification
* Refactoring: Split UI and logic
* Fixes Issue #1697 by adding information to the special production constructions.
* Get rid of extra $ sign in the SpecialConstruction tooltips
* Major refactor to use Sequences instead of List to try to improve logic whenever getting a list of tiles at a distance.
* Get rid of extraneous parameter
* get rid of extra exception. slight refactor placeUnitNearTile for readability
* Fix bug of doing intersection instead of union
* Add an extra method to get tiles in distance range
* Refactor the UnitActions to use more sequences and also to grab the actions needed by Automation directly.
* Update based on comments
* Redo to be more easily compared
* use elvis operator for assignment
* resolve merge conflicts
* Fix typo
* Fix one more typo
* Get rid of one more search for great person actions
* Get rid of one more search for pillage action
* Try to realign methods names for better diff
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Changes:
- worker automation to build Railroad overseas (currently they do not improve roads/build new)
- recognize harbor connection and add Railroad production bonus
- extracted and refactored connections to capital lookup
* CR fixes
* Fixes Issue #1697 by adding information to the special production constructions.
* Get rid of extra $ sign in the SpecialConstruction tooltips
* Try to fix bug I introduced
* Fixes Issue #1697 by adding information to the special production constructions.
* Get rid of extra $ sign in the SpecialConstruction tooltips
* Major refactor to use Sequences instead of List to try to improve logic whenever getting a list of tiles at a distance.
* Get rid of extraneous parameter
* get rid of extra exception. slight refactor placeUnitNearTile for readability
* Fix bug of doing intersection instead of union
* Add an extra method to get tiles in distance range
* Update based on comments
* Possible Bug Fix
Testing if clipboard content == null
This should have been a problem before
* Moved null check into addMultiplayerGame
making it more readable
* Update Polish.properties (#1931)
* Update Russian.properties (#1932)
* Update Italian.properties (#1933)
Also added Research Agreement
* Update Japanese.properties (#1942)
* Update Japanese.properties
* Update Japanese.properties
* Update Japanese.properties
* Translations update (#1943)
* Translations update
* Render some missing characters in the Ukrainian translations
* More translations
* Fixed typo: Otto von Bismark -> Otto von Bismarck (#1954)
* Translation updates, added test to assure that translations in template file end with a space
* Disabled Maven - hopefully Travis check will not take 10 minutes and will pass
Co-authored-by: Freshy <60152907+GreenFreshy@users.noreply.github.com>
Co-authored-by: IraqLobster34 <56483230+IraqLobster34@users.noreply.github.com>
Co-authored-by: Smashfanful <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: paontv <57051667+paontv@users.noreply.github.com>
Co-authored-by: JackRainy <JackRainy@users.noreply.github.com>
Co-authored-by: schnippl0r <58435847+schnippl0r@users.noreply.github.com>
* Added MultiplayerScreen
Added MultiplayerScreen Class to replace openMultiplayerPopup()
Added Sessionbrowser UI elements
* Added Session Browser functionality
* Added ResponsePopup
is used for "copy UserID" among others to be more responsive
* Added "Edit Session" and Help Button
Changed saving Multiplayer Session to seperate Folder
-TODO? Help Button chould be in every pickerscreen
* removed function for Turn Check
heard tobo is working on a Turn checker so no need for the function
* Added delete to editScreen + Cleanup and Comments
delete should be a "give up" instead
* creating new game as multiplayer now saves to multiplayer folder
+ gameId gets copied to clipboard
* Delete unintended save file
delete a save file which got falsely commited
* Added helpPopup Text and refresh Button
* Cleanup + Translation
* More Cleanup
Refresh List doesn't flicker anymore
Response PopUp time for new Game reduced
* Fixed Game crashing on reload
* Added Add Current Game
Games you don't know the gameID of can now be saved when running
* Added Translations entry
* adding requested changes
+ added addCurrentGameButton() for readability and to reduce indentation
- removed unnecessary returns
+ sequentialised try catch for better readability
+ added comments to responsePopup for better unstanding
* Adding requested indent changes
- removed all unnecessary indents
* Enable Polinesia worker to build regular improvements
* More short notation, similar to next line
* Revert "More short notation, similar to next line"
This reverts commit f97cc59fac449dcddab7045761cfc1ceb8a900ce.
* Tied the unit upkeep scaling to game speed
* Refactor: Modifier and TurnLimit are now fields
* Turn limit will be derived from the GameSpeed.modifier and base game duration
* Mongolia
* Translation & Atlas
* Remove debug option
* Remove erroneous import
* Promotions.addXP
* Khan heals 15 HP
* XP bonus fix
* Added 'Mongol Terror' which is the term used for the mongolian combat bonus
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Diplomacy overview window: Using full screen
* Different shades of friendship
* Show/hide the relations for the picked civilization
* Minor refactoring
* Optimized handling of lines visibility
* Minor refactoring
* Refactoring: special function Battle.nuke() for missiles
* Special BattleTable.simulateNuke() function for missiles
* Refactoring: BugReport popup moved into a separate function
* Refactoring: call defaults().pad once in the init()
* Refactoring: not using "syntax sugar"
* Fix community popup not opening
Fixes a regression in b95844d2f4. This commit refactored popups and it was thought that the "screen has popup -> don't show popup" was correct for all popups. That assumption was incorrect, the community popup was not opening anymore as well as the game menu popups (editor and normal game) could not be opened over other popups anymore.
This commit fixes that by introducing a queue for popups. When you try to open a popup and one is already open, the popup you tried to open only gets shown when the popup that was already open is closed. This can be manually overridden with a calling the `open` method with a `(force = true)` argument.
Also, all popups are now and should be opened and closed only with their `open()` and `close()` methods to ensure this behavior works.
* Refactor: Remove all open() methods from popup constructors
While it may be a little less to type, it should be up to the caller to decide to open a popup over other popups (via the `force = true` parameter) or not. This is not possible if a popup is opened automatically within its constructor, which is why that is the wrong place to open the popup-
Implemented with @Azzurite's suggestions to match the button's behavior with the player's own city buttons:
* First tap slides the city button down so that the underlying tile is visible.
* Second tap on the button presents the diplomacy screen focused on the city's owner civ.
* Add missing Forge and Seaport production bonus uniques
Parital fix for #1762
- Forge gets "+15% production of land units"
- Seaport gets "+15% production of naval units"
* Adds missing translation "+15% production of land units"
* Implemented aircraft carrier "Flight Deck" and "Armor Plating" promotions
* Template for the translation strings
* New icons are added
Co-authored-by: ltrcao <ltrcao@users.noreply.github.com>
First, `PopupTable` and all extending classes had the `Table` at the end removed. Second, the popup base classes `Popup(Table)` and `YesNoPopup(Table)` were moved from the worldscreen to the util package.
Third: The popups were inconsistent. In CameraStageBaseScreen, there was a check with 3 parts, one if any tutorial was showing, second if any child is a TradePopup, and third if the boolean field "hasPopupOpen" is true.
However, all of these checks were, in the end, `Popup(Table)`s on the screen. So, this check has simply been changed to check if any child is a `Popup(Table)`. All the other checks and their relating code could simply be removed.
* Barbarians don't move/attack on the turn of their spawning
* Revert "Barbarians don't move/attack on the turn of their spawning"
This reverts commit b088fb8c
* Better implementation
Co-authored-by: dumichno <57294813+dumichno@users.noreply.github.com>
* Fix: ships being teleported into landlocked cities
* Proposal: extend the city teleport to all owned tiles
* Utilizing the existing method
Co-authored-by: dumichno <57294813+dumichno@users.noreply.github.com>
* Added map reveal when the player is defeated in singleplayer
* Added victory (actually defeat) screen when the player is defeated
* Moved the victory screen navigation to an appropriate place
* Moved the map reveal logic to WorldMapHolder
* Tutorials and Diplomacy button are hidden after the defeat
* Callback to exit the game by 'Back' button
* Prompt dialog for the game exit
* Additional strings for translations are generated
* Do not show exit prompt dialog twice
* Construction Queue
* Added constructionQueue in addition to currentConstruction: if currentConstruction is done, next construction from Queue is started; if Queue is empty invoke ConstructionAutomation
* Queue utility methods: add, remove, higher prio, lower prio
* Icons to move constructions in queue
* Top left city stats moved to top right panel
* Added current construction and queue construction to top left
* Extended selected construction (containing description) moved to bottom right, it is now displayed alternatively to selected tile
* Max queue size, cannot change queue in puppet city or in other player turn
* Queue and current construction reset on puppeting city
* Cleanup again
* CityStatsTable is a separate class so we can play around with where it's located with minimal code changes
* Rejection reason wrap & removing nothing on enqueue a construction
* Crude UI proposal
* Tutorial updates for queues
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Construction Queue
* Added constructionQueue in addition to currentConstruction: if currentConstruction is done, next construction from Queue is started; if Queue is empty invoke ConstructionAutomation
* Queue utility methods: add, remove, higher prio, lower prio
* Icons to move constructions in queue
* Top left city stats moved to top right panel
* Added current construction and queue construction to top left
* Extended selected construction (containing description) moved to bottom right, it is now displayed alternatively to selected tile
Rework
* Max queue size, cannot change queue in puppet city or in other player turn
* Queue and current construction reset on puppeting city
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Added the "crudely-drawn map" to ancient ruins outcomes
Closes#1640
* Extracted the constants for readability
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Songhai, Burial Tomb, Gold for capturing city
* Burial Tomb unique: double gold gained when city is captured
* Rebuilt Atlas and Translations
* Italian translation + fix missing translations
* Barbarian Camp Reward
Is now modified by Speed and Difficulty
* Added temporary growth number to CityButton.
* Added a growth bar to CityButton.
* Made relevant changes based on comments in pull request #1626
* Added the unicode infinity symbol to reflect no growth.
* New growth functions now return null instead of -1.
* Adjusted the population group width to account for large numbers.
* Changed the colour of the growth number.
Rulesets are heavy to load so we now have a RulesetCache, which can construct "custom" rulesets with a list of mods!
We now pack mod images on Desktop run, and load the atlases for the loaded mods on load game!
* Fix: "Sell the building" button being randomly disabled based on the sell price
* Fix: `sellBuildingButton` being enabled in puppet cities
Co-authored-by: dumichno <57294813+dumichno@users.noreply.github.com>