author | truebrain |
Fri, 18 Jul 2008 10:15:16 +0000 | |
branch | noai |
changeset 11168 | 3842648184cd |
parent 10455 | 22c441f5adf9 |
permissions | -rw-r--r-- |
9626 | 1 |
/* $Id$ */ |
2 |
||
10455
22c441f5adf9
(svn r12997) [NoAI] -Sync: with trunk r12895:12996.
rubidium
parents:
9724
diff
changeset
|
3 |
/** @file newgrf_industries.h Functions for NewGRF industries. */ |
9626 | 4 |
|
5 |
#ifndef NEWGRF_INDUSTRIES_H |
|
6 |
#define NEWGRF_INDUSTRIES_H |
|
7 |
||
9723
eee46cb39750
(svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents:
9704
diff
changeset
|
8 |
#include "industry_type.h" |
9626 | 9 |
#include "newgrf_spritegroup.h" |
10 |
||
9704 | 11 |
/** When should the industry(tile) be triggered for random bits? */ |
12 |
enum IndustryTrigger { |
|
13 |
/** Triggered each tile loop */ |
|
14 |
INDUSTRY_TRIGGER_TILELOOP_PROCESS = 1, |
|
15 |
/** Triggered (whole industry) each 256 ticks */ |
|
16 |
INDUSTRY_TRIGGER_256_TICKS = 2, |
|
17 |
/** Triggered on cargo delivery */ |
|
18 |
INDUSTRY_TRIGGER_CARGO_DELIVERY = 4, |
|
19 |
}; |
|
20 |
||
9723
eee46cb39750
(svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents:
9704
diff
changeset
|
21 |
/** From where is callback CBID_INDUSTRY_AVAILABLE been called */ |
eee46cb39750
(svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents:
9704
diff
changeset
|
22 |
enum IndustryAvailabilityCallType { |
eee46cb39750
(svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents:
9704
diff
changeset
|
23 |
IACT_MAPGENERATION, ///< during random map generation |
eee46cb39750
(svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents:
9704
diff
changeset
|
24 |
IACT_RANDOMCREATION, ///< during creation of random ingame industry |
eee46cb39750
(svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents:
9704
diff
changeset
|
25 |
IACT_USERCREATION, ///< from the Fund/build window |
eee46cb39750
(svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents:
9704
diff
changeset
|
26 |
}; |
eee46cb39750
(svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents:
9704
diff
changeset
|
27 |
|
9628
b5c2449616b5
(svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents:
9627
diff
changeset
|
28 |
/* in newgrf_industry.cpp */ |
9626 | 29 |
uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available); |
9694
e72987579514
(svn r10775) [NoAI] -Sync: with trunk r10535:r10774.
rubidium
parents:
9686
diff
changeset
|
30 |
uint16 GetIndustryCallback(CallbackID callback, uint32 param1, uint32 param2, Industry *industry, IndustryType type, TileIndex tile); |
9704 | 31 |
uint32 GetIndustryIDAtOffset(TileIndex new_tile, const Industry *i); |
9631
8a2d1c2ceb88
(svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents:
9628
diff
changeset
|
32 |
void IndustryProductionCallback(Industry *ind, int reason); |
9724
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
33 |
bool CheckIfCallBackAllowsCreation(TileIndex tile, IndustryType type, uint itspec_index, uint32 seed); |
9686
d3c195c226f9
(svn r10636) [NoAI] -Sync with trunk r10532:10635.
rubidium
parents:
9641
diff
changeset
|
34 |
bool CheckIfCallBackAllowsAvailability(IndustryType type, IndustryAvailabilityCallType creation_type); |
9641
855e32c08c9b
(svn r10533) [NoAI] -Sync with trunk r10460:r10532.
truelight
parents:
9631
diff
changeset
|
35 |
|
855e32c08c9b
(svn r10533) [NoAI] -Sync with trunk r10460:r10532.
truelight
parents:
9631
diff
changeset
|
36 |
IndustryType MapNewGRFIndustryType(IndustryType grf_type, uint32 grf_id); |
9626 | 37 |
|
9628
b5c2449616b5
(svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents:
9627
diff
changeset
|
38 |
/* in newgrf_industrytiles.cpp*/ |
9641
855e32c08c9b
(svn r10533) [NoAI] -Sync with trunk r10460:r10532.
truelight
parents:
9631
diff
changeset
|
39 |
uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, IndustryID index); |
855e32c08c9b
(svn r10533) [NoAI] -Sync with trunk r10460:r10532.
truelight
parents:
9631
diff
changeset
|
40 |
|
9626 | 41 |
#endif /* NEWGRF_INDUSTRIES_H */ |