From d18d1275a2234b5747b1c69e067afc8d31f5c87b Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sun, 7 Jan 2024 22:49:13 +0000 Subject: [PATCH] Add: Support town_production_effect and town_production_multiplier. --- nml/actions/action0properties.py | 2 ++ nml/global_constants.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/nml/actions/action0properties.py b/nml/actions/action0properties.py index c32314cc..62890fcb 100644 --- a/nml/actions/action0properties.py +++ b/nml/actions/action0properties.py @@ -1263,6 +1263,8 @@ def check_accept(acp): "units_of_cargo": {"num": 0x1B, "size": 2, "string": 0xDC}, "items_of_cargo": {"num": 0x1C, "size": 2, "string": 0xDC}, "capacity_multiplier": {"num": 0x1D, "size": 2, "unit_conversion": 0x100}, + "town_production_effect": {"num": 0x1E, "size": 1}, + "town_production_multiplier":{"num": 0x1F, "size": 2, "unit_conversion": 0x100}, } # fmt: on diff --git a/nml/global_constants.py b/nml/global_constants.py index ef5b43cf..8b28ee3e 100644 --- a/nml/global_constants.py +++ b/nml/global_constants.py @@ -907,6 +907,11 @@ def constant_number(name, info, pos): "TOWNGROWTH_FOOD" : 0x0B, "TOWNGROWTH_NONE" : 0xFF, + # Town production effect on cargo + "TOWNPRODUCTION_PASSENGERS" : 0x00, + "TOWNPRODUCTION_MAIL" : 0x02, + "TOWNPRODUCTION_NONE" : 0xFF, + # Cargo callbacks "CARGO_CB_PROFIT" : 0x01, "CARGO_CB_STATION_RATING" : 0x02,