Commit Graph

92 Commits

Author SHA1 Message Date
SomeTroglodyte
6b084f0e6b
Victory screen score charts (#9121)
* VictoryScreen with Charts by WhoIsJohannes

* VictoryScreen with Charts by WhoIsJohannes - atlas

* VictoryScreen with Charts by WhoIsJohannes - lost icon attribution
2023-04-08 21:38:27 +03:00
SomeTroglodyte
a4c4c5f93e
Music player controls (#9087)
* Music controls cleanup

* Music controls cleanup - assets

* Music controls cleanup - fix incorrect attribution
2023-04-01 22:06:46 +03:00
SomeTroglodyte
793d3387bf
Custom key bindings (#8802)
* Configurable key bindings - linting

* Configurable key bindings - move keyboardAvailable

* Configurable key bindings - separate KeyShortcutDispatcher

* Configurable key bindings - framework

* Configurable key bindings - save and load

* Configurable key bindings - activation

* Configurable key bindings - UI

* Configurable key bindings - more linting

* Configurable key bindings - Separate SettingsSelect

* Configurable key bindings - translation tested

* Configurable key bindings - disclaimer

* Configurable key bindings - disclaimer
2023-03-11 20:12:00 +02:00
SomeTroglodyte
5d80f50d93
Show UnitTypes in Civilopedia (#8729)
* Show UnitTypes in Civilopedia

* Show UnitTypes in Civilopedia - polish
2023-02-25 20:40:59 +02:00
vegeta1k95
a8a458ab48
Blockade mechanics (#8654)
* Fix centering of unit HP bar

* Blockade mechanics: land tiles

* Blockade mechanics: water tiles

* Don't blockade water tile if it has friendly military unit

* Blockade mechanics: cities

* Added tile/city blockade tutorials. Added city blockade status icon.

---------

Co-authored-by: vegeta1k95 <vfylfhby>
2023-02-14 22:13:25 +02:00
vegeta1k95
ca86e6fde7
Enemy indicator, city culture hex outline + misc (#8629)
* Rework of UnitGroup, City culture tile hex-outline, tweak enemy indicators

* Rework of UnitGroup, City culture tile hex-outline, tweak enemy indicators

* Better embarked selection sprite

* Small fixes

* Hotfix fog

---------

Co-authored-by: tunerzinc@gmail.com <vfylfhby>
2023-02-09 18:46:02 +02:00
vegeta1k95
4e15a1581b
City Screen improvements (#8598)
* City Screen improvements

* Buy icon reverted to Gold icon

---------

Co-authored-by: tunerzinc@gmail.com <vfylfhby>
2023-02-06 15:22:36 +02:00
alexban011
3180fce94d
Fix UX of random nations pool && keep advanced tab open when updating the screen (#8452)
* added feature to select specific city states

created MultiNationSelectPopup to reuse for the city states

* keep advanced tab open when update() is called

* Revert "added feature to select specific city states"

This reverts commit 4a1e6964b0.

* improved UX

* translations

* fix checks
2023-02-03 09:51:18 +02:00
vegeta1k95
0006aaef55
Modding: allow custom ResourcePortraits (#8330)
* Modding: allow custom ResourcePortraits

* Modding: big generification of the icons/portraits mechanism

* Resolve conflict

* Fix background fallback, remove dimming of improvement icons

Co-authored-by: tunerzinc@gmail.com <vfylfhby>
2023-01-09 21:03:00 +02:00
vegeta1k95
a5f68612ad
Better visibility for city status icons (#8329)
Co-authored-by: tunerzinc@gmail.com <vfylfhby>
2023-01-07 19:27:55 +02:00
vegeta1k95
8fd561de50
Added WLTKD status icon (#8257)
* Added WTLKD status icon

* Credits

Co-authored-by: tunerzinc@gmail.com <vfylfhby>
2022-12-29 13:52:35 +02:00
vegeta1k95
be573f2b76
Big rework of City plates (#8239)
* Big rework of City plates

* New city plates design, new status icons

* A little bit of padding for construction icon

* Better border for defence counter

* Better border for defence counter

* Solid colored icons

* Solid colored icons

* Credits

* Credits

Co-authored-by: tunerzinc@gmail.com <vfylfhby>
2022-12-28 17:32:26 +02:00
vegeta1k95
78c4f6de68
Big rework of Policy Picker UI, added new ninepatch RoundedEdgeRectangleSmall (#8218)
Co-authored-by: tunerzinc@gmail.com <vfylfhby>
2022-12-24 19:17:00 +02:00
vegeta1k95
1346eea4ca
Huge update of Technology Picker screen UI (Civ 5), new original icons + misc changes (#8188)
* Huge update of Technology Picker screen UI, new original icons + misc changes

* Fix possible memory leak

* Fix lines Z-Depth, shifted era boundary lines, thicker queue-path lines

* Fix lines Z-Depth more correctly

* Size checks replaced by truncation

* Icons credits

Co-authored-by: tunerzinc@gmail.com <vfylfhby>
2022-12-21 11:25:10 +02:00
Yair Morgenstern
c5bde45c5d Moved city state icons to separate folder 2022-11-20 18:48:28 +02:00
alexban011
d980b0d9ff
Global politics overview screen (#7469)
* getting the data

* finished getting the data

* optimization + separator

* vrtical separators

* more functions

* made it look good

* reverted debug variables

* cleanup

* added icon

* credits

* translations

* removed redundant equalizeColumns

* removed redundant separator

* column headers

* reviews

* removed redundant function

* latest translations

* latest review

* checks 1

* removed space

* removed vars and used DiplomacyManager instead

* combined overview screens

* 2 more translations

* little cleanup and fix
2022-09-19 16:12:24 +03:00
Xander Lenstra
a19fed5d28
Added a screen to move spies between cities (#7665)
* Added a screen to move spies between cities

* Fixed tests

* Reviews

* Avoid labels blinking

Co-authored-by: JackRainy <JackRainy@users.noreply.github.com>
2022-08-28 23:25:14 +03:00
Ouaz
90e582a0c3
Add an icon for "Wait" unit action (#7668) 2022-08-16 12:30:37 +02:00
Xander Lenstra
202e0bcf47
Basic version of EspionageManger, added a unique to gain spies (#7641)
* Handfull of comment questions, small refactorings

* Code changes

* Reworded a unique, removed a file

* Added spy names for all nations, minor consistency change

* Removed debug output

* Added an empty constructor so gdx can reconstruct it
2022-08-13 22:45:16 +03:00
itanasi
af6ab8e4e5
Add Air Sweep (#7484)
* Add Air Sweep Unique
Enable Dogfighting Promotion
Add Air Sweep mode button and crosshair overlay

* Adding Air Sweep Battle Table

* Add airSweep to Battle
Remove double XP
While in AirSweep can't select other units on tile

* initial airsweep code

* Implement airSweep

* BattleTable indicates tile you're AirSweeping

* some notifications

* Clean up notifications.
Add icons

* Revert game.atlas and game.png

* Fix selection properly

* Update Vanilla UnitPromotions.json

* Better handling of movement use
comment cleanup

* missing credit

* Proper code so that Seas units also deal no damage
Adding Tutorials!

* Remove Intercept Bonus Damage/Protection

* Remove chance of Interceptor missing

* Battle Table a bit more consistent

* Defender also gets Air Sweep Modifiers

* Defender doesn't get bonus

* Remove unused getInterceptBonus
Combine logic

* Show damage in notifications for Air Sweep

* Randomize intercepting Civ and prioritize Air Units

* Remove debug code

* Updated atlas

* Clean up Uniques

* Object-ify DamageDealt for ease of reference

* code clean up

Co-authored-by: itanasi <spellman23@gmail.com>
2022-07-27 22:16:53 +03:00
alexban011
8047278d80
Add Notifications Log (#7122) 2022-06-25 13:40:42 +02:00
OptimizedForDensity
c922f134e6
Moddable game speeds (#6856)
* Move GameSpeed definition to JSON files

* Add game speeds civilopedia page
2022-06-18 23:27:46 +02: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
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
SomeTroglodyte
345ca0ec25
Pedia from mainmenu (#6788)
* Make Civilopedia independent of worldScreen or gameInfo

* Make Civilopedia callable from Main Menu

* Era category for Civilopedia

* Era category for Civilopedia - atlas
2022-05-13 12:36:06 +03:00
SomeTroglodyte
7526114281
Empire overview resources (#6442)
* Empire Overview Resources: Vertical option

* Empire Overview Resources: Extra Info

* Empire Overview Resources: Tweaks

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2022-03-28 17:31:19 +03:00
Yair Morgenstern
13f052878b Merged all arrow images into one
Removed unnecessary filterNotNull from getTileBaseImageLocation
2022-02-09 16:59:05 +02:00
will-ca
1a8a86cb2c
Unify and improve moddability of more tile-based images. (#5873) 2021-12-29 18:21:34 +02:00
SimonCeder
010931ca42
Bombard notification (#5637)
* add notification when able to bombard

* harmonize with enemy unit notification

* use city.range
2021-11-04 18:36:50 +02:00
Arthur van der Staaij
df39dfd2a8
Fixed the visual gaps in territory borders (#5446)
* Implemented left/right-concave border segments

* Fixed ConvexConcave border image

It was flipped horizontally.

* Implemented border left/right-concave detection

* Moved border images into their own directory

They're not really icons, after all.

* Cleaned up code a bit and added some more comments

* Applied requested change and consistified some function names

* Removed the old border images

I was sure I already did this, but apparently not.
2021-10-11 09:23:28 +03:00
SomeTroglodyte
7bbcb8db1a
Mayas (#5408)
* The Maya - data and calendar

* The Maya - completed

* The Maya - notifications

* The Maya - favoredReligion

* The Maya - comments in GreatPersonManager

* The Maya - clickable notifications

* The Maya - templates

* The Maya - atlas

* The Maya - patch1
2021-10-09 20:45:59 +03:00
SomeTroglodyte
fb30a76e85
Civilopedia category icons and keyboard navigation (#5341)
* Civilopedia category icons and keyboard navigation

* Civilopedia category icons - white alternative
2021-09-29 17:39:02 +03:00
SomeTroglodyte
e9e0f2c55f
World and Natural Wonders Overview (#5297)
* World and Natural Wonders Overview

* World and Natural Wonders Overview - icon

* World and Natural Wonders Overview - groups and tuning

* World and Natural Wonders Overview - atlas

* World and Natural Wonders Overview - lint
2021-09-24 10:04:30 +03:00
SomeTroglodyte
4a83bed4ba
Nation Picker visual help where to click (#5287)
* Nation Picker visual help where to click

* Nation Picker visual help where to click - circles
2021-09-23 11:23:40 +03:00
SomeTroglodyte
0e88ca978b
Oversized speaker (#5243)
* More modestly sized Sound Tab icon on the Options Screen

* More modestly sized Sound Tab icon on the Options Screen - atlas
2021-09-17 01:05:58 +03:00
SomeTroglodyte
340bedc7ea
Implemented Unit Supply by r3versi, not by me (#5234)
* Implemented Unit Supply

Unit Supply is a soft cap to number of units. If the number of units of a civilization exceeds the total supply, a production malus (capped at 70%) is applied.

* Warning icon & message for supply deficit

* Implemented Unit Supply - atlas merge

* Unit Supply: Malus->Penalty, lint, sumOf

* Unit Supply: Fresh atlas

Co-authored-by: r3versi <fluo392@gmail.com>
2021-09-16 22:50:49 +03:00
SomeTroglodyte
5fd04f6e32
Modmanager sort and filter (#5186)
* Mod manager portrait mode

* Mod manager portrait and auto scroll

- MM switches to stacked expanders in portrait.
- Use AutoScrollPanes.
- Disable the enter/leave listener of AutoScrollPane in Pickers which disable the default ScrollPane to roll their own - helps all such pickers.
- No expander open/close persistence on purpose.
- PickerScreen a bit cleaned 'cuz I needed to understand something.
- Marked mods from the kill-list that are already installed.
- Button sync now OK when counterpart missing (deselects other column).

* Mod Manager sorts and filters - WIP 1

* Mod Manager sorts and filters - WIP 2

* Mod Manager sorts and filters - WIP 2a

* Mod Manager sorts and filters - WIP 3

* Mod Manager sorts and filters - atlas

* Mod Manager sorts and filters - tip
2021-09-16 20:54:47 +03:00
SimonCeder
cbd3c2910e
Icons for city states (#5160)
* Add city state icons

* Add the icons

* Get filename from cityStateType.name

* less padding

* Icon names in enum, icons in diplomacy screen
2021-09-09 21:28:30 +03:00
SomeTroglodyte
6bc58ab5a3
Tabbed options (#5081)
* Tabbed Options Screen

* Tabbed Options Screen - atlas
2021-09-04 21:30:39 +03:00
Xander Lenstra
9575b5bf66
Implemented renaming of religions (#5057)
* Implemented renaming of religions

* Made AskForText display error on invalid input, implemented recommended changes

* Almost forgot the translatable strings in the new popup
2021-09-02 17:40:10 +03:00
Xander Lenstra
89ea30af95
Implemented Inquisitors (#4909)
* Added inquisitor unit including image

* Inquisitor now blocks spreading of religions

* Added 'remove heresy' action

* Fixed tests

* Reworded remove heresy unique, updated sprites

* Fix Crash

* Implemented requested changes & fixed a few minor bugs

* Implemented requested changes
2021-08-23 20:26:37 +03:00
SomeTroglodyte
636b58d43c
Reduce atlas - The Huns was 4x larger than the other nations, and a dirty Hexagon dupe (#4689) 2021-07-31 23:56:55 +03:00
Xander Lenstra
85f4840e35
Hide lesser used action buttons to free up space (#4580)
* You can now use 'h' to fortify/sleep until healed

* Hide lesser used unit actions by default

* Refactored worker actions into automate & build improvements

* Added missing translation lines

* Fixed translations
2021-07-21 10:43:55 +03:00
SimonCeder
118c1fc888
Unit gifting (#4557)
* wonder splash screens

* wonder splash screens atlas

* reset to master

* add basic gifting to city states and major civs

* actual gifting of the unit

* add gift icon to atlas

* adjust relationship decay

* add strings to jsons

* AI and player return same object
2021-07-19 00:30:10 +03:00
SomeTroglodyte
c42561c545
Spruced up Civilopedia - phase 4 - Visual candy, Units (#4350)
* Spruced up Civilopedia - phase 4 - Visual candy, Units

* Unified separators, CheckBox helper - patch2

* Unified separators, CheckBox helper - atlas merge

* Spruced up Civilopedia - phase 4 - rebuild atlas

* Spruced up Civilopedia - phase 4 - rebuild atlas

* Spruced up Civilopedia - phase 4 - do separator to-do
2021-07-05 16:35:41 +03:00
Federico Luongo
5e1803c40a
FIX: unintended code slipped through (#4143) 2021-06-14 22:44:09 +03:00
Federico Luongo
5f66c57de5
Proposal for New borders (#4124)
* new-borders

* New Borders
2021-06-13 21:56:47 +03:00
lishaoxia1985
7e284f998b
Redraw skin Images, edit skin load method (#4080) 2021-06-10 23:10:13 +03:00
Arthur van der Staaij
a7afc0718c
Unit swapping (#4049)
* Added an icon for unit swapping

* Implemented unit swapping

In the original Civ V, unit swapping is a supported mechanic.
If you try to move a unit to a tile with another of your units, and both
units have enough movement points left to reach the other's tile, they
will swap places. They will consume only the movement points needed to
reach the other's tile in this way.

This change implements unit swapping for Unciv.

To prevent all kinds of problems from arising with automatic unit
movement, unit swapping can only be done explicitly. This also means
that it can only be done if the unit-swap movement is possible in a
single turn. It is however not limited to adjacent units.

Because Unciv supports mobile devices, there is in general no separation
between a unit-selection click and a movement click. Clicking on another
unit while a unit is selected simply selects that other unit. Because we
do not want to make it more difficult to select other units in this way,
unit swapping is implemented as a separate "movement mode": to toggle
this mode on or off, the new unit action "Swap units" must be used.
Newly selected units still always start in the normal movement mode.

In the unit-swap movement mode, the possible swap tiles are highlighted
instead of the possible movement and attack tiles. Clicking on a
highlighted tile will display a swap button, similar to the movement
button, or instantly perform the swap if single-click-movement is
enabled. This new behavior overrides the selection of the unit on the
target tile: if the user wants to select the unit instead, they have to
exit the unit-swapping mode first.

The swapping code is robust, it can even handle swaps that involve a
paradrop!

An option to always swap-move when an eligible tile is clicked instead
of requiring the unit-swapping mode, similar to the existing
single-click-movement option, could perhaps be added in later.

* Added some comments to existing movement functions

* Fixed a silly mistake

Fixed a silly mistake which caused the unit-swapping eligibility
detection to sometimes remove units from the world.

* Removed some unneeded code

* Fixed movement buttons not showing with world wrap

Fixed a bug where the "move here" and "swap with" buttons would only
show on the leftmost copy of the world when world wrap was enabled.

* Made the swap action only display if usable

Made the unit swapping button only display if there is at least one
possible swap movement.
2021-06-06 22:56:25 +03:00
Yair Morgenstern
d7941924be Better camera square 2021-05-28 14:53:21 +03:00