Commit Graph

7117 Commits

Author SHA1 Message Date
SomeTroglodyte
eb5e8ae226
Switchable gzipping of saved games (#6735)
* Switchable gzipping of saved games

* Switchable gzipping of saved games - consensus says default off
2022-05-11 16:23:11 +03:00
Timo T
1bbf5514cf
Add UncivServer.jar to github release (#6745) 2022-05-11 16:22:21 +03:00
SomeTroglodyte
addfddb2ec
Update wiki Building-locally.md for AS Chipmunk (#6761) 2022-05-11 16:19:56 +03:00
Md. Touhidur Rahman
45739a172d
improve autofix on multiplayerServer from url input (#6759) 2022-05-11 15:18:00 +03:00
OptimizedForDensity
5a78c59405
Hide Unmet Civ and Capital Names in the Victory Status Screen (#6742)
* Hide the names of unmet yet alive civs in the victory screen.

Mainly affects the DestroyAllPlayers victory but the CaptureAllCapitals (as capital name) and WorldReligion victory code is updated accordingly.

* Redundant condition since dead civs can't hold cities.

* Formatting + undid CaptureAllCapitals name obscuring since there could be some cases where the known capital name suddenly becomes unknown.

* Parameterized if statement

* Hide other capital names until the tile is explored.

* New constant for an unknown city name.

Co-authored-by: OptimizedForDensity <>
2022-05-11 11:46:37 +03:00
Md. Touhidur Rahman
531906f5ba
Autofix Multiplayer Server URL on input (#6743)
* Autofix Multiplayer Server URL on input, resolves #6583

* some improvements
2022-05-11 09:36:08 +02:00
Xander Lenstra
8fcfbf752b
Improved clarity and moddability of building improvements (#6712)
* Renamed tile.hasUnique, deprecated `Indestructable`, unique for citadels
Also refactored the consumption of (great) people out of UnitActions.

* Reworked when improvements can be build somewhere for more clarity

* Made resources improvable by multiple improvements; Offshore Platform

* Fix compatability

* WIP

* Fixed the tests, but better

* I suppose I might as well update this now that we're a version later
2022-05-11 00:35:21 +02:00
SomeTroglodyte
7b4833741d
Fix missing translatables, again (#6705) 2022-05-11 00:21:38 +03:00
Timo T
7841f57fc8
Fix spectator not being able to view tile improvements or city buttons (#6741) 2022-05-10 12:33:10 +02:00
SomeTroglodyte
ecd328afc3
Four Uniques typed - Blitz, Haka Dance, Hakkapeliitta, Amphibious (#6740)
* Four Uniques typed - Blitz, Haka Dance, Hakkapeliitta, Amphibious
2022-05-10 01:04:05 +03:00
SomeTroglodyte
0ba71e2c6b
Allow untyped Uniques in MapUnit UniqueMap (#6739) 2022-05-09 23:49:35 +03:00
Yair Morgenstern
ba96bea556 4.0.14 2022-05-08 21:42:19 +03:00
Yair Morgenstern
4fe775c0f5
Version rollout (#6726)
* Bump version and create initial changelog entry

* Update Filipino.properties (#6714)

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Filipino.properties

* Update Romanian.properties (#6713)

* 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

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

This reverts commit bae7d7c07f.

* some translations

* merging with 4.0.13

* fixed a little error

* fixed github check error

* Update German translation (#6710)

* Update German translation

* Update German translation

* Update German translation

* Update Italian.properties (#6708)

* Update French.properties (#6697)

* Update French.properties

* Update French.properties to 4.0.13

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Shann Aurelle Ripalda <shannaurelleg@gmail.com>
Co-authored-by: alexban011 <alexban011@gmail.com>
Co-authored-by: MartinP <77325495+Mape6@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
2022-05-08 21:29:33 +03:00
SomeTroglodyte
4290373cf1
Move UncivServer to own module (and jar) (#6468)
* Move UncivServer to own module (and jar)

* UncivServer isalive logged

* Separate UncivServer - some wiki hints

* Separate UncivServer - how to build UncivServer.jar

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2022-05-08 21:22:43 +03:00
SomeTroglodyte
3ea9c6503b
Font choice rework (#6670)
* Font choice rework

* Font choice rework - naming

* Font choice rework - fix default font selection
2022-05-08 21:22:23 +03:00
SomeTroglodyte
4b7edca7a8
Rework of the "Creates improvement on a specific tile" Unique (#6687)
* Make Citadel tile takeover a unique

* CreatesOneImprovement unique overhaul step 1

* CreatesOneImprovement unique overhaul - increase highlights alpha

* Fix missing translatables, again

* CreatesOneImprovement unique overhaul - review suggestions

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2022-05-08 21:22:01 +03:00
Timo T
7c24b0b6af
Fix old barbarian camps not being properly loaded after 86d5011 (#6724)
* Fix old barbarian camps not being properly loaded after 86d5011

* Fix first load resulting in error
2022-05-08 21:21:25 +03:00
Jack Rainy
d00b72806b
Leftovers from previous PRs (#6725)
* Leftovers from #6698

* Leftovers from #6718

* Better naming
2022-05-08 21:19:55 +03:00
Timo T
86d5011da1
In-depth serialization improvement, fixes Barbarian Camps revealed by Honor not showing immediately in multiplayer
* Fix Barbarian Camp Spawned notification not revealing the camp on the map in multiplayer

* Fix lastSeenImprovement not being cloned

* Use HashMapVector2 in BarbarianManager

* Fix value not having its class written out for proper deserializing

* Refactor: various code improvements
2022-05-08 12:35:41 +02:00
Jack Rainy
569b51cb27
Missing uniques are added (#6721) 2022-05-08 11:23:55 +02:00
letstalkaboutdune
304d3317b0
Update VictoryScreen.kt (#6723)
Corrected bug in Demographics scoreboard which displayed current player based on turn, not based on viewing civ.
2022-05-08 09:00:46 +03:00
Jack Rainy
080842d65c
Assist on downloading of the missing mods (#6718)
* More verbose error handling

* Better handling of the missing mods exceptions

* Place GitHub routines where it is used the most

* Move a shared routine to the shared class

* Download missing mods

* Minor refactoring

* Minor fix: Handling corner cases
2022-05-07 21:59:01 +02:00
Yair Morgenstern
417831085b Resolved ANR in City Screen by increasing performance of rankTileForExpansion 2022-05-07 22:43:34 +03:00
Yair Morgenstern
806d58074c 4.0.13 2022-05-06 10:15:38 +03:00
Yair Morgenstern
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
Xander Lenstra
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
Jack Rainy
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
Jack Rainy
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
Timo T
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
Ouaz
822ce5e041
Update healing values in "Injured Units" article (#6704)
- Based on merged commit "Healing parity" (c8be00b)
2022-05-05 21:07:11 +02:00
Yair Morgenstern
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
Yair Morgenstern
1e7eff9d1e Can no longer gift units to enemy City States 2022-05-05 18:36:46 +03:00
Yair Morgenstern
467a0aa742 Resolved crash due to sending 'localized message' from exception 2022-05-05 18:29:34 +03:00
Yair Morgenstern
28a207813b Resolved #6701 - No crash from Science victory AI units that cannot head towards capital 2022-05-05 17:41:11 +03:00
letstalkaboutdune
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
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