Loading

Paste #pitvvmta8

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

Comments

relevant nfo output

// Name: return_switch
4 * 38 02 0A FF 89
24 60 \dxFFFFFFFF \dxFFFFF862 \dx00000001
\2psto 1A 00 \dx00000001
\b1
\wx8000 \dx00000001 \dx00000000 // Bogus range to avoid nvar == 0
\wx8000 // default: return 0;

// Name: coal_mine_subtype_switch
5 * 55 02 0A FF 89
1A 20 \dx00000004
\2psto 1A 20 \dx00000000
\2r 7E FF 20 \dxFFFFFFFF
\2r 02 00 \dx000000FF
\b2
\wx8000 \dx00000000 \dx0000000A // 0 .. 10: return string(STR_COALMINE_MONTH_0_10);
\wx00FF \dx0000000D \dx0000000D // 13 .. 13: return_switch;
\wx8001 // default: return string(STR_COALMINE_MONTH_11);

Anonymous • 24 Nov 2019, 20:36:10 UTC