Commit Graph

10040 Commits

Author SHA1 Message Date
Yair Morgenstern
2d49838f13 changed requiredTech to revealedBy in tileResources json schema, added deposit amounts and improvedBy 2024-02-25 23:36:57 +02:00
Yair Morgenstern
46dacd2991 Added resourceType field to tileResources json schema 2024-02-25 23:31:24 +02:00
Yair Morgenstern
cba867bb7e json schema for tileResources 2024-02-25 23:27:23 +02:00
Yair Morgenstern
4dbed12e45 Keep opened mods open and at top of list when reloading mods in 'locate mod errors' tab 2024-02-25 23:07:02 +02:00
Yair Morgenstern
83655bbd34 Resolves #11193 - above/below HP conditionals work outside of combat 2024-02-25 22:45:21 +02:00
Yair Morgenstern
72fa2a3f48 Resolves #11193 - update uniques upon taking damage and other situations 2024-02-25 21:42:05 +02:00
Yair Morgenstern
2494b1dcbc Move takeDamage function from MapUnitCombatant to MApUnit where it belongs 2024-02-25 21:35:08 +02:00
Yair Morgenstern
adccee0b2e 'cached unique' documentation is within collapsible block 2024-02-25 21:25:01 +02:00
Yair Morgenstern
8675a8a747 4.10.12 2024-02-25 00:35:00 +02:00
Yair Morgenstern
f5d80c5463
Version rollout (#11191)
* Bump version and create initial changelog entry

* Update French.properties (#11171)

* Update Italian.properties (#11168)

* Update Indonesian.properties (#11166)

* Update Indonesian.properties

Added and fixed some translation.

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.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: M792003 <158552928+M792003@users.noreply.github.com>
2024-02-24 22:51:54 +02:00
SomeTroglodyte
4a138478f6
Right-click/longpress for World screen city buttons (#10771)
* City buttons support right-click / long-press to enter CityScreen directly

* City r-click: Rename helper and UI tips

* City capitalization follows getCurrentTutorialTask precedent

* City capitalization change applied to existing translation keys

* Revert "City capitalization change applied to existing translation keys"

This reverts commit c3638a0daf.

* Revert "City capitalization follows getCurrentTutorialTask precedent"

This reverts commit b618f4cae3.

* City capitalization in new text follows getCurrentTutorialTask precedent
2024-02-24 22:42:31 +02:00
SomeTroglodyte
dd1f0142f1
Unit actions from Uniques shouldn't be active at zero movement (#11188) 2024-02-24 22:41:39 +02:00
Oskar Niesen
04083de766
Added unit escorting formation!!! (#11057)
* Added escort button

* Added basic escort movement

* Improved escort movement

* Swapping breaks escorting

* Added stop escorting button

* Added link icon to unit

* getDistanceToTiles() now automatically includes escorting

* Multi-turn movement with different units works somewhat

* Escorting units persist to escort across saves

* Escorting units are only idle if their partner unit is idle as well

* Fixed multi-turn escort movement where one unit has more movement points left over

* Added basic tests

* Added a test for formation idle units

* Added some basic movement tests

* Added some canMoveTo tests

* getDistanceToTiles only caches when includeEscort is true

* added getDistanceToTiles test

* An entire commit to remove one line of white space just for you! And yes, there are no semi-colons;

* Added translations

* Added more stopEscorting() calls when the unit is removed

* Added extra comments and refactoring

* Refactored removeAllTilesNotInSet to use a mutableIterator

* Refactored code based on review

* Refactored removing tiles in PathsToTilesWithinTurn that aren't in another PathsToTilesWithinTurn
2024-02-24 22:39:04 +02:00
SeventhM
54201c381c
Allow conditional timed triggers for unit actions or most other trigger conditionals (#11181)
* Allow conditional timed triggers to be visible from all uniqueMaps

* Whoops
2024-02-24 22:38:32 +02:00
SpacedOutChicken
b17f162be9
Allow Barbarians to make set-up ranged units (#11173)
Allow Barbarians to create units that must set up to ranged attack, unless specifically forbidden by the relevant unique

Since we have a unique for this explicit purpose, we no longer need this extra prevention for Barbarian unit types.
2024-02-24 22:38:22 +02:00
SomeTroglodyte
bebe0c67da
Fix double "close" action from Overview ESC key (#11185) 2024-02-24 22:38:12 +02:00
SomeTroglodyte
84902b7957
Fix a few applications of the "hidden from users" modifer (#11186)
* Respect hidden modifier in a nation's unique improvements display

* Respect hidden modifier in the Unhappiness stat overview

* No auto-icons for an ExpanderTab title
2024-02-24 22:38:02 +02:00
SomeTroglodyte
6092702f96
Fix fortified units upgraded to ones that can't fortify still keeping their fortification (#11187) 2024-02-24 22:37:53 +02:00
Yair Morgenstern
5b04d1b0d6 Make terraform unique triggerable from improvements 2024-02-23 10:53:17 +02:00
SomeTroglodyte
52eae2a3f9
Fix options setting for the notifications scroll visibility being wrong for new installs (#11177) 2024-02-22 17:34:29 +02:00
SomeTroglodyte
382d966696
Change EmpireOverviewScreen closing to use the same button and UX as Civilopedia (#11169)
* Centralize a "round X" close button factory with global scope

* Change EmpireOverviewScreen closing to use the same button and UX as Civilopedia
2024-02-22 17:33:26 +02:00
SomeTroglodyte
3047c1abad
Normalize TNP 'search' links, fix a few broken or incomplete attributions (#11178) 2024-02-22 17:32:07 +02:00
Yair Morgenstern
e2df543778 4.10.11 2024-02-20 23:49:28 +02:00
Yair Morgenstern
5cba78cd9b
Version rollout (#11164)
* Bump version and create initial changelog entry

* Update Simplified Chinese (#11161)

* Update French.properties (#11153)

* Update Indonesian.properties (#11151)

* Update Indonesian.properties

Added translation for vanilla civ introduction.

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Italian.properties (#11150)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: M792003 <158552928+M792003@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2024-02-20 23:43:12 +02:00
Yair Morgenstern
23edf07a41
Terraforming! (#11152)
* Terraforming!

* comment

* whoops

* And better tests, that actually output text.

* SomeTrog caught this doc error :)

* Fix natural wonder placement, it better belongs with base terrain
Also, normalize tiles to ruleset after plonking a new terrain

* Out Of Cheese Error, Redo From Start

- Only terrains, no improvements - one problem at a time
- Fit new functional trigger format
- Respect occursOn
- Teleport units out of tiles if they can't pass through (nat wonders for example)
- No need for terrainFeature unique parameter
- Tested with "Turn this tile into a [Grand Mesa] tile <for [0] movement>", "Turn this tile into a [Forest] tile <for [0] movement>" uniques

* Don't allow city tiles to turn into water/wonders etc kudos @SomeTrog
2024-02-20 23:38:23 +02:00
SomeTroglodyte
2c96c6f244
ConditionalWhileResearching as suggested by @woo1127 (#11156) 2024-02-20 23:25:16 +02:00
SeventhM
8eadaa9d8e
Fix victory focus being ignored (#11158)
* Fix victory focus being ignored

* Move to Civilization
2024-02-20 23:25:06 +02:00
SomeTroglodyte
7d17b9296d
External links: Right-click and some housecleaning (#11155)
* Right-click external links to copy url

* Add hint about right-clicking links to UI Tips tutorial

* Add wiki link to about and centralize repo/wiki external link bases
2024-02-20 23:24:54 +02:00
SeventhM
17abf7840b
Add unique for Personality to avoid building object (#11160)
* Add unique for Personality to avoid building object

* Switch civInfo with city

* Missed a spot

* baseUnitFilter instead of "unitFilter"
2024-02-20 23:23:56 +02:00
Yair Morgenstern
b80ab2d3e6 Fix timed uniques without further conditionals not getting type recognized 2024-02-20 14:49:26 +02:00
Yair Morgenstern
fc6d913204 Ensure that each uniquetype specified returns a value =- thank you amazing Kotlin compiler :) 2024-02-20 14:03:51 +02:00
Yair Morgenstern
3a7401a939 Only allow a trigger-based unit action if the trigger function is not null
Tested with "Adopt [Legalism] <for [0] movement>" - it allows me to click once, adopting the policy, but not a second time since the policy is already adopted thus the trigger function is null
2024-02-20 11:03:07 +02:00
Yair Morgenstern
27465425b0 Allow determining *if* a unique can trigger a triggerable effect, *without* actually doing so 2024-02-20 10:52:36 +02:00
SeventhM
d51d032e18
Fix Personality documentation (#11159) 2024-02-20 10:01:34 +02:00
SomeTroglodyte
4661ee2496
Fix Maya "Long Count" unlock translations (#11157)
* Mayan Long-Count unlock: Match translation template and existing translations to actual notification

* A TFW run adds another empty line at the end...
2024-02-19 21:48:50 +02:00
itanasi
d3356c94fd
Minor style updates (#11154)
* Properly Calculate Population based on Food Conversion to Prod
Trigger properly when Queue is changed

* Remove triggers

* Missed a trigger

* Add triggers in CityConstructionsTable so we can call cityScreen.update()

* Properly Calculate Population based on Food Conversion to Prod
Trigger properly when Queue is changed

* Remove triggers

* Missed a trigger

* Add triggers in CityConstructionsTable so we can call cityScreen.update()

* Minor style cleanups

* Properly Calculate Population based on Food Conversion to Prod
Trigger properly when Queue is changed

* Remove triggers

* Missed a trigger

* Properly Calculate Population based on Food Conversion to Prod
Trigger properly when Queue is changed

* Remove triggers

* Missed a trigger

* Minor style cleanups
2024-02-19 21:46:57 +02:00
Yair Morgenstern
6c87bef1cf 4.10.10 2024-02-17 23:12:03 +02:00
Yair Morgenstern
b2bbd8d145
Version rollout (#11149)
* Bump version and create initial changelog entry

* Update Brazilian_Portuguese.properties (#11143)

* Update Italian.properties (#11140)

* Update Italian.properties

* Update Italian.properties

* Fixed mistranslations and made the translation more natural (#11139)

Some of the diplomacy wording are clearly machine translated, so I improved it.

* Update Indonesian.properties (#11136)

* Update Indonesian.properties

Translated some words and fixed some mistranslated words.

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update French.properties (#11135)

* Update Spanish.properties (#11132)

* Update Spanish.properties

* Update Spanish.properties

---------

Co-authored-by: yairm210 <yairm210@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: chenxing61 <70869440+chenxing61@users.noreply.github.com>
Co-authored-by: M792003 <158552928+M792003@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
2024-02-17 23:09:51 +02:00
SomeTroglodyte
5b698102ef
Don't prematurely round Great person point boni and GPP breakdown UI (#10924)
* GreatPersonPointsBreakdown class and logic use

* Minor comment

* Fix untrue wiki claim that civilopediaText color accepts names

* GreatPersonPointsBreakdown UI available by clicking in the CityStatsTable GPP section

* Two separate assembly lines for two different products of the factory

* One more code-deduplication

* Fix rounding - rounds *up* on x.5

* Clearer display code (but output unchanged)

* Minor comment clarification
2024-02-17 21:45:02 +02:00
SomeTroglodyte
7dc398184f
Fix creating 105x90 rectangular no-wrap maps (#11144) 2024-02-17 21:43:17 +02:00
SeventhM
cc7b8cd26c
Documentation for Personality json (#11138)
* Documentation for Personality json

* whoops, bad link

* Fix inaccurate "double focus" comment

* Fix accidental copy-paste error

* Edit priority text to maybe be clearer
2024-02-17 21:43:05 +02:00
itanasi
c8a7cf29b6
AutoAssign Population with Food Converts to Production (#11141)
* Properly Calculate Population based on Food Conversion to Prod
Trigger properly when Queue is changed

* Remove triggers

* Missed a trigger

* Add triggers in CityConstructionsTable so we can call cityScreen.update()

* Properly Calculate Population based on Food Conversion to Prod
Trigger properly when Queue is changed

* Remove triggers

* Missed a trigger

* Add triggers in CityConstructionsTable so we can call cityScreen.update()
2024-02-17 21:42:23 +02:00
SomeTroglodyte
88df2c26e6
Framework stuff: Preparation for another Warning-Suppression branch (#11128)
* Make source object available to RulesetErrorList.add

* Make ruleset available to RulesetErrorList

* Introduce UniqueTarget.MetaModifier - ModifierHiddenFromUsers won't stay alone

* There was no use of prefix without the unique name - fold

* Introduce UniqueTarget.MetaModifier - doc

* Pass context down even inside UniqueValidator, convenience factory for limited RulesetErrorList's

* Clean up RulesetErrorList.of factory

* Reorder parameters of RulesetErrorList.add
2024-02-17 21:41:37 +02:00
SeventhM
ec1f51dfb8
Allow barb camps to function after giving ruins effects (#11137)
* Allow barb camps to function after giving ruins effects

* Add comment
2024-02-17 21:41:21 +02:00
SeventhM
5730d1b80a
Conditional for building in amount of cities (#11101)
* Conditional for building in amount of cities

* fix order of operations

* Deprecate old require in amount cities uniques

* import

* Fix referring to the unique instead of the conditional

* Fix yield message

* I have no clue how this isn't imported, but I'mma assume this translates fine anyways

* Rename text for unique

* revert unique text

* Whoops

* Remove unnecessary puppet check

* Move additional description to it own function

* Split missing city text into its own function

* Move ToDo comment

* flip to be easier to read

* Move onlyAvailable rejections to its own function to be easier to work with

* Add in the word "of"
2024-02-17 21:41:05 +02:00
SomeTroglodyte
df7072b550
Clean up console output of unit test runs (#11134)
* Allow tests to discard console output selectively, by default collect and discard unless result is failure

* Fix debug change and a little source clarification
2024-02-16 11:57:42 +02:00
SomeTroglodyte
63243fd775
Fix translation placeholder mismatches failing unit tests (#11133) 2024-02-14 19:43:04 +02:00
Yair Morgenstern
90eb08734f 4.10.9 2024-02-13 23:45:54 +02:00
Yair Morgenstern
80d57afee0
Version rollout (#11131)
* Bump version and create initial changelog entry

* Update Dutch.properties (#11120)

* Update Dutch.properties

* Update Dutch.properties

* Update Polish.properties (#11118)

* Update Finnish.properties (#11117)

* Update French.properties (#11114)

* Update Italian.properties (#11113)

* Update Brazilian_Portuguese.properties (#11112)

* Update Indonesian.properties (#11110)

* Update Indonesian.properties

Translated some untranslated words and fixed some mistranslated words.

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Gekko03 <148203740+Gekko03@users.noreply.github.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: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: M792003 <158552928+M792003@users.noreply.github.com>
2024-02-13 23:36:38 +02:00
SeventhM
a7c0df8c0b
Initial Civ Personality implementation (#10939)
* Barebones implementation

* Personality Policy branch

* Initial addtions to Victory.Focus based changes

* Have no focus or personality if human

* Add getter/setter for easier access to focuses

* Add scaled value to various areas

* Make getPersonality non null to simplify checks

* Forgot to add in changes to the base class

* Ugly code to add in Personality preferred victory type. Not sure how to make it cleaner

* Fix typo

* Early return Faith building choice

* Change set concatination to listOf

* fix missing equal sign

* vals for getPersonality

* Remove unnecessary parenthesis

* Early return the other buildings as well

* Some linting and renames
2024-02-13 23:27:38 +02:00