mirror of https://github.com/OpenTTD/OpenTTD
(svn r18703) -Feature-ish: allow virtually paying a percentage of the leg profit in feeder chains. This to give the user a better chance to get a feeder system without "losses".
parent
a9d4147eb2
commit
069b6a9fab
|
@ -1068,6 +1068,8 @@ Money CargoPayment::PayTransfer(const CargoPacket *cp, uint count)
|
||||||
cp->DaysInTransit(),
|
cp->DaysInTransit(),
|
||||||
this->ct);
|
this->ct);
|
||||||
|
|
||||||
|
profit = profit * _settings_game.economy.feeder_payment_share / 100;
|
||||||
|
|
||||||
this->visual_profit += profit; // accumulate transfer profits for whole vehicle
|
this->visual_profit += profit; // accumulate transfer profits for whole vehicle
|
||||||
return profit; // account for the (virtual) profit already made for the cargo packet
|
return profit; // account for the (virtual) profit already made for the cargo packet
|
||||||
}
|
}
|
||||||
|
|
|
@ -1242,6 +1242,7 @@ STR_CONFIG_SETTING_COLOURED_NEWS_YEAR :{LTBLUE}Coloure
|
||||||
STR_CONFIG_SETTING_STARTING_YEAR :{LTBLUE}Starting year: {ORANGE}{STRING1}
|
STR_CONFIG_SETTING_STARTING_YEAR :{LTBLUE}Starting year: {ORANGE}{STRING1}
|
||||||
STR_CONFIG_SETTING_SMOOTH_ECONOMY :{LTBLUE}Enable smooth economy (more, smaller changes): {ORANGE}{STRING1}
|
STR_CONFIG_SETTING_SMOOTH_ECONOMY :{LTBLUE}Enable smooth economy (more, smaller changes): {ORANGE}{STRING1}
|
||||||
STR_CONFIG_SETTING_ALLOW_SHARES :{LTBLUE}Allow buying shares from other companies: {ORANGE}{STRING1}
|
STR_CONFIG_SETTING_ALLOW_SHARES :{LTBLUE}Allow buying shares from other companies: {ORANGE}{STRING1}
|
||||||
|
STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE :{LTBLUE}Percentage of leg profit to pay in feeder systems: {ORANGE}{STRING1}%
|
||||||
STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :{LTBLUE}When dragging, place signals every: {ORANGE}{STRING1} tile(s)
|
STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :{LTBLUE}When dragging, place signals every: {ORANGE}{STRING1} tile(s)
|
||||||
STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE :{LTBLUE}Automatically build semaphores before: {ORANGE}{STRING1}
|
STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE :{LTBLUE}Automatically build semaphores before: {ORANGE}{STRING1}
|
||||||
STR_CONFIG_SETTING_ENABLE_SIGNAL_GUI :{LTBLUE}Enable the signal GUI: {ORANGE}{STRING1}
|
STR_CONFIG_SETTING_ENABLE_SIGNAL_GUI :{LTBLUE}Enable the signal GUI: {ORANGE}{STRING1}
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
#include "saveload_internal.h"
|
#include "saveload_internal.h"
|
||||||
|
|
||||||
extern const uint16 SAVEGAME_VERSION = 133;
|
extern const uint16 SAVEGAME_VERSION = 134;
|
||||||
|
|
||||||
SavegameType _savegame_type; ///< type of savegame we are loading
|
SavegameType _savegame_type; ///< type of savegame we are loading
|
||||||
|
|
||||||
|
|
|
@ -1372,6 +1372,7 @@ static SettingEntry _settings_economy[] = {
|
||||||
SettingEntry(&_settings_economy_industries_page, STR_CONFIG_SETTING_ECONOMY_INDUSTRIES),
|
SettingEntry(&_settings_economy_industries_page, STR_CONFIG_SETTING_ECONOMY_INDUSTRIES),
|
||||||
SettingEntry("economy.inflation"),
|
SettingEntry("economy.inflation"),
|
||||||
SettingEntry("economy.smooth_economy"),
|
SettingEntry("economy.smooth_economy"),
|
||||||
|
SettingEntry("economy.feeder_payment_share"),
|
||||||
};
|
};
|
||||||
/** Economy sub-page */
|
/** Economy sub-page */
|
||||||
static SettingsPage _settings_economy_page = {_settings_economy, lengthof(_settings_economy)};
|
static SettingsPage _settings_economy_page = {_settings_economy, lengthof(_settings_economy)};
|
||||||
|
|
|
@ -328,6 +328,7 @@ struct EconomySettings {
|
||||||
bool bribe; ///< enable bribing the local authority
|
bool bribe; ///< enable bribing the local authority
|
||||||
bool smooth_economy; ///< smooth economy
|
bool smooth_economy; ///< smooth economy
|
||||||
bool allow_shares; ///< allow the buying/selling of shares
|
bool allow_shares; ///< allow the buying/selling of shares
|
||||||
|
uint8 feeder_payment_share; ///< percentage of leg payment to virtually pay in feeder systems
|
||||||
byte dist_local_authority; ///< distance for town local authority, default 20
|
byte dist_local_authority; ///< distance for town local authority, default 20
|
||||||
bool exclusive_rights; ///< allow buying exclusive rights
|
bool exclusive_rights; ///< allow buying exclusive rights
|
||||||
bool give_money; ///< allow giving other companies money
|
bool give_money; ///< allow giving other companies money
|
||||||
|
|
|
@ -434,6 +434,7 @@ const SettingDesc _settings[] = {
|
||||||
SDT_CONDNULL( 4, 0, 104),
|
SDT_CONDNULL( 4, 0, 104),
|
||||||
SDT_BOOL(GameSettings, economy.smooth_economy, 0, 0, true, STR_CONFIG_SETTING_SMOOTH_ECONOMY, NULL),
|
SDT_BOOL(GameSettings, economy.smooth_economy, 0, 0, true, STR_CONFIG_SETTING_SMOOTH_ECONOMY, NULL),
|
||||||
SDT_BOOL(GameSettings, economy.allow_shares, 0, 0, false, STR_CONFIG_SETTING_ALLOW_SHARES, NULL),
|
SDT_BOOL(GameSettings, economy.allow_shares, 0, 0, false, STR_CONFIG_SETTING_ALLOW_SHARES, NULL),
|
||||||
|
SDT_CONDVAR(GameSettings, economy.feeder_payment_share, SLE_UINT8,134, SL_MAX_VERSION, 0, 0, 75, 0, 100, 0, STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE, NULL),
|
||||||
SDT_CONDVAR(GameSettings, economy.town_growth_rate, SLE_UINT8, 54, SL_MAX_VERSION, 0, MS, 2, 0, 4, 0, STR_CONFIG_SETTING_TOWN_GROWTH, NULL),
|
SDT_CONDVAR(GameSettings, economy.town_growth_rate, SLE_UINT8, 54, SL_MAX_VERSION, 0, MS, 2, 0, 4, 0, STR_CONFIG_SETTING_TOWN_GROWTH, NULL),
|
||||||
SDT_CONDVAR(GameSettings, economy.larger_towns, SLE_UINT8, 54, SL_MAX_VERSION, 0, D0, 4, 0, 255, 1, STR_CONFIG_SETTING_LARGER_TOWNS, NULL),
|
SDT_CONDVAR(GameSettings, economy.larger_towns, SLE_UINT8, 54, SL_MAX_VERSION, 0, D0, 4, 0, 255, 1, STR_CONFIG_SETTING_LARGER_TOWNS, NULL),
|
||||||
SDT_CONDVAR(GameSettings, economy.initial_city_size, SLE_UINT8, 56, SL_MAX_VERSION, 0, 0, 2, 1, 10, 1, STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER, NULL),
|
SDT_CONDVAR(GameSettings, economy.initial_city_size, SLE_UINT8, 56, SL_MAX_VERSION, 0, 0, 2, 1, 10, 1, STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER, NULL),
|
||||||
|
|
Loading…
Reference in New Issue