Commit Graph

4419 Commits

Author SHA1 Message Date
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
906d770443 Fix isEmbarked() Crash (#6290)
* Correct logic for blocking Naval Melee from capturing Civilians on Land

* Even better solution now that we can move on to unguarded Civilian tiles. But still won't let us capture Civilians if we can't get there

* Make Embarked unable to capture Civilians

* Embarked can't capture Water Civilians

* Fix Gradle Test

* Better unit test without making variable not internal

* attempt not working

* Just make currentTile not internal

* remove debug

* erronious import

* Fix exception for when currentTile isn't initialized yet

* More precise solution

Co-authored-by: itanasi <spellman23@gmail.com>
2022-03-07 13:02:30 +02:00
fb7cb707e0 WLTK decorations (#6253)
* WLTK decoration png's and atlas

* UncivTooltip anchor to stage so tips won't get clipped by some ScrollPane

* Empire Overview Cities add WLTK column

* Make WLTK line on CityScreen stats box link to Civilopedia

* Make Civilopedia return to previous screen for _both_ ESC/Back and the Close Button

* Revive Civilopedia links in WorldScreen.TileInfoTable

* Festive decoration for WLTK day on CityScreen
2022-03-05 20:10:03 +02:00
20f34eb5f5 Block Embarked from capturing Civilians on Water (#6224)
* Correct logic for blocking Naval Melee from capturing Civilians on Land

* Even better solution now that we can move on to unguarded Civilian tiles. But still won't let us capture Civilians if we can't get there

* Make Embarked unable to capture Civilians

* Embarked can't capture Water Civilians

* Fix Gradle Test

* Better unit test without making variable not internal

* attempt not working

* Just make currentTile not internal

* remove debug

* erronious import

Co-authored-by: itanasi <spellman23@gmail.com>
2022-03-05 20:06:06 +02:00
70517b9c3d Sort maps & accelerate playing a newly edited map (#6267)
* Sort map file lists

* Pre-select custom map if saved within last 15min
2022-03-05 20:04:55 +02:00
617f801558 Improve Unique.getReplacementText (#6265) 2022-03-05 20:03:34 +02:00
2f980abd72 Locate Mod Errors choose base ruleset to do complex check against (#6263)
* Some Ruleset linting

* Mod-check display remove unnecessary FormattedLine

* Mod-check can run on selectable base ruleset instead of Vanilla only

* Mod-check show final severity on Expander

* Mod-check base selectbox translatable
2022-03-05 20:03:28 +02:00
9f9e8c33c5 Fix next turn button disabled after leaving sub-screens from menu (#6261) 2022-03-05 20:03:20 +02:00
e7fc1a565f Fix after-pillage display (#6255) 2022-03-05 20:03:09 +02:00
c503f840d1 Hide irrelevant items from CityInfoTable stats (#6254) 2022-03-05 20:02:54 +02:00
115a7f84bf Fix broken border display on the smallest possible maps (#6266) 2022-03-05 20:01:49 +02:00
0e26ea2cc8 Added deep link to multiplayer games (#6273) 2022-03-05 20:00:56 +02:00
1b9e496db5 Swap order on diplomatic victory: voting result _then_ victory (#6270) 2022-03-05 19:55:14 +02:00
0390ec225f Move automated units button was showing when it didn't do anything (#6271) 2022-03-05 19:54:54 +02:00
00c5ecb6a6 3.19.13 2022-02-28 22:49:11 +02:00
bca3d5645a Fix Spaceship production boni (and key binding) (#6247)
* Fix spaceship part boni

* Key binding for 'Add part to spaceship'
2022-02-28 19:42:02 +02:00
e2945687f2 Fix Ctrl-Letter key bindings (#6232) 2022-02-28 19:41:46 +02:00
9870003e33 Fix Petra and Garden not allowed in some cases (#6245) 2022-02-28 19:41:35 +02:00
651dcff581 Fix Polynesia's Wayfinding (#6238)
* Fix Polynesia's Wayfinding

* Fix mod option to use other unit filters with UnitsMayEnterOcean
2022-02-28 19:41:22 +02:00
f360eda047 Align (reduce) Embarked Defense Strength per Era (#6231)
* Change Embarked Defending Strength per era. Update Tutorial a little

* Use JSON implementation of EmbarkDefense

Co-authored-by: itanasi <spellman23@gmail.com>
2022-02-28 19:41:13 +02:00
8a6b4de84f Minor improvements from GPC 2022-02-28 19:39:44 +02:00
6bbab8a394 FINALLY removed CivInfo.getMatchingUniques(String)! 2022-02-27 16:57:21 +02:00
78f0ad768a Step 1 of resolving #6186 freshwater crisis - unify adjacency to a single function, only rivers are outliers (#6219) 2022-02-25 13:39:34 +02:00
8cb73ac91b UncivSlider fixes (#6222)
* Fix UncivSlider isDisabled and snapToValues with the +/- buttons

* Apply UncivSlider to convertGoldToScience

* Apply percent tooltip formatting to sound volume sliders

* Linting and guard against a border case
2022-02-25 13:39:22 +02:00
6db4ba586c Less instantiations of listOf(HiddenToUsers) (#6220) 2022-02-24 23:20:04 +02:00
c767ebe2bf More unique typing isn't this fun 2022-02-24 16:29:09 +02:00
f14a201afb Fix Navies capturing Land Civilians (#6223)
* Correct logic for blocking Naval Melee from capturing Civilians on Land

* Even better solution now that we can move on to unguarded Civilian tiles. But still won't let us capture Civilians if we can't get there

Co-authored-by: itanasi <spellman23@gmail.com>
2022-02-24 13:38:17 +01:00
261e09e336 Rudimentary AI control over goldPercentConvertedToScience (#6221) 2022-02-24 13:36:41 +01:00
ae2b91dd67 Moved wiki links to new site links 2022-02-23 21:40:20 +02:00
b7211a582c Minor fix for global alert 2022-02-23 20:18:07 +02:00
6d7e8616ec 3.19.11-patch1 2022-02-23 18:44:40 +02:00
1fa1c6885a placeholder equality tests replaced with hasUnique() and getMAtchingUniques() instead 2022-02-23 12:16:09 +02:00
09089cb60d Added uniques and deprecations for "Requires" and "Unlocked by" uniques - #6165 2022-02-22 16:55:37 +02:00
4ad9d58850 Some of the last remaining simple uniques, from now on it's more complicated ones 2022-02-22 16:38:52 +02:00
13af71e427 Autoupdates to uniques will multiple solutions now replace to the correct one (#6208)
* Autoupdates to uniques will multiple solutions now replace to the correct one

Problem - some deprecated uniques can lead to multiple possibilities of replacements, depending on the parameter type
This lead to replacements in the jsons that were either unparseable entirely or were causing errors, both of which needed to be corrected by hand
We now separate such deprecations into their constituent potential replacement uniques, and try and take only the unique that doesn't cause any errors
Works like a charmander :)

* Conditional name change

* Resolved #6179 - when changing units production due to deprecation, notification no longer counts the same city multiple times if it appears multiple times in its queue
2022-02-22 11:33:07 +02:00
d30ea86b27 Additional guard against no-barbarian games calling doRevoltSpawn (#6213) 2022-02-22 11:30:48 +02:00
e0345bcb52 Reorganized the way city states grant resources & rounded a float to an int (#6210)
* Reorganized the way city states grant resources & rounded a float to an int

* Reworded a string so it sounds nicer
2022-02-22 11:30:33 +02:00
90386bd4e7 Made spaceship parts units instead of buildings (#6203)
* Spaceship parts are units now

* Fixed tests

* Removed commented out lines

* `Spaceship Part` unique can also go on buildings in ods
2022-02-22 11:30:20 +02:00
ca5f48ad61 Terrainfeature objects transient (#6199)
* terrainFeatures is only set through the setTerrainFeatures function

* Use cached terrainFeatures for performance

* Fixed map editor error due to not setting tileinfo ruleset
Added private set to terrainfeatureobjects
2022-02-22 11:28:24 +02:00
c9945ca7ba Make multiple tile defense bonuses stack (#6193)
* Make multiple defense bonuses stack

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

Co-authored-by: itanasi <spellman23@gmail.com>
2022-02-22 11:27:58 +02:00
1e24f04cf9 Added mod constants for the distance between two cities (#6211) 2022-02-22 11:17:22 +02:00