Commit Graph

6851 Commits

Author SHA1 Message Date
Yair Morgenstern
8ee2a34a4d chooseMilitaryUnit optimized! 2022-02-10 14:42:52 +02:00
Yair Morgenstern
86450c54eb When pathfinding, only consider ZOC for the *current* turn since things will likely change next turn! This gives a massive performance boost by removing a possible wrong check entirely :) 2022-02-10 14:01:11 +02:00
Yair Morgenstern
dcdb0ca892 Loading a new game while nextTurn is running no longer reverts you to that game 2022-02-09 18:02:52 +02:00
Yair Morgenstern
13f052878b Merged all arrow images into one
Removed unnecessary filterNotNull from getTileBaseImageLocation
2022-02-09 16:59:05 +02:00
Yair Morgenstern
09ea1a869d 3.19.7 2022-02-09 12:31:08 +02:00
Yair Morgenstern
74037489fc 3.19.7 2022-02-09 12:30:35 +02:00
Yair Morgenstern
ccfe4386b8 Unique deprecation 2022-02-09 12:26:21 +02:00
Yair Morgenstern
c54438ef9f
Translations update (#6132)
* Update Spanish.properties (#6130)

nothing important

* Update French.properties (#6126)

* Update Russian.properties (#6124)

* Update Japanese.properties (#6123)

* Update Portuguese.properties (#6121)

* Update Portuguese.properties

* Update Portuguese.properties

Sorry, corrected, I had overlooked that error.

* Update Italian.properties (#6119)

Co-authored-by: Hello200000 <98656089+Hello200000@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: deqtodo <94169613+deqtodo@users.noreply.github.com>
Co-authored-by: nukurette <76560753+nukurette@users.noreply.github.com>
Co-authored-by: Chacal <chacal_exodius@hotmail.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2022-02-09 12:26:11 +02:00
Yair Morgenstern
90d459a9f4
Added conditional for 'first civilization to research a tech' (#6120)
* Techs with these kinds of conditional bonuses exist in Civ IV and VI

* Phrasing can now include long-term benefits :)

* Capitalization

* Triggered uniques now subject to conditionals

* Removed extraneous parameter

* Conditional placement

* Updated uniques.md to better phrasing
2022-02-09 12:21:20 +02:00
Yair Morgenstern
03f7af4360
Typified Obsolete unique, made luxury resources obsoletable (#6129)
* Typified Obsolete unique, made luxury resources obsoletable
Things that were luxuries in the past become uninteresting as time goes on

* Unified obsolescence handling for buildings, improvements and resources

* Obsolete icons have their x's in the right place

* All images &c are done - we have the skeleton of the mod in place!

* Revert "All images &c are done - we have the skeleton of the mod in place!"

This reverts commit 61553c17
2022-02-09 12:18:14 +02:00
Yair Morgenstern
644c61a851 Withdraw chances can stack 2022-02-09 12:15:21 +02:00
itanasi
967b70a4b9
Sea Unit can't capture Land Civilian (and vice versa) (#6128)
* Relevant Code

* Negate check

Co-authored-by: itanasi <spellman23@gmail.com>
2022-02-08 12:07:54 +01:00
itanasi
1420ad845c
Notify when Barbs don't give more XP (#6115)
* Updates to allow BarbXP gain check

* Remove from ICombatant

* Revert Battle.kt

* Fix code in BattleTable

* Add template.properties entry

* Fix space issue

* Silly autoformatting

Co-authored-by: temurakami <spellman23@gmail.com>
2022-02-08 11:42:24 +02:00
Yair Morgenstern
92f0be995d More -/+ unique deprecation fixes 2022-02-07 18:26:20 +02:00
Yair Morgenstern
fb77a9e6b1 Replace existing 'unique with condition' with a new Conditional, applicable everywhere 2022-02-07 17:15:10 +02:00
Yair Morgenstern
8fda18db42 3.19.6 2022-02-07 11:27:51 +02:00
Yair Morgenstern
e9d7ed168f
Translations update (#6118)
* Big update for French.properties (#6112)

* Big update for French.properties

- Try as much as possible to match Civ 5 french translation
- Modify some translations to better fit the UI
- Modify some translations to improve some original Civ 5 french entries which were poorly translated
- Make translations consistent through all the file
- Fix all broken translations due to bad word/key ordering
- Some quotes are now real quotes from french books (when available) rather than translated from english quotes
- Fix many typos

* Fix translation error

* Translatión: Actualización del Español (#6109)

Also deleted the extra resource icons I originally put 'xD

* Update Korean.properties (#6108)

* Update Korean.properties

* Update Korean.properties

* Update Korean.properties

* Update Korean.properties

* Update Korean.properties

* Update Korean.properties

* Update Korean.properties

* Update Korean.properties

* Update Japanese.properties (#6107)

* Update Indonesian.properties (#6103)

* Update Indonesian.properties

* Update Indonesian.properties

Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: ArchDuque-Pancake <78449553+ArchDuque-Pancake@users.noreply.github.com>
Co-authored-by: Samsaek the Calico <saud2410@naver.com>
Co-authored-by: yuracla <89312848+yuracla@users.noreply.github.com>
Co-authored-by: kensvin <63847755+Kensvin28@users.noreply.github.com>
2022-02-07 11:21:18 +02:00
Yair Morgenstern
aa21cf8a28 More tilegroup performance improvements - Only run orFallback once per TileSetStrings and not for every tilegroup
We should probably have a dictionary of "original string to actual string" where orFallback only actually runs if the key isn't in the dictionary yet, otherwise it returns the stored value
2022-02-07 11:14:11 +02:00
Yair Morgenstern
efd576e195 Don't display empty civilopedia categories in mods that don't have them 2022-02-07 11:02:55 +02:00
Yair Morgenstern
a495e5c8fe Memory and performance improvements for tileGroup imagelocation 2022-02-07 11:02:55 +02:00
itanasi
77dd9f63f6
Fixing to also capture Civilian Unit when capturing during battle (#6114)
Co-authored-by: temurakami <spellman23@gmail.com>
2022-02-07 09:45:53 +01:00
lishaoxia1985
aa11602c9a
Delete unused var in the method getDescription/getShortDescription of the Class Building (#6117) 2022-02-07 10:11:53 +02:00
Yair Morgenstern
6403337da6
New unique to designate when you need at least N buildings of a certain kind (#6113) 2022-02-06 23:55:44 +01:00
Yair Morgenstern
c9d487638c Added button to reload all rulesets - very helpful if you're working on mods and adding things gradually :) 2022-02-06 22:07:56 +02:00
Yair Morgenstern
9da66c8c08 Notification icons are now on the RIGHT so you can scroll notifications and find interesting ones faster 2022-02-06 19:58:22 +02:00
Yair Morgenstern
9726b90b22 tileCanBeImproved was never actually called without a unit. 2022-02-06 19:40:22 +02:00
Yair Morgenstern
b0b16787e4 Nicer 'move unit to tile' button 2022-02-06 15:29:42 +02:00
Yair Morgenstern
8efcd8cc2b Exploring and automating workers are some of the most common actions, they don't deserve to be behind a 'get additional actions' click 2022-02-06 15:11:03 +02:00
Yair Morgenstern
e466db397c Better mod loading error messages 2022-02-06 15:05:44 +02:00
Yair Morgenstern
5e29b1321b
Generalized tile conditionals (#6110)
Tiles can come from either
A. attackedTile
B. unit tile
C. City tile

All tile conditionals now work for all tile sources
2022-02-06 14:05:59 +02:00
Yair Morgenstern
f40ca8469f Updated battle table UI 2022-02-04 11:24:50 +02:00
Yair Morgenstern
4817f49ce9 Flood plains no longer generate on desert hills 2022-02-03 22:59:38 +02:00
Yair Morgenstern
27e383631d A couple more that were in Son of War 2022-02-03 20:16:10 +02:00
Yair Morgenstern
6654acd92e Added more deprecated uniques that I found still existing in LOTR Unciv 2022-02-03 19:46:10 +02:00
Yair Morgenstern
3661ad8d5b
Find all replaceable uniques, generate replacement text, check for compatibility, and replace! (#6105)
* Find all replaceable uniques, generate replacement text, check for compatibility, and replace!

All of the work up until now has lead up to this point - since we already know what's out and what to replace it with, we can do 90%+ of the work ourselves and spare the sanity of our modders

For an example run:
- Download your favorite mod
- Check its deprecated uniques in the options menu
- Run the autoupdater from the same menu
- See how they disappear
- Bask in the glory

* A few unreplaced uniques raised problems in some of the replacement texts

* Old unusable deprecated uniques are suddenly important again, because they can help autoupdate mods!

I'm wondering if to remove outdated mods entirely from the uniques.md, since they're going to keep accumulating

* Padding for the 'autoupdate' button

* Only display autoupdate button if there are unique to update
Also, fixed some of the revived deprecated unique's replacement text thanks to fancy new tests :)
Tech uniques autoupdate!

* Toast now pops correctly, added translation entries
2022-02-03 14:58:17 +02:00
Xander Lenstra
02c37f19fe
Fixed a bug where units requiring nearby units for bonuses could find themselves (#6104)
* Fixed a bug where units requiring nearby units for bonuses could find themselves

* Added requested changes
2022-02-03 14:51:04 +02:00
Yair Morgenstern
6925fc6909 Add mod folder to mod info when initializing mods so we don't have files pretending to be mods everywhere we try and find mod folders 2022-02-03 12:15:28 +02:00
Yair Morgenstern
89958e27ff
Options checks mods gradually and has expander tabs (#6099)
* Change options mod checking to check each mod individually, part 1 - change cell to table

* Mod checker now posts each mod separately by posting a new runnable each time one has completed

* Each mod now has its own expandertab so you don't need to scroll endlessly if you have a lot of mods

* Only enable 'check against vanilla' mod checkbox after all mods have been checked
2022-02-03 10:56:55 +02:00
Yair Morgenstern
37c0092284 3.19.5 2022-02-03 10:34:51 +02:00
Yair Morgenstern
0e9e4dc279
Translations update (#6102)
* Update Dutch translation (#6100)

* Update Dutch.properties

* Update Dutch.properties

* Taalfout verbeterd

* Taalfouten verbeterd

* Meer taalverbeteringen

* Laatste taalverbetering

* Update German translation (#6098)

Co-authored-by: Blubvis725 <62372520+Blubvis725@users.noreply.github.com>
Co-authored-by: MartinP <77325495+Mape6@users.noreply.github.com>
2022-02-03 10:26:50 +02:00
Xander Lenstra
6a12db23e1
Fixed a bug where stats from uniques would exponentially grow (#6101) 2022-02-03 07:32:48 +02:00
Yair Morgenstern
f217ce7055 Added check for deprecated uniques referencing other deprecated uniques (can happen if we replace uniques in quick succession and we forget to modify the older deprecated unique when we introduce the new one) 2022-02-02 11:25:35 +02:00
Yair Morgenstern
483a8eab1a Added test to ensure that deprecation texts are accurate to existing uniquetypes and conditionals
Tested that this does indeed break if you add a random space :)
2022-02-02 11:21:02 +02:00
Yair Morgenstern
57ada6aa27 Separated single unique check to a different function, so we can use it individually 2022-02-02 11:11:14 +02:00
Yair Morgenstern
9696fa59f5
Added unique to convert terrain to other terrain if adjacent to something (#6094)
* Added unique to convert terrain to other terrain if adjacent to something

Terrain converting to other terrain when adjacent to rivers was using hardcoded stuff, so I un-hardcoded it
I thought I could use this to replace the 'coast' hardcoding, and if it wasn't for the maxCoastExtension then I could.
Modders CAN therefore add their own coast (Lava tiles and Ash tiles I dunno) but it will only be for directly close terrains.
This enables Deciv Redux to spawn huge maps.

* Also for Vanilla, which apparently had a different number of tabs than G&K for no apparent reason.

* Apparently terrain name wasn't a uniquetype yet

(cherry picked from commit 593fc257b5)
2022-02-02 00:59:37 -08:00
Yair Morgenstern
423a83275b Lower-case "deprecated as of" to look nicer to users 2022-02-02 10:49:54 +02:00
Yair Morgenstern
fe14918545 Turned 'getDeprecationAnnotation' and 'getReplacementText' to functions for reusability 2022-02-02 10:48:26 +02:00
Xander Lenstra
ff2fc02961
Fixed a bug where open borders, war delcarations and cities could not be traded (#6097) 2022-02-02 07:23:11 +02:00
Yair Morgenstern
3c30a5697f Greatly reduced game loading times and new game screen thinking time by removing misspelling checks always except for options menu 2022-02-01 22:05:49 +02:00
Yair Morgenstern
593fc257b5 Apparently terrain name wasn't a uniquetype yet 2022-02-01 17:22:08 +02:00