Commit Graph

2100 Commits

Author SHA1 Message Date
yairm210
2093761e2d Resolved #11829 - "after [amount] turns" -> "after turn number [amount]" 2024-06-25 16:01:57 +03:00
yairm210
a540355cc9 docs: Resource unique documentation 2024-06-25 11:57:05 +03:00
Yair Morgenstern
39de50829a Resolve #11795 - fix performance problem for displaying air units in cities 2024-06-24 23:53:36 +03:00
Yair Morgenstern
676ced0f8b Better unique documentation - resolves #11842 2024-06-24 23:20:36 +03:00
Yair Morgenstern
7bd0a03cab Remove unused parameters 2024-06-24 23:13:33 +03:00
Oskar Niesen
f65709ab09
Add personality uses (#11807)
* Reduced max motivationToAttack from relative combat strength

* Refactored MotivationToAttackAutomation to use a float instead of an int

* Added personality values to MotivationToAttackAutomation

* Fixed minor build errors

* Added DiplomacyAutomation personality modifiers

* Improved ConstructionAutomation personality values

* Added some more personality implementations

* Tweaked trainSettler

* Fixed civilizations asking for help against city-states

* Adjusted DiplomacyAutomation to account for war mongering

* Fixed typo
2024-06-22 22:23:38 +03:00
SomeTroglodyte
de04c00dd0
Improvement picker fixes (#11801)
* 🎵 A little linting 🎶

* Prevent queueing unresearched removals by adding their problem reports on top

* More linting and bugfixes

* Hide "too advanced" Improvements in the PickerScreen

* ImprovementPickerScreen fully Civilopedia-linked

* Fix dumb mistake

* Slightly improve PickerPane descriptionLabel layout

* Slightly improve ImprovementPickerScreen top padding
2024-06-22 22:20:16 +03:00
yairm210
149e90bfed Tech, policy, unit and terrain uniques provide multiplied uniques with "for every [countable]" / "for every [amount] [countable]" modifiers 2024-06-21 19:21:29 +03:00
yairm210
1bf494a6f7 perf 2024-06-21 17:30:56 +03:00
yairm210
ff775056de perf: Improvement filter cache, other small things 2024-06-21 16:54:05 +03:00
yairm210
66ed79298f perf: Cache civFilter results 2024-06-21 16:29:57 +03:00
Yair Morgenstern
c6620f7470 Re-enable ConsoleLauncher to run simulations 2024-06-21 15:47:20 +03:00
Yair Morgenstern
4e5ec53d64
Resolves #11772 - Allow hidden conditionals (#11778)
* Allow hidden conditionals

* SomeTrog fixes

* We sure display uniques to users A LOT
2024-06-19 17:28:53 +03:00
yairm210
f52245865c perf(minor): Don't check stat purchases for non-purchacable stats 2024-06-19 17:15:12 +03:00
yairm210
0d91cf9983 perf: Resolved #11775 2024-06-19 17:05:10 +03:00
Yair Morgenstern
79be14e291 Resolved #11082 - Added "Will not be replaced by automated units" unique 2024-06-17 23:12:50 +03:00
Oskar Niesen
bbea08364b
TechDebt: Made getDiplomacyManger() nullable (#11771)
* Made getDiplomacyManager nullable and added getDiplomacyMangerOrMeet

* Fixed AI Automation having problems when playing as a oneCityChallenger civ
2024-06-16 23:40:45 +03:00
Oskar Niesen
4759287465
Fixed a city-state coup crash (#11769)
* Fixed the coup crash

* Fixed another potential crash on a failed coup
2024-06-16 18:01:25 +03:00
Oskar Niesen
2b8c965d6b
Personality implementation (#11729)
* Add Personalities.json

* Personality tags

* Askia, Attila, Augustus Personalities

* Bismark & Boudica

* Added parsed personalities

* Linked Personalities to their nation

* Tweaked some personalities

* Added the declareWar Personality

* Fixed some misnaming

---------

Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
2024-06-15 22:02:51 +03:00
Yair Morgenstern
255e6c7fc9
Adds unique IDs to units (#11745)
* Adds unique IDs to units

* Add IDs to units in existing games

* civ.getUnitById function

* Fix 'no units' case
2024-06-15 22:00:41 +03:00
SomeTroglodyte
3c91647fb2
Streamline and thereby reduce size of the save game json (#11728) 2024-06-14 17:39:59 +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
yairm210
c89b2666c9 Specific uniques to generic trigger: "upon expending a [mapUnitFilter] unit" 2024-06-10 17:35:23 +03: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
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
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
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
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
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
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
6da9fe23f2 Unify "get stat for conditional state" logic 2024-05-31 13:42:41 +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
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
yairm210
cee2346c42 doc: getTriggerFunction 2024-05-28 23:38:19 +03:00
yairm210
0351c4fe94 Don't crash if starting units contain OneTimeGainPopulation uniques 2024-05-28 23:27:15 +03:00
yairm210
a69aae1c87 Better naming - constructionComplete -> completeConstruction 2024-05-28 23:25:04 +03:00
yairm210
07d1f1ead4 Fix tests 2024-05-27 21:21:08 +03:00
yairm210
d7018de5c5 Add unit name and building name countables 2024-05-27 16:15:08 +03:00
yairm210
7474dcaddc Added "per every X countables" modifier 2024-05-27 15:41:12 +03:00