diff --git a/nml/actions/action2var.py b/nml/actions/action2var.py index 878a789..6dd607e 100644 --- a/nml/actions/action2var.py +++ b/nml/actions/action2var.py @@ -619,6 +619,9 @@ class Varaction2Parser: self.var_list.append(expr) self.var_list_size += expr.get_size() + elif isinstance(expr, expression.SpriteGroupRef): + self.parse_proc_call(expr) + else: expr.supported_by_action2(True) assert False #supported_by_action2 should have raised the correct error already diff --git a/regression/019_switch.nml b/regression/019_switch.nml index 3e3806c..542ec32 100644 --- a/regression/019_switch.nml +++ b/regression/019_switch.nml @@ -13,7 +13,7 @@ switch(FEAT_INDUSTRIES, SELF, return_switch, STORE_PERM(current_year - 1950, 0x0 /* store a value of 4 into the permanent register 0x00, but evaluate current_month * use the array notation */ -switch(FEAT_INDUSTRIES, SELF, coal_mine_subtype_switch, [STORE_PERM(4, 0x00), current_month]) { +switch(FEAT_INDUSTRIES, SELF, coal_mine_subtype_switch, [STORE_PERM(4, 0x00), return_switch, current_month]) { 0..10: return string(STR_COALMINE_MONTH_0_10); 13: return_switch; // unreachable return string(STR_COALMINE_MONTH_11);