# UI_Window_Inventory_InventoryNewSlotCell_596.luac
; fn @InventoryNewSlotCell.lua  line 0-0 np=0 va=1 ms=2 code=18 consts=6 upvals=1 protos=4
;   K[0]='InventoryNewSlotCell'
;   K[1]='__index'
;   K[2]='Init'
;   K[3]='Reset'
;   K[4]='OnButtonClicked'
;   K[5]='OnOpened'
;   upvals: _ENV
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABUP  _ENV[K0('InventoryNewSlotCell')] = R0
0002  GETTABUP  R0 = _ENV[K0('InventoryNewSlotCell')]
0003  GETTABUP  R1 = _ENV[K0('InventoryNewSlotCell')]
0004  SETTABLE  R0[K1('__index')] = R1
0005  GETTABUP  R0 = _ENV[K0('InventoryNewSlotCell')]
0006  CLOSURE   R1 = closure proto0
0007  SETTABLE  R0[K2('Init')] = R1
0008  GETTABUP  R0 = _ENV[K0('InventoryNewSlotCell')]
0009  CLOSURE   R1 = closure proto1
0010  SETTABLE  R0[K3('Reset')] = R1
0011  GETTABUP  R0 = _ENV[K0('InventoryNewSlotCell')]
0012  CLOSURE   R1 = closure proto2
0013  SETTABLE  R0[K4('OnButtonClicked')] = R1
0014  GETTABUP  R0 = _ENV[K0('InventoryNewSlotCell')]
0015  CLOSURE   R1 = closure proto3
0016  SETTABLE  R0[K5('OnOpened')] = R1
0017  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 6-17 np=1 va=0 ms=6 code=41 consts=19 upvals=1 protos=0
  ;   K[0]='Reset'
  ;   K[1]='GM'
  ;   K[2]='ConfigModel'
  ;   K[3]='GetLocalConfig'
  ;   K[4]='LocalConfigKey'
  ;   K[5]='InventorySlot'
  ;   K[6]='MiscModel'
  ;   K[7]='GetInventoryBoughtCapInNumber'
  ;   K[8]='m_gemCostNum'
  ;   K[9]='UnlockCost'
  ;   K[10]=1
  ;   K[11]=9999
  ;   K[12]='m_countText'
  ;   K[13]='text'
  ;   K[14]='preferredWidth'
  ;   K[15]=75
  ;   K[16]='UIUtil'
  ;   K[17]='SetSizeDelta'
  ;   K[18]='transform'
  ;   upvals: _ENV
  ;   locals: self(0-41), slotConfig(8-41), boughtCount(12-41)
  0000  SELF      R2 = R0[K0('Reset')] (self)
  0001  CALL      R1 = call(R1, 0 args, 1 rets)
  0002  GETTABUP  R1 = _ENV[K1('GM')]
  0003  GETTABLE  R1 = R1[K2('ConfigModel')]
  0004  SELF      R2 = R1[K3('GetLocalConfig')] (self)
  0005  GETTABUP  R3 = _ENV[K4('LocalConfigKey')]
  0006  GETTABLE  R3 = R3[K5('InventorySlot')]
  0007  CALL      R1 = call(R1, 1 args, 2 rets)
  0008  GETTABUP  R2 = _ENV[K1('GM')]
  0009  GETTABLE  R2 = R2[K6('MiscModel')]
  0010  SELF      R3 = R2[K7('GetInventoryBoughtCapInNumber')] (self)
  0011  CALL      R2 = call(R2, 1 args, 1 rets)
  0012  GETTABLE  R3 = R1[K9('UnlockCost')]
  0013  ADD       R4 = K10(1) add R2
  0014  GETTABLE  R3 = R3[R4]
  0015  TEST      if not R3 then   -> -131054
  0016  JMP       (jump)   -> 18
  0017  LOADK     R3 = K11 9999
  0018  SETTABLE  R0[K8('m_gemCostNum')] = R3
  0019  GETTABLE  R3 = R0[K12('m_countText')]
  0020  GETTABLE  R4 = R0[K8('m_gemCostNum')]
  0021  SETTABLE  R3[K13('text')] = R4
  0022  GETTABLE  R3 = R0[K12('m_countText')]
  0023  GETTABLE  R3 = R3[K14('preferredWidth')]
  0024  LT        if R0 lt R3   -> 7709
  0025  JMP       (jump)   -> 33
  0026  GETTABUP  R3 = _ENV[K16('UIUtil')]
  0027  GETTABLE  R3 = R3[K17('SetSizeDelta')]
  0028  GETTABLE  R4 = R0[K12('m_countText')]
  0029  GETTABLE  R4 = R4[K18('transform')]
  0030  LOADK     R5 = K15 75
  0031  CALL      R3 = call(R3, 0 args, 2 rets)
  0032  JMP       (jump)   -> 40
  0033  GETTABUP  R3 = _ENV[K16('UIUtil')]
  0034  GETTABLE  R3 = R3[K17('SetSizeDelta')]
  0035  GETTABLE  R4 = R0[K12('m_countText')]
  0036  GETTABLE  R4 = R4[K18('transform')]
  0037  GETTABLE  R5 = R0[K12('m_countText')]
  0038  GETTABLE  R5 = R5[K14('preferredWidth')]
  0039  CALL      R3 = call(R3, 0 args, 2 rets)
  0040  RETURN    return R0..R-1
