Commit Graph

32 Commits (2fd9096070cf5af8548dadafdaf32e49909f6a8b)

Author SHA1 Message Date
Peter Nelson 2fd9096070
Change: Decouple and remove landscape-dependent cargo types. (#11719)
Cargo types of default engines, industries and houses are now specified in terms of label.
4 months ago
Peter Nelson 17d02ed45f
Feature: NewGRF properties to set town production effect and multiplier. (#11947)
Town production effect is modelled on town acceptance (growth) effect, and so takes an original cargo slot for behaviour instead of a direct value.

NewGRF feature 0x0B, property 0x1E, takes 1 byte.

Valid values are:
- 0x00 to behave like passengers
- 0x02 to behave like mail
- 0xFF to behave like other cargo (i.e. not produced.)

If not set, town production effect is set based on the cargo label ('PASS' or 'MAIL').

Town production multiplier allows adjusting the amount of cargo produces when Town Production Effect is set, without needing to use callbacks.

NewGRF feature 0x0B (cargo), property 0x1F, accepts a 2 byte (word) value, similar to the cargo capacity multiplier property. The default value is 256 which means 100%, i.e. normal rate.
4 months ago
Peter Nelson 8d69d0549d Codechange: Add town production effect type and assign to cargo types. 4 months ago
Peter Nelson 60dcf3b5e2 Codechange: Rename TownEffect to TownAcceptanceEffect.
This makes it clearer that TownEffect only affects acceptance behaviour.
4 months ago
Peter Nelson 280dce9543 Codechange: Reorder CargoSpec to reduce alignment padding. 9 months ago
Peter Nelson 14bcfff6f5 Codechange: Rename INVALID_CARGO to INVALID_CARGO_BITNUM
... to avoid future ambiguity.
9 months ago
rubidium42 9f6fec01cd
Codechange: rename cargo aging days to periods, as they are not really days (#11112) 11 months ago
Jonathan G Rennison fc58ed9987
Codechange: Remove CargoSpec::multipliertowngrowth which is unused (#9701)
This is set by cargo property 19.
This property is only implemented in TTDPatch.
3 years ago
frosch a9ff296c3d Codechange: add constant for number of original cargoes. 3 years ago
Xaroth Brook d05be2cff5 Cleanup: Rework the CargoSpec macro for improved readability. 3 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
frosch 8beedd4cb6 (svn r23862) -Fix (r23860): Fix sweets capacity. 13 years ago
frosch 90c53046c7 (svn r23860) -Feature: [NewGRF] Add cargo property 1D to set the capacity multipliers when refitting vehicles, which do not use callback 15. 13 years ago
frosch 844dc8646f (svn r22430) -Fix: COAL, RUBR, SUGR and the coalmine used windows palette colours in smallmap/legends etc.. 13 years ago
alberth 41d2214e7e (svn r18413) -Doc: Added doxygen strings for cargo-type related enums, structs, and functions. 15 years ago
smatz 6c7f8fc8b4 (svn r17701) -Codechange: don't start line with a space if it's not inside comment 15 years ago
frosch eb1306110a (svn r17435) -Codechange: Move _cargo_payment_rates[] to CargoSpec::current_payment. 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium 59d45a04d6 (svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible. 15 years ago
peter1138 2e28978264 (svn r14144) -Fix (r8826): Incorrect cargo weights 16 years ago
frosch 93d0ca8731 (svn r13885) -Fix [FS#2168]: Var 0x7F is not feature-specific. 16 years ago
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 16 years ago
rubidium 00f0bf98ee (svn r12751) -Codechange: do what has been done in r11862 in a different way so it uses less memory. 16 years ago
glx faa1483ee6 (svn r12382) -Fix [FS#1864]: use 'items' unit for batteries, fizzy drinks, toys and bubbles in total cargo tab 16 years ago
rubidium 26c621945d (svn r11862) -Fix [FS#1559]: when two NewGRFs 'fight' to define the same cargo it could happen that the strings are defined by one cargo and the 'action2' by another and when one assumes that both come from the same NewGRF... So store the GRF ID with the strings. To be extra sure add the same protection mechanism to industries and towns too. 17 years ago
peter1138 6a13067931 (svn r11758) -Fix(ette): Populate 'void' cargo slots (unused slots in temperate and arctic) with default data as per pre-newcargo support. These slots are still disabled by default, but some NewGRFs (erroneously?) expect the default data. 17 years ago
glx a6a7b905af (svn r11428) -Fix: wrong string used for candy/sweets units_volume 17 years ago
peter1138 b8a82dcb05 (svn r9871) -Fix (r8826): Some cargo costs were wrong for different climates. Multiple definitions of the same cargo type are sometimes required. 17 years ago
peter1138 68572f1076 (svn r9418) -Codechange: Implement actions 1/2/3 for cargos, callback handler and custom icon sprites 17 years ago
peter1138 99577265de (svn r9236) -Codechange: Add 'town effect' attribute to cargo types. This will be used to specify how the cargo behaves wrt towns, instead of relying on fixed cargo IDs. 17 years ago
peter1138 ef2daa5060 (svn r8826) -Codechange: Replace _cargoc's separate arrays with a regular struct array (with accessor) and implement new initialization method using cargo labels. 18 years ago