diff -r a5e2fda0b31a nml/actions/action2var.py --- a/nml/actions/action2var.py Tue Sep 09 13:21:01 2014 +0200 +++ b/nml/actions/action2var.py Tue Sep 09 19:12:08 2014 +0200 @@ -956,8 +956,10 @@ # since we need the variable name later on, a reverse lookup is needed # TODO pass the function name along to avoid this func60x = lambda value, pos: expression.FunctionPtr(expression.Identifier(generic.reverse_lookup(vars_60x, value), pos), parse_60x_var, value) + funcg60x = lambda value, pos: expression.FunctionPtr(expression.Identifier(generic.reverse_lookup(action2var_variables.varact2_globalvars60x, value), pos), parse_60x_var, value) return expr.reduce(extra_dicts + [(action2var_variables.varact2_globalvars, parse_var), \ + (action2var_variables.varact2_globalvars60x, funcg60x), \ (vars_normal, parse_var), \ (vars_60x, func60x)] + \ global_constants.const_list) diff -r a5e2fda0b31a nml/actions/action2var_variables.py --- a/nml/actions/action2var_variables.py Tue Sep 09 13:21:01 2014 +0200 +++ b/nml/actions/action2var_variables.py Tue Sep 09 19:12:08 2014 +0200 @@ -112,6 +112,10 @@ 'current_year' : {'var': 0x24, 'start': 0, 'size': 32}, } +varact2_globalvars60x = { + 'CALL' : {'var': 0x7E, 'start': 0, 'size': 15, 'param_function': lambda name, args, pos, info: (expression.ConstantNumeric(0, pos), [])}, #value_function: , param_function: args[0].get_action2_id(feature) +} + # # Vehicles (features 0x00 - 0x03) # A few variables have an implementation that differs per vehicle type diff -r a5e2fda0b31a regression/013_train_callback.nml --- a/regression/013_train_callback.nml Tue Sep 09 13:21:01 2014 +0200 +++ b/regression/013_train_callback.nml Tue Sep 09 19:12:08 2014 +0200 @@ -95,7 +95,7 @@ // no default: instead fail CB and use capacity set in properties (30) } -switch (FEAT_TRAINS, SELF, bulk_wagon_cb_weight_switch, cargo_type_in_veh) { +switch (FEAT_TRAINS, SELF, bulk_wagon_cb_weight_switch, CALL(bulk_wagon_cb_capacity_switch)) { COAL: return 18; FRUT: return 18; FRVG: return 18;