// Automatically generated by GRFCODEC. Do not modify!
// (Info version 4)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel

// Add chemicals as new cargo to temperate
0 * 4	 18 00 00 00
// skip everything if we aren't on temperate
1 * 6	 07 83 01 03 00 10
// action 8
2 * 128	 08 06 38 2B 49 15 4E 65 77 63 61 72 67 6F 73 20 64 65 6D 6F 00 44 65 6D 6F 6E 73 74 72 61 74 69
6F 6E 20 6F 66 20 74 68 65 20 6E 65 77 63 61 72 67 6F 73 20 73 77 69 74 63 68 0D 0A 41 64 64 73
20 61 20 6E 65 77 20 63 61 72 67 6F 20 74 6F 20 6F 69 6C 20 77 65 6C 6C 20 70 72 6F 64 75 63 74
69 6F 6E 20 61 6E 64 20 6F 69 6C 20 72 65 66 69 6E 65 72 79 20 61 63 63 65 70 74 61 6E 63 65 00
// We override the tropic water tanker to carry our new cargo (0c) and rename it to
// chemical tanker. This demonstrates that we can reference a slot even without
// filling it first. The slot _must_ be filled sooner or later though, or it will
// contain random junk.
3 * 21	 04 00 1F 01 29 43 68 65 6D 69 63 61 6C 20 54 61 6E 6B 65 72 00
4 * 24	 00 00 07 01 29 06 01 0B 00 00 0D 00 0E 00 00 00 00 15 0C 1B 00 00 23 00
// Modify oil wells so it generates cargo 0c as well
5 * 14	 00 0A 04 01 00 08 0B 09 0B 10 03 0C 13 0C
// Modify one of the oil refinery tiles to make it accept cargo 0c...
6 * 12	 00 09 03 01 00 08 17 09 17 0A 0C 08
// ...and the industry itself to process cargo 0C
7 * 14	 00 0A 03 01 01 08 04 09 04 11 03 0C FF 00
// Define the needed new texts:
// "Chemicals"
8 * 16	 04 0B 9F 01 00 DC 43 68 65 6D 69 63 61 6C 73 00
// "Chemical"
9 * 15	 04 0B 9F 01 01 DC 43 68 65 6D 69 63 61 6C 00
// "(xxx liters) of chemicals"
10 * 21	 04 0B 9F 01 02 DC 87 20 6F 66 20 63 68 65 6D 69 63 61 6C 73 00
// "(xxx liters) of chemicals" (this would be the plural version, but it's the same for liquids)
11 * 21	 04 0B 9F 01 03 DC 87 20 6F 66 20 63 68 65 6D 69 63 61 6C 73 00
// "CM" (short for CheMicals)
12 * 10	 04 0B 9F 01 04 DC 0E 43 4D 00
// Cargo icon (yes I know a C letter isn't a decent icon, but I'm no drawer :P)
13 * 6	 01 0B 01 FF 01 00
14 c:\jatek\ttd.win\newgrf\SPRITES\chemiw.pcx 242 8 01 8 8 0 0
// The definition of the new cargo itself: slot 0C, bit: 1Fh, name: "Chemicals"
// weight: 1 ton/unit, time penalties: 7 and 8, price factor: 3185, color: dark brown
15 * 40	 00 0B 0D 01 0C 08 1F 09 00 DC 0A 01 DC 0B 02 DC 0C 03 DC 0D 04 DC 0E FF FF 0F 10 10 07 11 08 12
71 0C 00 00 13 3C 14 3C
// cargoID for cargo icon
16 * 7	 02 0B 00 01 00 00 00
// action3 to attach icon to cargo slot
17 * 7	 03 0B 01 0C 00 00 00
// now tell the AI to use our wagon for chemicals

// first of all, we need a dummy action2 for trains, so we can exit from callback 18
// without returning a correct value. The dummy action2 needs a dummy action1 as well,
// so it can refer to sprite numbers. The dummy sprite will be 1x1 in size to save some
// space
18 * 4	 01 00 01 01
19 c:\jatek\ttd.win\newgrf\SPRITES\chemiw.pcx 242 8 01 1 1 0 0
20 * 9	 02 00 fe 01 01 00 00 00 00
// ID 0 - if the AI wants to carry chemicals, choose our chemical tanker for it,
// otherwise go to our dummy action2 to pass control to the next handler in the chain
21 * 14	 02 00 00 81 80 00 ff 01 29 ff 0c 0c fe 00
// ID 1 - if the AI is choosing a wagon currently, go to ID 0, go to the dummy ID otherwise
22 * 14	 02 00 01 81 86 00 ff 01 00 00 08 08 fe 00
// ID 2 - if callback 18 is in progress, go to ID 1, go to the dummy ID otherwise
23 * 14	 02 00 02 81 0c 00 ff 01 01 00 18 18 fe 00
// attach ID 2 as a generic handler
24 * 6	 03 00 00 00 02 00