Skip to content

Commit adb6e66

Browse files
committed
(deps) Upgrade to newest upstream grf-py
1 parent 43fc19f commit adb6e66

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+209
-167
lines changed

agrf/lib/cargo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def __init__(self, id, **props):
1010
@staticmethod
1111
def translate_strings(props, g):
1212
props = props.copy()
13-
for p in ["type_text", "unit_text", "one_text", "many_text", "abbr_text"]:
13+
for p in ["type_name", "unit_name", "one_text", "many_text", "type_abbreviation"]:
1414
if props.get(p):
1515
s = props[p]
1616
if isinstance(s, grf.StringRef):

industry/cargos/alcohol.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
b"BEER",
77
grf.CargoClass.EXPRESS | grf.CargoClass.PIECE_GOODS | grf.CargoClass.LIQUID,
88
weight=17,
9-
units_text=CargoUnit.LITRE,
9+
units_of_cargo=CargoUnit.LITRE,
1010
is_freight=1,
11-
penalty1=9,
12-
penalty2=36,
11+
penalty_lowerbound=9,
12+
single_penalty_length=36,
1313
base_price=166,
1414
)

industry/cargos/ammonia.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
b"NH3_",
77
grf.CargoClass.LIQUID | grf.CargoClass.HAZARDOUS,
88
weight=10,
9-
units_text=CargoUnit.LITRE,
9+
units_of_cargo=CargoUnit.LITRE,
1010
is_freight=1,
11-
penalty1=32,
12-
penalty2=64,
11+
penalty_lowerbound=32,
12+
single_penalty_length=64,
1313
base_price=109,
1414
)

industry/cargos/beans.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x13,
66
b"BEAN",
77
grf.CargoClass.BULK,
8-
units_text=CargoUnit.TONNE,
8+
units_of_cargo=CargoUnit.TONNE,
99
is_freight=1,
10-
penalty1=4,
11-
penalty2=40,
10+
penalty_lowerbound=4,
11+
single_penalty_length=40,
1212
base_price=119,
1313
)

industry/cargos/building_materials.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x11,
66
b"BDMT",
77
grf.CargoClass.BULK | grf.CargoClass.PIECE_GOODS,
8-
units_text=CargoUnit.CRATE,
8+
units_of_cargo=CargoUnit.CRATE,
99
is_freight=1,
10-
penalty1=12,
11-
penalty2=255,
10+
penalty_lowerbound=12,
11+
single_penalty_length=255,
1212
base_price=133,
1313
)

industry/cargos/chemicals.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
b"RFPR",
77
grf.CargoClass.LIQUID | grf.CargoClass.PIECE_GOODS | grf.CargoClass.HAZARDOUS,
88
weight=19,
9-
units_text=CargoUnit.LITRE,
9+
units_of_cargo=CargoUnit.LITRE,
1010
is_freight=1,
11-
penalty1=20,
12-
penalty2=255,
11+
penalty_lowerbound=20,
12+
single_penalty_length=255,
1313
base_price=115,
1414
)

industry/cargos/china_clay.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x12,
66
b"KAOL",
77
grf.CargoClass.BULK | grf.CargoClass.LIQUID | grf.CargoClass.COVERED,
8-
units_text=CargoUnit.TONNE,
8+
units_of_cargo=CargoUnit.TONNE,
99
is_freight=1,
10-
penalty1=30,
11-
penalty2=255,
10+
penalty_lowerbound=30,
11+
single_penalty_length=255,
1212
base_price=100,
1313
)

industry/cargos/coal.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x01,
66
b"COAL",
77
grf.CargoClass.BULK,
8-
units_text=CargoUnit.TONNE,
8+
units_of_cargo=CargoUnit.TONNE,
99
is_freight=1,
10-
penalty1=40,
11-
penalty2=255,
10+
penalty_lowerbound=40,
11+
single_penalty_length=255,
1212
base_price=86,
1313
)

industry/cargos/coffee.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x14,
66
b"JAVA",
77
grf.CargoClass.EXPRESS | grf.CargoClass.PIECE_GOODS,
8-
units_text=CargoUnit.BAG,
8+
units_of_cargo=CargoUnit.BAG,
99
is_freight=1,
10-
penalty1=0,
11-
penalty2=26,
10+
penalty_lowerbound=0,
11+
single_penalty_length=26,
1212
base_price=173,
1313
)

industry/cargos/copper.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x15,
66
b"COPR",
77
grf.CargoClass.PIECE_GOODS,
8-
units_text=CargoUnit.TONNE,
8+
units_of_cargo=CargoUnit.TONNE,
99
is_freight=1,
10-
penalty1=7,
11-
penalty2=255,
10+
penalty_lowerbound=7,
11+
single_penalty_length=255,
1212
base_price=146,
1313
)

