Commit Graph

9193 Commits

Author SHA1 Message Date
SomeTroglodyte
88449a819b
Fix next-turn not offering Policy Picker for free Policies (#9963) 2023-08-24 10:09:09 +03:00
SomeTroglodyte
cfd22621ee
Fix intended Longpress-to-move on Android not working (#9962) 2023-08-24 10:08:36 +03:00
Yair Morgenstern
2ce258b281 Free water units are always added to coastal cities 2023-08-24 10:07:33 +03:00
Yair Morgenstern
3d8af531c5 4.7.16 2023-08-21 22:46:29 +03:00
Oskar Niesen
d668c5dceb
General Starting locations in map editor (#9920)
* Added an Any Civ starting location brush.

* Fixed the Remove starting locations brush from being too long.

* Civs without a specific starting location given to them now use the spectator starting locations before finding a free tile.

* Removed spectator from civilizations to give a starting location.

* Added comments

* Removed accidentally added import statements.

* Added new display text to template.properties

* Replaced an inline when statement with an if statement.

* Fixed not having a space after a translation.

* Moved finding a starting location to a new function.

* Fixed GameStarter.getCivStartingLocation to return a null if it couldn't find a tile to start on.
2023-08-21 22:42:14 +03:00
Yair Morgenstern
70b04765cc
Version rollout (#9949)
* Bump version and create initial changelog entry

* Update Simplified_Chinese (#9938)

* Update Italian.properties (Defensive Pacts) (#9924)

* Update French.properties (#9922)

* Update Spanish.properties (#9921)

* Update Spanish.properties

* Reword

* Add missing equal sign

Co-authored-by: TommasoPetrolito <tommasouni@gmail.com>

---------

Co-authored-by: TommasoPetrolito <tommasouni@gmail.com>

* Update Brazilian_Portuguese.properties (#9919)

* Update Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

* Update Korean.properties (#9948)

New unciv & github user here.
I found Korean translation stopped on February and thought this would help a little bit.
It still has untranslated lines and some may be incorrect, but better than never? :)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: TommasoPetrolito <tommasouni@gmail.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: DoosanBears82 <142787703+DoosanBears82@users.noreply.github.com>
2023-08-21 22:41:47 +03:00
Brian
1ef883ecdd
ImprovementPicker screen displays tile owner civ and city (#9942)
* Added owner civ and city to the ImprovementPicker screen with translation

* Switched tileOwnerText from var to val

* Changed unowned tile message and city name link to city screen
2023-08-21 22:41:15 +03:00
SomeTroglodyte
ff806b5f3c
Fix minimum votes needed for a diplomatic victory (#9932)
* Diplomatic Vote tweak: Defensively make sure Spectator can't vote

* Diplomatic Vote tweak: Fix votesNeededForDiplomaticVictory formula and base count
2023-08-21 18:17:32 +03:00
SomeTroglodyte
cc43a41ec7
Consistent UTF-8 where possible (#9927)
* Consistent UTF-8 where possible

* Remove one import
2023-08-21 18:17:21 +03:00
SomeTroglodyte
4851865bce
Victory illustrations (#9934)
* Victory Screen Illustrations page

* Fix WorldReligion victory disclosing random player count

* Victory screen icons and Victory types get their separately moddable path

* Merge fix and nicer wiki text

* VictoryScreenIllustrations debug run

* Fix Image sizing and some polishing

* Fix white squares on some Victory Screen Cultural milestone buttons
2023-08-21 18:17:13 +03:00
John McDonnell
56a3f298ef
Add option to Enable/Disable unit upgrades for automated units (#9941)
* Add option to enable/disable unit upgrades for automated units

* Add automated unit upgrade String to template.properties

* Change check for isPlayer to isHuman when performing upgrades for automated units
2023-08-21 18:16:59 +03:00
Brian
f7415bf0a9
Visual indicator for building outside workable tiles 9486 (#9935)
* Added warning to improvement picker buttons for improvements out of range for population to work

City population can not work tiles farther than 3 tiles from the city center. The improvement picker did not warn that improvements providing stat increases would not be workable, so the improvement might be worthless. The ImprovementPicker screen will now warn on the improvement button if the improvement provides a stat increase, but is farther than 3 tiles from the owning city center. The warning happens for all improvements that increase the tile stats, including Luxury and Strategic resource improvements. The warning does not disallow building the improvement.

* Changed methods for finding positive stat increases and added translation for warning text

* Condensed conditional for warning text in ImprovementPicker
2023-08-21 18:16:07 +03:00
Yair Morgenstern
f3ff1033ea Resolved #9944 - Undo button in Multiplayer no longer changes 'next turn' button 2023-08-21 18:15:48 +03:00
SeventhM
08a04d3575
Refactor: Move checking targets from automation to logic (#9945)
* Move checking targets from automation to logic

* Ending newline, move attackable tile

* move getBombardableTiles for similar reasons

* fix package name

* remove import
2023-08-20 09:18:47 +03:00
Cong
7cb39dcecf
Fix docker badge (#9946) 2023-08-20 09:18:13 +03:00
Yair Morgenstern
72a7f4df57 4.7.15-patch1 2023-08-18 12:51:37 +03:00
SomeTroglodyte
0e664d943b
Fix missing DiplomaticVotePickerScreen link in NextTurnAction (#9931) 2023-08-17 16:18:23 +03:00
SomeTroglodyte
e1a44b1076
Fix AutoScrollPane to not steal focus when disabled (#9930) 2023-08-17 16:12:43 +03:00
SeventhM
67adabb78f
Additional unit tests (#9866)
* Additional unit tests

* Missing import

* Changing stuff solely to avoid an import

* Example of the test, in different orders

* New PromotionTree test

* Add functions to make PromotionTree easier to work with

* Changing values to be lateinit variables
2023-08-17 09:17:23 +03:00
SeventhM
1c85ca8c09
Fix City-States giving untradeable resources (#9923) 2023-08-17 08:50:39 +03:00
Yair Morgenstern
886f0f8caa 4.7.15 2023-08-16 18:17:58 +03:00
Yair Morgenstern
3bc06efc16
Version rollout (#9918)
* Bump version and create initial changelog entry

* Update Indonesian.properties (#9916)

* Update Indonesian.properties

* Update Indonesian.properties

Variable errors

* Italian: Add translations for '# Requires' lines (#9915)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: kensvin <kensvin28@gmail.com>
Co-authored-by: TommasoPetrolito <tommasouni@gmail.com>
2023-08-16 18:02:57 +03:00
SeventhM
6e3d4d99e0
Add "Improvement" as an improvement filter (#9906)
* Add "Improvement" as an improvement filter

* Update docs, change from non road improvement to all improvement
2023-08-16 17:59:54 +03:00
Oskar Niesen
548b536818
Add Defensive pact (#9900)
* Defensive Pacts can now be offered.

* Signing a defensive pact now makes the Civs join all defensive wars. Any future defensive wars will force the other civ to join.

* Removed Popup Alert Defensive Pact.

* Defensive pact and Research pact now are only on the trade screen.

* AI now offers defensive pacts.

* Added AI evaluating sending and receiving Defensive Pact offers.

* Reverted some temporary changes

* Reduced the chance an AI offers a defensive pact

* Starting an offensive war now cancels all Defensive Pacts with other civilisations.

* Removed extra requirements before an AI will sign or offer a defensive pact.

* Added Defensive Pacts to the Civilopedia.

* Fixed the AI counter offering with treaties.

* Fixed a test using the old method of checking if a civ is at war.

* Fixed a previous refactor error.

* Deleted commented out Research Agreement button code.

* Fixed some spelling errors and remnant debugging code.

* Removed signing a defensive pact brings both Civ's into each others previous defensive wars.

* Refactored setFriendshipBasedModifier to look better

* Starting an offensive war now removes the defensive pact form both sides.

* Reverted changes to DiplomaticStatus

* Removed extra technology check to sign a defensive pact.

* Removed DiplomacyManager.isAtWar() completely.

* Moved setting defensivePact flags from  TradeLogic.transferTrade() to DiplomacyManager.signDefensivePact.

* Changed diplomatic modifiers related to Defensive Pacts to be less extreme.

* Fixed canceling Defensive Pacts when declaring war and notifying other Civs.

* Updated the Defensive Pact entry in the Civilopedia and fixed some spelling.

* Fixed Defensive Pact behavior while attacking and defending.

* Changed a variable to a more readable name.

* Improved readability of setFriendshipBasedModifier().

* Moved the important onWarDeclared functionality to their own functions.

* Added a notification for the attacking Civ when a Civ joins war through a Defensive Pact.

* Refactored setDefensivePactBasedModifier() to be more readable.

* Increased DeclinedDefensivePact time.

* Deleted old commented code that removed the research agreement button.

* Fixed having reverting changes errors in UnitMovementTests.

* Refactored breaking treaties when declaring war.

* Removed unnecessary semicolons.
2023-08-16 17:59:41 +03:00
Oskar Niesen
65f884cb54
Nuke blast simulation no longer shows invisible units. (#9913)
* Nuke blast simulation no longer shows invisible units.

* Changed code to look better.

* Improved readability.
2023-08-16 17:59:30 +03:00
SomeTroglodyte
9889bfcd1d
Show impassable tile percentage on Map Editor View summary (#9917) 2023-08-16 17:59:14 +03:00
Yair Morgenstern
52c0dcfb38 4.7.14 2023-08-14 16:32:14 +03:00
Yair Morgenstern
ff24a5b884
Version rollout (#9909)
* Bump version and create initial changelog entry

* Update Russian.properties (#9903)

* Update Russian.properties

* Update Russian.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: deqtodo <94169613+deqtodo@users.noreply.github.com>
2023-08-14 16:29:05 +03:00
SomeTroglodyte
a4a43dadc1
Mod manager smallish overhaul (#9878)
* Mod Manager - move classes, visibility

* Mod Manager - separate metadata from UI buttons

* Mod Manager - split off info/actions pane and make it scrollable

* Mod Manager - fix bottom button mouseover

* Mod Manager - getRepoSize lint and doc

* Mod Manager - banner for builtin rulesets and hide visual checkbox in obvious-BS cases

* Mod Manager - MB rounded to next instead of down

* Mod Manager - One missed lint

* Post-merge sort imports

* Avatars as fallback for preview
2023-08-14 16:17:18 +03:00
Oskar Niesen
756431ee74
Fixed GameStarter adding gold to spectator Civilization on later eras when it shouldn't. (#9901) 2023-08-14 16:14:45 +03:00
Yair Morgenstern
c1da217ff6 Resolved #9908 - Improvements created by buildings can activate 'take over adjacent tiles' unique 2023-08-14 16:14:05 +03:00
Yair Morgenstern
42a5440a76 Safeguard against errors in establishing the URL connection to Github 2023-08-11 11:52:33 +03:00
Yair Morgenstern
34fbe9e9a2 AI: Better policy selection 2023-08-10 16:20:01 +03:00
Yair Morgenstern
e406533ef0 AI: Finer-tuned Food ranking vs other stats for cities 2023-08-10 16:05:38 +03:00
Yair Morgenstern
27a5bd0cc5 AI: Build melee naval units to defend coastal cities and move them there 2023-08-10 12:00:03 +03:00
Yair Morgenstern
654b9f80f2 AI will not waste promotions on Heal Instantly 2023-08-10 11:13:51 +03:00
Yair Morgenstern
95b8fab950 Rivers at the bottom edge of maps are considered by tiles for river-adjacency 2023-08-10 10:45:47 +03:00
SeventhM
0fbe5a18b8
Fix promotions being unavailable when it can be reached a slower way (#9856)
Previously if a promotion could require 2 promotions from branch A but 1 branch B and the branch B also lead to an earlier promotion from branch A, it erroneously consider that a loop. Solved by copying the logic from the ruleset Validator (going child up to parent, rather than parent to child and passing in the hashset rather than using a global one)
2023-08-09 09:17:09 +03:00
Yair Morgenstern
036c6c820e 4.7.13 2023-08-09 01:10:50 +03:00
Yair Morgenstern
98029b68d2
Version rollout (#9899)
* Bump version and create initial changelog entry

* Update Catalan.properties (#9897)

* some Persian-UN translations (#9893)

* Update Persian_(Pinglish-UN).properties

Added and fixed some till 1295.

* Update Persian_(Pinglish-UN).properties

fixed typo.

* Update Persian_(Pinglish-UN).properties

till 2254

* Update Persian_(Pinglish-UN).properties

fixed "Populism".

* Update Turkish.properties (#9891)

Just making same translate...

* Update Italian.properties (#9883)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Ilia <81512402+ilia-abbasi@users.noreply.github.com>
Co-authored-by: Omar Mammadov <114606477+OmarMammadov@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2023-08-09 01:00:26 +03:00
SomeTroglodyte
8576f16c6e
Ruleset validator: Tilesets (#9881)
* Defensive Tileset loading

* Deleting a mod should do the same cleanup as downloading a new one

* Extensive RulesetValidator checks on Tileset mod integrity
2023-08-09 00:47:14 +03:00
SomeTroglodyte
903fb2c097
NextTurnAction as enum (#9889) 2023-08-09 00:47:07 +03:00
SomeTroglodyte
6c841e52c6
Minor Mod Manager fixes (mods having dashes in their repo name not shown right away) (#9894)
* Fix Mod Manager not displaying some freshly downloaded mods immediately
(and scroll it into view)

* Mod Manager DL-from-URL stays open after invalid link

* Minor lint

* Another lint on an unfortunate lint
2023-08-09 00:46:59 +03:00
Yair Morgenstern
0561a7951c Much more accurate improvement stat effects 2023-08-09 00:46:33 +03:00
Yair Morgenstern
60ea752c1f chore: Modernized DiplomacyManagerTests 2023-08-08 23:55:37 +03:00
SomeTroglodyte
4fac033704
Ruleset object reorganization (#9898)
* IHasUniques without INamed removed - treat ModOptions same as GlobalUniques in that respect

* Unify uniqueObjects and uniqueMap initialization

* Move and split RulesetValidator

* Split Ruleset file to make it pure single-class

* Minor linting
2023-08-08 23:06:33 +03:00
Yair Morgenstern
7b778f7535 Moved changeImprovement to TileInfoImprovementFunctions 2023-08-08 22:06:25 +03:00
Yair Morgenstern
3cbd447620 Removed HandleImprovementCompletion function, added test for citadel tile takeover 2023-08-08 22:00:18 +03:00
Yair Morgenstern
08c8bcf383 Removed double lines between handleImprovementCompletion and changeImprovement 2023-08-08 20:25:12 +03:00
Yair Morgenstern
417b6ff798 removeImprovement convenience function 2023-08-08 19:29:33 +03:00