Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions nml/actions/action3.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,12 @@ def parse_graphics_block_single_id(
for info in info_list:
if "deprecate_message" in info:
generic.print_warning(generic.Warning.DEPRECATION, info["deprecate_message"], cargo_id.pos)
if "maxid" in info and id.value > info["maxid"]:
generic.print_warning(
generic.Warning.GENERIC,
"Make sure you don't use this item as result for callback '{}'.".format(cb_name),
cargo_id.pos,
)
if house_tile is not None and "tiles" in info and house_tile not in info["tiles"]:
continue

Expand Down
4 changes: 2 additions & 2 deletions nml/actions/action3_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def vehicle_length(value):
'cargo_capacity' : [ {'type': 'cb', 'num': 0x15, 'flag_bit': 3},
{'type': 'cb', 'num': 0x36, 'var10': 0x14, 'purchase': 'purchase_cargo_capacity'}],
'purchase_cargo_capacity' : {'type': 'cb', 'num': 0x36, 'var10': 0x14, 'purchase': 2},
'articulated_part' : {'type': 'cb', 'num': 0x16, 'flag_bit': 4, 'purchase': 1}, # Don't add separate purchase CB here
'articulated_part' : {'type': 'cb', 'num': 0x16, 'flag_bit': 4, 'maxid': 0x3FFF, 'purchase': 1}, # Don't add separate purchase CB here
'can_attach_wagon' : {'type': 'cb', 'num': 0x1D},
'speed' : {'type': 'cb', 'num': 0x36, 'var10': 0x09, 'purchase': 'purchase_speed'},
'purchase_speed' : {'type': 'cb', 'num': 0x36, 'var10': 0x09, 'purchase': 2},
Expand Down Expand Up @@ -84,7 +84,7 @@ def vehicle_length(value):
'cargo_capacity' : [ {'type': 'cb', 'num': 0x15, 'flag_bit': 3},
{'type': 'cb', 'num': 0x36, 'var10': 0x0F, 'purchase': 'purchase_cargo_capacity'}],
'purchase_cargo_capacity' : {'type': 'cb', 'num': 0x36, 'var10': 0x0F, 'purchase': 2},
'articulated_part' : {'type': 'cb', 'num': 0x16, 'flag_bit': 4, 'purchase': 1}, # Don't add separate purchase CB here
'articulated_part' : {'type': 'cb', 'num': 0x16, 'flag_bit': 4, 'maxid': 0x3FFF, 'purchase': 1}, # Don't add separate purchase CB here
'running_cost_factor' : {'type': 'cb', 'num': 0x36, 'var10': 0x09, 'purchase': 'purchase_running_cost_factor'},
'purchase_running_cost_factor' : {'type': 'cb', 'num': 0x36, 'var10': 0x09, 'purchase': 2},
'cost_factor' : {'type': 'cb', 'num': 0x36, 'var10': 0x11, 'purchase': 2},
Expand Down
Loading