diff --git a/nml/actions/action2var_variables.py b/nml/actions/action2var_variables.py index 46bdbf8b..3e2dafdb 100644 --- a/nml/actions/action2var_variables.py +++ b/nml/actions/action2var_variables.py @@ -352,7 +352,6 @@ def platform_info_fix_var(var, info): 'nearby_tile_height' : {'var': 0x67, 'start': 16, 'size': 8, 'param_function': signed_tile_offset}, 'nearby_tile_class' : {'var': 0x67, 'start': 24, 'size': 4, 'param_function': signed_tile_offset}, 'nearby_tile_is_station' : {'var': 0x68, 'start': 0, 'size': 32, 'param_function': signed_tile_offset, 'value_function': lambda var, info: nmlop.CMP_NEQ(var, 0xFFFFFFFF)}, - 'nearby_tile_station_id' : {'var': 0x68, 'start': 0, 'size': 8, 'param_function': signed_tile_offset}, 'nearby_tile_original_gfx' : {'var': 0x68, 'start': 8, 'size': 2, 'param_function': signed_tile_offset, 'value_function': value_equals(0)}, 'nearby_tile_same_grf' : {'var': 0x68, 'start': 8, 'size': 2, 'param_function': signed_tile_offset, 'value_function': value_equals(1)}, 'nearby_tile_other_grf' : {'var': 0x68, 'start': 8, 'size': 2, 'param_function': signed_tile_offset, 'value_function': value_equals(2)}, @@ -360,6 +359,7 @@ def platform_info_fix_var(var, info): 'nearby_tile_perpendicular' : {'var': 0x68, 'start': 11, 'size': 1, 'param_function': signed_tile_offset}, 'nearby_tile_tile_type' : {'var': 0x68, 'start': 11, 'size': 3, 'param_function': signed_tile_offset}, 'nearby_tile_grfid' : {'var': 0x6A, 'start': 0, 'size': 32, 'param_function': signed_tile_offset}, + 'nearby_tile_station_id' : {'var': 0x6B, 'start': 0, 'size': 16, 'param_function': signed_tile_offset}, # 'var' will be set in the value_function, depending on parameter 'platform_length' : {'var': 0x00, 'start': 16, 'size': 4, 'param_function': platform_info_param, 'value_function': platform_info_fix_var}, 'platform_count' : {'var': 0x00, 'start': 20, 'size': 4, 'param_function': platform_info_param, 'value_function': platform_info_fix_var}, @@ -823,7 +823,6 @@ def industry_cargotype(name, args, pos, info): 'nearby_tile_class' : {'var': 0x67, 'start': 24, 'size': 4, 'param_function': signed_tile_offset}, 'nearby_tile_road_stop_info' : {'var': 0x68, 'start': 0, 'size': 32, 'param_function': signed_tile_offset}, 'nearby_tile_is_road_stop' : {'var': 0x68, 'start': 0, 'size': 32, 'param_function': signed_tile_offset, 'value_function': lambda var, info: nmlop.CMP_NEQ(var, 0xFFFFFFFF)}, - 'nearby_tile_road_stop_id' : {'var': 0x68, 'start': 0, 'size': 8, 'param_function': signed_tile_offset}, 'nearby_tile_same_grf' : {'var': 0x68, 'start': 8, 'size': 2, 'param_function': signed_tile_offset, 'value_function': value_equals(0)}, 'nearby_tile_other_grf' : {'var': 0x68, 'start': 8, 'size': 2, 'param_function': signed_tile_offset, 'value_function': value_equals(1)}, 'nearby_tile_original_gfx' : {'var': 0x68, 'start': 8, 'size': 2, 'param_function': signed_tile_offset, 'value_function': value_equals(2)}, @@ -834,6 +833,7 @@ def industry_cargotype(name, args, pos, info): 'nearby_tile_stop_type' : {'var': 0x68, 'start': 16, 'size': 4, 'param_function': signed_tile_offset}, 'nearby_tile_same_stop_type' : {'var': 0x68, 'start': 20, 'size': 1, 'param_function': signed_tile_offset}, 'nearby_tile_grfid' : {'var': 0x6A, 'start': 0, 'size': 32, 'param_function': signed_tile_offset}, + 'nearby_tile_road_stop_id' : {'var': 0x6B, 'start': 0, 'size': 16, 'param_function': signed_tile_offset}, } class VarAct2Scope: diff --git a/regression/040_station.nml b/regression/040_station.nml index 7458d5b2..65c3b2e9 100644 --- a/regression/040_station.nml +++ b/regression/040_station.nml @@ -115,7 +115,7 @@ item (FEAT_STATIONS, basic_station, 255) { } graphics { foundations: 0; - prepare_layout: [STORE_TEMP(0,0), STORE_TEMP(1,1)]; + prepare_layout: [STORE_TEMP(0,nearby_tile_station_id(-1,2)), STORE_TEMP(1,1)]; purchase_prepare_layout: STORE_TEMP(3,3); sprite_layouts: [ station_sprite_layout_0, diff --git a/regression/expected/040_station.grf b/regression/expected/040_station.grf index c04740a6..847e80da 100644 Binary files a/regression/expected/040_station.grf and b/regression/expected/040_station.grf differ diff --git a/regression/expected/040_station.nfo b/regression/expected/040_station.nfo index a5850a48..10289544 100644 --- a/regression/expected/040_station.nfo +++ b/regression/expected/040_station.nfo @@ -79,9 +79,9 @@ \wx8000 // Return computed value // Name: Station Layout@prepare - Id FF -17 * 34 02 04 FC 89 +17 * 35 02 04 FC 89 1A 20 \dx00000000 -\2sto 1A 20 \dx00000000 +\2sto 6B 2F 20 \dx0000FFFF \2r 1A 20 \dx00000001 \2sto 1A 00 \dx00000001 \b0