Changeset - r14145:5a1d747ea3e9
[Not reviewed]
master
0 6 0
rubidium - 15 years ago 2010-01-03 21:29:20
rubidium@openttd.org
(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".
6 files changed with 7 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/economy.cpp
Show inline comments
 
@@ -1068,6 +1068,8 @@ Money CargoPayment::PayTransfer(const Ca
 
		cp->DaysInTransit(),
 
		this->ct);
 

	
 
	profit = profit * _settings_game.economy.feeder_payment_share / 100;
 

	
 
	this->visual_profit += profit; // accumulate transfer profits for whole vehicle
 
	return profit; // account for the (virtual) profit already made for the cargo packet
 
}
src/lang/english.txt
Show inline comments
 
@@ -1242,6 +1242,7 @@ STR_CONFIG_SETTING_COLOURED_NEWS_YEAR   
 
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_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_SEMAPHORE_BUILD_BEFORE_DATE                  :{LTBLUE}Automatically build semaphores before: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_ENABLE_SIGNAL_GUI                            :{LTBLUE}Enable the signal GUI: {ORANGE}{STRING1}
src/saveload/saveload.cpp
Show inline comments
 
@@ -47,7 +47,7 @@
 

	
 
#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
 

	
src/settings_gui.cpp
Show inline comments
 
@@ -1372,6 +1372,7 @@ static SettingEntry _settings_economy[] 
 
	SettingEntry(&_settings_economy_industries_page, STR_CONFIG_SETTING_ECONOMY_INDUSTRIES),
 
	SettingEntry("economy.inflation"),
 
	SettingEntry("economy.smooth_economy"),
 
	SettingEntry("economy.feeder_payment_share"),
 
};
 
/** Economy sub-page */
 
static SettingsPage _settings_economy_page = {_settings_economy, lengthof(_settings_economy)};
src/settings_type.h
Show inline comments
 
@@ -328,6 +328,7 @@ struct EconomySettings {
 
	bool   bribe;                            ///< enable bribing the local authority
 
	bool   smooth_economy;                   ///< smooth economy
 
	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
 
	bool   exclusive_rights;                 ///< allow buying exclusive rights
 
	bool   give_money;                       ///< allow giving other companies money
src/table/settings.h
Show inline comments
 
@@ -434,6 +434,7 @@ const SettingDesc _settings[] = {
 
	SDT_CONDNULL(                                                            4,  0, 104),
 
	    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_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.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),
0 comments (0 inline, 0 general)