Commit Graph

4685 Commits

Author SHA1 Message Date
alexban011
ea31bd164f
Add optional on-screen buttons to zoom in and out (#6933) 2022-05-29 15:32:36 +02:00
alexban011
57c027dca5
Land melee units can only attack water units once they are able to embark (#6957) 2022-05-29 15:27:57 +02:00
itanasi
37d6233f5d
Dynamically adjust StatsTable height (#6990)
* Dynamically adjust StatsTable height

* redo Gradle?

* redo Gradle?

* Remive undeeded default

* Remove reduant init() line

* Make top portion fixed and lower section scroll
2022-05-29 08:46:35 +03:00
alexban011
b8f987d791
changed main menu world shape to rectangular (#6983)
* change to rectangular

* clean up
2022-05-29 04:51:15 +02:00
Yair Morgenstern
f613bba7d4 Better minimap buttons 2022-05-29 00:07:07 +03:00
alexban011
7db4806274
Fix GitHub markdown of crash report save game (#6986) 2022-05-28 01:20:52 +02:00
Timo T
3a03799074
Refactor: Extract all cross-platform code from CustomSaveLocationHelpers into core module (#6962)
* Also fixes the GameInfo.customSaveLocation to work for Android
2022-05-27 15:53:18 +02:00
itanasi
317e8c74df
Citizen Management as Expandable Tab (#6969)
* Add ScrollPane to CityStatsTable, limit to half screen height

* Reformat CitizenManagementTable to not have clashing background. Add Expander functionality
Remove button and Table from CityScreen
CitizenManagement added in CityStatsTable
Other cleanup

* Move Reset Citizens to within ExpanderTab

* Minor code format whitespace
2022-05-27 13:59:57 +03:00
itanasi
67065d766b
Make Locked Tiles workable, and thus clickable (#6966) 2022-05-27 13:55:51 +03:00
Yair Morgenstern
62dc05ee5c
AI counteroffers will no longer contain items already offered by the player for 'double declaration of war' etc (#6940) 2022-05-27 13:55:33 +03:00
alexban011
591c96b0c1
puppet cities only focus on gold (#6946)
* fixed issue

* cleanup

* puppets only like making gold

* fully revert file to master file

* Update CityInfo.kt
2022-05-27 13:52:23 +03:00
Timo T
214fae6f59
Add simple logging solution (#6952)
* Add simple logging solution

* Fix Android compilation

For some reason I stashed this and didn't unstash.

* Add better logging explanation
2022-05-27 13:45:13 +03:00
itanasi
e7a90f2ad0
Make so Citizen Management buttons don't work if Spectator (#6954) 2022-05-26 15:24:55 +03:00
Timo T
ea03b97639
#6914 Multiplayer Status Display (#6916)
* Handle subclassing of Events properly

Previously, you could only listen to the exact class

* Add relevant parent classes for the multiplayer events

* Refactor: use the old name as the main name in MultiplayerGameNameChanged event

* Add being able to stop listening to events in the EventBus

* Add tests for EventBus

* Refactor: Extract GameList into standalone file

* Refactor: safeUpdateIf to more generic throttle function

* Refactor: Extract multiplayer UI helper functions into separate file

* Refactor: Extract load/download multiplayer game into logic class from UI

* Make loading a multiplayer game automatically update the in-memory game in OnlineMultiplayer

* Refactor: Extract multiplayer settings into separate object

* Add multiplayer status display

* Fix error with multiplayer games not correctly being cleaned up after successful update

* Prevent loadLatestMultiplayerState() while next turn update is running

* Show "Working..." while waiting for next turn calculations instead of "Waiting for [civ]..."

* Fix race condition while updating online game state
2022-05-25 22:22:58 +02:00
SomeTroglodyte
e54fda5a4a
Resource supply list reorg (#6881)
* ResourceSupplyList reorg

* ResourceSupplyList reorg - instrumentation

* ResourceSupplyList reorg - map of maps

* ResourceSupplyList reorg - revert to ArrayList

* ResourceSupplyList reorg - review

* ResourceSupplyList reorg - review

* ResourceSupplyList reorg - almost-immutability
2022-05-25 19:42:51 +03:00
SomeTroglodyte
e1b76e776d
Fix floodfill abbreviation translation showing on fortify key tooltips (#6909)
* Fix floodfill abbreviation translation showing on fortify key tooltips

* Fix floodfill abbreviation translation - fix case

* Fix floodfill abbreviation translation - existing and comment
2022-05-25 19:39:08 +03:00
SomeTroglodyte
392a8d5de9
Re-hide Enable Portrait option on desktop (#6912)
* Re-hide Enable Portrait Option in desktop version

* MainMenu Background Map Job cancellable

* MainMenu Background Map generation cancellable

* MainMenu Background Map cancellable - remove instrumentation

* Revert "MainMenu Background Stuff"
2022-05-25 19:37:44 +03:00
SomeTroglodyte
0f63000ac8
Show required resource for upgrades, rework upgrade logic (#6849)
* Show required resource for upgrades, rework upgrade logic

* Show required resource for upgrades - reviews
2022-05-25 19:35:27 +03:00
SomeTroglodyte
0461d9d7fd
Fix Right-Click attacks made no sound (#6906)
* Fix Right-Click attacks made no sound

* Fix Right-Click attacks made no sound - no UI in logic

* Fix Right-Click attacks made no sound - comments

* Fix Right-Click attacks made no sound - comments
2022-05-25 19:34:41 +03:00
SomeTroglodyte
e927ef6f64
ImageGetter.getDrawable a few ns faster (#6936) 2022-05-25 19:33:17 +03:00
SomeTroglodyte
6f7af9ee22
KeyPressDispatcher no longer silently eats exceptions (#6931) 2022-05-25 19:32:24 +03:00
OptimizedForDensity
fe0ec08e61
Fix missing icons and translations in civilopedia accessed from main menu (#6922)
* Fix blank icons

* Apply translations to civilopedia + use complex ruleset

* Unused import

* Typo

* Simplify definition
2022-05-25 19:31:12 +03:00
Timo T
156db1f5f7
Go back to current game when you press "Resume" on the main menu (#6882) 2022-05-25 19:27:59 +03:00
SomeTroglodyte
16874f5da6
Implement a waiting command (#6884) (#6896)
* Implement a waiting command (#6884)

* Resolve misc. issues with commit 27a03bca8

* Resolve misc. issues with commit 93d9fe9cc

* Resolve misc. issues with commit 2ca7ed154

Co-authored-by: Paul Pogonyshev <pogonyshev@gmail.com>
2022-05-25 04:07:20 +02:00
alexban011
0661bbc31b
Fixed slider sound playing when opening NewGameScreen and MapEditor (#6932)
* fixed slider sound playing in some of the tabs

* made "initial" value mandatory to avoid such issues in the future

* initial values now taken from gameParameters

* whitespaces
2022-05-24 22:43:00 +02:00
alexban011
93afb26c62
Added option for confirmation when clicking "next turn" button (#6925) 2022-05-24 21:32:35 +02:00
Timo T
b59b890ced
Fix multiplayer turn check worker exception (#6915) 2022-05-23 10:48:08 +03:00
Yair Morgenstern
6836038252 4.1.2 2022-05-22 20:40:51 +03:00
Timo T
fc9668f2d0
Refactor: change GameSaver from singleton to single instance pattern & move autosave logic into GameSaver (#6846)
* Refactor: change GameSaver from singleton to single instance pattern & move autosave logic info GameSaver

Singleton just doesn't make sense anymore when we have to `init(..)` with different arguments, then we should just make a normal class out of it

* Fix not correctly checking for missing external files dir

* Refactor: use more appropriate library method

* Add logging for external files dir
2022-05-22 19:51:35 +03:00
SomeTroglodyte
a2c646ef8e
Fix Autocracy Complete including unit test (#6908) 2022-05-22 19:51:05 +03:00
OptimizedForDensity
39bbb2de1c
Fix crashes when a civ does not have a capital (#6889) 2022-05-22 17:00:42 +02:00
SomeTroglodyte
740886c890
Refactor UncivShowableException (#6899) 2022-05-22 13:55:19 +02:00
Xander Lenstra
3754108391
Added more unit tests for uniques; added missing unique implementations (#6886)
* Added more unit tests for uniques; added missing implementations

* This of course shouldn't go here as there is another function for it

* Stylistic changes

* This generates better unique examples

* Reviews

* Reordered for efficiency

* Reverted improvement percentage bonuses applying to tiles
2022-05-22 13:12:10 +03:00
Timo T
f34b97a421
Fix multiplayer turn checker potentially stopping turn checks for everyone that plays that game if a file was not found remotely (#6901) 2022-05-22 00:13:48 -07:00
Timo T
244f9477df
Initial Event Bus implementation & Event-based multiplayer updates (#6826)
* Add EventBus

* Refactor: Extract multiplayer logic into their own classes & make updates event-based instead of throwaway+rebuild
2022-05-22 00:05:33 +02:00
Timo T
91ffa2e185
Fix screens not correctly being dispose()d (#6876) 2022-05-21 23:52:02 +02:00
Timo T
81379078fa
Refactor: Split options into multiple files (#6857)
* Refactor: Move OptionsPopup to own package

* Refactor: Split OptionsPopup into multiple classes

# Conflicts:
#	core/src/com/unciv/ui/options/OptionsPopup.kt
2022-05-21 21:57:06 +03:00
Timo T
a128ea0d59
Fix images not being able to have their size set (#6887)
* Fix images not being able to have their size set

* Small corrections

`> 0f` to include `-0f`
2022-05-21 21:43:30 +03:00
SomeTroglodyte
3e95e3f152
Fix effect of new Beliefs not immediately visible in top bar (#6888)
* Fix effect of new Beliefs not immediately visible in top bar

* Fix effect of new Beliefs not immediately visible - reviews
2022-05-21 21:37:06 +03:00
itanasi
8b9946e65e
Fix Zone of Control (#6891) 2022-05-21 15:24:18 +02:00
Jack Rainy
915f3e694f
A lot of smaller code/performance improvements (#6859)
* Unused import directive

* Unused symbols

* Unnecessary constructions

* Redundant constructions

* Some optimizations

* Java interop issues: a package must match a location

* Collection .count() can be replaced with .size

* Class member can be "private"

* Call chain can be simplified

* Simplified conditions

* Proper use of variables

* Assignment styles

* Corrections after the code review

* Corrections after the code review - part 2

* Code review feedback: get them back to public

* Fix of the bad merging

* Code review: Lost spaces found their homes
2022-05-21 01:41:28 +02:00
Timo T
5d835c762a
Refactor: Extract PickerPane from PickerScreen (#6870)
Refactor: Extract PickerPane from PickerScreen
2022-05-20 21:23:25 +02:00
itanasi
a2bc1a1a29
Assign Population Improvements (#6650)
City management UI to allow focusing automatic worker placement

Improvements to worker / specialist assignment routines
2022-05-20 00:12:23 +02:00
Jack Rainy
a272e8e7ba
Correct check for the city connection quest (#6875) 2022-05-19 22:52:55 +02:00
SomeTroglodyte
0ced4d96e7
SimpleHttp gets a connection timeout (#6812)
* SimpleHttp gets a connection timeout
2022-05-19 14:30:31 +02:00
Xander Lenstra
6dabffb5a9
Fixed a bug blocking special improvements on removable terrain features (#6865) 2022-05-19 13:04:03 +03:00
SomeTroglodyte
3d6a01d633
Build warnings cleanup (#6827) 2022-05-19 02:12:18 +02:00
Timo T
5353f3337c
Fix Gdx.files being garbage collected in MultiplayerTurnCheckWorker (#6817)
* Add logging to MultiplayerTurnCheckWorker

* Fix NullPointerException in turn check worker: Gdx.files is null
2022-05-18 07:35:00 +03:00
Jack Rainy
4986505363
Great General typed uniques and improved moddability (#6818)
* Great General UniqueTyped and improved moddability - draft

* Great General UniqueTyped and improved moddability - reviews

* Great General UniqueTyped and improved moddability - no reason not to cache another

* Integration with JackRainy's solution

* Integration with JackRainy's solution - part 2

* Revert of maxGreatGeneralBonusRadius logic

* Minor refactoring

* Code review: minor refactoring

* Keep the warning for the modders about the obsolete unique

* Code review: Better wording for the unique

Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com>
2022-05-18 00:02:53 +03:00
Xander Lenstra
7079619fe2
Great improvements can again be constructed on forest (#6823)
* Great improvements can again be constructed on forest
This PR fixes a bug where great improvements couldn't be build on 
forests/marshes/jungles/etc. It does so by creating a unique which 
specifically allows for removing features, and checking for that.
Additionally, we only remove these features when we have the tech to 
remove them. For example, you can no longer plonk an Academy down over a 
forest without having researched mining.

* Missed the file for vanilla

* Reviews

* Fixed logic
2022-05-17 20:04:49 +03:00