; ---------- proto1 [Reset] ----------
  ; fn ?  line 19-31 np=1 va=0 ms=7 code=27 consts=11 upvals=1 protos=0
  ;   K[0]='m_canvasGroup'
  ;   K[1]=nil
  ;   K[2]='alpha'
  ;   K[3]=1
  ;   K[4]='m_shadowImg'
  ;   K[5]='UIUtil'
  ;   K[6]='SetColor'
  ;   K[7]='m_spine'
  ;   K[8]='Init'
  ;   K[9]='PlayAnimation'
  ;   K[10]='idle'
  ;   upvals: _ENV
  ;   locals: self(0-27)
  0000  GETTABLE  R1 = R0[K0('m_canvasGroup')]
  0001  EQ        if R1 eq K1(nil)   -> -130300
  0002  JMP       (jump)   -> 5
  0003  GETTABLE  R1 = R0[K0('m_canvasGroup')]
  0004  SETTABLE  R1[K2('alpha')] = K3(1)
  0005  GETTABLE  R1 = R0[K4('m_shadowImg')]
  0006  EQ        if R1 eq K1(nil)   -> -130295
  0007  JMP       (jump)   -> 14
  0008  GETTABUP  R1 = _ENV[K5('UIUtil')]
  0009  GETTABLE  R1 = R1[K6('SetColor')]
  0010  GETTABLE  R2 = R0[K4('m_shadowImg')]
  0011  LOADNIL   R3..R3 = nil
  0012  LOADK     R6 = K3 1
  0013  CALL      R1 = call(R1, 0 args, 5 rets)
  0014  GETTABLE  R1 = R0[K7('m_spine')]
  0015  EQ        if R1 eq K1(nil)   -> -130286
  0016  JMP       (jump)   -> 26
  0017  GETTABLE  R1 = R0[K7('m_spine')]
  0018  SELF      R2 = R1[K8('Init')] (self)
  0019  CALL      R1 = call(R1, 0 args, 1 rets)
  0020  GETTABLE  R1 = R0[K7('m_spine')]
  0021  SELF      R2 = R1[K9('PlayAnimation')] (self)
  0022  LOADK     R3 = K10 'idle'
  0023  LOADNIL   R4..R4 = nil
  0024  LOADBOOL  R5 = true
  0025  CALL      R1 = call(R1, 0 args, 4 rets)
  0026  RETURN    return R0..R-1
