Commit Graph

6782 Commits

Author SHA1 Message Date
a495e5c8fe Memory and performance improvements for tileGroup imagelocation 2022-02-07 11:02:55 +02:00
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
aa11602c9a Delete unused var in the method getDescription/getShortDescription of the Class Building (#6117) 2022-02-07 10:11:53 +02:00
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
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
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
9726b90b22 tileCanBeImproved was never actually called without a unit. 2022-02-06 19:40:22 +02:00
b0b16787e4 Nicer 'move unit to tile' button 2022-02-06 15:29:42 +02:00
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
e466db397c Better mod loading error messages 2022-02-06 15:05:44 +02:00
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
f40ca8469f Updated battle table UI 2022-02-04 11:24:50 +02:00
4817f49ce9 Flood plains no longer generate on desert hills 2022-02-03 22:59:38 +02:00
27e383631d A couple more that were in Son of War 2022-02-03 20:16:10 +02:00
6654acd92e Added more deprecated uniques that I found still existing in LOTR Unciv 2022-02-03 19:46:10 +02:00
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
3.19.5-autoupdate-unqiues
2022-02-03 14:58:17 +02:00
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
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
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
37c0092284 3.19.5 3.19.5 2022-02-03 10:34:51 +02:00
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
6a12db23e1 Fixed a bug where stats from uniques would exponentially grow (#6101) 2022-02-03 07:32:48 +02:00
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
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
57ada6aa27 Separated single unique check to a different function, so we can use it individually 2022-02-02 11:11:14 +02:00
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
423a83275b Lower-case "deprecated as of" to look nicer to users 2022-02-02 10:49:54 +02:00
fe14918545 Turned 'getDeprecationAnnotation' and 'getReplacementText' to functions for reusability 2022-02-02 10:48:26 +02:00
ff2fc02961 Fixed a bug where open borders, war delcarations and cities could not be traded (#6097) 2022-02-02 07:23:11 +02:00
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
593fc257b5 Apparently terrain name wasn't a uniquetype yet 2022-02-01 17:22:08 +02:00
18a86bf472 Don't generate ice if it isn't in the ruleset 2022-02-01 17:18:58 +02:00
5b39b59a19 There were several places in getMatchingUniques where conditionals were checked multiple times - now they're all checked exactly once 2022-02-01 15:39:01 +02:00
5a01a319be Simplified CityInfo.getMatchingUniques 2022-02-01 15:32:07 +02:00
6d3eabde22 Code cleanup 2022-02-01 15:18:23 +02:00
b1df775217 Apparently the code already existed, the problem was that the uniquetype wasn't marked as such 2022-02-01 14:59:52 +02:00
2e9bc1604f "Must be next to [terrainFilter]" applicable for improvements, as requested 2022-02-01 14:58:07 +02:00
0ac2c932f6 Added ruleset warnings for empty ally and friend bonuses
We currently use the defaults, but we should phase that out
2022-02-01 14:51:54 +02:00
8c4bc2927c Code cleanup 2022-02-01 12:36:08 +02:00
3c2dda3ad4 Use empty lists and maps for objects with no uniques for less memory consumption 2022-02-01 12:26:53 +02:00
3908fbc9cf Fixed memory- and time-intensive unit maintenance checks (#6092)
Get all civwide unit discount uniques once, and then filter them by-conditional only when checking each specific unit.
This saves a LOT of memory allocation and time.
A result of the investigation at #5919.
2022-02-01 12:14:46 +02:00
0a336b3d99 Summarized civ resources, which were getting accessed all the time, are now cached and updated together with the detailed civ resources. (#6093) 2022-02-01 12:14:37 +02:00
cf6dacdcbe Only update CIV viewable tiles if the UNIT'S viewable tiles actually changed!
This will save SO much time and memory!
2022-02-01 11:28:26 +02:00
4f421dc44f 3.19.4 3.19.4 2022-02-01 10:06:47 +02:00
c3d185cce8 Deprecated old uniques 2022-02-01 10:03:47 +02:00
78e8dba2b5 Translations update (#6091)
* Update Spanish.properties (#6082)

* Update Spanish.properties

the only thing i didn't translate were the names of the cities if you have any problem contact me on discord like: lostxxxxx

* Update Spanish.properties

problem solved

* Update Japanese translation (#6075)

* Update Japanese.properties

* Update Japanese.properties

* Update Italian.properties (#6074)

Co-authored-by: Hello200000 <98656089+Hello200000@users.noreply.github.com>
Co-authored-by: yuracla <89312848+yuracla@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2022-02-01 09:53:22 +02:00
6bc41a627c Typed all healing uniques (#6087)
* Typed all healing uniques

* Fixed tests by replacing placeholder texts by types in BeliefAutomation
2022-02-01 09:43:37 +02:00
0951e5d6fd Fixed a bug where unit discounts would not work (#6081) 2022-02-01 09:43:25 +02:00
f6e22f60bf Replace old uniques with *parameter-filled* new uniques! (#6077)
* Since we have the old unique typed, and the new replacement unique typed, we can show modders EXACTLY the new unique they'll need to have!
The final step of this process is having a 'replace old uniques' button which will automagically replace old uniques in a mod with the new versions. This will of course require some manual intervention since it's possible we added some parameters that didn't exist in the old one, but should work well for 95%+ of uniques.

* Also allow "[-amount]" replacements
Better replacements - "[+amount]" etc - where relevant

* Fixed misadded + in unique
2022-02-01 09:42:52 +02:00
d11fe43d2b Fix art for farms on hills (#6080)
* Fix art for farms on hills

This makes hills with farms on them change appearance.

* Refine fix for farms on hills
2022-02-01 09:42:41 +02:00