Commit Graph

7094 Commits

Author SHA1 Message Date
806d58074c 4.0.13 4.0.13 2022-05-06 10:15:38 +03:00
621099b315 Version rollout (#6707)
* Bump version and create initial changelog entry

* Update Filipino.properties (#6703)

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Italian.properties (#6693)

* Update German translation (#6691)

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Shann Aurelle Ripalda <shannaurelleg@gmail.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: MartinP <77325495+Mape6@users.noreply.github.com>
2022-05-06 10:07:20 +03:00
155fbb2690 Adds a debug option to simulate up to some amount of turns (#6657)
* Adds a debug option to simulate up to some amount of turns
Note that the option popup only appears _after_ closing the option menu, 
which is very counterintuitive, but a direct result of how opening 
popups is implemented.
I'm fine if this PR is rejected as a result of that, but it is quite a 
useful option to have nonetheless.

* Reworked it so its just an internal text field + button

* Fixed the weird crashes and made UI interactive during simulation
2022-05-06 10:06:34 +03:00
13eb49f55c Allow trade routes via city-states (#6696)
* Allow trade routes via city-states

* One more unit test is added

* Minor refactoring
2022-05-06 10:06:22 +03:00
3b4881ffdd Reviewed version of the unit's teleportation (#6698)
* Unit tests for the teleports

* Ensure that unit may technically reach the teleport tile

* Capture the civilian units being teleported on them
2022-05-06 10:05:57 +03:00
ceeb547fb8 Create turn notifier for when the game is running for Windows (#6682)
* Create turn notifier for when the game is running for Windows

If playing on Desktop, you often put the game into background, but still want to know if it's your turn. A standard Windows function for that is `FlashWindow` from winuser.h, which is implemented here

* Fix: Use the window from the listener instead of the static one from libGDL

* Only notify if it's the turn of the player that is playing

* Always notify spectators of the next players' turn

* Refactor: Move notifier into GeneralPlatformSpecificHelpers

* Only load Windows DLL when we're actually on Windows
2022-05-06 08:42:30 +03:00
822ce5e041 Update healing values in "Injured Units" article (#6704)
- Based on merged commit "Healing parity" (c8be00b)
2022-05-05 21:07:11 +02:00
f703f2fbde Do not resort building uniques when displaying in Civilopedia - leave as the json order to allow modders to determine order themselves 2022-05-05 18:43:28 +03:00
1e7eff9d1e Can no longer gift units to enemy City States 2022-05-05 18:36:46 +03:00
467a0aa742 Resolved crash due to sending 'localized message' from exception 2022-05-05 18:29:34 +03:00
28a207813b Resolved #6701 - No crash from Science victory AI units that cannot head towards capital 2022-05-05 17:41:11 +03:00
035b6528a7 New Demographics Scoreboard (#6645)
* Healing parity

Adjusted healing values for parity with CV

* New Demographics system for victory screen rankings

Added a new game setup checkbox option to use a ranking system on the victory screen which is more in line with the Civ V Demographics window. Created the UI element and game parameter but the demographics screen still needs to be implemented.

Also removed unnecessary comments from adjustments to healing values in a previous update.

* Demographics table init

Beginning to build structure of Demographics rankings table.

* Update VictoryScreen.kt

Attempt at getting more of the Demographics table implemented

* Update VictoryScreen.kt

Continued building the structure of the Demographics table

* Demographics first implementation

Finished first pass of Demographics screen.

* Minor text formatting

Improved some text formatting in code and comments.

* Update MapUnit.kt

Minor comment cleanup.

* SomeTroglodyte's Feedback, pt. 1

Implemented feedback given by SomeTroglodyte in PR #6645.

* Organized into functions

Split up Rankings table creation and Demographics table creation into new functions

* Update template.properties

Fixed missing space.

* Implementing more PR #6645 feedback

Added needed translation templates, used enum class instead of array for headers, moved checkbox to Options -> Display instead of new game

* Implemented rest of PR #6645 feedback

Simplified logic for finding player's rank, value, best/worst civ value, and filtered out defeated civs from the display and calculations

* Dead Civs get 0 in all categories

Added simple check if a civ is dead when computing score. If they are dead then they get 0 and go to the bottom of the scoreboard.

* Update VictoryScreen.kt

Further cleaned up code for better reuse and simpler logic with fewer loops.

* Update CivilizationInfo.kt

Simplified implementation of return 0 for stats when civ is defeated.

* Update CivilizationInfo.kt

Removed commented-out line of code.

* Fixed duplicate rank bug

Adjusted method of determining best and worst civs so that duplicates don't occur.

* Update VictoryScreen.kt

One-lined the handling of logic in buildDemographicsTable()

* Update VictoryScreen.kt

Moved static header row to new function.
2022-05-05 14:42:35 +02:00
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
d285bc1ec7 When updating civ resources, only update stats if anything has changed - see #6695 2022-05-05 12:16:34 +03:00
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
c6795d7e91 Cache city-wide uniques in CityConstructions.getStats() for reuse between buildings - see #6695 2022-05-05 10:39:40 +03:00
333582980f Ignore temporary uniques if not relevant - see #6695 2022-05-05 09:51:17 +03:00
fe2c98bc54 Lazy initialize of Yield group - see #6695 2022-05-05 09:50:35 +03:00
cf6543bc29 Fix Sweden not being able to gift great people to city states (#6690) 2022-05-05 09:09:15 +03:00
342367c72c Fix typo in new translation line (#6692) 2022-05-05 01:23:22 +03:00
20d580976d Don't create unneeded filters in getMatchingUniquesWithNonLocalEffects - see #6695 2022-05-04 22:59:14 +03:00
6812caf3b3 Placeholder and Conditional function optimization - see #6695 2022-05-04 22:56:15 +03:00
7986134929 Update latest fastlane changelog entry when generating translation files 2022-05-04 19:03:47 +03:00
0aa1dbeda4 Added owner-style-specific improvements 2022-05-04 15:23:04 +03:00
760aace923 4.0.12 4.0.12 2022-05-04 10:56:17 +03:00
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
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
deac3d6f67 Minor performance improvement for border strings 2022-05-04 10:11:27 +03:00
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
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
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
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
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
515c9bbcae Show available resources from CityScreen (bottom right info only) (#6667) 2022-05-03 07:59:42 +03:00
6ceb2b10c2 Fastlane - sort screenshots by renaming (#6671) 2022-05-03 07:57:03 +03:00
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
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
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
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
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
031cb4fc14 Enable scrolling for the oversized popups (#6668) 2022-05-02 13:56:34 +02:00
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
3eb3324848 4.0.11 4.0.11 2022-05-01 00:23:18 +03:00
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
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
ac2f31f553 Protect the cities from the fallout spawning (#6640) 2022-05-01 00:09:00 +03:00
9b5f70e868 Show number of global followers in Religion Overview (#6654) 2022-05-01 00:07:48 +03:00
1ac2ecb9e8 Fixed improvements with unfulfilled 'Only Available' still buildable (#6646) 2022-04-30 23:58:52 +03:00
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
940306432f Added new page with map rendering documentation 2022-04-30 23:50:15 +03:00