; ---------- proto2 [OnButtonClicked] ----------
  ; fn ?  line 33-40 np=1 va=0 ms=5 code=21 consts=12 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='MainBoardModel'
  ;   K[2]='BuyStoreSlot'
  ;   K[3]='UIManager'
  ;   K[4]='CloseView'
  ;   K[5]='UIPrefabConfigName'
  ;   K[6]='InventoryWindow'
  ;   K[7]='ShopModel'
  ;   K[8]='OnLackOfGem'
  ;   K[9]='m_gemCostNum'
  ;   K[10]='EBIType'
  ;   K[11]='BuyInventorySlot'
  ;   upvals: _ENV
  ;   locals: self(0-21)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('MainBoardModel')]
  0002  SELF      R2 = R1[K2('BuyStoreSlot')] (self)
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  TEST      if not R1 then   -> -131066
  0005  JMP       (jump)   -> 7
  0006  RETURN    return R0..R-1
  0007  GETTABUP  R1 = _ENV[K0('GM')]
  0008  GETTABLE  R1 = R1[K3('UIManager')]
  0009  SELF      R2 = R1[K4('CloseView')] (self)
  0010  GETTABUP  R3 = _ENV[K5('UIPrefabConfigName')]
  0011  GETTABLE  R3 = R3[K6('InventoryWindow')]
  0012  CALL      R1 = call(R1, 0 args, 2 rets)
  0013  GETTABUP  R1 = _ENV[K0('GM')]
  0014  GETTABLE  R1 = R1[K7('ShopModel')]
  0015  SELF      R2 = R1[K8('OnLackOfGem')] (self)
  0016  GETTABLE  R3 = R0[K9('m_gemCostNum')]
  0017  GETTABUP  R4 = _ENV[K10('EBIType')]
  0018  GETTABLE  R4 = R4[K11('BuyInventorySlot')]
  0019  CALL      R1 = call(R1, 0 args, 3 rets)
  0020  RETURN    return R0..R-1
; ---------- proto3 [OnOpened] ----------
  ; fn ?  line 42-54 np=1 va=0 ms=9 code=25 consts=13 upvals=1 protos=1
  ;   K[0]=0.2
  ;   K[1]='DOTween'
  ;   K[2]='Sequence'
  ;   K[3]='Append'
  ;   K[4]='m_canvasGroup'
  ;   K[5]='DOFade'
  ;   K[6]=0
  ;   K[7]='Join'
  ;   K[8]='m_shadowImg'
  ;   K[9]=1
  ;   K[10]='InsertCallback'
  ;   K[11]=0.1
  ;   K[12]=0.667
  ;   upvals: _ENV
  ;   locals: self(0-25), fadeDt(1-25), s(4-25)
  0000  LOADK     R1 = K0 0.2
  0001  GETTABUP  R2 = _ENV[K1('DOTween')]
  0002  GETTABLE  R2 = R2[K2('Sequence')]
  0003  CALL      R2 = call(R2, 1 args, 0 rets)
  0004  SELF      R4 = R2[K3('Append')] (self)
  0005  GETTABLE  R5 = R0[K4('m_canvasGroup')]
  0006  SELF      R6 = R5[K5('DOFade')] (self)
  0007  LOADK     R7 = K6 0
  0008  MOVE      R8 = R0
  0009  CALL      R5 = call(R5, -1 args, 3 rets)
  0010  CALL      R3 = call(R3, 0 args, -1 rets)
  0011  SELF      R4 = R2[K7('Join')] (self)
  0012  GETTABLE  R5 = R0[K8('m_shadowImg')]
  0013  SELF      R6 = R5[K5('DOFade')] (self)
  0014  LOADK     R7 = K9 1
  0015  MOVE      R8 = R0
  0016  CALL      R5 = call(R5, -1 args, 3 rets)
  0017  CALL      R3 = call(R3, 0 args, -1 rets)
  0018  SELF      R4 = R2[K10('InsertCallback')] (self)
  0019  SUB       R5 = K11(0.1) sub R1
  0020  CLOSURE   R6 = closure proto0
  0021  CALL      R3 = call(R3, 0 args, 3 rets)
  0022  ADD       R3 = K12(0.667) add R1
  0023  RETURN    return R3..R2
  0024  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 48-50 np=0 va=0 ms=3 code=5 consts=3 upvals=1 protos=0
    ;   K[0]='m_spine'
    ;   K[1]='PlayAnimation'
    ;   K[2]='hit'
    ;   upvals: self
    0000  GETTABUP  R0 = self[K0('m_spine')]
    0001  SELF      R1 = R0[K1('PlayAnimation')] (self)
    0002  LOADK     R2 = K2 'hit'
    0003  CALL      R0 = call(R0, 0 args, 2 rets)
    0004  RETURN    return R0..R-1
