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

# support for paper and the according industries in temperate
# originally written by Csaba Varga, GRM and vehicle code added by Josef Drexler

0 * 4	 25 00 00 00

# check for alpha 57
1 * 9	 09 8B 04 05 39 02 0A 02 02
2 * 19       0B 03 1F 00 "2.0.1 alpha 57" 00
3 * 9	 09 8B 04 04 3A 02 0A 02 0A
# skip if not on temperate
4 * 6	 07 83 01 03 00 00
# then, check for newcargos and newindustries and warn if they aren't enabled
5 * 6	 07 85 01 00 6B 01
6 * 17	 0B 03 1F 02 "newcargos on" 00
7 * 6	 07 85 01 00 67 01
8 * 21	 0B 03 1F 02 "newindustries on" 00
# check for GRF resources; feature 0B IDs 0B (cargo ID paper), 3B (cargo bit paper+20)
# first set param 0 to 0B, then param 1 to 3B
9 * 9	 0D 00 00 FF 00 0B 00 00 00
10 * 9	 0D 01 00 FF 00 3B 00 00 00
# then do the two checks and two marks (the last of which is merged with the second check)
11 * 9	 0D 00 00 02 FE FF 0B 01 00
12 * 9	 0D 01 00 03 FE FF 0B 01 00
13 * 9	 0D 00 00 03 FE FF 0B 01 00
# action 8
14 * 137	 08 06 38 2B 49 16
"Paper on temperate" 00
"Replacement for the moreindustriesperclimate switch" 0D 0A
"Enables paper, paper mills and printing works on temperate" 00

// prevent "invalid sprite" if not alpha 57
15 * 9        09 8b 04 04 3a 02 0a 02 00

# define the temperate paper cargo:
# bitnum: 1B (to maintain compatibility with old GRFs that expect paper there),
# name & stuff: the original TTD texts for arctic paper, icon: TTD's paper roll icon,
# weight/unit: 1 ton, time penalties: 07 and 60, base cost: 5461 (copied from orig. paper)
16 * 50	 00 0B 10 01 0B 08 1B 09 1F 00 0A 3F 00 0B 5F 00 0C 7F 00 0D 9F 00 0E D9 10 0F 10 10 07 11 3C
12 55 15 00 00 13 30 14 30 15 01 16 20 00 17 "PAPR"
# make the tiles of the printing works accept cargo 0b instead of 09
17 * 24	 00 09 03 04 00 08 2B 2C 2D 2E 09 2B 2C 2D 2E 0B 0B 08 0B 08 0B 08 0B 08
# bring paper mill and printing works over from arctic and modify them to produce/accept
# cargo 0b instead of 09. There's also a small hack here: we're overriding an arctic
# climate industry, while on temperate. This is needed to ensure that these industries
# have the same internal IDs as moreindustriesperclimate uses, so savegames can be safely
# transferred
18 * 17	 00 0A 04 01 00 08 0E 09 0E 10 0B FF 11 07 FF FF 00
19 * 17	 00 0A 04 01 01 08 07 09 07 10 05 FF 11 0B FF FF 00
# if our parameter isn't 1, enable paper mill and printing works during random game
# generation, and modify the colors slightly so paper mill/steel mill and
# factory/printing works can be distinguished on the map
20 * 9	 07 00 04 02 00 00 00 00 01
21 * 14	 00 0A 03 02 00 17 05 05 18 02 02 19 0F B0

# Enabling the default paper vehicles (if not already reserved using GRM)

# Train wagon ID 27 (railroad)
22 * 9	 0D 00 00 FF 00 27 00 00 00	# Set par0 = 27
23 * 9	 0D 00 00 05 FE FF 00 01 00	# Check feature - ID 27
24 * 9	 07 00 04 02 FF FF FF FF 01	# If reserved, skip action 0
25 * 9        00 00 02 01 27 06 03 15 0B	# set climate and cargo type
# Train wagon ID 45 (monorail)
26 * 9	 0D 00 00 FF 00 45 00 00 00
27 * 9	 0D 00 00 05 FE FF 00 01 00
28 * 9	 07 00 04 02 FF FF FF FF 01
29 * 9        00 00 02 01 45 06 03 15 0B
# Train wagon ID 65 (maglev)
30 * 9	 0D 00 00 FF 00 65 00 00 00
31 * 9	 0D 00 00 05 FE FF 00 01 00
32 * 9	 07 00 04 02 FF FF FF FF 01
33 * 9        00 00 02 01 65 06 03 15 0B
# Road vehicles 2B..2D
34 * 9	 0D 00 00 FF 00 2B 00 00 00
35 * 9	 0D 00 00 05 FE FF 01 03 00
36 * 9	 07 00 04 02 FF FF FF FF 01
37 * 13       00 01 02 03 2B 06 03 03 03 10 0B 0B 0B