Commit Graph

10657 Commits

Author SHA1 Message Date
Yair Morgenstern
546f7c79a2 4.11.19 2024-06-10 23:00:08 +03:00
Yair Morgenstern
2896181bbb
Version rollout (#11727)
* Bump version and create initial changelog entry

* Update translations to Ukrainian (#11723)

Co-authored-by: Kostiantyn Ko <mormat.iam@gmail.com>

* Update Italian.properties (#11722)

* Update Simplified_Chinese.properties (#11721)

* Update Simplified_Chinese.properties

* Update Simplified_Chinese.properties

* Update German translation (#11720)

* Update French.properties (#11716)

* Update Brazilian_Portuguese.properties (#11715)

* Update Indonesian.properties (#11714)

Translated the new words and corrected a few grammar mistakes.

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Kostiantyn Ko <test9@mormat.name>
Co-authored-by: Kostiantyn Ko <mormat.iam@gmail.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: AutumnPizazz <114050365+AutumnPizazz@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: X2003 <158255876+Xenia2003@users.noreply.github.com>
2024-06-10 22:55:01 +03:00
SomeTroglodyte
9ef3fec0ea
Reenable console unit sethealth and setmovement with trailing blank (#11726) 2024-06-10 22:22:56 +03:00
SomeTroglodyte
03a85fb3ad
Allow EmpireOverview persistence across game launches (#11725)
* Remove blank space between header and list in ResourceOverviewTab vertical mode

* Allow EmpireOverview persistence across game launches
2024-06-10 22:22:46 +03:00
Oskar Niesen
b61961d0a5
Moddable city ranges (#11708)
* Added city bombard, work and expand range ModConstants

* Changed some city range integers to city.getWorkRange() or some equivalent

* Fixed city screen

* Fixed create game error

* Improved support for CityScreen when work range is higher than expand range

* Improved WonderOverviewTab Style

* Improved Civilization.modConstants

* Improved random spacing

* Changed WonderOverviewTab to use a constant again

* Added comments in documentation
2024-06-10 22:22:30 +03:00
SomeTroglodyte
d39c7a97bf
Use Events for the floating "Tutorials" (#11717)
* Split off reuses of CityStateIcons/Cultured to allow modding separately

* Reposition floating tutorials in case the TopBar moved its buttons

* Event definition, art and basic support

* Split off Event rendering from AlertPopup

* Support Event presentation modes and replace hardcoded floating tutorials

* "Meet another civilization" art - can't find any better

* Tweak TranslationFileWriter and some polishing
2024-06-10 22:22:18 +03:00
Oskar Niesen
b496784ab5
Extra Civ and Spy moddability (#11702)
* Made minimum duration of a war moddable

* Made turns until revolt moddable

* Made spy skill moddable

* Migrated city-state elections to use the Civ flag system

* Moved cityStateElectionTurns away from espionage

* Added new moddable constants to the documentation

* Fixed merge conflicts
2024-06-10 22:22:09 +03:00
SomeTroglodyte
7012297af6
Centralize and organize use of special unicode codepoints (#11647)
* Centralize and organize use of special unicode codepoints

* Centralize and organize use of special unicode codepoints - minor doc addition
2024-06-10 22:21:56 +03:00
Yair Morgenstern
be3260d770 History command no longer breaks on autocomplete sometimes 2024-06-10 22:19:21 +03:00
Yair Morgenstern
c0cec548e0 Fix broken console checkFilter due to capitalizing first letter 2024-06-10 22:02:42 +03:00
yairm210
c89b2666c9 Specific uniques to generic trigger: "upon expending a [mapUnitFilter] unit" 2024-06-10 17:35:23 +03:00
yairm210
b0c70e6ec8 Console: city addtile <cityName> takes an optional [radius] parameter 2024-06-09 19:34:38 +03:00
yairm210
d61df7fe51 Console: civ addtech / civ removetech commands 2024-06-09 19:25:44 +03:00
yairm210
616a297f49 Documentation for mobile console 2024-06-09 14:31:22 +03:00
yairm210
78ac58fe39 4.11.18-patch1 2024-06-09 08:20:18 +00:00
Yair Morgenstern
2233d3df99
Fix "ask for help" crash (#11712)
* Solved combat resource conditionals vs cities being checked against the target's resources

* Crash fix - Don't attempt to ask civs you don't know for help
2024-06-09 11:20:10 +03:00
Yair Morgenstern
2f8b8ca974 4.11.18 2024-06-08 23:33:38 +03:00
Yair Morgenstern
fe72b8f012
Version rollout (#11711)
* Bump version and create initial changelog entry

* Provide missing Ukrainian translations (#11710)

Co-authored-by: Kostiantyn Ko <mormat.iam@gmail.com>

* Update Indonesian.properties (#11697)

* Update Indonesian.properties

Translated the new words and fixed some grammar mistakes.

* Update Indonesian.properties

* Update French.properties (#11695)

* Update Brazilian_Portuguese.properties (#11694)

* Update Italian.properties (#11693)

* Update Italian.properties

* Update Italian.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Kostiantyn Ko <test9@mormat.name>
Co-authored-by: Kostiantyn Ko <mormat.iam@gmail.com>
Co-authored-by: X2003 <158255876+Xenia2003@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2024-06-08 22:21:23 +03:00
SomeTroglodyte
aa74c557d2
UX: Dev Console easier to use without installing keyboard apps (#11706)
* UI replacements for Tab, Up, Down in DevConsolePopup

* DevConsole history display via command or longpress on the Android UI
2024-06-08 21:59:33 +03:00
Yair Morgenstern
68e29e9c53
"(modified by game speed)" modifier (#11696)
* "(modified by game speed)" modifier

* Added missing flags

* Fixed G&K ruleset
2024-06-08 21:58:52 +03:00
SomeTroglodyte
e276a08d61
UniqueParameterType getErrorSeverity/isKnownValue architecture simplification (#11701)
* UniqueParameterType getErrorSeverity/isKnownValue simplification

* Minor changes to a few UniqueType documentations

* Allow UnitsGainPromotion e.g. "[Melee] units gain the [Morale] promotion"
2024-06-08 21:58:38 +03:00
SomeTroglodyte
cf7f5a1c52
Remove 'Strategic Balance' and 'Legendary Start' from resource abundance select (#11699)
* Convert MapResources into an Enum

* Fix IsPartOfGameInfoSerialization where actually only the String is part of serialization

* Refactor MapResources to own file, package mapgenerator

* Refactor MapSize/MapSizeNew to own file and rename
2024-06-08 21:58:19 +03:00
Oskar Niesen
9cd531c8cf
Reworked AI war evaluation and plans (#11688)
* hasAtLeastMotivationToAttack now takes uses City.neighboringCities

* Changed attack pathing to use Astar

* Made the base force higher

* Declare war checks for total population instead of number of cities

* MotivationToAttackAutomation takes into account denunciation

* Set up DeclareWarTargetAutomation.kt

* Added logic for Civs to try and gang up on other Civs

* Added logic for civs to try and join an ally civ in their war and to declare war directly

* Added declineJoinWarOffer flag

* Reduced the likelyhood of declaring war a little

* Civs don't try to join wars against city-states

* Removed calculating targets with 0 motivation

* Relative production is not calculated against city-states

* Improved getAttackPathsModifier to only calculate the best path per city

* Refactored filter statements

* AI now tries to execute planned wars by default

* Culture Civs can now declare war, AI can declare multiple wars

* AI won't gift gold to city-states that it wants to attack

* Changed motivation from combat

* Changed AI aggression towards city-states

* Civs don't want to sign a DOF with the only nearby major civ as much

* City.neighboringCities filters out cities that are not visible

* Fixed some conditionals in tryJoinWar

* Fixed some war plan types breaking instead of continuing

* Civs are more likely to sign open borders if they haven't seen their cities

* Changed far away cities to have less of a value

* Fixed neighboringCities and getNeighboringCivilizations

* Other fixes

* Reduced motivation to attack from relative strength

* Added more to motivation to attack

* Added extra friendship modifiers

* Moved war evaluation to WarPlanEvaluator

* Added comments and re-named preparingWarPlan

* AI Team wars require neutral relations to send

* Added a team war notification

* Added evaluation of join war trades

* Tweaked MotivationToAttackAutomation

* Improved peace deal offers

* AI peace deals wait until 10 turns after declaring war

* Made the AI declare war a little less

* AI builds more military units

* AI keeps at least 2 great generals to not build citadels with

* AI TeamWar is more specialized for fighting stronger Civs

* Removed extra line

* Added more comments

* Improved unit tryPrepare logic

* Minor respelling and style improvements

* Changed MotivationToAttackAutomation HashMap to be a list

* Added a heuristic for the Astar search

* TeamWarPlan focuses more on relative force and fighting stronger civs

* MotivationToAttackAutomation takes into account planned wars and can target stronger civs

* Added logic for AI's to request other civs to join their war

* Fixed some WarDeclaration TradeEvaluation logic and reduced costs

* Added some extra safety against extreme force values in DeclareWarPlanEvaluator
2024-06-08 21:56:51 +03:00
SomeTroglodyte
6979ea8e85
Improve update of "Last seen improvement" (#11673)
* Restrict access to lastSeenImprovement

* Move TileInfoNormalizer to logic

* Remove all uses of gamestate- and transient-dependent changeImprovement from MapGenerator

* Update lastSeenImprovement from changeImprovement where appropriate

* Another rename removing an `Info`

* Remove redundant spectator test

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>

---------

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2024-06-08 21:56:04 +03:00
yairm210
3d111465ec Resolved #11700 - "Promotes all spies [amount] time(s)" crash 2024-06-05 16:15:20 +03:00
yairm210
1296b16f90 4.11.17 2024-06-04 18:18:49 +03:00
Yair Morgenstern
533e6b7832
Version rollout (#11692)
* Bump version and create initial changelog entry

* Update Spanish.properties (#11685)

* Update German translation (#11672)

* Update Brazilian_Portuguese.properties (#11671)

* Update French.properties (#11670)

* Update Indonesian.properties (#11669)

Translated the new words and corrected the mistranslated words.

* Update Italian.properties (#11606)

* Update Italian.properties

* Update Italian.properties

* Add translations to Ukrainian (#11684)

Co-authored-by: Kostiantyn Ko <mormat.iam@gmail.com>

* Update Polish.properties (#11679)

* Update Polish.properties

* Update Polish.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
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>
Co-authored-by: Kostiantyn Ko <test9@mormat.name>
Co-authored-by: Kostiantyn Ko <mormat.iam@gmail.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
2024-06-04 18:13:26 +03:00
Oskar Niesen
ba0c5cfbae
Spy max rank can be modded (#11650)
* Changed the spy level cap to be a mod constant

* Spy rank shows with more stars

* Reverted some temporary debug changes

* Changed Promotes all spies to accept an amount

* Change Promotes all spies [amount] time(s) to have parenthesis around the s

* Fixed problem with merging
2024-06-04 18:03:48 +03:00
Oskar Niesen
9e6e157835
Added an option to disable move by long press (#11681)
* Added an option to disable move by long press

* Moved setting check to tileGroup.onActivation and changed it to check for longTapMove

* Added translation
2024-06-04 18:02:01 +03:00
SomeTroglodyte
4e28b9e75c
Console: Improve civ activatetrigger command (#11676)
* Limit visibility inside devconsole package

* Make City an INamed to allow use of INamed-bounded generics on it

* CliInput class treats all DocConsole command line tokens, allows autocompleting quoted input to quoted full names

* Alternate, more flexible but also validating `civ activatetrigger` implementation

* Allow undisturbed display of square brackets in UncivTextField's

* Fix minor bug with OneTimeRevealSpecificMapTiles and move OneTimeReveal* implementations together
2024-06-04 18:01:00 +03:00
SomeTroglodyte
a046e43dbf
UI candy: WLTK fireworks (#11616)
* Particle effect fireworks for WLTK

* Refactor fireworks, try another location calculation

* Save todo list

* Fireworks assets

* ParticleEffectAnimation framework refactor and FasterUIDevelopment

* ParticleEffectAnimation rework - works correctly now

* ParticleEffectAnimation - credits and fine-tune

* ParticleEffectAnimation - atlas

* ParticleEffectAnimation - clean up testing code

* ParticleEffectAnimation - fix bungled texture move
2024-06-04 18:00:44 +03:00
SomeTroglodyte
7e3bbb6053
A ModOptions unique allowing a mod to control which map gets preselected (#11468)
* Minor linting

* UniqueType.ModMapPreselection
2024-06-04 18:00:29 +03:00
SomeTroglodyte
4b2f5e468d
Sortable unit overview (#11521)
* SortableGrid architecture changes: defaultSort instead of defaultDescending

* SortableGrid architecture changes: Header cell actor management

* SortableGrid architecture changes: General Services and reusable defaults

* Fix EmpireOverviewScreen sometimes forgetting the last active tab

* Reimplement Unit Overview using SortableGrid (but dropping unit supply)

* Get UnitSupplyTable back into Unit Overview

* Fix unit overview does not know PromotionPickerScreen changed the name

* Simplify update after rename

* Fix "Ooops" wrong value in ranged strength column
2024-06-04 18:00:04 +03:00
Oskar Niesen
9d8484cf75
Fixed spy steal tech timer (#11680)
* Fixed the time to steal a tech being infinity when the science produced by a city is negative

* Removed duplicate stealing tech checking behaviour
2024-06-04 17:58:46 +03:00
yairm210
8eda342613 Deprecated old uniques 2024-05-31 19:13:01 +03:00
yairm210
bdb0dcef65 Resolved #11675 - Unavailable techs work well with tech picker screen 2024-05-31 19:06:12 +03:00
yairm210
834567170e Added ruleset check for resource uniques with resource conditionals 2024-05-31 18:41:29 +03:00
yairm210
bed8d3b176 minor docs and city resource conditional test 2024-05-31 13:55:38 +03:00
yairm210
a45c057b48 Better location for resource tests 2024-05-31 13:47:14 +03:00
yairm210
6da9fe23f2 Unify "get stat for conditional state" logic 2024-05-31 13:42:41 +03:00
yairm210
5404b97009 4.11.16 2024-05-30 00:07:01 +03:00
Yair Morgenstern
371f9639c1
Version rollout (#11667)
* Bump version and create initial changelog entry

* Update Indonesian.properties (#11662)

* Update Indonesian.properties

Translated the new words and fixed some mistranslated words.

* Update Indonesian.properties

* Update Spanish.properties (#11661)

* Update French.properties (#11660)

* Update Brazilian_Portuguese.properties (#11656)

* Update Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

* Update Italian.properties (#11655)

* Update Italian.properties

* Update Italian.properties

Oops

* Update German translation (#11654)

* Update German translation

* Update German translation

* Update German translation

* Update German translation

* Update German translation

* Update Ukrainian.properties (#11653)

Co-authored-by: Viktoriia <158747182+moonytori@users.noreply.github.com>

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: X2003 <158255876+Xenia2003@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Viktoriia <158747182+execsuvikky@users.noreply.github.com>
Co-authored-by: Viktoriia <158747182+moonytori@users.noreply.github.com>
2024-05-30 00:00:11 +03:00
SomeTroglodyte
9e5c113ee8
UI: Allow any mod sound to be selected as a multiplayer turn notification sound (#11623)
* Linting

* Fix potential crash when having a multiplayer notification sound configured that is no longer available

* New media finder architecture

* Unit tests for new media finder architecture

* Apply new media finder architecture to solve "allow all mod sounds as multiplayer notifications" request
2024-05-29 23:59:57 +03:00
SomeTroglodyte
655c98a7e5
Allow access to the Dev Console on mobile devices (#11588)
* Make DeveloperConsole callable from WorldScreenMenuPopup

* Better WorldScreenMenuPopup single/dual-column logic

* Allow developer console to stay open and persist history

* Fix console tab key closing onscreen keyboard

* Give the now persisted console history an upper size limit

* Ensure "up" always gives the new entry

* Fix merge leftovers

* Reviews
2024-05-29 23:59:35 +03:00
SomeTroglodyte
c6e3ff5d1b
Linting and re-sort Tile class so the regions are no longer lying (#11649)
* Rename TileInfoImprovementFunctions

* Linting and re-sort Tile class so the regions are no longer lying
2024-05-29 23:59:16 +03:00
Oskar Niesen
9757cae098
Removed espionage debug setting (#11658) 2024-05-29 23:59:04 +03:00
Oskar Niesen
498a64fa16
Added spy steal tech timer (#11657) 2024-05-29 23:58:50 +03:00
SomeTroglodyte
d82669d26c
Tune "work has started" notification (#11663)
* Make UncivGame.screenStack private

* Tune "work has started" notification

* Remove obsolete template (since commit [25b1259](25b1259ab6))

* Linting

* General suppression of duplicate notifications

* Little cheap optimization
2024-05-29 23:58:36 +03:00
SomeTroglodyte
bc52704614
Console create natural wonder and tile find (#11664) 2024-05-29 23:58:26 +03:00
yairm210
cee2346c42 doc: getTriggerFunction 2024-05-28 23:38:19 +03:00