Commit Graph

6639 Commits

Author SHA1 Message Date
Yair Morgenstern
4f421dc44f 3.19.4 2022-02-01 10:06:47 +02:00
Yair Morgenstern
c3d185cce8 Deprecated old uniques 2022-02-01 10:03:47 +02:00
Yair Morgenstern
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
Xander Lenstra
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
Xander Lenstra
0951e5d6fd
Fixed a bug where unit discounts would not work (#6081) 2022-02-01 09:43:25 +02:00
Yair Morgenstern
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
SpacedOutChicken
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
Yair Morgenstern
9674ddf04e
Caught more mod failure conditions, removed certain assumptions from map creation (#6076)
* Caught more mod failure conditions, removed certain assumptions from map creation

* Military unit in Era can be "Era Specific Unit"

* Resolved #6078 - even more ruleset assumptions removed :)

* We now catch missing military units from the difficulties as well, as well as missing settler and worker units from eras
2022-02-01 09:42:25 +02:00
Xander Lenstra
499b5e5b2f
Possibly fixed a crash accessing gameInfo before it is initialized (#6062)
* Possibly fixed a crash accessing gameInfo before it is initialized

* Inlined an otherwise unused variable

* Alternative version using an extra constructor instead of weird getters/setters
2022-02-01 09:41:57 +02:00
Yair Morgenstern
16855f66f6
Gradle build tools upgrade (#6085)
* Gradle build tools upgrade
Apparently the magic is rewriting a specific line in the Android build file and downloading Android SDK 30.0.3

* Added wiki change, isn't that nice :)
2022-01-31 15:05:42 +02:00
Yair Morgenstern
45e96b948a
Gradle build tools upgrade (#6084)
Upgrading to 7.1 gives us the fun java.lang.NoSuchMethodError: 'void org.apache.commons.compress.archivers.zip.ZipFile.<init>(java.nio.channels.SeekableByteChannel) error so let's not
2022-01-31 14:27:30 +02:00
Yair Morgenstern
10bb4c244f
This is to test the build process with the new Gradle (#6083) 2022-01-31 12:35:01 +02:00
Yair Morgenstern
0f4449f2e9 3.19.3 2022-01-29 23:40:43 +02:00
Yair Morgenstern
fc5dd86007
Translations update (#6073)
* Update Ukrainian.properties (#6068)

* Update Czech.properties  (#6060)

* Update Czech.properties

many new strings trsanslated

* Update Czech.properties

- fixed accidental typos

* Update German translation (#6059)

* Update Italian.properties (#6056)

Co-authored-by: StepanIvasyn <57094070+StepanIvasyn@users.noreply.github.com>
Co-authored-by: stoupa007 <60326342+stoupa007@users.noreply.github.com>
Co-authored-by: MartinP <77325495+Mape6@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2022-01-29 23:32:22 +02:00
Yair Morgenstern
461385fff6
Current map generation is extremely dependant on specific terrains existing in the ruleset. (#6067)
* Current map generation is extremely dependant on specific terrains existing in the ruleset.
This attempts to eliminate those dependencies.
All changes indicate areas where a crash occured before the change.

I still encounter problems in generateRegions when trying to generate a map with no water tiles - @SimorCedar I think the splitRegion doesn't like the fact that there are land tiles on edges of the map?

* Split 'equal fertility' regions as close to the center as possible
Also, don't crash if no luxury resources are defined
2022-01-29 23:28:00 +02:00
Xander Lenstra
a237e7bf82
Typed all remaining uniques using CityInfo.GetMatchingUniques and removed that function (#6071)
* Typed all remaining uniques using CityInfo.GetMatchingUniques and removed that function

* Fixed two NullPtrExceptions

* Fixed syntax
2022-01-29 23:27:48 +02:00
Xander Lenstra
39483d78bd
Resources can now again provide uniques applying to the entire civ (#6072) 2022-01-29 18:37:53 +02:00
Xander Lenstra
599a09176d
Fixed a few rare mod-specific crashes (#6070) 2022-01-29 18:36:50 +02:00
Md. Touhidur Rahman
1b01ee3802
updated Caravel.png, resolves #5317 (#6069)
* updated Caravel.png, resolves #5317

* Update Credits.md
2022-01-29 18:36:05 +02:00
itanasi
6a98d8dd70
Minor logic cleanup (#6066)
Co-authored-by: temurakami <spellman23@gmail.com>
2022-01-28 09:56:10 +01:00
Yair Morgenstern
957d5b4008
Converted era parameter to a transient var (#6063)
The cost of casting getEra() constantly is definitely non-trivial, and why do we even generate the era every time? It only changes when we add a new tech! So we can save it as a transient in the civInfo.tech and be done with it!
2022-01-27 05:44:33 -08:00
Yair Morgenstern
7c478f4cd3 Don't run expensive canBePurchasedWithStat if you aren't going to buy the unit!!!
Also sped up the actual 'finding matching units' part so it's pretty invisible from a performance standpoint :)
2022-01-27 14:59:38 +02:00
Yair Morgenstern
2130cf20e0 Another small improvement, speeds up chooseNextConstruction by about 40%, but this wouldn't really be an issue if tileInfo.hasUnique was fast since that's the main time clog... 2022-01-27 14:50:44 +02:00
Yair Morgenstern
1732d951d2 The O(n^2) is noticable in the flame graphs, I kid you not 2022-01-27 14:00:10 +02:00
Xander Lenstra
cd05fe6ac8
Fixed a crash (#6057) (#6061) 2022-01-27 13:33:18 +02:00
Yair Morgenstern
b121563b99
Converted TileInfo.isCityCenter to use a transient var (#6058) 2022-01-27 00:57:38 -08:00
Yair Morgenstern
fbec7c836e Performance boost for GameInfo.setTransients - speeds up loadGame and nextTurn 2022-01-27 00:28:41 +02:00
Yair Morgenstern
6a969b98f5 A few quick wins for performance 2022-01-26 23:49:21 +02:00
Yair Morgenstern
6855a52466 3.19.2 2022-01-26 22:55:30 +02:00
Xander Lenstra
47af1ff1c3
Removed a function that is no longer used and should not be used imo (#6055) 2022-01-26 22:46:36 +02:00
Yair Morgenstern
dddba4d969
Translations update (#6054)
* Update Indonesian.properties (#6048)

* Update German translation (#6037)

* Update German translation

* Update German translation

* Update German translation

* Update German translation

* Update Italian.properties (#6035)

Co-authored-by: kensvin <63847755+Kensvin28@users.noreply.github.com>
Co-authored-by: MartinP <77325495+Mape6@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2022-01-26 22:42:19 +02:00
Yair Morgenstern
84ef8944d0
Stat bonus drilldown (#6053)
* Step 1 - converted stat bonus list to tree.
No visual difference yet, since the stat bonus list is still generated in the same way.

* Step 2 - updateStatPercentBonusList converted to tree form

* Step 3 - buildings converted to tree form - now user visible!

* Step 4 - Bonuses from uniques are now drilldownable

* Removed unneeded todo

* Welp, turns out I forgot to apply conditionals
2022-01-26 22:42:05 +02:00
will-ca
824efcb1a9
Try to fix potential typos in stock rulesets. (#6028)
* Make mod checker pass status message translatable.

* Try to fix some possibly broken Uniques.

Move comma.
2022-01-26 22:36:24 +02:00
Yair Morgenstern
dcb1be8e9b Welp, turns out I forgot to apply conditionals 2022-01-26 22:31:31 +02:00
Yair Morgenstern
a56874282b Converted RulesetObject unique checks to work against a map for efficiency 2022-01-26 21:10:46 +02:00
Yair Morgenstern
231963f050 Game can now handle improvements with no special stats from resources 2022-01-26 18:20:21 +02:00
Yair Morgenstern
b26d2fc6e7 Removed 'local city uniques' parameter that was being passed around
Due to changes since that was written, the cityInfo.getMatchingUniques has a default parameter of 'local uniques that are of the unique type', so not only was it making a mess, it was also inefficient!
2022-01-26 16:11:13 +02:00
ravignir
74cb3245a5
Update improved resource stats to fully match civ5 (#6038)
* Update improved resource stats to fully match civ5

* More fixes

* Update TileResources.json
2022-01-26 11:20:13 +01:00
Yair Morgenstern
c51e7a5e1e It's about time for showPixelUnits to be on by default, we have all the base game units set up nicely :) 2022-01-25 22:58:47 +02:00
will-ca
40d88eb486
Wiki: Details on keeping the wiki files in the repo. (#6050)
* Wiki: Details on keeping the wiki files in the repo.

* Wiki: Missed a word.
2022-01-25 21:53:00 +02:00
will-ca
607d3f521b
Wiki: Mention nation colour layers. (#6049)
* Fix some inter-wiki links.

* Wiki: Mention nation colour layers.

* Wiki: Slight wording change to a page.
2022-01-25 21:52:03 +02:00
will-ca
88ecbc26b2
Make sure units always have starting promotions. (#6051) 2022-01-25 21:51:35 +02:00
Xander Lenstra
6a5d44c3e9
Adressed comments on the happiness PR after it was merged (#6047) 2022-01-24 22:23:26 +00:00
will-ca
1ee1214b35
Wiki: Remove outdated translation info? (#6046) 2022-01-25 00:08:41 +02:00
will-ca
2234b86d3c
Post-Wiki-Migration cleanup. (#6045)
* Fix GH wiki repository link translation.

* Harmonize wiki links to local paths, as used by AS+GHTree and translated on Wiki by UncivBot.
2022-01-25 00:06:19 +02:00
will-ca
4215ca7a51
Make Indirect Fire a starting promotion instead of Unique for Artillery, Battleship, etc. (#6042) 2022-01-24 21:02:15 +01:00
will-ca
598e0c9c85
Revert "Fix GH wiki repository link translation. (#6043)" (#6044)
This reverts commit 95545ba186.
2022-01-24 18:25:54 +00:00
will-ca
95545ba186
Fix GH wiki repository link translation. (#6043) 2022-01-24 18:19:48 +00:00
Xander Lenstra
b69507255f
Fixed the problems with the food carry-over unique (#6040) 2022-01-24 19:52:35 +02:00
Xander Lenstra
f6cb2bd0d7
Made unhappiness effects moddable by adding a global uniques json; added revolts when < -20 happiness (#5932)
* Added a json file for unhappiness effects

* Change existing code to handle these effects

* Made a weird and unexpendable way to add unhappiness effects to the civilopedia

* Add the default unhappinesseffects to mods without the json

* Added revolts when at very low happiness

* Renamed a few often-used functions

* Added a file for uniques that are always active

* Fixed tests

* Nullifies [Food] -> Nullifies Growth
2022-01-24 17:19:51 +00:00