Pavel Stupnikov
9a45a0f535
Feature: Set exclusive access to industry from GS ( #8115 )
2020-12-22 14:29:48 +01:00
Niels Martin Hansen
b7751c483e
Feature: Influence industry production changes from GS ( #7912 )
2020-12-22 14:21:31 +01:00
Patric Stout
d8c8f4e72d
Fix: next 67 savegame versions are used in PatchPacks; skip them ( #8411 )
...
Various of PatchPacks (Spring 2013, Joker, ChillPP) used versions
slightly higher than ours. Of course, as time went by, this
caught up with us, and we are now almost pushing a new version
that would conflict with them. To avoid users creating unneeded
issues about "why can I not load my savegame", lets be ahead of
the curve and flat-out refuse to load them.
Version-wise, this is totally fine. We have ~32k versions to go
before we run out (0x8000 is masked by JGRPP; we should avoid
using that). At the rate we bump savegames, this is not going to
happen in any sane reality.
2020-12-22 10:44:07 +01:00
Jonathan G Rennison
8ac436f507
Add setting to scale primary industry cargo production
2020-12-21 20:47:44 +00:00
Jonathan G Rennison
f0c3a4b42e
Saveload: Store NewGRF name in savegame, include in missing GRF message
2020-12-16 02:06:48 +00:00
Jonathan G Rennison
207c79a736
Saveload: Fix SLE*_CONDSSTR* macros
2020-12-16 01:31:46 +00:00
Patric Stout
d15dc9f40f
Add: support for emscripten (play-OpenTTD-in-the-browser)
...
Emscripten compiles to WASM, which can be loaded via
HTML / JavaScript. This allows you to play OpenTTD inside a
browser.
Co-authored-by: milek7 <me@milek7.pl>
2020-12-15 15:46:39 +01:00
Michael Lutz
79240eab1e
Codechange: Make use of the improved C++17 emplace_back function.
2020-12-15 00:29:30 +01:00
Jonathan G Rennison
840e459601
Revert "Fix 63ccb36ef3
: Crash trying to load TTO/TTD savegames. ( #8356 )"
...
This is not necessary due to 5243cfd6d0
.
This reverts commit c558936ec3
.
2020-12-07 18:19:54 +00:00
Jonathan G Rennison
4436da7436
Saveload: Skip GetVariableAddress asserts if _DEBUG not defined
2020-12-07 18:12:33 +00:00
Jonathan G Rennison
4da3cfcf56
Merge branch 'master' into jgrpp
...
# Conflicts:
# CMakeLists.txt
# src/bootstrap_gui.cpp
2020-12-07 17:56:44 +00:00
Patric Stout
731af1f1f3
Codechange: don't do work GetVariableAddress() is already doing
2020-12-06 16:10:58 +01:00
Patric Stout
c98717cb45
Fix: do not add an offset to a nullptr
...
This is, by specs, undefined behaviour. See
https://reviews.llvm.org/D67122
In cases where this is done, optimizations done by LLVM can
generate code that causes crashes.
GetVariableAddress() had two (legit) ways this could happen:
- For SaveLoad set to global
- For SaveLoad set to SLE_VAR_NULL, where sld->address is always
a nullptr, and object could or could not be a nullptr.
2020-12-06 16:10:58 +01:00
Michael Lutz
c558936ec3
Fix 63ccb36ef3
: Crash trying to load TTO/TTD savegames. ( #8356 )
2020-12-06 00:29:27 +01:00
Jonathan G Rennison
3e1ab88323
Fix NRT road/tram type conversion on savegame load from JokerPP v1.27
2020-12-01 21:10:49 +00:00
Jonathan G Rennison
270a748b64
Tracerestrict: Add time/date conditional
2020-11-27 18:43:32 +00:00
Jonathan G Rennison
2ad446369d
Cache animated tile speed, use btree map for animated tiles
2020-11-26 00:19:51 +00:00
Jonathan G Rennison
1f54c8a018
Send vehicle caches to network clients to prevent desyncs due to bad GRFs
2020-11-22 11:41:50 +00:00
Jonathan G Rennison
9efeb3551a
Tunnel/bridge signal simulation spacing is now a company setting
2020-11-21 17:43:55 +00:00
Jonathan G Rennison
0902243ab3
Allow changing the colour of plans
2020-11-06 22:40:02 +00:00
Jonathan G Rennison
57d47b9bae
Add support for overtaking inside (non-custom) bridges/tunnels
2020-10-28 17:52:58 +00:00
Jonathan G Rennison
ffe3c769a3
Add road tile cached one way state, one way road section detection
2020-10-28 00:27:48 +00:00
Jonathan G Rennison
3a75f13874
Allow drive-through road stops to be one-way
2020-10-28 00:27:48 +00:00
Jonathan G Rennison
de5fb361ad
Fix crash when saving order backups
2020-10-21 00:24:38 +01:00
Jonathan G Rennison
e1aca1ab34
Extend Order::flags to 16 bits, fixes conditional order target field size
...
Adjust order packing and CmdInsertOrder
See: #198
2020-10-17 17:25:44 +01:00
Jonathan G Rennison
b9f7db9c7e
Jump counter is no longer a separate field
2020-10-17 17:25:44 +01:00
Jonathan G Rennison
1716083a30
Use saveload object filtering for order chunks
2020-10-17 11:27:18 +01:00
Jonathan G Rennison
bb862100af
Fix operator typo in 6dd7b286
in oldloader_sl.cpp
2020-10-13 21:32:10 +01:00
Jonathan G Rennison
6dd7b2869c
Increase per-vehicle order limit to 64k
...
See: #110
2020-10-12 23:48:54 +01:00
Jonathan G Rennison
cce6d731a1
TBTR: Delete orphaned virtual trains on client disconnection
2020-10-09 19:26:07 +01:00
Jonathan G Rennison
3b47b7b091
Plans: Improve performance of viewport plan rendering
2020-09-29 01:40:12 +01:00
Jonathan G Rennison
84dd35b685
Add drive-through train depot emulation (default off)
2020-09-26 18:08:26 +01:00
Jonathan G Rennison
4763f441f6
On load, use previous local company or first usable company
...
Instead of always using the first company slot
2020-09-20 17:36:36 +01:00
Jonathan G Rennison
2ea3a7d6f4
Add setting for default road/tram types, to match default rail type setting
2020-09-18 23:32:47 +01:00
Jonathan G Rennison
2d350d26db
Add rate limit for object construction
2020-09-14 23:06:49 +01:00
Jonathan G Rennison
ff12051ee1
Only show ship is lost messages if lost for a significant time
2020-09-07 18:24:49 +01:00
Jonathan G Rennison
825190db0c
Remove programmable pre-signal calls to DebugPrintProgram
2020-09-01 22:00:02 +01:00
Jonathan G Rennison
abb7b69861
Add slot and counter support to programmable pre-signals
2020-09-01 18:37:53 +01:00
Jonathan G Rennison
9ee8091ecc
Add conditional order which tests counter value
2020-08-31 22:52:26 +01:00
Jonathan G Rennison
817bc44a3e
Initial implementation of tracerestrict counter mechanism
2020-08-31 19:08:35 +01:00
Jonathan G Rennison
d2594ece79
Add routing restrictions action to control news reports about stuck trains
2020-08-29 13:38:19 +01:00
Jonathan G Rennison
beaeda2990
TBTR: Show empty and full train weights in GUI, and weight ratios if enabled
2020-08-28 18:37:50 +01:00
Jonathan G Rennison
e2de103d82
Skip GRF compatibility check when using -K/-q switches
2020-08-27 19:25:07 +01:00
Jonathan G Rennison
5b78090a61
Merge branch 'master' into jgrpp
...
# Conflicts:
# CMakeLists.txt
# src/saveload/town_sl.cpp
# src/screenshot.h
# src/script/api/ai/ai_date.hpp.sq
# src/script/api/ai/ai_marine.hpp.sq
# src/script/api/ai/ai_station.hpp.sq
# src/script/api/game/game_date.hpp.sq
# src/script/api/game/game_marine.hpp.sq
# src/script/api/game/game_station.hpp.sq
# src/script/api/game/game_window.hpp.sq
# src/script/api/script_window.hpp
# src/script/api/template/template_window.hpp.sq
# src/signal.cpp
# src/statusbar_gui.cpp
# src/toolbar_gui.cpp
# src/viewport.cpp
# src/viewport_func.h
2020-08-27 18:31:09 +01:00
Jonathan G Rennison
2b9c633d50
Add leave early if any/all cargoes fully loaded timetable modes
2020-08-19 18:51:47 +01:00
Jonathan G Rennison
1fd9c929ef
Increase church/stadium count field size, fix save/load
...
Fix too many error message
2020-08-03 20:27:12 +01:00
Jonathan G Rennison
b7118b60fe
Add setting to enable multiple churches/stadiums in scenario editor
...
See: #177
2020-08-03 16:39:03 +01:00
dP
452e1e3328
Codechange #8258 : Remove unused town cargo caches from the savegame
2020-07-27 17:32:00 +01:00
TechGeekNZ
a10013dd00
Codechange: Spell 'Viewport' consistently
...
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
2020-07-27 17:31:29 +01:00
Jonathan G Rennison
1f5de8b82c
Auto separation: Remove circular linked list, use new algorithm
2020-07-09 02:15:16 +01:00
Jonathan G Rennison
53f9fa139d
Remove redundant year/month date globals
2020-07-07 17:53:54 +01:00
Jonathan G Rennison
6288abae56
Saveload: Improve error messages for loading unsupported versions
2020-07-03 02:11:19 +01:00
Jonathan G Rennison
f4cf966167
Saveload: Add version label feature to SLXI chunk
2020-07-03 02:10:04 +01:00
Jonathan G Rennison
3adeff1883
Merge branch 'master' into jgrpp
...
# Conflicts:
# CMakeLists.txt
# cmake/CompileFlags.cmake
# src/bridge_gui.cpp
# src/saveload/afterload.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/saveload/town_sl.cpp
# src/screenshot.cpp
# src/screenshot.h
# src/toolbar_gui.cpp
# src/town.h
# src/town_cmd.cpp
2020-06-30 21:43:04 +01:00
Jonathan G Rennison
d6f785d125
Merge branch 'pr-163' into jgrpp
2020-06-30 21:05:00 +01:00
Jonathan G Rennison
1aefc9d010
Use malloc instead of calloc for MemoryDumper::AllocateBuffer
2020-06-29 17:20:27 +01:00
TechGeekNZ
cf8ea74733
Update: Merge branch 'jgrpp_master_cmake' into jgrpp_cmake
2020-06-28 21:56:43 +01:00
dP
7045186594
Change #8159 : Remove now unused town cargo caches without bumping the savegame version
2020-06-28 18:23:59 +02:00
dP
ca2604c4e2
Revert #8157 : Redundant change
2020-06-28 18:23:59 +02:00
Jonathan G Rennison
7a09413a1a
Fix: Incorrect save/load array size of Town::cargo_accepted
...
In 11ab3c4e
the number of cargo types was changed from 32 to 64.
The save/load of Town::cargo_accepted was not updated, such that
only half of the data structure is saved/loaded in savegame versions
199 to 218.
Discard and regenerate data from all savegame versions prior to 219.
2020-06-28 15:32:53 +02:00
Jonathan G Rennison
54237b0e98
Codechange: Move SlSkipBytes to saveload.h
2020-06-28 15:32:53 +02:00
Charles Pigott
64b1c70fdd
Codechange: Add WARN_FORMAT to vseprintf and fix the cascade of warnings that followed
2020-06-27 14:51:14 +01:00
Jonathan G Rennison
27b92c3526
Fix #159 : Incorrect display date on load for savegame versions < 31
2020-06-24 17:14:28 +01:00
Jonathan G Rennison
f5e9805b10
Store time display settings both in savegame and client, add setting
2020-06-23 21:05:21 +01:00
Jonathan G Rennison
e6f3e15c32
Fix 63ccb36e
: Incorrect string type for OrderBackup::name save/load
...
In 63ccb36e
BaseConsist::name was changed from a malloced char*
to a std::string.
OrderBackup inherits from BaseConsist.
The saveload of OrderBackup::name was not updated.
2020-06-22 08:02:42 +02:00
Patric Stout
56d54cf60e
Add: introduce CMake for project management
...
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.
Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.
This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.
Addtiionally, this heavily improves our detection of libraries, etc.
2020-06-05 19:36:05 +02:00
Jonathan G Rennison
5243cfd6d0
Use TinyString for custom name fields which are almost always empty
2020-05-22 00:10:09 +01:00
Jonathan G Rennison
f8d6e781ba
Merge branch 'master' into jgrpp
...
# Conflicts:
# projects/openttd_vs140.vcxproj.filters
# projects/openttd_vs141.vcxproj.filters
# projects/openttd_vs142.vcxproj.filters
# src/base_consist.h
# src/company_base.h
# src/newgrf_config.cpp
# src/newgrf_config.h
# src/openttd.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/saveload/station_sl.cpp
# src/settings.cpp
# src/signs_base.h
# src/string.cpp
# src/string_func.h
# src/table/misc_settings.ini
# src/table/settings.h.preamble
# src/town_cmd.cpp
# src/vehicle.cpp
# src/vehicle_cmd.cpp
# src/video/cocoa/cocoa_v.mm
# src/video/null_v.cpp
2020-05-21 22:24:01 +01:00
Michael Lutz
63ccb36ef3
Codechange: Use std::string for most of the user-settable custom names.
2020-05-21 20:02:34 +02:00
Michael Lutz
9b6f5e3bb8
Codechange: Store GS lang texts in std::strings.
2020-05-21 20:02:34 +02:00
Jonathan G Rennison
ea06a0670d
Add rail ground type support for rail custom bridge heads
...
See: #146
2020-05-19 00:41:35 +01:00
Jonathan G Rennison
77673b731c
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/industry_cmd.cpp
# src/openttd.cpp
# src/station_cmd.cpp
# src/station_func.h
2020-05-13 11:17:09 +01:00
glx22
cca613e3b8
Fix #8142 , 5aa6351
: Buoy owner and tile owner can be different ( #8143 )
2020-05-12 15:22:58 +02:00
Jonathan G Rennison
763a2826b6
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/gamelog.cpp
2020-05-11 00:45:24 +01:00
Jonathan G Rennison
0202211514
Conditional orders: Add slot acquire modes to train in slot conditional
2020-05-10 21:06:09 +01:00
glx
5aa6351042
Fix #8132 : Corrupted savegame crashing OpenTTD on load
2020-05-10 20:03:41 +01:00
glx
0ed00ae111
Fix: Stop any gamelog action when recovering from SlError()
2020-05-10 20:02:55 +01:00
Jonathan G Rennison
0100ea4e32
Conditional orders: Add mode to check waiting station cargo via next node
2020-05-10 15:32:12 +01:00
Jonathan G Rennison
07c9621fcf
Merge branch 'master' into jgrpp
2020-05-07 20:57:47 +01:00
glx
bc8333723c
Fix #8021 : limit savegame range for docking tiles fixing
2020-05-06 23:12:59 +02:00
Yexo
64278fd598
Fix: reset roadtype/streetcartype info for non-road bridges
2020-05-06 22:10:08 +02:00
Yexo
19dc31e0b3
Fix #8108 : always update tile_hash after updating v->tile
2020-05-04 23:26:50 +02:00
SamuXarick
8edbb42fe8
Fix c01a2e2
: crash on loading old savegames with invalid animated tile information
2020-05-04 21:21:06 +02:00
SamuXarick
c01803cd42
Fix #8108 : possible crash on loading TTD savegames with phantom oil rigs
2020-05-04 21:21:06 +02:00
Jonathan G Rennison
eef6ad7b2a
Crash log: Save config file in new crash save chunk
2020-04-21 18:17:13 +01:00
Jonathan G Rennison
1506479f56
Cheat: Add cheats to set inflation income and cost factors
...
See: #124
2020-04-18 10:53:49 +01:00
Jonathan G Rennison
3e7618f519
Save/load: Add extra cheats savegame chunk
2020-04-18 10:51:02 +01:00
Jonathan G Rennison
d210bc4d14
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/lang/korean.txt
# src/saveload/afterload.cpp
Recalculate docking tile cache due to 57553cd8
2020-04-01 00:32:45 +01:00
SamuXarick
57553cd809
Fix #8020 : Add missing docking tiles around industry neutral stations
2020-03-30 08:21:40 +02:00
Jonathan G Rennison
ba65a79d09
Enable allowing/disallowing supply to a station, per cargo
...
Ctrl-click station cargo rating
2020-03-22 13:49:22 +00:00
Jonathan G Rennison
8956b1ab02
Improve performance of tunnel rendering in viewport map mode
2020-03-03 06:57:50 +00:00
Jonathan G Rennison
b96e7f78fb
Merge branch 'master' into jgrpp
2020-02-21 21:18:01 +00:00
glx
9116b22386
Fix #8011 , f5381798
: Dock tile in TTD savegame was only 2 bytes
2020-02-19 17:45:42 +01:00
Jonathan G Rennison
babe98cdb1
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/network/network_server.h
# src/pathfinder/yapf/yapf_road.cpp
# src/viewport.cpp
2020-02-09 15:43:47 +00:00
glx
2f264f2c92
Change: Heading for 1.11 now
2020-02-08 23:38:49 +01:00
Johannes E. Krause
107283748a
Feature: SLF_HEX to print hexadecimal numbers in the config file
2020-02-06 21:00:30 +00:00
Jonathan G Rennison
76f68c48f5
Cache whether vehicle is currently drawn: Vehicle::IsDrawn()
2020-02-03 18:58:19 +00:00
Jonathan G Rennison
dd99fd646d
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/base_station_base.h
# src/industry.h
# src/industry_cmd.cpp
# src/industry_gui.cpp
# src/lang/korean.txt
# src/os/macosx/crashlog_osx.cpp
# src/station_cmd.cpp
# src/town.h
# src/town_cmd.cpp
# src/town_gui.cpp
2020-01-20 18:36:55 +00:00
Jonathan G Rennison
09b13dd484
Add conditional orders for cargo load percentage and waiting cargo amount
...
See: #90
2020-01-18 20:32:42 +00:00
Jonathan G Rennison
bb363695fc
YAPF: Prevent user for configuring signal penalties to negative values
...
Warn if signal penalty polynomial goes negative, and clamp to non-negative
2020-01-17 19:23:03 +00:00