Stian Grenborgen
4de0391900
The AI is now able to buy units in Europe (without cheating). This was previously supported in FreeCol, but seem to have been removed in 2012.
2022-12-27 14:28:22 +01:00
Stian Grenborgen
b527eac6ac
Stops the AI from deliberatly transporting less than 100 goods.
2022-12-27 12:47:04 +01:00
Stian Grenborgen
da6ae1ebf3
Fixes a bug that prevents the AI from exporting goods. The bug happens when the number of goods to be exported is larger than the capacity of the ship. For example, when having 300 rum in a colony and trying to transport it with a caravel.
2022-12-27 11:45:01 +01:00
Stian Grenborgen
bf12558d5a
Stop wasting resources exporting lumber.
2022-12-27 11:20:20 +01:00
Stian Grenborgen
9cda2c6032
BR#3313 is fixed by closing open file descriptors after use.
2022-12-25 11:46:27 +01:00
Stian Grenborgen
efbb217825
The AI now avoids having regular colonists as defenders. This gets rid of having loads of colonists just standing outside of the colony doing nothing.
2022-12-23 14:17:49 +01:00
Stian Grenborgen
0fc1b6ebf6
This fixes unattended production so that it matches the original game on viceroy difficulty.
2022-12-11 14:57:35 +01:00
Stian Grenborgen
d20dedb592
Fixes colony tile production so that the values matches the classic.
2022-12-11 09:46:47 +01:00
Stian Grenborgen
e211325a73
Allows a scope check to be applied to a unit-change-type.
2022-10-10 21:40:05 +02:00
Stian Grenborgen
083b581a21
Allows clear speciality to be called even when a unit cannot be assigned a role.
2022-10-10 21:38:50 +02:00
Stian Grenborgen
47fb2cc774
BuildingType.getPotentialProduction now gives the same number as the actual production.
2022-10-10 21:38:07 +02:00
David lewis
f3879543cb
Conditionals should have braces. This isn't Python
2022-09-21 10:19:35 -07:00
David lewis
826cad5d9e
[BR-164] Add Treasure trains to the cargo report
...
* [BR-164](https://sourceforge.net/p/freecol/ideas-for-freecol/164/ ): #164 List treasure chests somewhere.
2022-09-20 14:40:49 -07:00
Stian Grenborgen
447a33870f
This fixes a bug occuring when a mod replaces an image that is used for more than one mapping. The bug caused an image overridden by a mod to sometimes revert back to the original image (depending on zoom level and pure chance).
2022-09-20 21:04:49 +02:00
Stian Grenborgen
0a063c595f
The ActionManager should be called on the EDT.
2022-09-20 21:04:49 +02:00
Stian Grenborgen
3bdda582bd
Creates calculator classes replacing the functionality previously in ColonyTile and Building.
...
* Production output can now reliably be tested without having built a Colony. This will be used by the new AI Colony Management code.
* Fixes several differences/bugs that occured because of code duplication.
2022-09-20 21:04:49 +02:00
Stian Grenborgen
37f141ae9a
Texture2Tile now produces an alternate result where the texture is rotated 45 degrees.
2022-09-18 16:05:47 +02:00
Stian Grenborgen
1eb4979b3f
Adding support for recruiting nation specific units in Europe.
2022-09-17 18:43:49 +02:00
Stian Grenborgen
bb21d54e4c
Reverts default escape behaviour from commit 9f1cf3a
. The default behaviour was wrong in many cases -- especially when closing the MainPanel, NewPanel and StartGamePanel, since the result is no panel being open (and the player is forced to use ALT+F4 to exit the game). I have explicitly added escape handling for the FreeCol panels (but not for the dialogs).
2022-09-17 16:17:10 +02:00
Stian Grenborgen
fe60a38de5
This fixes automatic generation of specification documentation. Resource URI keys are now supported. Location of the resource directory has been updated.
2022-09-17 09:31:48 +02:00
Stian Grenborgen
dd2094cae1
Adding support for buying nation specific units in Europe.
2022-09-17 08:55:29 +02:00
Stian Grenborgen
9f1e47af60
Adding methods for getting raw materials that are either used for making storable or unstorable building materials.
2022-09-17 08:52:53 +02:00
Stian Grenborgen
0cf011a4f3
Updates the documentation with the 2GB memory requirement.
2022-09-14 21:55:23 +02:00
Stian Grenborgen
90e4df323e
Handles uncaught errors (OutOfMemoryError, StackOverflowError etc) by freeing memory, showing an error message and force quit.
2022-09-14 20:15:11 +02:00
Stian Grenborgen
eabb0ea56b
Increase required memory and exit on uncaught *Error.
2022-09-14 20:15:11 +02:00
Mike Pope
fcd04a5ba5
Apply pre-build production at end of turn, BR#3261.
2022-09-14 17:00:59 +09:30
Stian Grenborgen
2bdcec888d
Fixes a bug causing modifiers not to be written when generating XML.
...
* Expert farmers and fishermen will now get the additional production bonus as they should.
* This fixes the issue with different production in the server and the client (that occured unless the server is loaded from a savegame).
The bug was introduced July, 27th 2013 -- so it has been in the code for a while.
2022-09-14 07:43:40 +02:00
Mike Pope
75940a99f7
Drop warning, no regression seen for old bug for some time.
2022-09-13 10:58:06 +09:30
Mike Pope
dccab2ee3e
Disable accept button when trade conditions change.
2022-09-09 10:21:58 +09:30
Mike Pope
e53fa8b24d
Drop trace.
2022-09-08 13:52:26 +09:30
Mike Pope
543cfbfa57
Use country label more widely, BR#3288.
2022-09-07 20:31:38 +09:30
Mike Pope
2f8ce717d1
Drop another autosave trace.
2022-09-07 17:07:56 +09:30
Mike Pope
65363a3760
Prevent NPE with old game load.
2022-09-07 16:50:17 +09:30
Mike Pope
e6a977df81
Another event thread fix.
2022-09-07 16:40:11 +09:30
Mike Pope
ab12298d0f
Another event thread fix.
2022-09-07 16:15:18 +09:30
Mike Pope
49c2a6282b
Revert getLongThreadID use, its not present in Java 11.
2022-09-06 19:57:46 +09:30
Mike Pope
6f399d438f
Bad message label, BR#3295.
2022-09-05 22:35:55 +09:30
Mike Pope
bdab6f49a6
Drop trace for autosave bug.
2022-09-05 21:30:47 +09:30
Mike Pope
e63ce19701
Prevent autosave-in-autosave, BR#3276.
2022-09-05 21:22:57 +09:30
Mike Pope
aca9e63c20
Try to improve unit repair location, BR#3271.
2022-09-05 20:29:00 +09:30
Mike Pope
26aaa7224a
Add a helper for the RebelToolTip that correctly finds the next/50%/100% bonus turn numbers, BR#3217.
2022-09-05 20:10:57 +09:30
Mike Pope
0185cc5a4a
Untangle the SoL/Tories mess.
2022-09-05 19:38:52 +09:30
Mike Pope
9f1cf3a632
Escape breaks out of FreeColPanels, BR#3035.
2022-09-04 20:09:53 +09:30
Mike Pope
41e2109f8b
setCancelComponent was a noop, removed.
2022-09-04 19:23:34 +09:30
Mike Pope
18810e5aad
Fix deprecation warning.
2022-09-04 15:24:00 +09:30
Stian Grenborgen
ce7d92d69e
Reduces the focus switching when animating enemy units. We now only scroll back to the original focus if there was an active unit selected.
2022-09-03 11:18:06 +02:00
Stian Grenborgen
84c3b6c417
Fixes two issues with the trade route panel (BR##3259). Goods types are no longer removed from the list of all goods types when adding it to a stop. It's now possible to add the same goods type multiple times to the same stop.
2022-09-02 17:49:32 +02:00
Stian Grenborgen
f6fc09a823
Fixes BR#3281 - endless loop with errors.
2022-08-29 19:29:23 +02:00
Stian Grenborgen
7e3990ef6d
Improves AI colony development and expansion.
...
This change has been tested with five games with 300 AI-only turns each. The simple fix was simply stop making tools in every colony. Prior to this commit, tools was prioritized above hammers (slowing down the construction of buildings) and even made elder statesmen work in the fields instead of producing liberty bells.
There are still lots of silly decisions, but these decisions are more complicated to fix -- and will therefor have to wait for the AI colony management rewrite.
2022-08-28 08:51:29 +02:00
Stian Grenborgen
34e610f426
Adds a method for checking if a raw material is used for an unstorable building material. This can be used for prioritizing hammers higher than tools.
2022-08-28 08:51:29 +02:00
Stian Grenborgen
6b09ae9e2e
The AI can now build docks. This commit fixes a bug where only autoproduction was considered when calculating the potential production of a tile. This prevented docks from being built since ocean tiles have no autoproduction. The production with the best expert is now used instead of the autoproduction. This will also give higher priority to production where the experts enhances bonuses.
2022-08-28 08:51:29 +02:00
Stian Grenborgen
ae212f5ba2
Fixes BR#3282 by allowing unit graphics to extend above the tile it is on.
2022-08-23 20:05:50 +02:00
Stian Grenborgen
4aed94381f
Fixes to the new end-of-turn behaviour (units with moves left after goto-orders aborts end-of-turn).
...
* Return to normal next-unit-handling when end-of-turn has been aborted.
* All waiting units are now skipped when ending the turn. This prevents these units from having to be handled again if the end turn is aborted.
2022-08-22 18:19:12 +02:00
Stian Grenborgen
d325f761ce
Allows the buffers to be updated without repainting. This reduces the time to redraw the map while scrolling diagonally.
2022-08-21 21:11:55 +02:00
Stian Grenborgen
7d890b1fa7
Allows the game to continue when an AI fail with an unhandled exception.
2022-08-21 14:41:54 +02:00
Stian Grenborgen
3636a7d445
The native AI no longer crashes the game when all settlements have been eliminated.
2022-08-21 14:10:26 +02:00
Stian Grenborgen
3ceb2e4ef1
Fixes BR#3277 - game hangs after end of turn.
2022-08-21 12:57:43 +02:00
Stian Grenborgen
165051da85
Moves the handling of autoscrolling to a separate class. Additional fixes:
...
* Allows autoscrolling to be performed properly in the upper left corner (ie handling of mouse motion events over the menu items).
* Scales the scroll area according to the UI scaling factor.
2022-08-21 12:57:43 +02:00
Stian Grenborgen
06e70d9c9b
Accelerator keys can now be loadedf. The solution is using read instead of merge since the former supports dynamically generated options (like FreeColAction), while the latter requires all options to be present in the option file.
2022-08-14 19:41:12 +02:00
Stian Grenborgen
1d3560a313
The keyboard accelerator preferences are not scaled according to the font size.
2022-08-14 18:01:12 +02:00
Stian Grenborgen
74e676938e
Adding a new debug option for debugging the rendering code. When active, a red rectangle is drawn above all dirty areas being redrawn. The same flag is also used for displaying frame rates etc.
2022-08-14 16:55:27 +02:00
Stian Grenborgen
b831f2abb6
Fixes a bug giving full repaints when scrolling right or down. This was caused by a union with an empty dirty rectangle ... that suprisingly sets x and y to zero.
2022-08-14 16:37:39 +02:00
Stian Grenborgen
970ee9d51f
Updating the version number for development.
2022-08-14 15:24:08 +02:00
Stian Grenborgen
485dde01e7
The AI now chooses to build colonies in better locations.
...
* Tiles where there are many nearby enemy units are no longer prioritized (!) as a location to build a colony.
* We heavily prioritize building colonies with distance 3 between each other. This is the closest distance you can have without getting an overlap.
2022-08-14 11:19:09 +02:00
Stian Grenborgen
de6b1dfea4
Increasing buffer size to ensure smooth playback of audio.
2022-08-14 10:47:25 +02:00
Stian Grenborgen
6025d5c679
Fixes an issue where a circleiterator with radius 0 still returned a tile.
2022-08-14 09:22:57 +02:00
Stian Grenborgen
cc4254b397
Reintroducing separate volume sliders for music and sound effects.
2022-08-13 11:28:03 +02:00
Stian Grenborgen
af91ecbba0
Adding Misiulo's nation specific graphics for settlements. Part 1: Settlements without fortifications.
2022-08-11 20:33:53 +02:00
Mike Pope
cf9d2332b5
Quash NPE in addNewUnitToTile.
2022-07-30 14:33:20 +09:30
Stian Grenborgen
40cbdc4b81
Removes the shadow around the colony panel when playing on low resolution. This allows the buttons on the colony panel to be displayed properly when having only a 768px height window.
2022-07-09 10:39:41 +02:00
Stian Grenborgen
4b3781fd8d
Fixes scaling of founding father panel in Colopedia.
2022-06-19 16:11:48 +02:00
Stian Grenborgen
35e4409504
This fixes BR#3273 with active unit not changing.
2022-06-19 09:03:58 +02:00
Stian Grenborgen
2d9a45c6f4
The StartGamePanel's initial size is now scaled according to the scale factor. The start game button has been made important (thick border as a call-to-action).
2022-06-19 07:46:09 +02:00
Stian Grenborgen
faafabe6ce
Overrides scaling based on DPI for small screens. This ensures that we have a usable scaled 768px height for panels.
2022-06-18 21:57:34 +02:00
Stian Grenborgen
b70e86eccf
StartGamePanel is now updated for every player when a new player connects or changes nation.
2022-06-18 20:49:05 +02:00
Stian Grenborgen
2f568533ee
This fixes two bugs where disposed units are still selected as an active unit. The first bug is that the unit was explicitly set as the active unit after it disappeared. The second bug was that the active unit was not updated after the current active unit got disposed.
2022-06-18 19:21:11 +02:00
Stian Grenborgen
2ce7e4827e
The panel showing the log file can now be resized properly.
2022-06-18 18:04:33 +02:00
Stian Grenborgen
88beabba3f
Adjusts the position of the chat text.
2022-06-18 17:45:33 +02:00
Stian Grenborgen
a34f43425e
Fixes selection of nation when connecting to a running multiplayer game.
2022-06-18 10:41:56 +02:00
Stian Grenborgen
c28b893007
Uses the standard (straight line) transition if variations have been disabled.
2022-06-16 19:01:19 +02:00
Stian Grenborgen
b9d54db845
The cursor now changes when the terrain is selected instead of a unit.
2022-06-16 18:07:45 +02:00
Stian Grenborgen
25d79e390e
Adding support for having variations of the base transitions. Both sides of the base transition gets the same variation number -- so the transitions does not need to follow a straight line. Please note that no new base transitions have been added with this commit.
2022-06-16 18:07:45 +02:00
Stian Grenborgen
70b3e9e6e7
Re-adds the main panel if client options are changed. This makes any display scaling / font size change take immediate effect.
2022-06-15 18:28:54 +02:00
Stian Grenborgen
f71b2e43dc
Fixes an issue where changing the active unit on a tile does not result in a repaint.
2022-06-15 18:23:16 +02:00
Stian Grenborgen
a1d0ae39e0
Fixes sizing of object images (displayed in information panel etc).
2022-06-15 18:14:42 +02:00
Stian Grenborgen
b6d7f96aa6
Layout unit buttons in two rows if they doesn't fit on one row.
2022-06-15 17:02:59 +02:00
Stian Grenborgen
a7ec6c84e8
Fixes the initial value of the minimap's toggle buttons. This prevents the old behaviour where you needed to double click the button if the initial value was not political/fog-on.
2022-06-15 16:53:24 +02:00
Stian Grenborgen
8ba2309d6f
Adds a higher resolution image of the menu border. The menu border's size is now determined using the scale.
2022-06-15 16:50:16 +02:00
Stian Grenborgen
f81e3fc57c
Improves skin-support for InfoPanel and Minimap ... and adds new skins for them both.
...
* New skins for the info panel and the minimap.
* Draws the minimap skin on top of the minimap.
* Adds support for string properties with nested properties in order to support easy skin-definitions as one overridable property.
* Placement and sizes for the components on the minimap and infopanel can now be defined using resources.properties.
2022-06-15 16:06:08 +02:00
Stian Grenborgen
4742528011
Fixes problem with missing transition rendering in the colony panel.
2022-06-15 08:53:28 +02:00
Stian Grenborgen
71843b5240
Base transition corners and river animations are now activated on "Normal" graphics quality instead of "High" and "Highest".
2022-06-12 12:50:38 +02:00
Stian Grenborgen
7c269f8235
River deltas are now animated using the standard water animation. The river delta animation could be greatly improved by making a separate animation with directional water flow -- but I'm not prioritizing that now.
2022-06-12 11:41:20 +02:00
Stian Grenborgen
58105480c8
The river mouth graphics is no longer drawn on unexplored tiles.
2022-06-11 20:49:02 +02:00
Mike Pope
c2e76eeff8
Prevent NPE if trying to set a playlist with sound turned off.
2022-06-11 13:52:43 +09:30
Stian Grenborgen
5051012f2c
The unit selection cursor is now drawn on top of everything. This solution is a lot faster than the previous solution where the tile (and neighouring tiles) needed to be redrawn in the buffer. We should replace the cursor graphics with something prettier though.
2022-06-10 18:14:24 +02:00
Stian Grenborgen
2f41e9a35f
Adds code for animating the river.
2022-06-10 16:49:42 +02:00
Stian Grenborgen
3ff851e839
Fixes problem with rivers not connecting smoothly.
2022-06-10 16:43:23 +02:00
Stian Grenborgen
1b949b61fa
Reduces visibility of methods that no longer needs to be public.
2022-06-09 20:14:15 +02:00
Stian Grenborgen
624550eaf4
Moving more image production code from ImageLibrary into the image creators. This includes resource methods only used by a single image creator.
2022-06-09 20:05:51 +02:00
Stian Grenborgen
b6b6225e95
Moving the creation of base tile transition images into a separate class. Adding some more comments explaining the code.
2022-06-09 19:40:08 +02:00
Stian Grenborgen
df843e941c
Making base tile transitions prettier by properly rendering the corner of the tile. The prettier rendering is, for now, not activated by default. Please use graphics quality "High" in the client options if you want to see it.
2022-06-09 18:40:53 +02:00
Stian Grenborgen
88e6070b98
Adding a new client options for selecting the graphics quality. This option will allow us to provide more eye candy for players with sufficiently good systems, while still supporting lower spec-ed computers.
2022-06-09 18:17:29 +02:00
Stian Grenborgen
72daaa0863
Fixes an issue where minor-to-major transitions were drawn in places the style said they should be omitted.
2022-06-06 21:54:56 +02:00
Stian Grenborgen
c08e9a1d58
Fixes an issue where you needed to click on a map icon twice in order to actually select it.
2022-06-06 21:29:21 +02:00
Stian Grenborgen
d0bdf0730b
Adding new river graphics to the game. Rivers are now generated using a background image (pebbles), a water image that can be animated and masks for handling different variations.
2022-06-06 19:32:56 +02:00
Stian Grenborgen
bc24fff0d8
The major river now gets twice the production bonus as the minor river. This is the correct behaviour, and the reason why we have different graphics for minor and major river.
2022-06-06 18:17:44 +02:00
Stian Grenborgen
616c814bb8
Tile improvement magnitude is now kept when using a map. The magnitude is used for determining if a river is minor or major -- and all rivers reverted to being minor before this fix.
2022-06-06 18:14:07 +02:00
Stian Grenborgen
3e3927d0ff
Reintroduces the separation between rules and TC. A different TC can now be loaded using the --tc command line parameter.
2022-05-28 12:02:34 +02:00
Stian Grenborgen
670d5f83ae
Using an icon to show that a mod contains changes to the specification.
2022-05-27 17:41:08 +02:00
Mike Pope
de474502b1
Odd log omission in price variation generation.
2022-05-25 14:55:11 +09:30
Mike Pope
ede264786d
Perhaps clean up github false positive security warnings, BR#3262.
2022-05-23 12:36:37 +09:30
Stian Grenborgen
866e96d251
Do not allow mods with a specification to be reordered, added or removed when a game is running.
2022-05-08 17:09:35 +02:00
Stian Grenborgen
85f61452be
Adds font scaling to the transaction panel in Europe.
2022-05-08 16:17:58 +02:00
Stian Grenborgen
06c811b8a8
Increases thread priority for the audio playing threads in order to avoid stuttering on slow systems.
2022-05-08 15:30:47 +02:00
Stian Grenborgen
50e1c6e997
Adding change missing from the previous commit.
2022-05-08 12:51:36 +02:00
Stian Grenborgen
e31a8c6f4f
Adding compatibility code for setting previewEnabled on the audio volume.
2022-05-08 12:48:55 +02:00
Stian Grenborgen
68ab667bcb
Adds method (to be used later) for checking if a specifion is included in a mod.
2022-05-08 12:30:07 +02:00
Stian Grenborgen
533d7b3f7b
Do not overwrite the client options with values from the savegame -- except for the mods.
2022-05-08 11:27:54 +02:00
Stian Grenborgen
28ccccc9a5
Duplicates are no longer allowed in the mod list.
2022-05-08 09:45:22 +02:00
Stian Grenborgen
b4811ba834
Fixing and commenting out code for adding a label to the EditOptionsDialog. We should consider if a label is needed or not (and if yes, add the missing texts for FreeColMessages.properties.
2022-05-08 09:43:49 +02:00
Mike Pope
2463628b35
Fixed advantages break initial units, BR#5115.
2022-05-08 11:30:38 +09:30
Stian Grenborgen
7590969578
Using the provided Player owner instead of always sending null.
2022-05-07 22:22:54 +02:00
Stian Grenborgen
b59e08beba
Adds a default playlist (without songs right now) that is played when no other specific music is.
2022-05-07 21:54:13 +02:00
Stian Grenborgen
5b7ea5e7b0
Adds support for picking tracks from a playlist when the current track has completed. Fixes an additional old regression preventing volume changes from taking immediate effect.
2022-05-07 21:10:29 +02:00
Stian Grenborgen
732cd19f1d
This restores the preview-functionality for the audio volume option. Changing the volume in the client options now have immediate effect, and any changes are reverted if cancelling the client options. The functionality was removed erroneously in 60e1bb9
with the explanation: "Remove dead code from options and their UIs." way back in 2011.
2022-05-07 21:03:22 +02:00
Stian Grenborgen
a71a0b472c
Fixes selection of audio mixer in the client options.
2022-05-07 12:16:05 +02:00
Stian Grenborgen
66c7307595
This hopefully fixes BR#3250 that prevents the founding father colopedia panel from being displayed properly.
2022-05-07 08:10:08 +02:00
Stian Grenborgen
0473282b69
Fixes BR#3253 by removing cleanup code that is probably not needed.
2022-05-07 08:05:03 +02:00
Stian Grenborgen
94803fe20c
Converting the options dialog to regular panels. Fixing and renaming the button for reverting back to default values in the client options.
2022-05-07 08:01:17 +02:00
Mike Pope
7f027facea
Prevent NPE in tools equip, BR#3256.
2022-05-07 10:34:33 +09:30
Mike Pope
69ec58b69e
Split FreeColAction:275 so we can see where the NPE in BR#3249.
2022-05-04 19:52:05 -05:00
Mike Pope
f5b0996d7d
Finish cleaning up *Was (MarketWas).
2022-05-04 19:52:05 -05:00
Mike Pope
16a8f3e5cd
Git fumble omission from previous.
2022-05-04 19:52:05 -05:00
Mike Pope
809b9294da
Move property change firings to event thread, BR#3248.
2022-05-04 19:52:05 -05:00
Mike Pope
27b963c615
Bump version, at last.
2022-05-01 12:26:47 +09:30
Mike Pope
b306b880b5
Revert overreach with previous Coronado fix.
2022-05-01 12:17:21 +09:30
Mike Pope
faa899670c
Cosmetic javadoc.
2022-05-01 12:13:14 +09:30
Stian Grenborgen
ece80d03ee
Increasing timeout when connecting to the metaserver.
2022-04-30 11:46:45 +02:00
Stian Grenborgen
2027bb10b8
Stops a public server that fails to register with the metaserver.
2022-04-30 11:46:02 +02:00
Stian Grenborgen
4f7f25171d
Fixes multiple issues with connections, multiplayer games and the meta server. Changes:
...
* Network messages expecting a reply now have a timeout (default 30 seconds).
* Fixes issue where multiplayer games only listened on the loopback address (for systems where the hostname resolves to the localhost address).
* It's now possible to specify the binding address when running a multiplayer game. Only IPv4 is supported for now. It's easy to support IPv6, but we need to find a better way of displaying possible addresses first (perhaps using the NIC's name instead of the address?)
* The player gets an error when trying to register a server as public if the server is not connectable.
* Fixes game crash after the LoadingSavegameDialog gets cancelled (happened when a new game got loaded).
* Fixes the LoadingSavegameDialog so that the chosen values are actually used.
* The header now gets the translated title (the message key was wrong).
2022-04-30 11:05:01 +02:00
Stian Grenborgen
04b2c7c2e0
The chat is now drawn properly when the UI is scaled. Fixed a problem causing the UI to freeze.
2022-04-26 17:49:07 +02:00
Mike Pope
333b2c48a5
Cosmetic javadoc.
2022-04-26 13:37:46 +09:30
Mike Pope
4f3e50a833
Tidy up with Coronado.
2022-04-26 11:01:40 +09:30
Mike Pope
880f6cb236
Allow end turn panel to work again.
2022-04-25 15:45:27 +09:30
Mike Pope
cb682cb1dd
Restore reconnect confirmation box.
2022-04-25 15:02:01 +09:30
Mike Pope
a871c56ddb
Reduce random tax raises in line with new data of PF#71.
2022-04-25 13:30:46 +09:30
Stian Grenborgen
cea97dfb2d
Deselect the active unit before ending the turn. This avoids jumping between animated units and the active unit while watching the other players move.
2022-04-24 14:55:26 +02:00
Stian Grenborgen
6c4dee3eda
Quick-and-dirty fix for scaling pure-text tooltips.
2022-04-24 13:56:32 +02:00
Stian Grenborgen
519f694c32
Cancelling the game in the StartGamePanel now works. Previously two NewPanels were opened, and the application freezed if a new game was started.
2022-04-24 13:01:23 +02:00
Mike Pope
fcd1d5c914
Cosmetic javadoc.
2022-04-24 20:06:28 +09:30
Mike Pope
b3c08db7fd
Prevent another event dispatch crash.
2022-04-24 18:57:43 +09:30
Mike Pope
4832bb2532
Oops left trace print in.
2022-04-24 18:51:00 +09:30
Mike Pope
0dffd8793e
Teach scouting AI units to disembark before speaking to the chief, BR#3228,3247.
2022-04-24 18:28:56 +09:30
Stian Grenborgen
b7872e6b5f
Fixes video playback on system without a space in "java.vendor". This is a workaround for a bug in Cortado.
2022-04-24 09:55:33 +02:00
Stian Grenborgen
f7c129738b
Reduces the number of messages that pop up at the same time.
2022-04-24 09:10:55 +02:00
Stian Grenborgen
2e34193e4f
Improves display of maps in map generator options. Adds a button for removing the imported map. Selects a sensible optiongroup when clicking on a generator/map button.
2022-04-24 08:58:38 +02:00
Mike Pope
0353836d7f
Make sure async dialog invocation is in the event dispatch thread.
2022-04-24 16:06:39 +09:30
Mike Pope
260bfb1b2c
Prevent crash in emigration dialog handling.
2022-04-24 15:09:00 +09:30
Mike Pope
c9eedcf155
Again, checkREFDefeat improvements, BR#3246.
2022-04-24 10:33:18 +09:30
Mike Pope
6621e7e089
Bump to java 11.
2022-04-24 09:10:51 +09:30
Stian Grenborgen
01b5a1d1ab
Scales the row height based on the font. Disallows reordering since it produces visual artifacts.
2022-04-23 16:04:36 +02:00
Stian Grenborgen
2e47bab6ce
Allow the start game panel to be resized.
2022-04-23 16:03:53 +02:00
Stian Grenborgen
2cc96709f3
Fixes sorting of tile improvements. Bonus resources are now displayed above the river graphics.
2022-04-23 14:49:30 +02:00
Stian Grenborgen
752845c44f
Resource loading with mods has now been fixed. Resources are reloaded when changing the active mods. Added a debug option for reloading resources from disk (great for testing new ingame graphics).
2022-04-23 13:51:23 +02:00
Stian Grenborgen
368d8518d7
Creating higher resolution versions of the borders, and apply scaling to them. The new borders are still work-in-progress, but good enough (TM).
2022-04-23 10:41:36 +02:00
Stian Grenborgen
47f2fbd763
Avoids NPE when selecting unit type with count 0. Fixes problem where content disappears when the panel gets resized.
2022-04-22 17:31:41 +02:00
Stian Grenborgen
ce57704eff
Makes the main menu unresizable.
2022-04-21 21:00:50 +02:00
Stian Grenborgen
6883a2089e
Fixes rendering and scaling issues on Windows.
2022-04-21 17:55:56 +02:00
Stian Grenborgen
79ea99a460
Fixes scaling of checkbox without requiring a restart.
2022-04-21 07:11:48 +02:00
Stian Grenborgen
cf37ae1669
The tree list in colopedia now scales using the scaleFactor.
2022-04-20 21:04:19 +02:00
Stian Grenborgen
8cbc344f1d
Fixes updating the "modern" settlement label when changing the current buildable.
2022-04-19 19:05:29 +02:00
Stian Grenborgen
73d4d2756d
Fixing bug that prevented maps from being generated in the map editor.
2022-04-18 16:03:59 +02:00
Stian Grenborgen
10c8cae247
Scales the initial size of ColopediaPanel and EuropePanel.
2022-04-18 15:47:43 +02:00
Stian Grenborgen
425943c55c
Minor adjustment of the option display. Stops using the entire height for the detail view when it's not needed.
2022-04-18 11:03:54 +02:00
Stian Grenborgen
062386365f
Fixes several issues with the TradeRouteInputPanel. The panel now works better with scaling, drag&drop works again for the stops and disappearing items (missing refresh) have been fixed.
2022-04-18 10:45:23 +02:00
Stian Grenborgen
4621d4bb8f
Adds an equals method that tests identity since this class extends FreeColGameObject without setting an ID. This class should not extend FreeColGameObject, but I'm postponing fixing this issue.
2022-04-18 10:42:33 +02:00
Stian Grenborgen
7330c7d251
Renders the checkbox with a transparent text background.
2022-04-18 07:59:28 +02:00
Stian Grenborgen
92502c8a8d
Fixes scaling and layout issues for the EndTurnDialog.
2022-04-18 07:48:47 +02:00
Stian Grenborgen
e67db04bac
Improves the look and feel. Makes it easier to create custom borders and backgrounds for the UI. Allows spinners to be styled. Adds a few new borders and background images. Fixes various layout issues. Reduces the default DPI (thereby making autodetected sizes bigger). Adds checkbox styling.
2022-04-17 20:11:40 +02:00
Stian Grenborgen
3b1f4d2b3d
Fixes positioning of modern-type colony label.
2022-04-15 09:52:49 +02:00
Stian Grenborgen
3db60f8017
Adding a split pane to the ColopediaPanel.
2022-04-14 22:47:27 +02:00
Stian Grenborgen
ac65c85e38
Using a light bulb as an icon for concepts in the Colopedia. Source: https://opengameart.org/content/cc0-light-icons
2022-04-14 22:14:58 +02:00
Stian Grenborgen
e875d04ea3
Fixes rescaling of unit buttons when changing the scale in the client options.
2022-04-14 21:55:24 +02:00
Stian Grenborgen
85278301d7
The size of the RebelToolTip is now determined based on the content instead of being hardcoded.
2022-04-14 21:10:38 +02:00
Stian Grenborgen
9503c20439
The chip is now displayed in the correct position when animating a unit.
2022-04-14 17:58:03 +02:00
Stian Grenborgen
b00e256d2c
Adds font scaling throughout the application. Adds split pane to the client options.
2022-04-14 16:49:30 +02:00
Stian Grenborgen
2180c09898
Allowing the build queue panel to be properly resized.
2022-04-14 09:15:21 +02:00
Stian Grenborgen
1d6910dc22
The infomation part of the menu bar now has the correct font size after changing the value in client preferences.
2022-04-14 09:14:42 +02:00
Stian Grenborgen
a3b1523b45
If set manually, the display scaling will be used for scaling the main font unless the main font also has been manually set.
2022-04-14 09:13:27 +02:00
Stian Grenborgen
d27a9fdec9
Allow founding father images to be larger when using higher scale factor. Increasing the size of ReportPanel based on scaleFactor.
2022-04-14 09:08:51 +02:00
Mike Pope
651a3172e1
You can recruit seasoned scouts in Europe, with horses, but not train them, BR#3220.
2022-04-10 12:18:38 +09:30
Stian Grenborgen
b62b90212c
Adding missing action file.
2022-04-04 20:56:50 +02:00
Stian Grenborgen
2c98c90e89
Using refresh since the map might have changed.
2022-04-03 14:31:31 +02:00
Stian Grenborgen
308094354d
Stops hills and mountains from being clipped.
...
* Hills and mountains are now drawn using extended tiles.
* Increases the size of extended tiles to include the tiles below the base tiles we are drawing.
* Removing workaround that is no longer needed.
2022-04-03 11:54:57 +02:00
Stian Grenborgen
1d171d49dd
It's now possible to have fog of war enabled without the fog being displayed. Displaying the fog can be activated using a new menu option. The fog is now by default hidden -- the reason being that rendering fog of war properly is really slow on some systems.
2022-04-03 11:10:08 +02:00
Mike Pope
ea2960addc
Redundant cast removal, from mjunix, GHPR#102.
2022-03-12 19:30:14 +10:30
Mike Pope
436b14f9af
Static warning removal from mjunix, GHPR#101.
2022-03-12 19:16:12 +10:30
Mike Pope
6bddce0e7d
Logger wierdness in River, from mjunix, GHPR#101.
2022-03-12 19:08:49 +10:30
Mike Pope
4b418cd297
Bad change list check, from mjunix, GH#103.
2022-03-12 16:01:27 +10:30
Mike Pope
5c4bafb9d1
Logging weirdness, from mjunix, GH#103.
2022-03-12 16:00:16 +10:30
Mike Pope
56e3d2601b
Typo/missing else, from mjunix, GH#103.
2022-03-12 15:59:16 +10:30
Mike Pope
6ed106411d
The REF surrender condition was borked again, BR#3246.
2022-02-19 18:58:53 +10:30
Mike Pope
b7b6f9a9d4
REF fail, BR#3246.
2022-02-19 18:14:25 +10:30
Mike Pope
2af4455a9b
Tighten getMessageButton.
2022-02-19 17:09:37 +10:30
Mike Pope
16f92bdb2d
Missing message buttons, BR#3231.
2022-02-19 17:01:28 +10:30
Mike Pope
5ec7b1f1f8
Server/client unit confusion in InciteMessage, BR#3237.
2022-02-19 14:50:07 +10:30
Mike Pope
f076add780
Rewrite starting position code, insisting naval carriers start at sea, BR#3244.
2022-02-19 14:34:34 +10:30
Mike Pope
0faeb2898c
Drop info message, the bug it was helping find was fixed a while back.
2022-02-18 19:39:48 +10:30
Mike Pope
b992706eb1
Update gui when tiles change, BR#3238. Yes, hacky.
2022-02-18 17:38:32 +10:30
Mike Pope
3489898b4e
Take extra care over references to unknown owning settlements, BR#3238.
2022-02-17 15:41:09 +10:30
Mike Pope
3be5618f25
Revert colony tile ownership part of fix for BR#3228, it is breaking working of colony tiles.
2022-02-17 15:10:33 +10:30
Mike Pope
956e24c9dd
Prevent and warn of another mystery NPE.
2022-02-10 20:41:45 +10:30
Mike Pope
0d1cc17e97
Wrap showInformationPanel in client IGC.
2022-02-10 20:25:51 +10:30
Mike Pope
4b73e0101d
Wrap changeView in client IGC.
2022-02-10 18:27:01 +10:30
Mike Pope
b56b9c074e
Another debug print fix.
2022-02-10 18:08:24 +10:30
Mike Pope
1dbf3714c1
Add in missing id, its omission breaks location references.
2022-02-10 18:06:01 +10:30
Mike Pope
fcd4d2c6c4
Prevent NPEs when debugging constructors/copyIn.
2022-02-10 16:23:10 +10:30
Mike Pope
736e589f5d
Move updateGUI actions to event thread.
2022-02-10 16:06:05 +10:30
Mike Pope
5528a68656
Move save game popups to event thread.
2022-02-09 20:41:41 +10:30
Mike Pope
99e77fce7e
Move new land event panel into event thread.
2022-02-09 20:28:30 +10:30
Mike Pope
8e832f1a5e
Tile ownership copyIn should not be by reference, BR#3238.
2022-02-09 20:09:48 +10:30
Mike Pope
2f42bf3efa
Why do new colonies not always appear on the map?
2022-02-09 20:07:02 +10:30
Mike Pope
66ae96c719
Warn about care required with UnitLocation.units.
2022-02-09 17:11:12 +10:30
Mike Pope
db061f3344
Correct update of UnitLocation, part of BR#3238.
2022-02-08 20:08:55 +10:30
Mike Pope
1b4500be46
Avoid NPE when debugging.
2022-02-08 20:04:39 +10:30
Mike Pope
f364a0bbb1
guiShowArrived should be guiShowUnitArrived.
2022-01-28 20:35:43 +10:30
Mike Pope
7ad69d2696
Move messages, warehouse and other groups to INTERFACE_GROUP.
2022-01-28 19:57:48 +10:30
Mike Pope
6880aa0a5c
Update ClientOptions backward compatibility for new options and layout.
2022-01-28 14:33:48 +10:30
Mike Pope
94ac5ddb67
Backward compatibility, MAPCONTROLS_GROUP matches client-options.xml.
2022-01-28 14:30:36 +10:30
Mike Pope
b6de361881
Backward compatibility, MAPVIEW_GROUP matches client-options.xml.
2022-01-28 14:15:15 +10:30
Mike Pope
7cb94c3bed
ClientOptions DISPLAY_GROUP matches client-options.xml.
2022-01-28 13:59:23 +10:30
Mike Pope
6953d58f86
Backward compatibility, move LANGUAGE option to PERSONAL_GROUP.
2022-01-28 13:56:44 +10:30
Mike Pope
470a833086
Clean up client options group naming.
2022-01-28 13:42:07 +10:30
Mike Pope
cc9639915a
Backward compatibility for display client option group.
2022-01-28 13:30:44 +10:30
Mike Pope
2f55e3145d
Fix constant for model.option.displayColonyLabels.
2022-01-27 19:36:11 +10:30
Mike Pope
557248bdd2
Quick first cut at option backward compatibility, fixing crash when the scaling option is missing.
2022-01-27 19:24:19 +10:30
Mike Pope
f9e9627777
Rename defaultZoomLevel constant to be consistent.
2022-01-27 19:10:22 +10:30
Mike Pope
3120551e4f
Smooth rendering option is no longer used.
2022-01-27 18:59:39 +10:30
Mike Pope
e66d705a80
Do not display zero production on ColonyTiles, BR#3240.
2022-01-27 18:00:09 +10:30
Stian Grenborgen
81541c93f7
Fixes problem where actions were active when panels are being displayed. This caused the actions to be executed when writing chat messages etc.
2022-01-20 17:46:27 +01:00
Stian Grenborgen
73a3a5e0a7
[ #3239 ] Adds beaches to colony tiles again.
2022-01-20 17:42:11 +01:00
Stian Grenborgen
d64cc7f23b
Stops issuing extra repaints for terrain cursor -- as it is better to repaint together with any other animation.
2022-01-18 17:50:24 +01:00
Stian Grenborgen
9c84553c5e
Closes the main panel before opening it again. This fixes a bug where to main panels are displayed on top of eachother.
2022-01-18 17:50:24 +01:00
Stian Grenborgen
89c6b1ebbf
Adds font scaling, and allows both UI scaling and font size to be changed using the client options.
...
- Determines the DPI of the current screen and sets scaling and font size accordingly.
- Allows the scaling and font size to be overridden by client options.
- IntegerOption can now specify stepSize.
- Options can now be enabled/disabled by a BooleanOption in the same group by specifying a key in "enabledBy".
- Deactivates "sun.java2d.uiScale" so that we can manually manage the scaling ourself on all OSes.
2022-01-18 17:50:24 +01:00
Stian Grenborgen
d6aa1e9cb2
Adds missing update.
2022-01-16 18:40:22 +01:00
Stian Grenborgen
ebcb964cba
The map view is now properly refreshed when units move without animations.
2022-01-16 18:17:29 +01:00
Stian Grenborgen
163bc65446
Adds a utility method for determining the DPI.
2022-01-16 12:21:30 +01:00
Stian Grenborgen
9188781944
Updating the tile bounds in order to support larger images.
2022-01-16 12:12:33 +01:00
Stian Grenborgen
02a5b1cbb1
Fixes multiple issues with the server list / metaserver. These fixes are not backwards compatible. Only new versions will work with the meta server when it's up and running again.
...
- Renames "update", "register" and "remove" to "updateServer", "registerServer" and "removeServer". This is necessary to avoid name collision with UpdateMessage and RemoveMessage which means the meta server messages are sent without content.
- Keep sending keep alive requests to the metaserver so that the server doesn't get removed.
- Fixes reported server state.
- Using the correct host and port number for the server (the metaserver's host and port were reported instead).
2022-01-16 11:00:53 +01:00
Stian Grenborgen
3e3ddddc79
Removes unnecessary calls to refresh. Adding better documentation for repaint and refresh.
2022-01-15 15:37:12 +01:00