Merge branch 'more_cond_orders-sx' into jgrpp

# Conflicts:
#	config.lib
#	projects/openttd_vs100.vcxproj
#	projects/openttd_vs100.vcxproj.filters
#	projects/openttd_vs80.vcproj
#	projects/openttd_vs90.vcproj
#	src/order_gui.cpp
#	src/order_type.h
#	src/saveload/afterload.cpp
#	src/saveload/extended_ver_sl.cpp
This commit is contained in:
Jonathan G Rennison
2019-01-06 22:35:57 +00:00
36 changed files with 13882 additions and 58 deletions

View File

@@ -3570,6 +3570,16 @@ bool AfterLoadGame()
FOR_ALL_COMPANIES(c) c->purchase_land_limit = _settings_game.construction.purchase_land_frame_burst << 16;
}
if (SlXvIsFeaturePresent(XSLFI_MORE_COND_ORDERS, 1, 1)) {
Order *order;
FOR_ALL_ORDERS(order) {
// Insertion of OCV_MAX_RELIABILITY between OCV_REMAINING_LIFETIME and OCV_CARGO_WAITING
if (order->IsType(OT_CONDITIONAL) && order->GetConditionVariable() > OCV_REMAINING_LIFETIME) {
order->SetConditionVariable(static_cast<OrderConditionVariable>((uint)order->GetConditionVariable() + 1));
}
}
}
/* Road stops is 'only' updating some caches */
AfterLoadRoadStops();
AfterLoadLabelMaps();