# ChestNonstopActivity_View_ChestNonstopActivityHelpWindow_1812.luac
; fn @ChestNonstopActivityHelpWindow.lua  line 0-0 np=0 va=1 ms=3 code=21 consts=10 upvals=1 protos=3
;   K[0]='ChestNonstopActivityHelpWindow'
;   K[1]='setmetatable'
;   K[2]='windowMaskAlpha'
;   K[3]='EWindowMaskAlpha'
;   K[4]='Dark'
;   K[5]='ChestNonstopActivityBaseWindow'
;   K[6]='__index'
;   K[7]='_InitView'
;   K[8]='_GetTextKey'
;   K[9]='OnCloseFinish'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  GETTABUP  R2 = _ENV[K3('EWindowMaskAlpha')]
0003  GETTABLE  R2 = R2[K4('Dark')]
0004  SETTABLE  R1[K2('windowMaskAlpha')] = R2
0005  GETTABUP  R2 = _ENV[K5('ChestNonstopActivityBaseWindow')]
0006  CALL      R0 = call(R0, 1 args, 2 rets)
0007  SETTABUP  _ENV[K0('ChestNonstopActivityHelpWindow')] = R0
0008  GETTABUP  R0 = _ENV[K0('ChestNonstopActivityHelpWindow')]
0009  GETTABUP  R1 = _ENV[K0('ChestNonstopActivityHelpWindow')]
0010  SETTABLE  R0[K6('__index')] = R1
0011  GETTABUP  R0 = _ENV[K0('ChestNonstopActivityHelpWindow')]
0012  CLOSURE   R1 = closure proto0
0013  SETTABLE  R0[K7('_InitView')] = R1
0014  GETTABUP  R0 = _ENV[K0('ChestNonstopActivityHelpWindow')]
0015  CLOSURE   R1 = closure proto1
0016  SETTABLE  R0[K8('_GetTextKey')] = R1
0017  GETTABUP  R0 = _ENV[K0('ChestNonstopActivityHelpWindow')]
0018  CLOSURE   R1 = closure proto2
0019  SETTABLE  R0[K9('OnCloseFinish')] = R1
0020  RETURN    return R0..R-1
; ---------- proto0 [_InitView] ----------
  ; fn ?  line 17-25 np=1 va=0 ms=10 code=52 consts=23 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='ActivityManager'
  ;   K[2]='GetModel'
  ;   K[3]='ActivityType'
  ;   K[4]='BakeOut'
  ;   K[5]=nil
  ;   K[6]='CanAcquireToken'
  ;   K[7]='m_desc1Text'
  ;   K[8]='text'
  ;   K[9]='GameTextModel'
  ;   K[10]='GetText'
  ;   K[11]='_GetTextKey'
  ;   K[12]='chestnonstop_help_1'
  ;   K[13]='m_desc2Text'
  ;   K[14]='chestnonstop_help_2'
  ;   K[15]=1
  ;   K[16]=4
  ;   K[17]='string'
  ;   K[18]='format'
  ;   K[19]='m_gold%dImage'
  ;   K[20]='sprite'
  ;   K[21]='m_bakeOutSprite'
  ;   K[22]='m_goldSprite'
  ;   upvals: _ENV
  ;   locals: self(0-52), bakeOutModel(6-52), bBakeOut(13-52), (for index)(36-51), (for limit)(36-51), (for step)(36-51), i(37-50)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('ActivityManager')]
  0002  SELF      R2 = R1[K2('GetModel')] (self)
  0003  GETTABUP  R3 = _ENV[K3('ActivityType')]
  0004  GETTABLE  R3 = R3[K4('BakeOut')]
  0005  CALL      R1 = call(R1, 1 args, 2 rets)
  0006  EQ        if R1 eq K5(nil)   -> -130291
  0007  JMP       (jump)   -> 11
  0008  SELF      R3 = R1[K6('CanAcquireToken')] (self)
  0009  CALL      R2 = call(R2, 1 args, 1 rets)
  0010  JMP       (jump)   -> 13
  0011  LOADBOOL  R2 = false
  0012  LOADBOOL  R2 = true
  0013  GETTABLE  R3 = R0[K7('m_desc1Text')]
  0014  GETTABUP  R4 = _ENV[K0('GM')]
  0015  GETTABLE  R4 = R4[K9('GameTextModel')]
  0016  SELF      R5 = R4[K10('GetText')] (self)
  0017  SELF      R7 = R0[K11('_GetTextKey')] (self)
  0018  LOADK     R8 = K12 'chestnonstop_help_1'
  0019  MOVE      R9 = R0
  0020  CALL      R6 = call(R6, -1 args, 3 rets)
  0021  CALL      R4 = call(R4, 1 args, -1 rets)
  0022  SETTABLE  R3[K8('text')] = R4
  0023  GETTABLE  R3 = R0[K13('m_desc2Text')]
  0024  GETTABUP  R4 = _ENV[K0('GM')]
  0025  GETTABLE  R4 = R4[K9('GameTextModel')]
  0026  SELF      R5 = R4[K10('GetText')] (self)
  0027  SELF      R7 = R0[K11('_GetTextKey')] (self)
  0028  LOADK     R8 = K14 'chestnonstop_help_2'
  0029  MOVE      R9 = R0
  0030  CALL      R6 = call(R6, -1 args, 3 rets)
  0031  CALL      R4 = call(R4, 1 args, -1 rets)
  0032  SETTABLE  R3[K8('text')] = R4
  0033  LOADK     R3 = K15 1
  0034  LOADK     R4 = K16 4
  0035  LOADK     R5 = K15 1
  0036  FORPREP   forprep R3(sBx=13)   -> 50
  0037  GETTABUP  R7 = _ENV[K17('string')]
  0038  GETTABLE  R7 = R7[K18('format')]
  0039  LOADK     R8 = K19 'm_gold%dImage'
  0040  MOVE      R9 = R0
  0041  CALL      R7 = call(R7, 1 args, 2 rets)
  0042  GETTABLE  R7 = R0[R7]
  0043  TEST      if not R2 then   -> -131027
  0044  JMP       (jump)   -> 48
  0045  GETTABLE  R8 = R0[K21('m_bakeOutSprite')]
  0046  TEST      if not R8 then   -> -131023
  0047  JMP       (jump)   -> 49
  0048  GETTABLE  R8 = R0[K22('m_goldSprite')]
  0049  SETTABLE  R7[K20('sprite')] = R8
  0050  FORLOOP   forloop R3(sBx=-14)   -> 37
  0051  RETURN    return R0..R-1
