Commit Graph

4459 Commits

Author SHA1 Message Date
0b50715fb3 Improve TranslationFileWriter (less hardcoding, fixes PolicyBranch) (#6421)
* Allow TranslationFileWriter to follow several superclass levels (fixes PolicyBranch names)

* Bring German and template up to par as baseline

* Framework to feed TranslationFileWriter from UniqueParameterType, also fixes Fountain of Youth

* TranslationFileWriter legacy guessing now _much_ simpler

* Fix "chance to be destroyed by nukes" case

* Fix tests (allTranslationsHaveCorrectPlaceholders goes cross-language)
2022-03-25 17:27:25 +03:00
f013d400b0 Added test to find unmatched < and > for conditional typos. (#6415) 2022-03-23 19:04:16 +01:00
80d9872b6e Fix crash starting up on Lollipop (#6412) 2022-03-22 21:19:23 +02:00
59dd696c3f Fix crash on loading a save where Machu Picchu is built (#6402) 2022-03-21 23:33:28 +02:00
c1737b6183 Custom desktop font (#6377)
* Custom desktop font

* Add `getDesktopAllFonts` to setting custom desktop font.

* Custom font.
`desktopFontFamily` change to `fontFamily`.
Add GameSettings.getSettingsForPlatformLaunchers().

* Add `Custom font` setting UI.

* Add `Custom font` on Android.

* `Default Font` use translations.

* format

* remove open fun.

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2022-03-21 21:12:16 +02:00
130fd653a4 Prevent Char-to-code crash (#6392) 2022-03-21 21:09:01 +02:00
cf21ade76e Moddable Ice generation (any impassable feature on Water possible) (#6329)
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2022-03-21 21:08:25 +02:00
7734a48237 Empire Overview Religion: Fixed header, selection more visible (#6369) 2022-03-21 21:06:19 +02:00
367a427436 Unified two uniques into one more descriptive unique (#6380)
* Unified two uniques into one more descriptive unique

* Fixed fallout generation & typo
2022-03-21 21:05:54 +02:00
dcd8e6c845 Added an AI for building & using spaceship parts (#6374) 2022-03-21 21:05:43 +02:00
f6a989f1fc Empire Overview Diplomacy (#6375)
* Empire Overview Diplomacy: Preparations

* Empire Overview Diplomacy: DiplomacyScreen linkable

* Empire Overview Diplomacy: Overhaul

* Empire Overview Diplomacy: List always begins a new row between major and minor civs
2022-03-21 21:05:30 +02:00
984c4d9b2d Unified & generalized a few uniques (#6379)
* Generalized trade route percent bonuses

* Unified two uniques using populationFilter; deprecated a deprecated uniq

* Made some renamings to improve clarity & fixed tests

* Fixed tests again

* Fixed typo
2022-03-21 21:05:20 +02:00
2b1251258c Unciv server (#6384)
* Background implementation for Unciv server with ktor.

Server ip in settings, able to copy your own ip and copy ip from clipboard for easy sharing, created stub for the client-server data transfer. No actual data storage or server implementation.

* Unciv server round 2 - implementing crud for files and it works!
metadata seems to only be in use for mutex, which is currently unused
That's all for today

* When starting a new multiplayer game the files are correctly saved in the server, and the server can return the files, but the function in the game to retrieve the game info is non-blocking so it doesn't work. Still, progress!

* Changed the Gdx http to basic Java http, as used for Dropbox, and now everything works!!!!

* Documentation for running and using the server

* Better texts, translations, etc

* Trog is right this should be a PUT not POST
2022-03-21 21:05:02 +02:00
77839b4b9d Empire Overview Units: Persist scroll, unit select, show due, jump city, fixed header (#6368) 2022-03-21 21:04:47 +02:00
1df49749f2 Split 6 tiles visible unique into its parts, making it more moddable (#6389)
* Split sight unique into its parts, making it more moddable

* Standardized unique ordering
2022-03-21 21:03:33 +02:00
3374bb15d5 Reduce warnings (#6382) 2022-03-21 21:03:24 +02:00
ddb26dc56d Fix CS unit gift crash (#6393)
* Fix CS unit gift crash

* Clarify CityStateGreatPersonGift decision

* Removed misplaced comment
2022-03-21 21:02:50 +02:00
22477c1ccb Fixed a bug where the resource supply overview would not add up (#6381) 2022-03-20 08:16:34 +02:00
635d588711 More untranslated items fixed - #6131 2022-03-17 23:34:39 +02:00
36c8ce78cc Fixed hidden unit uniques being shown to users in construction table - #6131 2022-03-17 23:30:56 +02:00
ba4561add6 Empire Overview City: Fixed header, show sort, persist descending (#6366) 2022-03-17 23:27:44 +02:00
4bb48b68b6 Empire Overview Stats: Culture, Faith and Wrap ability (#6367) 2022-03-17 23:27:37 +02:00
ea362a448b Fixed rejection reason texts not showing the instance's text - see #6131 2022-03-17 23:12:45 +02:00
f884f30226 Double Zoom Out Range (#6354)
* Simple dumb solution. Just make WorldMapHolder twice as big!

* A bunch of attempts

* Just change to max 4x size

Co-authored-by: itanasi <spellman23@gmail.com>
2022-03-17 22:25:24 +02:00
89e73ad7c5 Redesign EmpireOverviewScreen as TabbedPager (#6364) 2022-03-17 22:23:09 +02:00
c80db524b2 Cache 'library' helper classes of CivilizationInfo (#6363) 2022-03-17 22:22:54 +02:00
c117860d6f Worldscreen unit supply deficit icon now updates properly (#6362) 2022-03-17 22:22:43 +02:00
365cf0dc19 Close little loophole allowing promoting a unit after moving or attacking (#6361) 2022-03-17 22:22:25 +02:00
797ce09508 Global review of Constants use, linting, maxXPfromBarbarians (#6327)
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2022-03-13 22:57:40 +02:00
4ffb21f525 Support more freely modded Worker-like units (#6339)
* TileImprovementTime UniqueType supports UniqueTarget.Unit

* Reduce UniqueType.ConstructImprovementConsumingUnit hardcoded Great People behaviour

* Some linting

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2022-03-13 22:49:54 +02:00
97787bd397 Resolved #6335 - now shows conditionals precluding construction of units (#6346)
* Resolved #6335 - now shows conditionals precluding construction of units

Built simply so that if we decide to expand the conditionals that should be shown it will simply be building a hashset of conditionalsToShow

* Added an instance wrapper, so the enum has the default values and the class has the actual values

* minor lint
2022-03-13 22:45:39 +02:00
cea63eb114 Multiplayer code cleanup (#6330)
* Fixed reviewed comments of PR 6273

* Cleanup of Dropbox.kt

- moved Dropbox.kt from ui\worldscreen\mainmenu to logic\multiplayer
- moved ServerMutex and OnlineMultiplayer to own files
- changed DropBoxFileConflictException to FileStorageConflictException to match FileStorage scheme
- merged FolderListEntry with DropboxMetaData as they were basicly the same
- introduced IFileMetaData to match FileStorage scheme and modified DropboxMetaData to use it
- removed some unused imports
2022-03-13 22:44:02 +02:00
d8e9563a7c Religion overview improved (#6303)
* Improve handling of Religion PickerScreen with long lists

* Fix mouseover graying Labels bug

* Update Pantheon chooser visuals

* Some Color.lerp simplification

* Religion pickers - Merge common stuff of Pantheon and Religion Pickers

* Religion pickers - Linting

* Religion pickers - Move ReligionOverviewTable extra lines capability to Belief, Fix FormattedLine link+center

* Religion pickers - Belief Civilopedia linked description

* Religion overview tweaked

* Religion overview tweaked - patch1
2022-03-13 22:43:40 +02:00
e4b0afb7e3 Update ModConstants and start its documentation (#6309)
* Update ModConstants

* Update ModConstants - revert Ice, tweak formula

* Update ModConstants - comment on predefined MapSizes
2022-03-13 22:43:23 +02:00
88ba48d7f1 Mod checker minor improvements (#6341)
* Enabled unique "spellcheck" flag to be passed down into complex check

* Allow mod checker to list untyped uniques, behind "secret" switch
2022-03-13 22:40:12 +02:00
c51f3b47de Fix 1 Spectator N AI games in seemingly endless loop (#6337) 2022-03-13 22:38:11 +02:00
877dedaa89 More unique cleanup 2022-03-13 16:43:56 +02:00
c3e345df27 Unique deprecation 2022-03-13 15:27:32 +02:00
a93d531b85 Religion/Pantheon pickers display selection Civilopedia-linked (#6302)
* Improve handling of Religion PickerScreen with long lists

* Fix mouseover graying Labels bug

* Update Pantheon chooser visuals

* Some Color.lerp simplification

* Religion pickers - Merge common stuff of Pantheon and Religion Pickers

* Religion pickers - Linting

* Religion pickers - Move ReligionOverviewTable extra lines capability to Belief, Fix FormattedLine link+center

* Religion pickers - Belief Civilopedia linked description
2022-03-10 19:46:15 +02:00
e5b36f5b9f Unique units abilities that should be inherited by upgrades (#6304)
* Unique units abilities that should be inherited by upgrades

* Unique units abilities that should be inherited by upgrades - xlt

* Unique units abilities that should be inherited by upgrades - wiki
2022-03-10 19:45:32 +02:00
e97c95b7aa Improve handling of Religion PickerScreen (#6287)
* Improve handling of Religion PickerScreen with long lists

* Fix mouseover graying Labels bug
2022-03-08 14:24:44 +02:00
12428835b3 Notifications location (#6282)
* LocationAction overhaul - groundwork

* LocationAction overhaul - instantiations, some simplifications

* LocationAction overhaul - ruin rewards can go to ruin ex-location

* LocationAction overhaul - obsolete construction refund simpler, notification points to city
2022-03-08 14:23:07 +02:00
e4607c9391 Added Server Sided Mutex (#5593)
* Added first iteration of server sided mutex

* Add Mutex-like interface for file locking in Multiplayer

* Fix my C++ habits

* Change retry interval to match Dropbox API guidelines

* Move lock implementation from OnlineMultiplayer to ServerMutex

* Removed unnecessary gameInfo to preview conversions

and fixed a problem regarding Dropbox fileNames

* Fixed wrongly named variable

* Check if lock is owned before unlocking

* Trying to implement forgotten lock release

but failed at Date.time ¯\_(ツ)_/¯

* Seems to be working now

* Updated to use FileStorage Interface

* Fixed missed fileStorage call

Co-authored-by: Colin Vanden Heuvel <colin.vandenheuvel@wisc.edu>
2022-03-08 14:20:17 +02:00
a4cb49ea63 Return Stacking Terrain Bonus to Civ5 Rules (#6249)
* Make multiple defense bonuses stack

* Switch to check base terrin and Natural Wonders using getAllTerrains()

* Improved Tile Defense stacking

* Change to using 0f since no other maths happening

Co-authored-by: itanasi <spellman23@gmail.com>
2022-03-08 14:19:13 +02:00
6391a5c881 Constants.minimumMovementEpsilon cleanup (#6285) 2022-03-08 14:18:57 +02:00
deafc96d82 Update Pantheon chooser visuals (#6291) 2022-03-08 14:18:44 +02:00
6a6c5184ec Some Color.lerp simplification (#6300) 2022-03-08 14:18:31 +02:00
ea2b26370a Some edits for fun getRejectionReasons in class building/unit and fun checkMod (#6165) 2022-03-08 14:18:15 +02:00
b779896332 Replace YesNoButton with Checkbox (#6297) 2022-03-08 14:17:17 +02:00
0a5223f721 Add "Starts with [policy] adopted" unique (#6296)
* Added "Starts with [policy] adopted" unique

* Polished "Starts with [policy] adopted"
2022-03-08 14:16:41 +02:00