Commit Graph

7232 Commits

Author SHA1 Message Date
Yair Morgenstern
b258b34c89 Use a UniqueMap to have hashmap finding instead of array iteration and string comparison for MapUnit getUnique(string) - see #6695 2022-05-05 12:29:04 +03:00
Yair Morgenstern
d285bc1ec7 When updating civ resources, only update stats if anything has changed - see #6695 2022-05-05 12:16:34 +03:00
Yair Morgenstern
79dc3c08d1 Cache city-wide uniques in addStatPercentBonusesFromBuildings and updateTileStats, don't build maps in Stats - see #6695 2022-05-05 11:14:31 +03:00
Yair Morgenstern
c6795d7e91 Cache city-wide uniques in CityConstructions.getStats() for reuse between buildings - see #6695 2022-05-05 10:39:40 +03:00
Yair Morgenstern
333582980f Ignore temporary uniques if not relevant - see #6695 2022-05-05 09:51:17 +03:00
Yair Morgenstern
fe2c98bc54 Lazy initialize of Yield group - see #6695 2022-05-05 09:50:35 +03:00
Timo T
cf6543bc29
Fix Sweden not being able to gift great people to city states (#6690) 2022-05-05 09:09:15 +03:00
MartinP
342367c72c
Fix typo in new translation line (#6692) 2022-05-05 01:23:22 +03:00
Yair Morgenstern
20d580976d Don't create unneeded filters in getMatchingUniquesWithNonLocalEffects - see #6695 2022-05-04 22:59:14 +03:00
Yair Morgenstern
6812caf3b3 Placeholder and Conditional function optimization - see #6695 2022-05-04 22:56:15 +03:00
Yair Morgenstern
7986134929 Update latest fastlane changelog entry when generating translation files 2022-05-04 19:03:47 +03:00
Yair Morgenstern
0aa1dbeda4 Added owner-style-specific improvements 2022-05-04 15:23:04 +03:00
Yair Morgenstern
760aace923 4.0.12 2022-05-04 10:56:17 +03:00
Yair Morgenstern
204d80fbe2
Version rollout (#6689)
* Bump version and create initial changelog entry

* Rework German descriptions for F-Droid (#6688)

* Update French.properties (#6678)

* Update German translation (#6674)

* Update Traditional_Chinese.properties (#6673)

* Update Indonesian.properties (#6663)

* Update Simplified_Chinese.properties (#6660)

* Update Simplified_Chinese.properties

* Fix errors

I wonder who translated 'wonder ' into “奇迹”. I bet he/she used machine translating. Pretty annoying

* Update Simplified_Chinese.properties

* Update Simplified_Chinese.properties

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: MartinP <77325495+Mape6@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Chia-Hung Ni <jameseses@gmail.com>
Co-authored-by: kensvin <63847755+Kensvin28@users.noreply.github.com>
Co-authored-by: heipizhu4 <100454479+heipizhu4@users.noreply.github.com>
2022-05-04 10:48:41 +03:00
SomeTroglodyte
75239ca1d9
Optimize String to Stat and Translation mod list somewhat (#6669)
* Accelerate Stat.values().firstOrNull and tr.activeMods a bit

* Use Stat.safeValueOf and its Map in existing code
2022-05-04 10:12:40 +03:00
Yair Morgenstern
deac3d6f67 Minor performance improvement for border strings 2022-05-04 10:11:27 +03:00
SomeTroglodyte
cec9975b4d
Implement fastlane step 2: Translating (#6643)
* Implement fastlane step 2: Translating

* Placing the Font family Label before the Thread is nicer
2022-05-03 09:16:22 +02:00
Jack Rainy
5d1a09b214
Allow city connections via open borders and own harbors only (#6656)
* Simplified tileFilter predicate

* Use only own harbors

* Allow city connections via open borders only

* Basic unit tests

* Advanced unit tests

* The maps and the legend for the tests

* CR changes: barbarians will not let the trades happen

* CR changes: get rid of question signs, "let" "Elvis" pass away
2022-05-03 08:10:29 +03:00
heipizhu4
0d80929945
Make 'Followers of this religion" translatable (#6662)
First time editing the template. Is this the correct way to do so?
2022-05-03 08:07:41 +03:00
Timo T
ded648f6b1
Fix minimap actor leak (#6659)
* Formatting

* Fix minimap actor leak

The minimap update method tried to update borders only on tiles that changed owners, which is fine if that was what it did. But only the "remove old borders" part was in the "changed owners" branch, not "add new borders", so what actually happened was that each update all borders where the tile owner didn't change got added again, which is basically all borders.

This caused a huge slowdown the more actions you do on the world map in a single turn (i.e. move a lot of units). When a new turn starts, the minimap gets completely thrown away and rebuilt, so then it's fine again.

This changes the minimap to properly add/remove borders when something actually changes.

* Refactor: Split classes up into separate files

Also, split up the Minimap.init method into smaller methods to make it a bit more readable

* Finish up comment
2022-05-03 08:07:17 +03:00
Xander Lenstra
da2d3450b8
Fixed provides [amount] [resource] on buildings not accepting conditionals (#6664)
* Fixed `provides [amount] [resource]` not accepting conditionals
This was due to it still using `getLocalMatchingUniques` without 
providing a `StateForConditionals`, and then manually filtering them if 
they didn't provide conditionals. This of course doesn't work anymore, 
as `getLocalMatchingUniques` then assumes that all conditionals aren't 
satisfied.
Also refactored a loop over `uniqueObjects` with `isOfType()` to just 
use `getMatchingUniques()`.

* Only initialize StateForConditionals once

* Actually this is more moddable
2022-05-03 08:01:54 +03:00
SomeTroglodyte
515c9bbcae
Show available resources from CityScreen (bottom right info only) (#6667) 2022-05-03 07:59:42 +03:00
SomeTroglodyte
6ceb2b10c2
Fastlane - sort screenshots by renaming (#6671) 2022-05-03 07:57:03 +03:00
Xander Lenstra
c55b14eaa7
Implemented most easy things from comments on moddable victory PR (#6600)
* Implemented most easy things from comments on moddable victory PR
Also added religious victory condition

* Fixed tests

* Fixed compile problems & missing string

* Fixed typo
2022-05-03 07:56:24 +03:00
SomeTroglodyte
345114ed93
Unciv Adaptive Android Icon (#6672)
* Use both icon and roundIcon properties

* Studio-generated Android Icon

* Studio-generated Android Icon to fastlane

Co-authored-by: JackRainy <JackRainy@users.noreply.github.com>
2022-05-03 07:55:55 +03:00
MartinP
e279e14fe8
Update Hosting-a-Multiplayer-server.md (#6676)
* Update Hosting-a-Multiplayer-server.md

Added a section for explaining that Android does not like unencrypted traffic to a self-hosted server and that you need to setup a reverse proxy to do that.

* Added hint for MultiplayerFiles folder
2022-05-03 07:52:59 +03:00
Jack Rainy
a938fffb99
Fix of the broken link in the uniques.md (once again) (#6665)
* Fix of misprint (once again)

* Usage of CRLF endings
2022-05-03 07:52:20 +03:00
alexban011
898b1ca056
check for internet before starting a mp game to avoid freeze (#6679)
* Fixed issue #6649 by checking for internet connection before starting the game if "online multiplayer" is selected
Many thanks to SomeTroglodyte for most of the code and for explanations

* check for internet before starting a mp game to avoid freeze

Fixed issue #6649 by checking for internet connection before starting the game if "online multiplayer" is selected.

Many thanks to SomeTroglodyte for most of the code and for explanations. A slight modification has been done to the code to catch an error caused by InetAddress

* Revert "Merge remote-tracking branch 'origin/master-noInternet' into master-noInternet"

This reverts commit bd6474b50d, reversing
changes made to f52ad60b51.
2022-05-02 23:41:08 +02:00
Jack Rainy
031cb4fc14
Enable scrolling for the oversized popups (#6668) 2022-05-02 13:56:34 +02:00
SomeTroglodyte
4d6058a9d4
Fix TileInfo.neighbors being incomplete in rare circumstances (#6644)
* Fix incomplete neighbors first seen as continents up to expectations

* Fix incomplete neighbors - more comments
2022-05-01 06:49:28 +03:00
Yair Morgenstern
3eb3324848 4.0.11 2022-05-01 00:23:18 +03:00
Yair Morgenstern
058a3e8211
Version rollout (#6658)
* Bump version and create initial changelog entry

* Update Filipino.properties (#6655)

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update French.properties (#6642)

* Update Italian.properties (#6629)

* Update Simplified_Chinese.properties (#6628)

* Update Simplified_Chinese.properties

* Update Simplified_Chinese.properties

* Update Indonesian.properties (#6626)

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update German translation (#6625)

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Shann Aurelle Ripalda <shannaurelleg@gmail.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: heipizhu4 <100454479+heipizhu4@users.noreply.github.com>
Co-authored-by: kensvin <63847755+Kensvin28@users.noreply.github.com>
Co-authored-by: MartinP <77325495+Mape6@users.noreply.github.com>
2022-05-01 00:17:32 +03:00
SomeTroglodyte
f668f65bb3
Update From-code-to-deployment.md (#6638)
Better link for the F-Droid Monitor and a hint what to expect
2022-05-01 00:12:42 +03:00
Jack Rainy
ac2f31f553
Protect the cities from the fallout spawning (#6640) 2022-05-01 00:09:00 +03:00
SomeTroglodyte
9b5f70e868
Show number of global followers in Religion Overview (#6654) 2022-05-01 00:07:48 +03:00
Xander Lenstra
1ac2ecb9e8
Fixed improvements with unfulfilled 'Only Available' still buildable (#6646) 2022-04-30 23:58:52 +03:00
SomeTroglodyte
52586a2101
Map editor2.2 (#6641)
* Readability overloads for `getComplexRuleset`

* Enable loading maps containing missing ruleset objects with fix and message

* Fix bungled `noMapsAvailable` and follow minor criticism
2022-04-30 23:58:03 +03:00
Yair Morgenstern
940306432f Added new page with map rendering documentation 2022-04-30 23:50:15 +03:00
Xander Lenstra
1a050bdaa6
Fixed a crash when a plane tried to enter a full city (#6652)
This would only occur if the plane was damaged and looking for a spot to 
heal, and had no tile to go to with >0 healing. It would then try to 
head towards the nearest city, regardless of whether it could enter 
that. As it's an air unit, 'head towards' means 'fly there directly this 
turn', which obviously caused crashes if the unit couldn't enter that 
tile.
2022-04-30 23:08:48 +03:00
Yair Morgenstern
8133f40f74 Don't allow trade routes through enemy cities - #6633 2022-04-29 09:47:51 +03:00
Yair Morgenstern
0179d8f95f 4.0.10-patch1 2022-04-28 20:11:21 +03:00
Yair Morgenstern
702f477e49
Added placeholder parameter location in a way that enables nested translations (#6632)
* Added placeholder parameter location in a way that enables nested translations - see #6474

* Simplified
2022-04-28 13:32:55 +02:00
Jack Rainy
487ad69d28
Correct swap of the full-loaded carriers (#6634)
* Correct swap of the full-loaded carriers

* Code comments
2022-04-28 13:31:46 +02:00
Xander Lenstra
2b9b68488d
Very likely fixed a new 4.0.9 crash. (#6627)
Not sure what exactly happened, but this should fix it. Also updated it 
to use the new victory milestones instead of the apollo project
2022-04-27 19:00:58 +03:00
Yair Morgenstern
3d9a53329e 4.0.10 2022-04-27 09:23:45 +03:00
Yair Morgenstern
0a6bdaa54d
Version rollout (#6624)
* Bump version and create initial changelog entry

* Update translation for Simplified_Chinese (#6616)

* Update Simplified_Chinese.properties

* Fix errors in Simplified_Chinsese translation

Including several accidentally deleted space & add 2 translation

* Update French.properties (#6607)

* Update French.properties

* Fix placeholder

* Update Spanish.properties (#6605)

* Update Italian.properties (#6603)

* Update German translation (#6598)

* Update German translation

* Update German translation

* Update German translation

* Update Filipino.properties (#6595)

* Update Filipino.properties

* Update Filipino.properties

* Translations for the Ukrainian language (#6593)

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: heipizhu4 <100454479+heipizhu4@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+ArchDuque-Pancake@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: MartinP <77325495+Mape6@users.noreply.github.com>
Co-authored-by: Shann Aurelle Ripalda <shannaurelleg@gmail.com>
Co-authored-by: Jack Rainy <JackRainy@users.noreply.github.com>
2022-04-27 09:19:11 +03:00
Jack Rainy
6e88828240
Correct calculation of the production for the Settlers (#6590)
* Correct contribution to the Settler production

* Correct indicator of the food usage during Settler production

* More precise calculation of the food to production conversion

* Revert of starvation avoidance during Settler production

* Minor tweaks
2022-04-27 09:16:11 +03:00
SomeTroglodyte
8891883998
Resources UI (#6596)
* More info for Resources in Civilopedia

* Remove duplicates for Resource requirements in Civilopedia

* Resource overview link resource label to Civilopedia

* Resource overview stay if clicking can't notify (resources not existing on map)

* Resource overview display of resources produced by buildings
2022-04-27 09:15:49 +03:00
Xander Lenstra
933e769d8e
Changed milestone build globally text to make it more understandable (#6613)
* Changed milestone build globally text to make it more understandable

* Actually this is probably just as clear, gramatically more correct and
more imperative like the other milestones

* Fixed tests

* Reworded again
2022-04-27 09:15:33 +03:00
ultradian
d2f0e32229
Making SpecialistAllocationTable an ExpanderTab (#6614)
* Make SpecialistAllocationTable an ExpanderTab

* Make Specialist ExpanderTab translatable
2022-04-27 09:14:19 +03:00