; ---------- proto1 [_GetTextKey] ----------
  ; fn ?  line 29-34 np=3 va=0 ms=6 code=10 consts=3 upvals=1 protos=0
  ;   K[0]='string'
  ;   K[1]='format'
  ;   K[2]='%s_complete'
  ;   upvals: _ENV
  ;   locals: self(0-10), textKey(0-10), bBakeOut(0-10)
  0000  TEST      if not R2 then   -> -131070
  0001  JMP       (jump)   -> 8
  0002  GETTABUP  R3 = _ENV[K0('string')]
  0003  GETTABLE  R3 = R3[K1('format')]
  0004  LOADK     R4 = K2 '%s_complete'
  0005  MOVE      R5 = R0
  0006  TAILCALL  tailcall(R3, 0)
  0007  RETURN    return R3..R2
  0008  RETURN    return R1..R0
  0009  RETURN    return R0..R-1
; ---------- proto2 [OnCloseFinish] ----------
  ; fn ?  line 36-39 np=1 va=0 ms=3 code=9 consts=4 upvals=1 protos=0
  ;   K[0]='ChestNonstopActivityBaseWindow'
  ;   K[1]='OnCloseFinish'
  ;   K[2]='GetModel'
  ;   K[3]='OnHelpWindowClosed'
  ;   upvals: _ENV
  ;   locals: self(0-9)
  0000  GETTABUP  R1 = _ENV[K0('ChestNonstopActivityBaseWindow')]
  0001  GETTABLE  R1 = R1[K1('OnCloseFinish')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  SELF      R2 = R0[K2('GetModel')] (self)
  0005  CALL      R1 = call(R1, 1 args, 1 rets)
  0006  SELF      R2 = R1[K3('OnHelpWindowClosed')] (self)
  0007  CALL      R1 = call(R1, 0 args, 1 rets)
  0008  RETURN    return R0..R-1
