Commit graph

1846 commits

Author SHA1 Message Date
JackRainy
e0a00eb9a5 Implemented aircraft carrier "Flight Deck" and "Armor Plating" promotions (#1754)
* Implemented aircraft carrier "Flight Deck" and "Armor Plating" promotions

* Template for the translation strings

* New icons are added

Co-authored-by: ltrcao <ltrcao@users.noreply.github.com>
2020-01-25 19:43:53 +02:00
lyrjie
b21fdc6c37 Fix: being able to acquire another player's tiles in multiplayer (#1766) 2020-01-25 19:40:47 +02:00
Yair Morgenstern
e9a6fd86f9 Added 'mountain within 2 tiles' restriction to Machu Picchu as per #1762 2020-01-23 23:44:25 +02:00
rayray61
5889cfd182 sorry for not informing you enough (#1764)
I didn't think you would add them from discord they were just example (I forgot letter Ğ ğ )
2020-01-23 22:15:32 +02:00
Yair Morgenstern
c29ccadc60 Exploring units no longer auto-enter city states 2020-01-23 20:50:53 +02:00
Yair Morgenstern
e419443eb6 Added missing Turkish letters 2020-01-23 20:36:56 +02:00
lishaoxia1985
42e16ec80a Now we and AI can sign research agreement. (#1671) 2020-01-23 20:12:24 +02:00
Yair Morgenstern
ce50828cdb 3.5.5-patch1 2020-01-22 19:09:16 +02:00
Federico Luongo
32e3cb2112 Hotfix Legalism on foundation (#1747) 2020-01-22 19:06:45 +02:00
lyrjie
9e0ed36bba Map editor menu (#1739)
* Refactor: map size is enum

* Feature: map editor menu

* Cleanup

* Added "Empty" map generation type for the map editor
2020-01-22 13:10:39 +02:00
JackRainy
617eea92cf Refactoring of isTransported flag for air units (#1742)
* Refactoring of `isTransported` flag for air units

* Minor refactoring: canAirUnitMoveTo as a separate function

* Redundant check is removed
2020-01-22 13:09:36 +02:00
Yair Morgenstern
4accfb594f Better specialist allocation table placement 2020-01-21 23:27:56 +02:00
Yair Morgenstern
1633394164 Resolved #1696
Specialist allocation
- Is now in a separate class
- Is immediately viewable on the City screen
2020-01-21 23:16:44 +02:00
Yair Morgenstern
7ea6fc2551 Added 4-way tile images (base,feature,improvement,resource) by The Bucketeer
Fixed some issues with existing tile images
2020-01-21 21:02:11 +02:00
lyrjie
73fc55eb0c Fix: Oligarchy (#1740)
* Fix: Oligarchy applying to civilian, water and air units

* Fix: moving unit into/out of city doesn't trigger income refresh
2020-01-21 19:48:52 +02:00
JackRainy
1441dd49f5 Aircraft carrier is added (#1731)
* Implemented aircraft carrier by @ltrcao in PR #1723

* New icon for the Carrier unit
2020-01-20 22:53:59 +02:00
Timo T
b95844d2f4 Refactor: Streamline popups (#1735)
First, `PopupTable` and all extending classes had the `Table` at the end removed. Second, the popup base classes `Popup(Table)` and `YesNoPopup(Table)` were moved from the worldscreen to the util package.

Third: The popups were inconsistent. In CameraStageBaseScreen, there was a check with 3 parts, one if any tutorial was showing, second if any child is a TradePopup, and third if the boolean field "hasPopupOpen" is true.

However, all of these checks were, in the end, `Popup(Table)`s on the screen. So, this check has simply been changed to check if any child is a `Popup(Table)`. All the other checks and their relating code could simply be removed.
2020-01-20 19:13:21 +02:00
Federico Luongo
0a5aefcdd9 Fix Legalism Policy (#1724)
Closes #1712
2020-01-19 18:43:52 +02:00
Federico Luongo
fd765fc442 Hotfix empty entry in construction queue (#1725) 2020-01-19 18:41:25 +02:00
lyrjie
762af74b61 Barbarians don't move/attack on the turn of their spawning (#1719)
* Barbarians don't move/attack on the turn of their spawning

* Revert "Barbarians don't move/attack on the turn of their spawning"

This reverts commit b088fb8c

* Better implementation

Co-authored-by: dumichno <57294813+dumichno@users.noreply.github.com>
2020-01-19 18:40:44 +02:00
lyrjie
7805f90dab Fix: ships being teleported into landlocked cities (#1718)
* Fix: ships being teleported into landlocked cities

* Proposal: extend the city teleport to all owned tiles

* Utilizing the existing method

Co-authored-by: dumichno <57294813+dumichno@users.noreply.github.com>
2020-01-18 22:14:29 +02:00
Yair Morgenstern
014220c480 Merge tag '3.5.3-patch1' 2020-01-18 21:58:09 +02:00
lyrjie
8efe21ea57 Fix: barbarians pillaging ancient ruins (#1720)
Co-authored-by: dumichno <57294813+dumichno@users.noreply.github.com>
2020-01-18 21:56:22 +02:00
Yair Morgenstern
66637637f4 findFurthestTile no longer crashes when the unit has no tiles it can move to 2020-01-18 21:20:28 +02:00
Yair Morgenstern
02def2ffa9 Resource+Improvement is go!
Added resource-specific plantations by The Bucketeer
2020-01-17 15:07:47 +02:00
lyrjie
d3e88906d6 Fix: starting units being able to spawn on Ancient Ruins/Barbarian encampments (#1691)
* Fix: starting units being able to spawn on Ancient Ruins/Barbarian encampments

* Added doc and commentary
2020-01-16 12:06:43 +02:00
Yair Morgenstern
c1c6f93f6d Ancient ruins are no longer save-scummable 2020-01-15 22:21:00 +02:00
Yair Morgenstern
b73e7100c0 Resolved #1700 - As per original civ, you no longer start with a scout. 2020-01-15 22:11:05 +02:00
lyrjie
ad1a57dd02 Map reveal after singleplayer defeat (#1681)
* Added map reveal when the player is defeated in singleplayer

* Added victory (actually defeat) screen when the player is defeated

* Moved the victory screen navigation to an appropriate place

* Moved the map reveal logic to WorldMapHolder

* Tutorials and Diplomacy button are hidden after the defeat
2020-01-15 19:56:01 +02:00
lyrjie
0a12062c70 Fix: "Pick construction" tutorial never completes (#1693) 2020-01-14 15:28:18 +02:00
lyrjie
81258297d5 Fix: ability to buy the same building multiple times (#1692) 2020-01-14 15:21:12 +02:00
lyrjie
2d0aec5a26 Fix: idle units not being properly selected after settling a city (#1685)
Closes #1682
2020-01-13 13:29:38 +02:00
Duan Tao
72df6869a3 Make sure all building be built before producting science. (#1678) 2020-01-13 12:06:19 +02:00
Yair Morgenstern
9a426318ba Proper destruction notification for city states
Added Fur resource image
2020-01-13 00:09:09 +02:00
Federico Luongo
5e003cfd64 Fix Map Editor Lag (#1670)
In painting mode, only the last drawn tiles are updated.
2020-01-12 23:29:26 +02:00
JackRainy
de7a369131 Fix of the Regex expression to heal after the battle (#1676) 2020-01-12 23:24:00 +02:00
Yair Morgenstern
08218b954e healUnit and tryPillageImprovement in BarbarianAutomation use their counterparts from UnitAutomation, because they're basically exactly the same 2020-01-12 23:21:34 +02:00
JackRainy
8a327fa7be Fix for the "Back button can't end Unciv (#1513)" (#1661)
* Callback to exit the game by 'Back' button

* Prompt dialog for the game exit

* Additional strings for translations are generated

* Do not show exit prompt dialog twice
2020-01-12 23:05:49 +02:00
Yair Morgenstern
ca59dc4e1f Removed redundant "else"s for less indentation and 'happy pathing' 2020-01-12 20:52:23 +02:00
Vladimir Tanakov
725edc2a31 Better barbarian automation (#1560) 2020-01-12 20:48:34 +02:00
JackRainy
109b60db2c Disable France culture boost after Steam Power research (#1663) 2020-01-11 22:59:45 +02:00
r3versi
51ecb0e99d Legalism grants Culture Buildings asap (#1658)
* Legalism grants Culture Buildings asap

* Buildings granted by Legalism cost no maintenance
2020-01-11 22:52:58 +02:00
r3versi
a1b03849ec Fix city screen (#1657)
* Last CityScreen fix

* Atlas & Translations
2020-01-11 22:46:17 +02:00
lyrjie
c37ea14df5 Defeat improvements (#1654)
* Fix: civilization not being destroyed when disbanding the initial settler

* Fix: destroyed unit providing visibility until the end of the turn
2020-01-11 22:33:27 +02:00
Vladimir Tanakov
fd5d38fb01 Fix issue when city can not bombard enemy (#1644) 2020-01-11 22:11:20 +02:00
r3versi
2daf27278d WIP Construction Queue (#1648)
* Construction Queue

* Added constructionQueue in addition to currentConstruction: if currentConstruction is done, next construction from Queue is started; if Queue is empty invoke ConstructionAutomation
* Queue utility methods: add, remove, higher prio, lower prio
* Icons to move constructions in queue
* Top left city stats moved to top right panel
* Added current construction and queue construction to top left
* Extended selected construction (containing description) moved to bottom right, it is now displayed alternatively to selected tile
* Max queue size, cannot change queue in puppet city or in other player turn
* Queue and current construction reset on puppeting city

* Cleanup again

* CityStatsTable is a separate class so we can play around with where it's located with minimal code changes

* Rejection reason wrap & removing nothing on enqueue a construction

* Crude UI proposal

* Tutorial updates for queues

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2020-01-10 11:41:43 +02:00
r3versi
12a98aa4bb City construction queue (#1479)
* Construction Queue

* Added constructionQueue in addition to currentConstruction: if currentConstruction is done, next construction from Queue is started; if Queue is empty invoke ConstructionAutomation
* Queue utility methods: add, remove, higher prio, lower prio
* Icons to move constructions in queue
* Top left city stats moved to top right panel
* Added current construction and queue construction to top left
* Extended selected construction (containing description) moved to bottom right, it is now displayed alternatively to selected tile

Rework

* Max queue size, cannot change queue in puppet city or in other player turn

* Queue and current construction reset on puppeting city

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2020-01-09 20:58:15 +02:00
Yair Morgenstern
977fcfb97e Code cleanup - when{} instead of if-else chains, toLabel() instead of Label(...) 2020-01-09 20:54:33 +02:00
lyrjie
ba324c9fad Added the "crudely-drawn map" to ancient ruins outcomes (#1645)
* Added the "crudely-drawn map" to ancient ruins outcomes

Closes #1640

* Extracted the constants for readability

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2020-01-09 20:40:59 +02:00
drwhut
b1b82c6a67 Fixed a bug where the growth bar's height exceeded the group. (#1646)
This happened on the turn that a city was taken.
2020-01-09 20:18:37 +02:00