industry/cargos/copper_ore.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x0E,
66
b"CORE",
77
grf.CargoClass.BULK,
8-
units_text=CargoUnit.TONNE,
8+
units_of_cargo=CargoUnit.TONNE,
99
is_freight=1,
10-
penalty1=30,
11-
penalty2=255,
10+
penalty_lowerbound=30,
11+
single_penalty_length=255,
1212
base_price=89,
1313
)

industry/cargos/diamonds.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
b"DIAM",
77
grf.CargoClass.ARMOURED,
88
weight=2,
9-
units_text=CargoUnit.BAG,
9+
units_of_cargo=CargoUnit.BAG,
1010
is_freight=1,
11-
penalty1=30,
12-
penalty2=255,
11+
penalty_lowerbound=30,
12+
single_penalty_length=255,
1313
base_price=162,
1414
)

industry/cargos/engineering_supplies.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x16,
66
b"ENSP",
77
grf.CargoClass.EXPRESS | grf.CargoClass.PIECE_GOODS,
8-
units_text=CargoUnit.CRATE,
8+
units_of_cargo=CargoUnit.CRATE,
99
is_freight=1,
10-
penalty1=2,
11-
penalty2=32,
10+
penalty_lowerbound=2,
11+
single_penalty_length=32,
1212
base_price=172,
1313
)

industry/cargos/explosives.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
b"BOOM",
77
grf.CargoClass.EXPRESS | grf.CargoClass.PIECE_GOODS,
88
weight=4,
9-
units_text=CargoUnit.CRATE,
9+
units_of_cargo=CargoUnit.CRATE,
1010
is_freight=1,
11-
penalty1=6,
12-
penalty2=42,
11+
penalty_lowerbound=6,
12+
single_penalty_length=42,
1313
base_price=158,
1414
)

industry/cargos/farm_supplies.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
b"FMSP",
77
grf.CargoClass.EXPRESS | grf.CargoClass.PIECE_GOODS,
88
weight=10,
9-
units_text=CargoUnit.CRATE,
9+
units_of_cargo=CargoUnit.CRATE,
1010
is_freight=1,
11-
penalty1=2,
12-
penalty2=32,
11+
penalty_lowerbound=2,
12+
single_penalty_length=32,
1313
base_price=170,
1414
)

industry/cargos/fertiliser.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x19,
66
b"FERT",
77
grf.CargoClass.EXPRESS | grf.CargoClass.PIECE_GOODS,
8-
units_text=CargoUnit.TONNE,
8+
units_of_cargo=CargoUnit.TONNE,
99
is_freight=1,
10-
penalty1=22,
11-
penalty2=44,
10+
penalty_lowerbound=22,
11+
single_penalty_length=44,
1212
base_price=123,
1313
)

industry/cargos/fish.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x1A,
66
b"FISH",
77
grf.CargoClass.EXPRESS | grf.CargoClass.REFRIGERATED,
8-
units_text=CargoUnit.TONNE,
8+
units_of_cargo=CargoUnit.TONNE,
99
is_freight=1,
10-
penalty1=0,
11-
penalty2=18,
10+
penalty_lowerbound=0,
11+
single_penalty_length=18,
1212
base_price=134,
1313
)

industry/cargos/food.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x0B,
66
b"FOOD",
77
grf.CargoClass.EXPRESS | grf.CargoClass.REFRIGERATED,
8-
units_text=CargoUnit.TONNE,
8+
units_of_cargo=CargoUnit.TONNE,
99
is_freight=1,
10-
penalty1=0,
11-
penalty2=20,
10+
penalty_lowerbound=0,
11+
single_penalty_length=20,
1212
base_price=168,
1313
)

industry/cargos/fruit.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x0D,
66
b"FRUT",
77
grf.CargoClass.BULK | grf.CargoClass.REFRIGERATED,
8-
units_text=CargoUnit.TONNE,
8+
units_of_cargo=CargoUnit.TONNE,
99
is_freight=1,
10-
penalty1=0,
11-
penalty2=26,
10+
penalty_lowerbound=0,
11+
single_penalty_length=26,
1212
base_price=124,
1313
)

industry/cargos/gold.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
b"GOLD",
77
grf.CargoClass.ARMOURED,
88
weight=8,
9-
units_text=CargoUnit.BAG,
9+
units_of_cargo=CargoUnit.BAG,
1010
is_freight=1,
11-
penalty1=30,
12-
penalty2=255,
11+
penalty_lowerbound=30,
12+
single_penalty_length=255,
1313
base_price=152,
1414
)

