12062 Commits

Author SHA1 Message Date
yairm210
6f0e39e686 chore(purity): Buncha stuff 2025-07-23 22:53:42 +03:00
yairm210
43b8b12131 Fixed crash on unloadable sounds 2025-07-23 22:53:41 +03:00
yairm210
2f92bedb52 chore(purity): CityResources 2025-07-23 22:53:41 +03:00
yairm210
6856c85981 chore(purity): cleanup suppressions 2025-07-23 22:53:41 +03:00
yairm210
8e59f9a8f9 chore(purity): resource modifiers 2025-07-23 22:53:41 +03:00
yairm210
11de0ae4a3 chore(purity): MultiFilter 2025-07-23 22:53:40 +03:00
yairm210
1620a4c231 chore(purity): Update to ensure new collections/sequences functions are ok 2025-07-23 22:53:40 +03:00
EmperorPinguin
4e766464a7
Perf: remove AI personality for citizen assignment (#13676) 2025-07-23 22:22:52 +03:00
SomeTroglodyte
5b6e86126c
Minor UI fix: Don't display the WLTK fireworks over the detailed stats popup (#13677)
* Patch CityScreen to hide WLTK fireworks while DetailedStatsPopup is open

* Linting
2025-07-23 22:22:40 +03:00
EmperorPinguin
7925f71602
AI: Update city construction evaluation of buildings + workboats (#13675)
* Update ConstructionAutomation.kt

* Update ConstructionAutomation.kt
2025-07-23 22:22:31 +03:00
EmperorPinguin
84608b441c
Bugfix: Update WorkerAutomation.kt (#13674)
Courtesy of @metablaster
2025-07-23 22:22:20 +03:00
Rob Loach
2250011d09
Civilopedia: Add Revealed By on Tile Resource screen (#13672)
* Civilopedia: Add Revealed By on Tile Resource screen

* Include the : in the translatable text for 'Revealed by:'
2025-07-23 22:22:10 +03:00
SomeTroglodyte
479dd558f2
Enable the "triggers global alert" unique for most uniques (#13560)
* Linting

* Move OneTimeGlobalAlert from PolicyManager to actual trigger

* Doc-Description for OneTimeGlobalAlert

* Adopt #13606 changes

* Minor improvements - efficiency and notification newline
2025-07-23 22:21:39 +03:00
Md. Touhidur Rahman
fdc7733054
Multiplayer Chat Support (#13599)
* basic chat ui

* improve chat infustructure

* implement websockets

* fix TODO crash

* delkt fixes & minor refactoring

* refactor civColor lookup

* set `ChatPopup` `Scrollability` to `None`

* refactor `chatLabel`

* move `ChatButton` update actions to its own file and refactor `WorldScreen`

* refactor `ChatPopup` - make it simple

* add `ChatPopup` layout explaination

* make `CloseButton` an `ImageButton`

* update .gitignore, try to ensure correct civName, close previous session on reconnect

* better `Message.Join()` usage

* update .gitignore entry for lasterror.txt

* improve chat message handling and color visibility

* refactor chat auth header handling and event filtering

* connection reliability improvements

* global messages for System and Server messages

* set `chatTable` cell defaults

* make flow work. remove internal keywords. fix chain job cancellation bug. extensively tested.

Made flow work, SomeHow.
Remove `internal` keywords, problematic.

One reconnect cancels another. This cancellation triggers another reconnect. Thus we get stuck in an infinite reconnect loop.

This was fixed by the force flag.

* added `Color.coerceLightnessAtLeast` and many comments

* faster `Color.coerceLightnessAtLeast`

* wait for `session` in `ChatWebSocketManager.requestMessageSend()`

* refactor some imports and simplify `ChatButton.updatePosition`

* move `Color.coerceLightnessAtLeast` with other `Color` extension functions

* remove `Event` suffix from event names and move events and files to better locations

* refactor multiplayer event handling and move event classes

Moved ServerUrlChanged, UserIdChanged, and PasswordChanged event classes from multiplayer/storage to models/metadata. Updated event dispatch logic for userId, server URL, and password changes to be handled within GameSettingsMultiplayer. Introduced ServerFeatureSetChanged event for feature set updates. Refactored usages and imports across chat, UI, and multiplayer modules to reflect these changes and removed redundant event dispatches.

* move `ServerFeatureSetChanged` to `ServerFeatureSet.kt`

* add chat and send icons, update atlas and chat ui elements

* make `Enter` key press work

* remove `yield()` calls

* refactor `WebSocket` error handling conditional branches

* remove unnecessary `ChatMessageSendRequested` event

* remove flow and reintroduce `yeild()`

* add translatable lines to `English.properties` and call `tr()`

* increase first session waiting time to `RECONNECT_TIME_MS * 2`

* add dynamically translatable global messages

* handle errors on `GlobalScope.launch`

* refactor `chatUrl` to `getChatUrl()` and remove the `yeild()` call after `delay()`

* add `ChatRestartException`

* implemented exponential backoff

* refactor chat error logging in `handleWebSocketThrowables`

* refactor `globalMessages` and revert unnecessary changes

* mark global messages as one time

* mark global messages that I forgot about as one time

* remove unnecessary event usage

* some necessary refactorings

1. start / stop chat based on `ChatButton` visibilty
2. fix `restart()` calls with `force = true` where needed
3. remove `try-catch` block from `restart()`

* fix websocket reconnection issues

* fix missing `}`

* fix problems for real

* fix import

* use `maxOf()`

* minor refactorings

* add support for `UncivServer.jar`

* get rid of `EventBus`

* rename and increase value to `60%` for `CIVNAME_COLOR_MIN_LIGHTNESS`

* get rid of setters

* fix 1

* fix `checkServerStatus()` not calling `setServer()`

* fix some issues

* fix crashes and remove redundant `ChatMessageReceived` data class

* fix some reviews

* remove `re-established` notification

* set type for `globalMessages` to `Queue`

* improve stability of `UncivServer.jar`
2025-07-23 22:20:41 +03:00
metablaster
1aa7272dc6
Update ruleset stats (#13673)
* fix automated ranged units not heading to enemy city

* fix distance from city typo

* Address points made in PR

* priotirize tiles without retaliation

* remove dangerous tiles logic

* resolve review with alternative approach

* faster exit if no sight

* automated units auto upgrade if enabled

* simplified condition

* fix incorrect building stats

* update stats for policies and buildings

* update wonder stats

* palace cost is 0

* aqueduct cost is 100 in vanilla

* update bank and stock exchange for vanilla
2025-07-23 22:07:15 +03:00
yairm210
3f78218033 4.17.7 4.17.7 2025-07-21 23:47:17 +03:00
Yair Morgenstern
db874e5ef3
Version rollout (#13668)
* Bump version and create initial changelog entry

* Update Brazilian_Portuguese.properties (#13666)

Translation of some words in the context of Civ V, spelling correction of accentuation and correction for word aesthetics (for example: Nuclear physics --> Nuclear Physics).

* Vietnamese patch #4 (#13650)

* Update Vietnamese.properties

- done the few first part of the translation ( I can't continue for now due to the tight schedule, will do it later )

* Update Vietnamese.properties

- I guess I did overlook that [amount] part ( it was not have the ( ] ) in it so my bad ).
- Done more translatation.

* Update Vietnamese.properties

* Update Vietnamese.properties

- I decided to go and check my eyes on the next week...

* Update Vietnamese.properties

* Update Vietnamese.properties

* Update Vietnamese.properties

* Update Vietnamese.properties

* Update #4 Vietnamese.properties

- I need the translation checked before I continue. 
+ I don't know what to do with Chinese city names for now. Most of the names for now are OK, though.   
+ Hellenic League and Greek in Vietnamese have the same meaning. The same thing goes to Armory and Arsenal. 
+ Founder, Believer and Enhancer: I genuinely have no idea how to translate these. Sorry. 
+ Mud Pyramid Mosque: the same as above, but I decided to put it with a generic translation for now. 
+ And some other stuffs too

* Update Vietnamese.properties

* Update Vietnamese.properties

* Update Vietnamese.properties

* Update Russian.properties (#13647)

* Update Japanese.properties (#13644)

* Update Indonesian.properties (#13642)

Just a few corrections.

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: ace9999 <106280936+4C39999@users.noreply.github.com>
Co-authored-by: perfectoast <duynamdo000@gmail.com>
Co-authored-by: LevPM <98984098+LevPM@users.noreply.github.com>
Co-authored-by: cknight828 <128895471+cknight828@users.noreply.github.com>
Co-authored-by: X2003 <158255876+Xenia2003@users.noreply.github.com>
2025-07-21 23:45:43 +03:00
metablaster
0ddbb46c79
Implementation for establishing embassies in diplomacy (#13625)
* G&K feature - Embassy

* fix spotted errors

* add icon and gameplay test

* fix invalid trade logic

* make embassies work for G&K only

* remove introduced bug

* trade evaluation and decline embassy

* update civilopedia for embassies

* cleanup

* diplomatic modifiers

* fix embassies unique

* make embassies unique global and bugfix

* fix AI can not trade with cs

* add embassies unique for mods

* mods require uniques to enable embassies

* fix mods require uniques to enable embassies

* update uniques.md

* apply reviewed changes

* apply reviewed change 2

* bugfix and cleanup

* remove obsolete import

* null pointer bugfix

* remove toList() and function rename
2025-07-21 23:30:17 +03:00
EmperorPinguin
368bf8c84d
Update NextTurnAutomation.kt (#13667) 2025-07-21 23:29:41 +03:00
metablaster
8283c0efc3
Fix for AI civilian unit escape from threat (#13649)
* Initial improvement of AI road planning

* fix tile caching of road plans

* fix worker not connecting city due to lower priority

* remove unnecessary code

* cleanup RoadBetweenCitiesAutomation.kt and enable harbor connection loging

* fix invalid logic in road construction

* apply reviewed changes

* sort plan list by closer cities

* apply reviewed changes and removed loging

* Fix AI civilian unit not escaping enemy

* Fix for AI civilian unit suicide

* resolve unit test errors

* remove enemy civilian unit counting as threat

* put cheaper logic check back
2025-07-21 23:29:34 +03:00
metablaster
e5fdcde836
Update incorrect stats for policies and buildings (#13656)
* fix automated ranged units not heading to enemy city

* fix distance from city typo

* Address points made in PR

* priotirize tiles without retaliation

* remove dangerous tiles logic

* resolve review with alternative approach

* faster exit if no sight

* automated units auto upgrade if enabled

* simplified condition

* fix incorrect building stats

* update stats for policies and buildings

* update wonder stats

* palace cost is 0
2025-07-21 23:29:24 +03:00
metablaster
d0b4250011
Fix for event names not translatable (#13646)
* fix broken translation

* apply suggested change

* fix untraslated string in load game screen

* update incorrect demand message

* refactor translation for an unknown civilization

* fix spaces

* fix translation for an unknown translation

* fix event names not getting translated

* add untranslated string to template.properties
2025-07-21 23:29:10 +03:00
yairm210
8b5247675a Hide icon for city in religion overview if 2025-07-21 14:25:40 +03:00
Rob Loach
3a671aa918
Fix readonly calls to getDifficulty() (#13659) 2025-07-21 13:28:12 +03:00
yairm210
286aab0cf1 chore: Got rid of fake Github error messages when attempting to download mod preview images 2025-07-20 16:23:59 +03:00
yairm210
c6c820afa3 chore: purity diplomacyFunctions 2025-07-19 23:09:30 +03:00
yairm210
237e286d4d getFlag returns 0 and does not crash if the flag does is not set 2025-07-18 14:09:44 +03:00
yairm210
29d5b8375f 4.17.6 4.17.6 2025-07-18 14:01:54 +03:00
yairm210
0eacc385d3 chore: purity - city round 1 2025-07-18 13:59:22 +03:00
Yair Morgenstern
15d915d63f
Version rollout (#13638)
* Bump version and create initial changelog entry

* 100% russian translation (#13635)

* chore: making russian translation more polished and purrfect

* chore: remaining translation is done (+ fixed incorrect line from RII)

* chore: отряд -> юнит for consistency + few typos

* chore: unnecessary space

* fix: tech problem

* Update Latin translation (#13632)

* Update Brazilian_Portuguese.properties (#13630)

* Update Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

* Update Spanish.properties (#13629)

* Update Croatian translation (#13628)

* update croatian translation

* fix invalid placeholder

* Update German translation (#13627)

* Update French.properties (#13626)

* Update Indonesian.properties (#13624)

* Update Italian.properties (#13622)

Additional translations

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: shwwwa <shwwwa.dev@gmail.com>
Co-authored-by: sls1005 <90055573+sls1005@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Nahuel Geno <142752140+NahuelGeno@users.noreply.github.com>
Co-authored-by: metablaster <44481081+metablaster@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: X2003 <158255876+Xenia2003@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2025-07-18 13:55:57 +03:00
Md. Touhidur Rahman
f6e583250a
better way to brighten colors (#13631)
* better `Color.brighten()` and `Color.darken()` but this time fixed!

* bring the previous behavior for `darken` back

* revert comment
2025-07-18 12:26:29 +03:00
metablaster
6a652bbe9d
Fix AI civilian unit not escaping enemy (#13637)
* Initial improvement of AI road planning

* fix tile caching of road plans

* fix worker not connecting city due to lower priority

* remove unnecessary code

* cleanup RoadBetweenCitiesAutomation.kt and enable harbor connection loging

* fix invalid logic in road construction

* apply reviewed changes

* sort plan list by closer cities

* apply reviewed changes and removed loging

* Fix AI civilian unit not escaping enemy
2025-07-18 12:26:06 +03:00
yairm210
f6b71fc0af chore: purity - big batch 2025-07-18 11:29:57 +03:00
yairm210
c1f0b97e2d chore: Tile purity 2025-07-18 11:15:02 +03:00
yairm210
673c33bb01 chore: Hexmath purity final round 2025-07-17 23:57:39 +03:00
metablaster
e56680edda
Fix translation for an unknown civilization (#13634)
* fix broken translation

* apply suggested change

* fix untraslated string in load game screen

* update incorrect demand message

* refactor translation for an unknown civilization

* fix spaces

* fix translation for an unknown translation
2025-07-17 23:18:12 +03:00
yairm210
7685591be7 chore: Hexmath purity round 2 2025-07-16 15:14:16 +03:00
yairm210
888a06cd0b chore: Hexmath purity round 1 2025-07-16 11:53:31 +03:00
yairm210
9c4e9f8877 Raise error if tilemap has no tiles 2025-07-16 11:38:50 +03:00
yairm210
0abcd22728 chore: Hexmath purity 2025-07-15 23:44:04 +03:00
yairm210
e3a2e41b19 chore: Update purity 2025-07-15 14:05:28 +03:00
yairm210
2bc3590a04 4.17.5 4.17.5 2025-07-15 13:03:33 +03:00
yairm210
2a36f43370 Revert "Color: Better methods of brightening and darkening colors (#13611)"
This reverts commit bee216aa3dcfd4d60efe0bdd3354a2514e2c8951.
2025-07-15 13:02:14 +03:00
Yair Morgenstern
b82fec2846
Version rollout (#13621)
* Bump version and create initial changelog entry

* Update Latin translation (#13619)

* Update German translation (#13616)

* Update German translation

* Update German translation

* Update Ukrainian translation (#13608)

* Update French.properties (#13607)

* Update Indonesian.properties (#13605)

* Update Indonesian.properties

* Update Indonesian.properties

* update croatian translation (#13604)

* Update Italian.properties (#13603)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: sls1005 <90055573+sls1005@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Kostiantyn Ko <mormat.iam@gmail.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: X2003 <158255876+Xenia2003@users.noreply.github.com>
Co-authored-by: metablaster <44481081+metablaster@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2025-07-15 12:02:56 +03:00
metablaster
e0040588a0
Nukes don't require line of sight to hit target tile (#13618)
* can nuke in range without visibility

* can not nuke unexplored tiles

* remove redundant check

* getTilesInDistance instead of aerialDistanceTo

* revert suggested change
2025-07-15 11:52:42 +03:00
metablaster
8138a0b9c5
Get notification when pantheon, religion or religion enhancement is made by other civ (#13613)
* notification for when religion is founded

* fix typo with space

* notification for pantheon and enhancement

* actions and notifications don't reveal info

* fix typo with space again

* shorten code

* an unknown civilization!
2025-07-15 11:52:28 +03:00
SeventhM
fa7d075cde
Add upon entering combat trigger (#13614)
* Add upon entering combat trigger

* whoops

* temporarily revert getMatchingUnique changes as out of scope

* Last rename in functions
2025-07-15 11:52:08 +03:00
SomeTroglodyte
dc937f91d2
Workaround for "Mod has no graphics for configured tilesets" false positive (#13617) 2025-07-15 11:51:58 +03:00
Md. Touhidur Rahman
bee216aa3d
Color: Better methods of brightening and darkening colors (#13611)
* better brighten and darken

* fix not returning new color

* update method descriptions
2025-07-15 11:51:49 +03:00
metablaster
29108d0adc
Display city defense and health in cities overview tab (#13609)
* add city defense column in city overview

* apply reviewed changes

* fix totals row

* totals for garisson

* WLTK shows count of WLTK's

* test and apply reviewed change
2025-07-15 11:51:38 +03:00