author | skidd13 |
Tue, 20 Nov 2007 14:11:19 +0000 | |
changeset 8428 | f8300c908bd9 |
parent 8118 | 644c9acc640c |
child 8709 | 4187ad809fe7 |
permissions | -rw-r--r-- |
7331
0a7f00fed4e6
(svn r10074) -Add: Addition of IndustryOverrideManager as well as the basic (and unfinished) support for callbacks for industries
belugas
parents:
diff
changeset
|
1 |
/* $Id$ */ |
0a7f00fed4e6
(svn r10074) -Add: Addition of IndustryOverrideManager as well as the basic (and unfinished) support for callbacks for industries
belugas
parents:
diff
changeset
|
2 |
|
0a7f00fed4e6
(svn r10074) -Add: Addition of IndustryOverrideManager as well as the basic (and unfinished) support for callbacks for industries
belugas
parents:
diff
changeset
|
3 |
/** @file newgrf_industries.h */ |
0a7f00fed4e6
(svn r10074) -Add: Addition of IndustryOverrideManager as well as the basic (and unfinished) support for callbacks for industries
belugas
parents:
diff
changeset
|
4 |
|
0a7f00fed4e6
(svn r10074) -Add: Addition of IndustryOverrideManager as well as the basic (and unfinished) support for callbacks for industries
belugas
parents:
diff
changeset
|
5 |
#ifndef NEWGRF_INDUSTRIES_H |
0a7f00fed4e6
(svn r10074) -Add: Addition of IndustryOverrideManager as well as the basic (and unfinished) support for callbacks for industries
belugas
parents:
diff
changeset
|
6 |
#define NEWGRF_INDUSTRIES_H |
0a7f00fed4e6
(svn r10074) -Add: Addition of IndustryOverrideManager as well as the basic (and unfinished) support for callbacks for industries
belugas
parents:
diff
changeset
|
7 |
|
0a7f00fed4e6
(svn r10074) -Add: Addition of IndustryOverrideManager as well as the basic (and unfinished) support for callbacks for industries
belugas
parents:
diff
changeset
|
8 |
#include "industry.h" |
0a7f00fed4e6
(svn r10074) -Add: Addition of IndustryOverrideManager as well as the basic (and unfinished) support for callbacks for industries
belugas
parents:
diff
changeset
|
9 |
#include "newgrf_spritegroup.h" |
0a7f00fed4e6
(svn r10074) -Add: Addition of IndustryOverrideManager as well as the basic (and unfinished) support for callbacks for industries
belugas
parents:
diff
changeset
|
10 |
|
8117
6f265223b5fa
(svn r11151) -Codechange: add (partial) support for randomizing industry triggers (part of the backend for it). Furthermore update the documentation of the map's bits wrt to industries.
rubidium
parents:
7823
diff
changeset
|
11 |
/** When should the industry(tile) be triggered for random bits? */ |
6f265223b5fa
(svn r11151) -Codechange: add (partial) support for randomizing industry triggers (part of the backend for it). Furthermore update the documentation of the map's bits wrt to industries.
rubidium
parents:
7823
diff
changeset
|
12 |
enum IndustryTrigger { |
6f265223b5fa
(svn r11151) -Codechange: add (partial) support for randomizing industry triggers (part of the backend for it). Furthermore update the documentation of the map's bits wrt to industries.
rubidium
parents:
7823
diff
changeset
|
13 |
/** Triggered each tile loop */ |
6f265223b5fa
(svn r11151) -Codechange: add (partial) support for randomizing industry triggers (part of the backend for it). Furthermore update the documentation of the map's bits wrt to industries.
rubidium
parents:
7823
diff
changeset
|
14 |
INDUSTRY_TRIGGER_TILELOOP_PROCESS = 1, |
6f265223b5fa
(svn r11151) -Codechange: add (partial) support for randomizing industry triggers (part of the backend for it). Furthermore update the documentation of the map's bits wrt to industries.
rubidium
parents:
7823
diff
changeset
|
15 |
/** Triggered (whole industry) each 256 ticks */ |
6f265223b5fa
(svn r11151) -Codechange: add (partial) support for randomizing industry triggers (part of the backend for it). Furthermore update the documentation of the map's bits wrt to industries.
rubidium
parents:
7823
diff
changeset
|
16 |
INDUSTRY_TRIGGER_256_TICKS = 2, |
6f265223b5fa
(svn r11151) -Codechange: add (partial) support for randomizing industry triggers (part of the backend for it). Furthermore update the documentation of the map's bits wrt to industries.
rubidium
parents:
7823
diff
changeset
|
17 |
/** Triggered on cargo delivery */ |
6f265223b5fa
(svn r11151) -Codechange: add (partial) support for randomizing industry triggers (part of the backend for it). Furthermore update the documentation of the map's bits wrt to industries.
rubidium
parents:
7823
diff
changeset
|
18 |
INDUSTRY_TRIGGER_CARGO_DELIVERY = 4, |
6f265223b5fa
(svn r11151) -Codechange: add (partial) support for randomizing industry triggers (part of the backend for it). Furthermore update the documentation of the map's bits wrt to industries.
rubidium
parents:
7823
diff
changeset
|
19 |
}; |
6f265223b5fa
(svn r11151) -Codechange: add (partial) support for randomizing industry triggers (part of the backend for it). Furthermore update the documentation of the map's bits wrt to industries.
rubidium
parents:
7823
diff
changeset
|
20 |
|
7380
a9d0047b015c
(svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
7364
diff
changeset
|
21 |
/* in newgrf_industry.cpp */ |
7331
0a7f00fed4e6
(svn r10074) -Add: Addition of IndustryOverrideManager as well as the basic (and unfinished) support for callbacks for industries
belugas
parents:
diff
changeset
|
22 |
uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available); |
7823
cad4dec2b899
(svn r10690) -Codechange: use the enum that describes all callback IDs in favor of "just" using an untyped integer.
rubidium
parents:
7756
diff
changeset
|
23 |
uint16 GetIndustryCallback(CallbackID callback, uint32 param1, uint32 param2, Industry *industry, IndustryType type, TileIndex tile); |
8118
644c9acc640c
(svn r11152) -Fix: GetIndustryIDAtOffset crashed when translation of the GFX ID would be needed. Fix by Belugas.
rubidium
parents:
8117
diff
changeset
|
24 |
uint32 GetIndustryIDAtOffset(TileIndex new_tile, const Industry *i); |
7664
81c35390400e
(svn r10442) -Codechange: implement the industry production callback.
rubidium
parents:
7598
diff
changeset
|
25 |
void IndustryProductionCallback(Industry *ind, int reason); |
7703
bc4b879b7324
(svn r10485) -Codechange: add a callback mechanism to determine whether building an industry is allowed at a given location.
rubidium
parents:
7664
diff
changeset
|
26 |
bool CheckIfCallBackAllowsCreation(TileIndex tile, IndustryType type, uint itspec_index); |
7756
47e4498a0119
(svn r10572) -Codechange: Add function CheckIfCallBackAllowsAvailability for industries
belugas
parents:
7730
diff
changeset
|
27 |
bool CheckIfCallBackAllowsAvailability(IndustryType type, IndustryAvailabilityCallType creation_type); |
7331
0a7f00fed4e6
(svn r10074) -Add: Addition of IndustryOverrideManager as well as the basic (and unfinished) support for callbacks for industries
belugas
parents:
diff
changeset
|
28 |
|
7729
21b3ddd80928
(svn r10514) -Codechange: add support for getting the nearest industry with a given type.
rubidium
parents:
7703
diff
changeset
|
29 |
IndustryType MapNewGRFIndustryType(IndustryType grf_type, uint32 grf_id); |
21b3ddd80928
(svn r10514) -Codechange: add support for getting the nearest industry with a given type.
rubidium
parents:
7703
diff
changeset
|
30 |
|
7380
a9d0047b015c
(svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
belugas
parents:
7364
diff
changeset
|
31 |
/* in newgrf_industrytiles.cpp*/ |
7730
a7b31d4fcc40
(svn r10515) -Codechange: allow getting some more data about the environment of an industry.
rubidium
parents:
7729
diff
changeset
|
32 |
uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, IndustryID index); |
a7b31d4fcc40
(svn r10515) -Codechange: allow getting some more data about the environment of an industry.
rubidium
parents:
7729
diff
changeset
|
33 |
|
7331
0a7f00fed4e6
(svn r10074) -Add: Addition of IndustryOverrideManager as well as the basic (and unfinished) support for callbacks for industries
belugas
parents:
diff
changeset
|
34 |
#endif /* NEWGRF_INDUSTRIES_H */ |