Commit Graph

574 Commits (2ed248a61d9b2faf0498d4b06e180777cbf3dc19)

Author SHA1 Message Date
Jonathan G Rennison 2ed248a61d Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/release-linux.yml
#	src/aircraft_cmd.cpp
#	src/airport_gui.cpp
#	src/articulated_vehicles.cpp
#	src/build_vehicle_gui.cpp
#	src/company_gui.cpp
#	src/genworld_gui.cpp
#	src/gfx_layout.cpp
#	src/misc_gui.cpp
#	src/newgrf.cpp
#	src/newgrf_config.h
#	src/newgrf_engine.cpp
#	src/news_gui.cpp
#	src/order_gui.cpp
#	src/roadveh_cmd.cpp
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/ship_cmd.cpp
#	src/statusbar_gui.cpp
#	src/table/settings/network_private_settings.ini
#	src/table/settings/network_settings.ini
#	src/toolbar_gui.cpp
#	src/train_cmd.cpp
#	src/vehicle_gui.cpp
12 months ago
Jonathan G Rennison 02fe4af934 Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/release-windows.yml
#	src/company_base.h
#	src/company_cmd.cpp
#	src/company_gui.cpp
#	src/console_cmds.cpp
#	src/economy.cpp
#	src/economy_cmd.h
#	src/fios.h
#	src/goal.cpp
#	src/group_gui.cpp
#	src/network/core/config.h
#	src/network/network_admin.cpp
#	src/newgrf_config.cpp
#	src/os/windows/win32.cpp
#	src/saveload/afterload.cpp
#	src/saveload/company_sl.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload_error.hpp
#	src/settings_gui.cpp
#	src/ship_cmd.cpp
#	src/stdafx.h
#	src/story.cpp
#	src/story_base.h
#	src/string.cpp
#	src/table/settings/economy_settings.ini
#	src/tests/CMakeLists.txt
#	src/tests/math_func.cpp
12 months ago
Peter Nelson 0880616851 Codechange: Remove various STRING strings. 1 year ago
Peter Nelson 4767641c8c Codechange: Remove various INT strings. 1 year ago
Peter Nelson d5fb9e7dc6 Codechange: Remove various DATE_LONG strings. 1 year ago
Tyler Trahan 6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar (#10753) 1 year ago
Peter Nelson 35ba49bfb4 Change: Rename text colour NWidgetPart to SetTextStyle and add font size.
This allows to set both text colour and size for any widget with default
drawing.
1 year ago
Rubidium ee723f26ba Codechange: Make FileToSaveLoad's title std::string and simplify assignments 1 year ago
Jonathan G Rennison c89079a210 Merge branch 'master' into jgrpp
# Conflicts:
#	src/saveload/cargopacket_sl.cpp
#	src/saveload/saveload.h
#	src/strings.cpp
#	src/vehicle.cpp
1 year ago
Peter Nelson 06b78a7299 Fix: Don't double-pad existing size when adding widget padding.
UpdateWidgetSize's size parameter already includes padding.
1 year ago
Tyler Trahan 2206c73156
Feature: Set a custom number of industries in map generation window (#10340) 1 year ago
Jonathan G Rennison adf2210bc8 Merge branch 'master' into jgrpp
# Conflicts:
#	src/genworld_gui.cpp
#	src/lang/afrikaans.txt
#	src/lang/arabic_egypt.txt
#	src/lang/basque.txt
#	src/lang/belarusian.txt
#	src/lang/brazilian_portuguese.txt
#	src/lang/bulgarian.txt
#	src/lang/catalan.txt
#	src/lang/croatian.txt
#	src/lang/czech.txt
#	src/lang/danish.txt
#	src/lang/dutch.txt
#	src/lang/english.txt
#	src/lang/english_AU.txt
#	src/lang/english_US.txt
#	src/lang/esperanto.txt
#	src/lang/estonian.txt
#	src/lang/faroese.txt
#	src/lang/finnish.txt
#	src/lang/french.txt
#	src/lang/frisian.txt
#	src/lang/gaelic.txt
#	src/lang/galician.txt
#	src/lang/german.txt
#	src/lang/greek.txt
#	src/lang/hebrew.txt
#	src/lang/hungarian.txt
#	src/lang/icelandic.txt
#	src/lang/indonesian.txt
#	src/lang/irish.txt
#	src/lang/italian.txt
#	src/lang/japanese.txt
#	src/lang/korean.txt
#	src/lang/latin.txt
#	src/lang/latvian.txt
#	src/lang/lithuanian.txt
#	src/lang/luxembourgish.txt
#	src/lang/malay.txt
#	src/lang/norwegian_bokmal.txt
#	src/lang/norwegian_nynorsk.txt
#	src/lang/persian.txt
#	src/lang/polish.txt
#	src/lang/portuguese.txt
#	src/lang/romanian.txt
#	src/lang/russian.txt
#	src/lang/serbian.txt
#	src/lang/simplified_chinese.txt
#	src/lang/slovak.txt
#	src/lang/slovenian.txt
#	src/lang/spanish.txt
#	src/lang/spanish_MX.txt
#	src/lang/swedish.txt
#	src/lang/tamil.txt
#	src/lang/thai.txt
#	src/lang/traditional_chinese.txt
#	src/lang/turkish.txt
#	src/lang/ukrainian.txt
#	src/lang/vietnamese.txt
#	src/lang/welsh.txt
#	src/saveload/afterload.cpp
1 year ago
Tyler Trahan 5a2907a99f
Change: Remove land generator setting from World Generation GUI (#10093) 1 year ago
Jonathan G Rennison 6d4474b84e Merge tag '13.0-beta2' into jgrpp
# Conflicts:
#	src/cheat_gui.cpp
#	src/company_gui.cpp
#	src/console_gui.cpp
#	src/depot_gui.cpp
#	src/error_gui.cpp
#	src/gfx.cpp
#	src/graph_gui.cpp
#	src/group_gui.cpp
#	src/lang/english.txt
#	src/lang/korean.txt
#	src/lang/polish.txt
#	src/misc_gui.cpp
#	src/network/network_content_gui.h
#	src/newgrf_debug_gui.cpp
#	src/order_gui.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/station_gui.cpp
#	src/subsidy_gui.cpp
#	src/table/settings/gui_settings.ini
#	src/timetable_gui.cpp
#	src/town_gui.cpp
#	src/train_cmd.cpp
#	src/vehicle_gui.cpp
#	src/viewport.cpp
#	src/water_cmd.cpp
#	src/widgets/dropdown.cpp
#	src/window_gui.h
1 year ago
Jonathan G Rennison 02e19521bc Merge branch 'master' into jgrpp
# Conflicts:
#	src/build_vehicle_gui.cpp
#	src/cheat_gui.cpp
#	src/company_gui.cpp
#	src/error_gui.cpp
#	src/fios_gui.cpp
#	src/gfx_func.h
#	src/graph_gui.cpp
#	src/group_gui.cpp
#	src/misc_gui.cpp
#	src/newgrf_debug_gui.cpp
#	src/order_gui.cpp
#	src/road_gui.cpp
#	src/roadveh_gui.cpp
#	src/settings_gui.cpp
#	src/ship_gui.cpp
#	src/station_gui.cpp
#	src/statusbar_gui.cpp
#	src/subsidy_gui.cpp
#	src/timetable_gui.cpp
#	src/town_gui.cpp
#	src/train_gui.cpp
#	src/tree_gui.cpp
#	src/vehicle_gui.cpp
#	src/widget.cpp
#	src/widgets/dropdown.cpp
#	src/window_gui.h
1 year ago
Jonathan G Rennison 1f36c3f3e4 Merge branch 'master' into jgrpp
# Conflicts:
#	src/ai/ai_gui.cpp
#	src/build_vehicle_gui.cpp
#	src/genworld_gui.cpp
#	src/lang/english.txt
#	src/lang/german.txt
#	src/lang/korean.txt
#	src/newgrf_sound.cpp
#	src/roadveh.h
#	src/sound.cpp
#	src/station_cmd.cpp
#	src/train.h
#	src/train_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehicle_gui.cpp
2 years ago
Peter Nelson ecb5393c55 Change: Standardize progress bar layout.
Progress bars are drawn differently depending on when it was added, with
different layouts and sizes.

This change adds a standard padding size to use, and makes all progress
bars visually similar, with scaled padding.
2 years ago
Peter Nelson 890b2666d3 Change: Use scaled WidgetDimensions. 2 years ago
Peter Nelson b6ed595176 Codechange: Prefer suggested widget padding. 2 years ago
Peter Nelson 6f95e04005 Change: Use Rect helpers for widget drawing.
This replaces repetitive and sometimes unwieldy use of constants.
2 years ago
Artin Alavi cbac243216
Feature: [UI] Split AI/Game Script configuration windows and add them to world gen window (#10058) 2 years ago
Jonathan G Rennison 3b7352132b Merge branch 'master' into jgrpp
# Conflicts:
#	src/company_cmd.cpp
#	src/console_cmds.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/screenshot.cpp
#	src/settings_gui.cp
2 years ago
Tyler Trahan 62a15734fe Codechange: Rename mapgen Sea Level string 2 years ago
Jonathan G Rennison 6459e62fff Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/english.txt
#	src/map_type.h
#	src/network/network_command.cpp
#	src/object_cmd.cpp
#	src/rail_cmd.cpp
#	src/road_cmd.cpp
#	src/road_func.h
#	src/saveload/afterload.cpp
#	src/saveload/saveload.h
#	src/settings_gui.cpp
#	src/string.cpp
#	src/table/road_land.h
#	src/table/settings/game_settings.ini
#	src/table/settings/world_settings.ini
#	src/tbtr_template_gui_main.h
#	src/train_cmd.cpp
2 years ago
Rubidium d5aafaee15 Codechange: rename and move some strings to make them more consistent with the rest of the strings 2 years ago
Jonathan G Rennison 0a9c44d1a2 Merge branch 'master' into jgrpp
# Conflicts:
#	src/airport_gui.cpp
#	src/blitter/32bpp_anim_sse4.cpp
#	src/console_cmds.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/newgrf_object.h
#	src/road_gui.cpp
#	src/widgets/road_widget.h
#	src/window.cpp
2 years ago
Peter Nelson dc1b84aa1e Cleanup: Text widgets are capable of drawing text without assistance.
Remove custom text drawing of some widgets in favour of standard text
widgets.
2 years ago
Peter Nelson fc944829e1 Change: Don't use zero-sized plane for World Generation window.
Use of zero-sized plane causes the window size calculation to change
depending on which plane is displayed. Instead use an empty plane so
that largest of the planes is taken into account for sizing.
2 years ago
Jonathan G Rennison b69521ea87 Allow specifying a custom number of industries in map generation window 2 years ago
Jonathan G Rennison 0b0d154788 Merge branch 'master' into jgrpp-beta
# Conflicts:
#	.github/workflows/ci-build.yml
#	src/lang/german.txt
#	src/lang/romanian.txt
#	src/lang/slovak.txt
#	src/lang/turkish.txt
#	src/network/core/address.cpp
#	src/network/core/tcp.h
#	src/network/core/udp.cpp
#	src/network/network.cpp
#	src/network/network_client.cpp
#	src/network/network_server.cpp
#	src/network/network_server.h
#	src/network/network_udp.cpp
#	src/openttd.cpp
#	src/saveload/newgrf_sl.cpp
#	src/tree_cmd.cpp
#	src/video/video_driver.hpp
#	src/window.cpp
#	src/window_gui.h
3 years ago
Andreas Schmitt 150e502cf9 Add generation of public roads linking towns 3 years ago
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 3 years ago
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 3 years ago
Patric Stout b136e65cf9
Change: reworked the debug levels for network facility (#9251)
It now follows very simple rules:
0 - Fatal, user should know about this
1 - Error, but we are recovering
2 - Warning, wrong but okay if you don't know
3 - Info, information you might care about
4 -
5 - Debug #1 - High level debug messages
6 - Debug #2 - Low level debug messages
7 - Trace information
3 years ago
Jonathan G Rennison f39b6f4ba3 Merge branch 'master' into jgrpp
# Conflicts:
#	src/cheat_gui.cpp
#	src/genworld_gui.cpp
#	src/landscape.cpp
#	src/lang/english.txt
#	src/saveload/afterload.cpp
#	src/screenshot.cpp
#	src/settings_gui.cpp
#	src/settings_internal.h
#	src/settings_type.h
#	src/table/settings.ini
#	src/tile_type.h
#	src/widgets/genworld_widget.h
3 years ago
Jonathan G Rennison 2e6dbfee05 Merge branch 'master' into jgrpp 3 years ago
Jonathan G Rennison 5e14b54a0c Merge branch 'master' into jgrpp 3 years ago
reldred 213b6fe6ef Add PR #231: More river configuration options 3 years ago
Patric Stout f05e2e0d40 Feature: allow setting a custom terrain type to define highest peak
At least, TGP will try to reach it. It heavily depends on the map
if it is reachable at all. But for sure it will do its atmost to
get there!
3 years ago
Patric Stout 45c2c29c35 Add: allow setting the highest mountain for heightmaps
It will add some slack to the map height limit if that was set
to auto.
3 years ago
Patric Stout 422e132845 Feature: auto-detect map height limit based on generated map
This opens up the true power of the TGP terrain generator, as it
is no longer constrainted by an arbitrary low map height limit,
especially for extreme terrain types.

In other words: on a 1kx1k map with "Alpinist" terrain type, the
map is now really hilly with default settings.

People can still manually limit the map height if they so wish,
and after the terrain generation the limit is stored in the
savegame as if the user set it.

Cheats still allow you to change this value.
3 years ago
Patric Stout 1a1049bc0d Change: rename setting "max_heightlevel" to "map_height_limit"
This better reflects what it is, and hopefully removes a bit of
the confusion people are having what this setting actually does.

Additionally, update the text on the setting to better inform
users what it is doing exactly, so they can make an educated
decision on how to change it.

Next commit will introduce an "auto" value, which should be the
new default. The rename has as added benefit that everyone will
start out on the "auto" value.
3 years ago
Patric Stout 23f27db8c3 Change: remove "maximum map height" from the New Game GUI
This setting influence the max heightlevel, and not as the name
suggests: the height of the generated map.

How ever you slice it, it is a very weird place to add this
setting, and it is better off being only in the settings menu.

Commits following this commit also make it more useful, so users
no longer have to care about it.
3 years ago
Patric Stout 70bc55cfd6 Feature: setting to indicate desert coverage for tropic climate
This is an indication value; the game tries to get as close as it
can, but due to the complex tropic rules, that is unlikely to be
exact.

In the end, it picks a height-level to base the desert/tropic
line on. This is strictly seen not needed, as we can convert any
tile to either. But it is the simplest way to get started with
this without redoing all related functions.
3 years ago
Patric Stout cafe4eed6e Feature: setting to indicate snow coverage for arctic climate (replaces snow line height)
Setting the snow coverage (in % of the map) makes a lot more sense
to the human, while still allowing the niche player to set (by
finding the correct %) a snow line height they like. This makes for
easier defaults, as it decoupled terrain height from amount of snow.

Maps can never be 100% snow, as we do not have sprites for coastal
tiles.

Internally, this calculates the best snow line height to approach
this coverage as close as possible.
3 years ago
Patric Stout 751434ea63
Fix: placing random trees in SE crashes the game (#8892)
This used to work by accident: originally the code checked if
GenerateWorld was threaded. If not, it would abort the function.
This worked for placing trees, because it was also returning false
when it was not active.

With the recent changes, that check got removed, and this crash
started to happen. So now check if we have a modal window, which
is a very solid indication we are generating the world.
3 years ago
Jonathan G Rennison abf8505c69 Add rainforest line height setting to map generation windows
See: #227
3 years ago
Patric Stout 970fedd78c Add: make modal windows update more smooth
Basically, modal windows had their own thread-locking for what
drawing was possible. This is a bit nonsense now we have a
game-thread. And it makes much more sense to do things like
NewGRFScan and GenerateWorld in the game-thread, and not in a
thread next to the game-thread.

This commit changes that: it removes the threads for NewGRFScan
and GenerateWorld, and just runs the code in the game-thread.
On regular intervals it allows the draw-thread to do a tick,
which gives a much smoother look and feel.

It does slow down NewGRFScan and GenerateWorld ever so slightly
as it spends more time on drawing. But the slowdown is not
measureable on my machines (with 700+ NewGRFs / 4kx4k map and
a Debug build).

Running without a game-thread means NewGRFScan and GenerateWorld
are now blocking.
3 years ago
Jonathan G Rennison 68a0a4d1b9 Merge branch 'master' into jgrpp
# Conflicts:
#	src/newgrf_config.cpp
3 years ago
Patric Stout 8bf8c0f251 Fix d437445c: also use std::chrono for the GRFFileScanner modal window
For some reason I only converted one of the two modal windows we
have, and completely forgot the other.

While at it, synchronize the way those two modal windows work
in terms of "next_update".
3 years ago