industry/cargos/goods.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
grf.CargoClass.EXPRESS,
88
capacity_multiplier=0x200,
99
weight=8,
10-
units_text=CargoUnit.CRATE,
10+
units_of_cargo=CargoUnit.CRATE,
1111
is_freight=1,
12-
penalty1=10,
13-
penalty2=56,
12+
penalty_lowerbound=10,
13+
single_penalty_length=56,
1414
base_price=163,
1515
)

industry/cargos/grain.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x06,
66
b"GRAI",
77
grf.CargoClass.BULK,
8-
units_text=CargoUnit.TONNE,
8+
units_of_cargo=CargoUnit.TONNE,
99
is_freight=1,
10-
penalty1=4,
11-
penalty2=40,
10+
penalty_lowerbound=4,
11+
single_penalty_length=40,
1212
base_price=114,
1313
)

industry/cargos/iron_ore.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x08,
66
b"IORE",
77
grf.CargoClass.BULK,
8-
units_text=CargoUnit.TONNE,
8+
units_of_cargo=CargoUnit.TONNE,
99
is_freight=1,
10-
penalty1=40,
11-
penalty2=255,
10+
penalty_lowerbound=40,
11+
single_penalty_length=255,
1212
base_price=90,
1313
)

industry/cargos/livestock.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
b"LVST",
77
grf.CargoClass.PIECE_GOODS,
88
weight=3,
9-
units_text=CargoUnit.ITEM,
9+
units_of_cargo=CargoUnit.ITEM,
1010
is_freight=1,
11-
penalty1=0,
12-
penalty2=15,
11+
penalty_lowerbound=0,
12+
single_penalty_length=15,
1313
base_price=122,
1414
)

industry/cargos/mail.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
grf.CargoClass.MAIL,
88
capacity_multiplier=0x200,
99
weight=4,
10-
units_text=CargoUnit.BAG,
10+
units_of_cargo=CargoUnit.BAG,
1111
is_freight=0,
12-
penalty1=6,
13-
penalty2=24,
12+
penalty_lowerbound=6,
13+
single_penalty_length=24,
1414
base_price=167,
1515
)

industry/cargos/maize.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x06,
66
b"MAIZ",
77
grf.CargoClass.BULK,
8-
units_text=CargoUnit.TONNE,
8+
units_of_cargo=CargoUnit.TONNE,
99
is_freight=1,
10-
penalty1=4,
11-
penalty2=40,
10+
penalty_lowerbound=4,
11+
single_penalty_length=40,
1212
base_price=111,
1313
)

industry/cargos/milk.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
b"MILK",
77
grf.CargoClass.EXPRESS | grf.CargoClass.LIQUID | grf.CargoClass.REFRIGERATED,
88
weight=18,
9-
units_text=CargoUnit.LITRE,
9+
units_of_cargo=CargoUnit.LITRE,
1010
is_freight=1,
11-
penalty1=0,
12-
penalty2=16,
11+
penalty_lowerbound=0,
12+
single_penalty_length=16,
1313
base_price=131,
1414
)

industry/cargos/nitrates.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x1B,
66
b"NITR",
77
grf.CargoClass.BULK,
8-
units_text=CargoUnit.TONNE,
8+
units_of_cargo=CargoUnit.TONNE,
99
is_freight=1,
10-
penalty1=30,
11-
penalty2=255,
10+
penalty_lowerbound=30,
11+
single_penalty_length=255,
1212
base_price=103,
1313
)

industry/cargos/oil.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
b"OIL_",
77
grf.CargoClass.LIQUID,
88
weight=14,
9-
units_text=CargoUnit.LITRE,
9+
units_of_cargo=CargoUnit.LITRE,
1010
is_freight=1,
11-
penalty1=30,
12-
penalty2=255,
11+
penalty_lowerbound=30,
12+
single_penalty_length=255,
1313
base_price=101,
1414
)

industry/cargos/paper.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
0x0C,
66
b"PAPR",
77
grf.CargoClass.PIECE_GOODS,
8-
units_text=CargoUnit.TONNE,
8+
units_of_cargo=CargoUnit.TONNE,
99
is_freight=1,
10-
penalty1=12,
11-
penalty2=60,
10+
penalty_lowerbound=12,
11+
single_penalty_length=60,
1212
base_price=143,
1313
)

industry/cargos/passengers.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
grf.CargoClass.PASSENGERS,
88
capacity_multiplier=0x400,
99
weight=1,
10-
units_text=CargoUnit.PASSENGER,
10+
units_of_cargo=CargoUnit.PASSENGER,
1111
is_freight=0,
12-
penalty1=0,
13-
penalty2=22,
12+
penalty_lowerbound=0,
13+
single_penalty_length=22,
1414
base_price=137,
1515
)

0 commit comments

Comments
 (0)