forked from mirror/OpenTTD
(svn r117) Feature: Performance details window in company league menu (TrueLight)
This commit is contained in:
42
economy.h
42
economy.h
@@ -23,6 +23,48 @@ typedef struct Subsidy {
|
||||
} Subsidy;
|
||||
|
||||
|
||||
enum {
|
||||
SCORE_VEHICLES = 0,
|
||||
SCORE_STATIONS = 1,
|
||||
SCORE_MIN_PROFIT = 2,
|
||||
SCORE_MIN_INCOME = 3,
|
||||
SCORE_MAX_INCOME = 4,
|
||||
SCORE_DELIVERED = 5,
|
||||
SCORE_CARGO = 6,
|
||||
SCORE_MONEY = 7,
|
||||
SCORE_LOAN = 8,
|
||||
SCORE_TOTAL = 9, // This must always be the last entry
|
||||
|
||||
NUM_SCORE = 10, // How many scores are there..
|
||||
|
||||
SCORE_MAX = 1000, // The max score that can be in the performance history
|
||||
// the scores together of score_info is allowed to be more!
|
||||
};
|
||||
|
||||
typedef struct ScoreInfo {
|
||||
byte id; // Unique ID of the score
|
||||
int needed; // How much you need to get the perfect score
|
||||
int score; // How much score it will give
|
||||
} ScoreInfo;
|
||||
|
||||
static const ScoreInfo score_info[] = {
|
||||
{SCORE_VEHICLES, 120, 100},
|
||||
{SCORE_STATIONS, 80, 100},
|
||||
{SCORE_MIN_PROFIT, 10000, 100},
|
||||
{SCORE_MIN_INCOME, 50000, 50},
|
||||
{SCORE_MAX_INCOME, 100000, 100},
|
||||
{SCORE_DELIVERED, 40000, 400},
|
||||
{SCORE_CARGO, 8, 50},
|
||||
{SCORE_MONEY, 10000000, 50},
|
||||
{SCORE_LOAN, 250000, 50},
|
||||
{SCORE_TOTAL}
|
||||
};
|
||||
|
||||
int _score_part[MAX_PLAYERS][NUM_SCORE];
|
||||
|
||||
void UpdateCompanyRatingAndValue(Player *p, bool update);
|
||||
|
||||
|
||||
VARDEF Subsidy _subsidies[MAX_PLAYERS];
|
||||
Pair SetupSubsidyDecodeParam(Subsidy *s, bool mode);
|
||||
void DeleteSubsidyWithIndustry(byte index);
|
||||
|
Reference in New Issue
Block a user