Commit Graph

4238 Commits

Author SHA1 Message Date
will-ca
f6d186445c
Try to fix #5729 as concurrency issue. (#5862)
* Try to fix #5729 as concurrency issue.

* Oh, remove comment about crash, I guess.
2021-12-28 09:15:34 +02:00
will-ca
005c465ee4
Use tileset fallbacks for missing images. (#5852)
* Use tileset fallbacks for missing images.

* Disable tileset fallback for FantasyHex.

* Tweak docs, remove debug signature.
2021-12-27 21:05:33 +02:00
will-ca
a1dfa53664
Save attacks per civ for arrows for cities, missiles, dead units. (#5855)
* Save attacks per civ for arrows for cities, missiles, dead units.

* Tweak docs.
2021-12-27 20:57:30 +02:00
Xander Lenstra
f14ec29468
Fixed a rare diplomacy voting bug in one-more-turn mode (#5845)
* Fixed a rare bug where in one-more-turn mode after conquering all other civs, players could be asked to vote, despite having no one to vote for

* Removed code duplication
2021-12-27 09:01:04 +02:00
Xander Lenstra
f03918f610
Fixed a few combat bugs and changed the religions founded label (#5846)
* Fixed a bug where bonusses applying 'in friendly tiles' would not apply

* Reworded something so it actually makes sense

* Fixed capitalization error leading to autocracy complete bonus no longer working

* Fixed save serialization errors and finally correctly implemented the time limit for autocracy bonus

* Made value const and static
2021-12-26 07:31:07 +02:00
will-ca
af941754cd
Show arrows on map for unit actions: Asset files. (#5825)
* Show arrows on map for unit actions.

* Don't wrap arrows unless world wrap is actually enabled.

* Fix transported air units always being treated like teleports.

* Simple reviews.

* Separate movement arrow visibility checks from WorldScreen.

* Assets for map arrows overlay.

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2021-12-25 22:29:19 +02:00
yairm210
b744acdc55 Exit CrashScreen normally, without exceptions 2021-12-25 22:28:43 +02:00
yairm210
d1b4fe6d1a Crash screen throws exception on a separate thread so the GCP logs record it 2021-12-25 22:24:37 +02:00
will-ca
e672bfb6d3
Show arrows on map for unit actions. (#5824)
* Show arrows on map for unit actions.

* Don't wrap arrows unless world wrap is actually enabled.

* Fix transported air units always being treated like teleports.

* Simple reviews.

* Separate movement arrow visibility checks from WorldScreen.

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2021-12-25 22:20:29 +02:00
Xander Lenstra
f3a2edf390
Converted the max turns drop down to a slider, idea courtesy of SomeTroglodyte (#5843)
* Converted the time victory drop down to a slider, idea courtesy of SomeTroglodyte

* Added a score breakdown to stat overview screen

* Removed score factors with value 0 & applied SomeTroglodyte's patch

* Removed 2000 max turns, should never be reached anyways
2021-12-25 17:57:02 +02:00
Xander Lenstra
ecadfb53fa
Typed some uniques and fixed a policy not working (#5848)
* Typed some uniques, fixing a policy not working

* Repurposed an unused function to remove .unit in some places

* Fixed compilation errors
2021-12-25 17:55:14 +02:00
Xander Lenstra
ea51c7155b
Fixed a bug where an empty improvement picker screen could open (#5815)
* Fixed a bug where an empty improvement picker screen could open

* Moved the check for constructing instead of building to the unit
2021-12-25 17:53:10 +02:00
Xander Lenstra
759366c912
Added score and time victory (#5842)
* Added a score calculation

* Added the score in multiple places of the UI

* Added time victory and a max turns

* Made time victory functional

* Added translation files
2021-12-24 14:31:36 +02:00
yairm210
730a3d8482 Merge remote-tracking branch 'origin/master' 2021-12-24 12:51:13 +02:00
yairm210
4c41536ed8 Resolved #4202 - AI cities now build workboats for use in other cities
Solves the 'landlocked but with water improvement' deadlock
2021-12-24 12:50:58 +02:00
will-ca
69450c5f4b
Added debug menu button that spawns and improves all strategic resources into your territory. (#5838)
* Added debug menu button that spawns and improves all strategic resources into your territory.

* Reviews.
2021-12-24 11:57:59 +02:00
yairm210
93268f53ee Another stab at #5729 after the toInt didn't help. 2021-12-23 21:22:40 +02:00
yairm210
eb4a76dcd0 Resolved #5823 2021-12-23 21:15:20 +02:00
yairm210
f4f673dc8a 3.18.11-patch1 2021-12-21 21:58:01 +02:00
will-ca
723aaf779c
Add new universal crash handlers and error reporting screen. (#5804)
* Add new crash handler and error reporting screen.

* Minor cleanup.

* Word choice.

* Rename `SafeCrashStage` to `CrashHandlingStage`.

* Reviews.

* Reference stack traces in comments for thread and postRunnable exceptions.

* Remove excessive line breaks, superfluous .apply{}.
2021-12-20 20:55:58 +02:00
Xander Lenstra
c9628c7fa7
Extended use for "in [tileFilter] tiles" conditionals (#5827)
* Changed 'in [tileFilter] tiles' to also apply outside of combat

* Changed unique docs writer to also sort applicables, so these are also not regenerated constantly
2021-12-20 13:53:03 +02:00
Xander Lenstra
b30576d115
Added an option to unlock all techs to the debug menu (#5820) 2021-12-18 20:05:34 +02:00
will-ca
1ab3041536
Refactor MiniMapHolder's little green map overlay toggle icons. (#5814)
* Refactor MiniMapHolder's little green map overlay toggle icons.

* Remove comment.

* Actually, don't hide those properties.
2021-12-18 17:56:50 +02:00
Yair Morgenstern
7aa7b8a4b2
Resolved #5790 - kudos to @xlenstra for finding the problem and providing reproduction! (#5812) 2021-12-17 08:47:07 +02:00
yairm210
8a93511a6a Merge remote-tracking branch 'origin/master' 2021-12-16 22:54:56 +02:00
yairm210
9d38ce75c4 @Interdice even after all that there was still a bug - we didn't check if the tiles we were sending the missionary/inquisitor to was actually reachable :) 2021-12-16 22:54:46 +02:00
Xander Lenstra
58cc3b517e
Fixed an infinite loop where foreign legion upgraded to the unit it replaced (#5808)
* Fixed an infinite loop where foreign legion upgraded to the unit it replaced

* Changed the wrong variable

* Maybe it is useful to also change its unlock tech

* Whoops, should only be for non-null values
2021-12-16 17:50:10 +02:00
itanasi
4fe7315478
Sort Maintenace Using Fixed Point (#5764)
* Add new UniqueType.NoMaintenance to support Guided Missile

* revert gradle
Add UnitMaintenanceDiscount
Rename UnitMaintenanceDiscount->UnitMaintenanceDiscountGlobal
Rework maintenance equation to account for overlapping reductions
Add maintenance variable to MapUnit

* Add square brackets in string (apparently didn't check in?)
More robust uniques check code so not assuming only one matching unique
Use toPercent()

* Proper toPercent() math

* Use fixed point Long to help in sorting to avoid float bug?

* Use fixed point Long to help in sorting to avoid float bug?

Co-authored-by: temurakami <spellman23@gmail.com>
2021-12-15 22:59:10 +02:00
yairm210
c655d69c78 Order unique docs by target type so we don't get reorderings all the time 2021-12-14 19:02:58 +02:00
GGGuenni
28d3c12142
Improvements to TurnChecker data usage (#5789)
* Added necessary utils

Added the FileNotFoundException which is also part of #5593

* Added preview download to MultiplayerScreen

* Added preview download to TurnChecker

* Fixed uncomplete commit

* Removed debug print in MultiplayerScreen
2021-12-13 21:14:30 +02:00
Interdice
3f6fe234b3
AI for Inquisitor and Missionary (#5590)
* First pull request to add missionaries and inquisitors

* First pull request to add missionaries and inquisitors

* First pull request to add missionaries and inquisitors

* First pull request to add missionaries and inquisitors

* Ai choice

* some fixes

* some fixes

* adding a system for the ai to buy with faith

* adding a system for the ai to buy with faith

* adding a system for the ai to buy with faith

* adding a system for the ai to buy with faith

* adding a system for the ai to buy with faith

* adding a system for the ai to buy with faith

* adding a system for the ai to buy with faith

* adding a system for the ai to buy with faith

* adding a system for the ai to buy with faith

* adding a system for the ai to buy with faith

* adding a system for the ai to buy with faith

* finally done

* finally done

* some fixes

* some fixes

* some fixes

* some fixes

* some fixes

* some fixes

* some fixes
2021-12-12 12:27:09 +02:00
yairm210
0c1509bfe8 Resolved problem in new uniques with multiple parameters of the same name
Relevant to #5783 and #5781
2021-12-11 20:23:31 +02:00
yairm210
b537f9e386 Resolved #5779 - uniques and conditionals for translating are taken directly from the uniquetypes 2021-12-10 15:34:17 +02:00
yairm210
23bad8d961 Resolved #4921 - can gift improvements to city states also on water tiles and when other improvements have been built on top of the resource 2021-12-09 21:58:57 +02:00
yairm210
ed3a4accdd Resolved #5775 - don't try and set resource amounts for "image" tiles, like in map editor or civilopedia 2021-12-09 20:43:19 +02:00
yairm210
f3378f4ced 3.18.8-patch1
Resolved #5774 - removed demanded resource from city when resource is not in ruleset
2021-12-09 20:37:37 +02:00
Xander Lenstra
22b3997c28
Band-aided a bug where players in multiplayer games were waiting for themselves. (#5768) 2021-12-07 21:38:45 +02:00
SimonCeder
24bd2b66b0
Regions part 3 - resource placement, resource settings (#5690)
* placeLuxuries

* map resource settings

* strategic and bonus resources

* terrain fixes

* slight optimizations

* vanilla jsons

* fix luxury terrain distribution

* also for vanilla

* fix ruleset bug

* terrainfilter
2021-12-07 07:25:16 +02:00
yairm210
4bc8c83555 Merge remote-tracking branch 'origin/master' 2021-12-06 19:20:28 +02:00
yairm210
0088ddd18b Solved bug that made civilian units uncapturable 2021-12-06 19:19:37 +02:00
Xander Lenstra
2fa3228148
Fixed a crash that occasionally happened when liberating a city to a dead civ (#5762)
* Fixed a crash that occasionally happened when liberating a city to a dead civ

* Added descriptive comment
2021-12-06 11:54:10 +02:00
Xander Lenstra
40cb651433
Fixed the unique for giving sight to units no longer working (#5760) 2021-12-06 07:10:52 +02:00
Xander Lenstra
a46f638ef1
Fixed a bug where protected city states would have a red line to their protector in the diplomacy overview screen (#5761) 2021-12-06 07:10:05 +02:00
yairm210
31639aac9f Resolved #5752 - don't show 'fortify until healed' if the unit won't actually heal in this tile 2021-12-05 21:38:27 +02:00
yairm210
144d2738a4 Trying to find the cause of #5729 2021-12-05 21:33:04 +02:00
Xander Lenstra
ba36956990
Replaced a != sign by a == sign (#5753) 2021-12-05 12:58:32 +02:00
Xander Lenstra
b6ce8b2aac
Fixed a bug where 'requires a [buildingName] in this city' would not work (#5754) 2021-12-05 12:55:46 +02:00
SimonCeder
936a32300b
counteroffer fixes (#5749) 2021-12-04 23:25:43 +02:00
yairm210
623420039b Resolved #5727 - on multiplayer, game info is updated as each intermediate player finishes their turn 2021-12-04 23:24:34 +02:00
yairm210
9950e963bc Resolved #5742 - removed extraneous empty lines from translation files 2021-12-04 23:13:43 +02:00
Xander Lenstra
d1224a36cf
Fixed a bug where WLTKD would continue after conquering/trading a city (#5748) 2021-12-04 18:33:19 +02:00
yairm210
5697a6f912 Solved crash of #5728 - AIs ignore trade requests that have become invalid mid-turn
They also no longer spam each other with requests
2021-12-03 13:57:00 +02:00
yairm210
234b1b1741 Removed many "proxy functions" from civInfo to cityStateFunctions 2021-12-03 11:28:24 +02:00
yairm210
7169458943 More informative exceptions, to try and catch the "invalid city ID on trade" crash 2021-12-03 11:12:48 +02:00
yairm210
69db686101 Moved all fully deprecated uniques to their own region down below
Slight steps towards stat percent bonus calculation efficiency in CityStats
2021-12-03 11:01:55 +02:00
yairm210
0def261012 Added unique types, added regions for easier location 2021-12-03 10:48:39 +02:00
itanasi
7f07bcb9e5
Recycling center (#5738)
* Add support to UniqueType.MaxNumberBuilding (including rejectionReasons)
Add Recycling Center entry to JSON
Need Graphical Icon

* Fix typo
Add TODO

* adding Recycling Center icon

* Credit update for icon
Rephrase Rejection text
Updated .atlas and .png
Add code to block showing Recycling Center

* Fix using placeholderText
Set shouldShow to True so iot still appears while under construction but not completed

* Rejection Text now working
Remove debug prints

* Remove odd extra lines

* extra lines

* Remove excessive if statement in shouldBeDisplayed
Reword text. Unique can apply to Buildings and Units
Refactor Signature since not just Buildings

* Adding code to remove building in transferred city

Co-authored-by: temurakami <spellman23@gmail.com>
2021-12-03 10:15:51 +02:00
Xander Lenstra
06dd395efb
Fixed a bug where statue off Zeus would not work (#5732) 2021-11-30 14:42:19 +02:00
yairm210
57f3bf2bb2 Resolved #5713 - AI doesn't try attacking with non-attack units 2021-11-29 22:45:54 +02:00
yairm210
b9d2078442 Fixed niche bug that let you try and capture civilians in territory you can't enter 2021-11-29 22:41:55 +02:00
yairm210
e43e23b9a8 Disabled buggy counteroffer mechanic to release a stable version 2021-11-29 19:47:42 +02:00
will-ca
f86b765d38
Show which cities are missing required buildings for National Wonders. (#5718) 2021-11-29 15:57:36 +02:00
yairm210
0cef056c4d Typing for unit uniques 2021-11-28 08:28:55 +02:00
SimonCeder
10686d1d8f
We Love The King Day (#5705)
* we love the king day

* AI improvements

* Don't break old saves

* unused import

* tutorial

* proper growth when unhappy

* reviews
2021-11-27 19:59:19 +02:00
Xander Lenstra
4107ff3386
Added health conditionals (#5707)
* Added health conditionals

* Whenefied conditional
2021-11-27 19:52:54 +02:00
yairm210
15cbf8359f Resolved edge case crash when conquering the capital of a civ that has a unique capital city indicator 2021-11-24 18:33:51 +02:00
yairm210
5d160508d3 Fixed bug when attempting to load a game that uses mods you don't have 2021-11-24 18:33:44 +02:00
SimonCeder
2dd4415977
Counteroffer mechanic, updated trade valuations (#5702)
* counteroffer mechanic

* string template

* string template

* AI always counteroffers if able
2021-11-23 13:00:30 +02:00
yairm210
4113b810ff Simplified civ info stats happiness breakdown 2021-11-22 20:53:08 +02:00
yairm210
532f42365c Merge remote-tracking branch 'origin/master'
# Conflicts:
#	core/src/com/unciv/models/ruleset/unique/UniqueType.kt
2021-11-22 20:27:11 +02:00
yairm210
63c5ed2156 Unique deprecation work 2021-11-22 20:24:43 +02:00
itanasi
b72a2c3ebb
Make Guided Missile Free (and Maintenance overhaul) (#5698)
* Add new UniqueType.NoMaintenance to support Guided Missile

* revert gradle
Add UnitMaintenanceDiscount
Rename UnitMaintenanceDiscount->UnitMaintenanceDiscountGlobal
Rework maintenance equation to account for overlapping reductions
Add maintenance variable to MapUnit

* Add square brackets in string (apparently didn't check in?)
More robust uniques check code so not assuming only one matching unique
Use toPercent()

* Proper toPercent() math

Co-authored-by: temurakami <spellman23@gmail.com>
2021-11-22 18:21:34 +02:00
yairm210
14c4f2d570 Step 3 - new uniqueTypes, and removed old getStatsFromUniques entirely!
And we can FINALLY remove that ugly double statsPerPopulation check, since we take ALL uniques and filter them by building/wonder type instead of local/nonlocal!
@xlenstra perhaps the lower two new unique types can be replaced with conditionals?
2021-11-21 22:43:51 +02:00
yairm210
213fc67c87 Step 2 - existing uniquetypes 2021-11-21 22:00:40 +02:00
yairm210
846388f032 Stats from uniques simplification, step 1 - setting up the base functions, with just one unique 2021-11-21 21:52:17 +02:00
yairm210
b23ba40cd0 More Unique types, with some deprecations 2021-11-21 21:08:15 +02:00
yairm210
59c5d2b10c Unique types for building filters 2021-11-21 21:02:45 +02:00
yairm210
4b5a709ee0 Resolved #4595 - policy screen keeps scroll position when adding new policy 2021-11-20 23:31:37 +02:00
yairm210
1a7f562bc0 Resolved #5265 - cannot add 2 of the same buildings to the queue visually 2021-11-20 23:27:31 +02:00
yairm210
73f275f4cd Resolved #5642 - viewable tiles update after capturing city 2021-11-20 21:10:41 +02:00
yairm210
fa5ac83f88 Resolved #5662 - AI won't declare war at the very beginning of games for little reason 2021-11-20 21:00:40 +02:00
will-ca
d477029232
Cleanup renaming "CameraStageBaseScreen" in KDocs. (#5695) 2021-11-20 19:56:53 +02:00
yairm210
ea0738f6e5 Recreate map editor screen when changing ruleset to update all the editing tools 2021-11-19 15:20:28 +02:00
yairm210
ea29458038 Resolved #5668 - Changing base ruleset in map editor removes all terrain references that are no longer viable, including starting locations for nations not in new ruleset 2021-11-19 15:09:01 +02:00
yairm210
bdeccb87e8 Resolved #5692 - exiting Civilopedia always brings you o the previous screen 2021-11-19 14:15:48 +02:00
yairm210
ff3cd7511c Somehow not all got added? 2021-11-19 12:27:48 +02:00
yairm210
200a62670c Rename: Changed CameraStageBaseScreen to BaseScreen 2021-11-19 12:26:57 +02:00
yairm210
8ddbe3b2b7 3.18.3 2021-11-19 12:13:23 +02:00
yairm210
422bb58814 Caught out of memory errors on autosave 2021-11-15 21:36:06 +02:00
Xander Lenstra
8f89826d03
Removed code that was unreachable after the removal of an exception in BackwardCompatability.kt for 3.18.2 (#5680) 2021-11-15 15:35:32 +02:00
Xander Lenstra
5a458e93cb
Fixed a crash when changing the base ruleset while in portrait mode (#5671)
* Fixed a crash when changing the base ruleset while in portrait mode

* Whoops
2021-11-14 14:14:16 +02:00
yairm210
f3115d9f03 Pre-solved potential bugs, unique typing for deprecated uniques 2021-11-14 00:16:01 +02:00
yairm210
297c3d8ba6 Probably resolved #5555 - made tileset config overrides deterministic 2021-11-13 23:32:02 +02:00
yairm210
c41fb3591a Caught "null values from musicHistory.peekLast" bug 2021-11-13 22:38:58 +02:00
yairm210
5910e52407 Catching out of memory errors when updating tiles with a catch-all popup 2021-11-13 22:33:55 +02:00
yairm210
fda3d32332 Performance improvement for getting civ-wide uniques, should help mitigate existing ANRs 2021-11-13 22:25:07 +02:00
yairm210
4b43ff5b5e Resolved crashes in game options table when changing base ruleset before the mod list was defined 2021-11-13 22:18:11 +02:00
yairm210
57c033ff34 More error handling for out of memory errors 2021-11-12 00:19:52 +02:00
yairm210
8aa99c03e2 Probably solved a bug where brushes would cause non-ruleset terrains for mods without grassland 2021-11-11 23:56:29 +02:00
yairm210
4ce8704969 Solved bug where AI units could expend all movement trying to attack enemy units when moving through fog, and would still try and attack 2021-11-11 23:34:43 +02:00
yairm210
c92381adba Don't display religion follower table if no one in city follows any religion 2021-11-11 21:57:00 +02:00
SimonCeder
e4f686964e
Regions part 2 - City state placements, start normalization (#5663)
* start position normalization

* assignLuxuries

* City states placement

* city state normalization

* don't consider tiny islands

* also modify the other json since they are duplicated now
2021-11-11 12:11:48 +02:00
yairm210
bc5ea2d90a Resolved #5641 - unit upgrade check ONLY removes/adds unit if absolutely necessary
This previously was done every time the function was called, leading to updating the civ resources twice per unit check, which is kind of heavy
2021-11-09 23:38:30 +02:00
Xander Lenstra
cda34bf23f
Replace calls to clone with calls to cloneStats when that is clearer (#5656) 2021-11-09 11:59:24 +02:00
Xander Lenstra
2854d88e11
Cleaned up some code from the split (#5652) 2021-11-09 06:21:24 +02:00
Xander Lenstra
5cf5e13ffb
Fixed a bug where maps created before the split PR could no longer be opened after (#5651) 2021-11-09 06:20:27 +02:00
Xander Lenstra
ac2bc3a404
Second version of G&K / vanilla split (#5647)
* Copied files for Gods & Kings folder

* Added G&K and unified with mods in dropdown

* Split the baseruleset from the mods list in game parameters

* Mod links are checked again when selecting a mod

* The new map editor screen now also uses the base ruleset

* Updated the ruleset change dialog in the map editor; Fixed a crash

* Refactored some code and fixed some bugs
2021-11-08 22:57:09 +02:00
Xander Lenstra
fb1b494470
It's probably a good idea to actually convert Hanse's to Banks rather than remove them entirely, actually (#5650)
* It's probably a good idea to actually convert Hanse's to Banks rather than remove them entirely, actually

* Remove checks for the unique as well

* Might as well use the intended function for it too
2021-11-08 22:50:43 +02:00
yairm210
367e0b940d Solved bug where land units that upgrade to water units would attempt to upgrade where the upgraded unit could not be placed.
This was such a cool idea that I decided to let it live :)
2021-11-08 21:35:11 +02:00
yairm210
de83383c8b 3.18.0 2021-11-08 19:52:09 +02:00
SimonCeder
73d9179f09
can remove fallout on oases (#5640)
* can remove fallout on oases

* remove matchesfilter
2021-11-07 18:25:27 +02:00
yairm210
74d1d0451c Minor linting 2021-11-05 15:07:30 +02:00
SimonCeder
09c40002f0
Regions part 1 - subdivide generated maps into regions, and use to place civs (#5556)
* json definitions

* create regions, define region types

* count terrains

* terrain qualities

* tilesInRectangle

* use even q coords

* major civ start locations

* move to separate file

* remove printlns

* unused imports

* strings

* strings

* reviews

* conditionalize qualities

* guess qualities of terrain types without explicit definitions

* guess qualities of terrain types without explicit definitions

* Update template.properties

* Update template.properties

* add HideInCivilopedia to technical uniques

* reviews
2021-11-05 07:59:48 +02:00
yairm210
6e6192c369 More field deprecation 2021-11-04 22:43:15 +02:00
yairm210
bad6692207 Deprecated older fields 2021-11-04 22:40:26 +02:00
Xander Lenstra
eb24a8d364
Possibly fixed a bug where replacement buildings would not be granted (#5636)
* Possibly fixed a bug where replacement buildings would not be granted

* Fixed tests
2021-11-04 18:37:31 +02:00
SimonCeder
010931ca42
Bombard notification (#5637)
* add notification when able to bombard

* harmonize with enemy unit notification

* use city.range
2021-11-04 18:36:50 +02:00
yairm210
25cad3aef2 Minor performance improvements 2021-11-03 16:12:24 +02:00
yairm210
0065d1052b Merge remote-tracking branch 'origin/master' 2021-11-03 15:57:56 +02:00
yairm210
198958772c Fixed error where typed unique map would try and register untyped uniques 2021-11-03 15:57:35 +02:00
SimonCeder
78afff9f36
fix bug when city states bullied (#5634) 2021-11-03 15:49:02 +02:00
yairm210
ff389e0238 City stats performance boost - converted list iterations to nice map retrievals :) 2021-11-03 14:29:01 +02:00
SimonCeder
0a0881d5bd
Quest fixes (#5629)
* quest fixes

* strings

* better placeholder for competitions
2021-11-03 13:59:13 +02:00
yairm210
cafbf0d155 Units can promote only if they have movement left and have not attacked 2021-11-03 10:23:59 +02:00
yairm210
05b741b3e5 Can upgrade unit if any movement is left, as per Civ V 2021-11-03 10:10:43 +02:00
will-ca
ad545e47da
Fix Spacebar key binding in LWJGL3; Switch to integer/named key. (#5633) 2021-11-03 08:48:45 +02:00
Yair Morgenstern
a1e0b686b1
Upgrading to LWJGL 3, which is now the default, as of LibGDX 1.10.1 (#5614)
* Upgrading to LWJGL 3, which is now the default, as of LibGDX 1.10.1
MacOS running problem solved by adding JVM args to desktop build.gradle
Should resolve #5601

* Apparently, keyTyped is ONLY for character keys. Esc and f12 are non-character keys, so we need to change from keyTyped to keyDown.
How does this affect out ctrl combinations? Dunno yet :) I couldn't find any actual uses in code, but it shouldn't be worse than keyTyped
This commit can be cherry-picked into the master branch as a preparation for the move to lwjgl3
2021-11-03 00:15:47 +02:00
SimonCeder
118f11abb1
Encampments revealed by ruins effects have lastSeenImprovement updated (#5631) 2021-11-03 00:14:32 +02:00
yairm210
8f216b3662 3.17.14 2021-11-02 18:17:20 +02:00
yairm210
f568d98694 Removed deprecated components 2021-11-02 18:15:49 +02:00
logic
f53435e612
Made rich presence text not change with language (#5613)
* update for no reason

* bruuhhhhhhhhh

* bruuhhhhhhhhh

* rebase... this probably wont work

* bruuhhhhhhhhh

* fix comments..?

* bruuhhhhhhhhh

* equalize with upstream/master

* made the game not change the text shown in rich presence with the current language, added a language override functionality to String.tr() which is probably inefficient as hell, also the reason why i had to keep the .tr in leader name is because it showed the parantheses

* i have no idea why github or git keeps bugging me on this but this line randomly appears then disappears

* i have no idea why github or git keeps bugging me on this but this line randomly appears then disappears

* revert changes to .tr(), use what @yairm210 suggested
2021-11-02 17:24:37 +02:00
SimonCeder
15a2a51a99
Unique flags (#5625)
* Add flags to UniqueTypes, implement HideInCivilopedia

* hasFlag function
2021-11-02 17:23:40 +02:00
will-ca
d15e01d5e8
Show notification to cycle through visible resources when clicking on resource icon in Resource Overview. (#5603)
* Show notif to cycle through resource tiles when tapping on icon in Resource Overview.

* Make resource reveal notification more configurable, and move completely to `GameInfo`.

* Make resource reveal notification loop through all explored tiles, instead of just visible tiles.

* Have resource discovery notif cycle through matching CS centers for CS-only Luxuries.

* Remove commented lines.

* Remove extra comma.

* Use Sequence in resource notif.
2021-11-01 18:39:01 +02:00
Yair Morgenstern
71ea8dadf7
Hopefully fixed tests 2021-11-01 10:12:58 +02:00
yairm210
405c561d5e Replaced "Map Height" with "Map Elevation" 2021-10-31 23:15:42 +02:00
yairm210
5ab802b776 Last untyped unique that could affect getTileStats performance 2021-10-31 23:00:02 +02:00
yairm210
4f897d9cc1 Fully deprecated older uniques 2021-10-31 22:54:23 +02:00
yairm210
d2add82ac3 Solved ANRs caused by slow "quickstarts" 2021-10-31 22:38:48 +02:00
yairm210
b7f9472308 If we're already at it, same thing for anti-local effects, this should help performance in the tileInfo.getStats() function 2021-10-31 22:24:27 +02:00
yairm210
bf568a44eb Big performance improvement - don't need to string-compare every param of every unique of every building each time we're looking for global uniques 2021-10-31 22:19:56 +02:00
Yair Morgenstern
52933ca58b
Added new type-based uniqueMap, which will be the base of the "cached uniques revolution", and added a relatively benign use in unit uniques (#5619) 2021-10-31 21:56:41 +02:00
Xander Lenstra
53a0c9b248
Reworked buying buildings & units with stats a bit (#5618)
* Reworked buying buildings & units with stats a bit

* Reviews
2021-10-31 17:59:13 +02:00
yairm210
1af01dc693 Fixed music download error 2021-10-31 10:32:50 +02:00
will-ca
79ec9a461a
Show construction icons in Cities Overview. (#5602)
* Show construction icons in Cities Overview.

* Don't try to draw images for empty Cities Overview constructions.
2021-10-30 20:25:55 +03:00
Yair Morgenstern
860e788fb5
Separate unit automation (#5592)
* Should resolve #5534 and the long-standing request of "move after automate" by separating the automated movement from the actual end of turn

* Added translation

* Automated units move in a separate thread to avoid UI freezing
2021-10-30 19:02:43 +03:00
SimonCeder
bfe0b68ab8
Barbarian units (#5589)
* barbarian unique units; barbarian blacklisted units

* credits

* barbarian units do not take resources

* ai fix
2021-10-29 13:33:11 +03:00
SomeTroglodyte
6172a893b8
Fix PercentProductionBuildings and PercentProductionWonders (#5588) 2021-10-29 11:29:03 +03:00
SimonCeder
03cebbdd42
Fix for broken saves in #5573 (#5587)
* no new camps in 4 tiles for 15 turns after cleared

* can't spawn land units on water or vice versa, unit choice

* UniqueType.MustSetUp

* sometroglodyte's fixes
2021-10-28 22:31:20 +03:00
Xander Lenstra
4c053ddc99
Revert "Splitting of vanilla and gods & kings rulesets -- Part 1: Groundwork (#5577)" (#5585)
This reverts commit db6e588479.
2021-10-28 22:01:06 +03:00
SomeTroglodyte
8c781bc0d2
Minor hardening of music against OpenAL quirks (#5586) 2021-10-28 22:00:14 +03:00