Pavel Stupnikov
9a45a0f535
Feature: Set exclusive access to industry from GS ( #8115 )
4 years ago
Niels Martin Hansen
b7751c483e
Feature: Influence industry production changes from GS ( #7912 )
4 years ago
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.
4 years ago
Jonathan G Rennison
8ac436f507
Add setting to scale primary industry cargo production
4 years ago
Jonathan G Rennison
f0c3a4b42e
Saveload: Store NewGRF name in savegame, include in missing GRF message
4 years ago
Jonathan G Rennison
207c79a736
Saveload: Fix SLE*_CONDSSTR* macros
4 years ago
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>
4 years ago
Michael Lutz
79240eab1e
Codechange: Make use of the improved C++17 emplace_back function.
4 years ago
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
.
4 years ago
Jonathan G Rennison
4436da7436
Saveload: Skip GetVariableAddress asserts if _DEBUG not defined
4 years ago
Jonathan G Rennison
4da3cfcf56
Merge branch 'master' into jgrpp
...
# Conflicts:
# CMakeLists.txt
# src/bootstrap_gui.cpp
4 years ago
Patric Stout
731af1f1f3
Codechange: don't do work GetVariableAddress() is already doing
4 years ago
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.
4 years ago
Michael Lutz
c558936ec3
Fix 63ccb36ef3: Crash trying to load TTO/TTD savegames. ( #8356 )
4 years ago
Jonathan G Rennison
3e1ab88323
Fix NRT road/tram type conversion on savegame load from JokerPP v1.27
4 years ago
Jonathan G Rennison
270a748b64
Tracerestrict: Add time/date conditional
4 years ago
Jonathan G Rennison
2ad446369d
Cache animated tile speed, use btree map for animated tiles
4 years ago
Jonathan G Rennison
1f54c8a018
Send vehicle caches to network clients to prevent desyncs due to bad GRFs
4 years ago
Jonathan G Rennison
9efeb3551a
Tunnel/bridge signal simulation spacing is now a company setting
4 years ago
Jonathan G Rennison
0902243ab3
Allow changing the colour of plans
4 years ago
Jonathan G Rennison
57d47b9bae
Add support for overtaking inside (non-custom) bridges/tunnels
4 years ago
Jonathan G Rennison
ffe3c769a3
Add road tile cached one way state, one way road section detection
4 years ago
Jonathan G Rennison
3a75f13874
Allow drive-through road stops to be one-way
4 years ago
Jonathan G Rennison
de5fb361ad
Fix crash when saving order backups
4 years ago
Jonathan G Rennison
e1aca1ab34
Extend Order::flags to 16 bits, fixes conditional order target field size
...
Adjust order packing and CmdInsertOrder
See: #198
4 years ago
Jonathan G Rennison
b9f7db9c7e
Jump counter is no longer a separate field
4 years ago
Jonathan G Rennison
1716083a30
Use saveload object filtering for order chunks
4 years ago
Jonathan G Rennison
bb862100af
Fix operator typo in 6dd7b286
in oldloader_sl.cpp
4 years ago
Jonathan G Rennison
6dd7b2869c
Increase per-vehicle order limit to 64k
...
See: #110
4 years ago
Jonathan G Rennison
cce6d731a1
TBTR: Delete orphaned virtual trains on client disconnection
4 years ago
Jonathan G Rennison
3b47b7b091
Plans: Improve performance of viewport plan rendering
4 years ago
Jonathan G Rennison
84dd35b685
Add drive-through train depot emulation (default off)
4 years ago
Jonathan G Rennison
4763f441f6
On load, use previous local company or first usable company
...
Instead of always using the first company slot
4 years ago
Jonathan G Rennison
2ea3a7d6f4
Add setting for default road/tram types, to match default rail type setting
4 years ago
Jonathan G Rennison
2d350d26db
Add rate limit for object construction
4 years ago
Jonathan G Rennison
ff12051ee1
Only show ship is lost messages if lost for a significant time
4 years ago
Jonathan G Rennison
825190db0c
Remove programmable pre-signal calls to DebugPrintProgram
4 years ago
Jonathan G Rennison
abb7b69861
Add slot and counter support to programmable pre-signals
4 years ago
Jonathan G Rennison
9ee8091ecc
Add conditional order which tests counter value
4 years ago
Jonathan G Rennison
817bc44a3e
Initial implementation of tracerestrict counter mechanism
4 years ago
Jonathan G Rennison
d2594ece79
Add routing restrictions action to control news reports about stuck trains
4 years ago
Jonathan G Rennison
beaeda2990
TBTR: Show empty and full train weights in GUI, and weight ratios if enabled
4 years ago
Jonathan G Rennison
e2de103d82
Skip GRF compatibility check when using -K/-q switches
4 years ago
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
4 years ago
Jonathan G Rennison
2b9c633d50
Add leave early if any/all cargoes fully loaded timetable modes
4 years ago
Jonathan G Rennison
1fd9c929ef
Increase church/stadium count field size, fix save/load
...
Fix too many error message
4 years ago
Jonathan G Rennison
b7118b60fe
Add setting to enable multiple churches/stadiums in scenario editor
...
See: #177
4 years ago
dP
452e1e3328
Codechange #8258 : Remove unused town cargo caches from the savegame
4 years ago
TechGeekNZ
a10013dd00
Codechange: Spell 'Viewport' consistently
...
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
4 years ago
Jonathan G Rennison
1f5de8b82c
Auto separation: Remove circular linked list, use new algorithm
4 years ago
Jonathan G Rennison
53f9fa139d
Remove redundant year/month date globals
4 years ago
Jonathan G Rennison
6288abae56
Saveload: Improve error messages for loading unsupported versions
4 years ago
Jonathan G Rennison
f4cf966167
Saveload: Add version label feature to SLXI chunk
4 years ago
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
4 years ago
Jonathan G Rennison
d6f785d125
Merge branch 'pr-163' into jgrpp
4 years ago
Jonathan G Rennison
1aefc9d010
Use malloc instead of calloc for MemoryDumper::AllocateBuffer
4 years ago
TechGeekNZ
cf8ea74733
Update: Merge branch 'jgrpp_master_cmake' into jgrpp_cmake
4 years ago
dP
7045186594
Change #8159 : Remove now unused town cargo caches without bumping the savegame version
4 years ago
dP
ca2604c4e2
Revert #8157 : Redundant change
4 years ago
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.
4 years ago
Jonathan G Rennison
54237b0e98
Codechange: Move SlSkipBytes to saveload.h
4 years ago
Charles Pigott
64b1c70fdd
Codechange: Add WARN_FORMAT to vseprintf and fix the cascade of warnings that followed
4 years ago
Jonathan G Rennison
27b92c3526
Fix #159 : Incorrect display date on load for savegame versions < 31
4 years ago
Jonathan G Rennison
f5e9805b10
Store time display settings both in savegame and client, add setting
4 years ago
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.
4 years ago
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.
4 years ago
Jonathan G Rennison
5243cfd6d0
Use TinyString for custom name fields which are almost always empty
4 years ago
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
4 years ago
Michael Lutz
63ccb36ef3
Codechange: Use std::string for most of the user-settable custom names.
4 years ago
Michael Lutz
9b6f5e3bb8
Codechange: Store GS lang texts in std::strings.
4 years ago
Jonathan G Rennison
ea06a0670d
Add rail ground type support for rail custom bridge heads
...
See: #146
4 years ago
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
4 years ago
glx22
cca613e3b8
Fix #8142 , 5aa6351: Buoy owner and tile owner can be different ( #8143 )
4 years ago
Jonathan G Rennison
763a2826b6
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/gamelog.cpp
4 years ago
Jonathan G Rennison
0202211514
Conditional orders: Add slot acquire modes to train in slot conditional
4 years ago
glx
5aa6351042
Fix #8132 : Corrupted savegame crashing OpenTTD on load
4 years ago
glx
0ed00ae111
Fix: Stop any gamelog action when recovering from SlError()
4 years ago
Jonathan G Rennison
0100ea4e32
Conditional orders: Add mode to check waiting station cargo via next node
4 years ago
Jonathan G Rennison
07c9621fcf
Merge branch 'master' into jgrpp
4 years ago
glx
bc8333723c
Fix #8021 : limit savegame range for docking tiles fixing
4 years ago
Yexo
64278fd598
Fix: reset roadtype/streetcartype info for non-road bridges
4 years ago
Yexo
19dc31e0b3
Fix #8108 : always update tile_hash after updating v->tile
4 years ago
SamuXarick
8edbb42fe8
Fix c01a2e2: crash on loading old savegames with invalid animated tile information
4 years ago
SamuXarick
c01803cd42
Fix #8108 : possible crash on loading TTD savegames with phantom oil rigs
4 years ago
Jonathan G Rennison
eef6ad7b2a
Crash log: Save config file in new crash save chunk
4 years ago
Jonathan G Rennison
1506479f56
Cheat: Add cheats to set inflation income and cost factors
...
See: #124
4 years ago
Jonathan G Rennison
3e7618f519
Save/load: Add extra cheats savegame chunk
4 years ago
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
4 years ago
SamuXarick
57553cd809
Fix #8020 : Add missing docking tiles around industry neutral stations
4 years ago
Jonathan G Rennison
ba65a79d09
Enable allowing/disallowing supply to a station, per cargo
...
Ctrl-click station cargo rating
4 years ago
Jonathan G Rennison
8956b1ab02
Improve performance of tunnel rendering in viewport map mode
4 years ago
Jonathan G Rennison
b96e7f78fb
Merge branch 'master' into jgrpp
4 years ago
glx
9116b22386
Fix #8011 , f5381798: Dock tile in TTD savegame was only 2 bytes
4 years ago
Jonathan G Rennison
babe98cdb1
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/network/network_server.h
# src/pathfinder/yapf/yapf_road.cpp
# src/viewport.cpp
4 years ago
glx
2f264f2c92
Change: Heading for 1.11 now
4 years ago
Johannes E. Krause
107283748a
Feature: SLF_HEX to print hexadecimal numbers in the config file
4 years ago
Jonathan G Rennison
76f68c48f5
Cache whether vehicle is currently drawn: Vehicle::IsDrawn()
4 years ago
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
5 years ago
Jonathan G Rennison
09b13dd484
Add conditional orders for cargo load percentage and waiting cargo amount
...
See: #90
5 years ago
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
5 years ago