# BlockActivity_View_BlockActivityHudButton_1542.luac
; fn @BlockActivityHudButton.lua  line 0-0 np=0 va=1 ms=3 code=27 consts=10 upvals=1 protos=6
;   K[0]='BlockActivityHudButton'
;   K[1]='setmetatable'
;   K[2]='HudPropertyButton'
;   K[3]='__index'
;   K[4]='Awake'
;   K[5]='Init'
;   K[6]='_AddListeners'
;   K[7]='UpdateValueText'
;   K[8]='OnPropertyConsumed'
;   K[9]='UpdateNumForPlace'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  GETTABUP  R2 = _ENV[K2('HudPropertyButton')]
0003  CALL      R0 = call(R0, 1 args, 2 rets)
0004  SETTABUP  _ENV[K0('BlockActivityHudButton')] = R0
0005  GETTABUP  R0 = _ENV[K0('BlockActivityHudButton')]
0006  GETTABUP  R1 = _ENV[K0('BlockActivityHudButton')]
0007  SETTABLE  R0[K3('__index')] = R1
0008  GETTABUP  R0 = _ENV[K0('BlockActivityHudButton')]
0009  CLOSURE   R1 = closure proto0
0010  SETTABLE  R0[K4('Awake')] = R1
0011  GETTABUP  R0 = _ENV[K0('BlockActivityHudButton')]
0012  CLOSURE   R1 = closure proto1
0013  SETTABLE  R0[K5('Init')] = R1
0014  GETTABUP  R0 = _ENV[K0('BlockActivityHudButton')]
0015  CLOSURE   R1 = closure proto2
0016  SETTABLE  R0[K6('_AddListeners')] = R1
0017  GETTABUP  R0 = _ENV[K0('BlockActivityHudButton')]
0018  CLOSURE   R1 = closure proto3
0019  SETTABLE  R0[K7('UpdateValueText')] = R1
0020  GETTABUP  R0 = _ENV[K0('BlockActivityHudButton')]
0021  CLOSURE   R1 = closure proto4
0022  SETTABLE  R0[K8('OnPropertyConsumed')] = R1
0023  GETTABUP  R0 = _ENV[K0('BlockActivityHudButton')]
0024  CLOSURE   R1 = closure proto5
0025  SETTABLE  R0[K9('UpdateNumForPlace')] = R1
0026  RETURN    return R0..R-1
; ---------- proto0 [Awake] ----------
  ; fn ?  line 4-6 np=1 va=0 ms=3 code=5 consts=2 upvals=1 protos=0
  ;   K[0]='HudPropertyButton'
  ;   K[1]='Awake'
  ;   upvals: _ENV
  ;   locals: self(0-5)
  0000  GETTABUP  R1 = _ENV[K0('HudPropertyButton')]
  0001  GETTABLE  R1 = R1[K1('Awake')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  RETURN    return R0..R-1
; ---------- proto1 [Init] ----------
  ; fn ?  line 8-15 np=2 va=0 ms=5 code=15 consts=7 upvals=1 protos=0
  ;   K[0]=nil
  ;   K[1]='m_model'
  ;   K[2]='m_activityDefinition'
  ;   K[3]='GetActivityDefinition'
  ;   K[4]='HudPropertyButton'
  ;   K[5]='Init'
  ;   K[6]='ActivityTokenPropertyType'
  ;   upvals: _ENV
  ;   locals: self(0-15), model(0-15)
  0000  EQ        if R0 eq K0(nil)   -> -130302
  0001  JMP       (jump)   -> 3
  0002  RETURN    return R0..R-1
  0003  SETTABLE  R0[K1('m_model')] = R1
  0004  GETTABLE  R2 = R0[K1('m_model')]
  0005  SELF      R3 = R2[K3('GetActivityDefinition')] (self)
  0006  CALL      R2 = call(R2, 1 args, 1 rets)
  0007  SETTABLE  R0[K2('m_activityDefinition')] = R2
  0008  GETTABUP  R2 = _ENV[K4('HudPropertyButton')]
  0009  GETTABLE  R2 = R2[K5('Init')]
  0010  MOVE      R3 = R0
  0011  GETTABLE  R4 = R0[K2('m_activityDefinition')]
  0012  GETTABLE  R4 = R4[K6('ActivityTokenPropertyType')]
  0013  CALL      R2 = call(R2, 0 args, 2 rets)
  0014  RETURN    return R0..R-1
; ---------- proto2 [_AddListeners] ----------
  ; fn ?  line 17-22 np=1 va=0 ms=5 code=15 consts=8 upvals=1 protos=0
  ;   K[0]='HudPropertyButton'
  ;   K[1]='_AddListeners'
  ;   K[2]='m_activityDefinition'
  ;   K[3]=nil
  ;   K[4]='EventDispatcher'
  ;   K[5]='AddListener'
  ;   K[6]='StateChangedEvent'
  ;   K[7]='SyncToModelValue'
  ;   upvals: _ENV
  ;   locals: self(0-15)
  0000  GETTABUP  R1 = _ENV[K0('HudPropertyButton')]
  0001  GETTABLE  R1 = R1[K1('_AddListeners')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  GETTABLE  R1 = R0[K2('m_activityDefinition')]
  0005  EQ        if R1 eq K3(nil)   -> -130294
  0006  JMP       (jump)   -> 14
  0007  GETTABUP  R1 = _ENV[K4('EventDispatcher')]
  0008  GETTABLE  R1 = R1[K5('AddListener')]
  0009  GETTABLE  R2 = R0[K2('m_activityDefinition')]
  0010  GETTABLE  R2 = R2[K6('StateChangedEvent')]
  0011  MOVE      R3 = R0
  0012  GETTABLE  R4 = R0[K7('SyncToModelValue')]
  0013  CALL      R1 = call(R1, 0 args, 3 rets)
  0014  RETURN    return R0..R-1
; ---------- proto3 [UpdateValueText] ----------
  ; fn ?  line 24-29 np=1 va=0 ms=5 code=21 consts=11 upvals=1 protos=0
  ;   K[0]='HudPropertyButton'
  ;   K[1]='UpdateValueText'
  ;   K[2]='m_exclamationGo'
  ;   K[3]=nil
  ;   K[4]='UIUtil'
  ;   K[5]='SetActive'
  ;   K[6]='math'
  ;   K[7]='floor'
  ;   K[8]='m_value'
  ;   K[9]=0.5
  ;   K[10]=0
  ;   upvals: _ENV
  ;   locals: self(0-21)
  0000  GETTABUP  R1 = _ENV[K0('HudPropertyButton')]
  0001  GETTABLE  R1 = R1[K1('UpdateValueText')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  GETTABLE  R1 = R0[K2('m_exclamationGo')]
  0005  EQ        if R1 eq K3(nil)   -> -130294
  0006  JMP       (jump)   -> 20
  0007  GETTABUP  R1 = _ENV[K4('UIUtil')]
  0008  GETTABLE  R1 = R1[K5('SetActive')]
  0009  GETTABLE  R2 = R0[K2('m_exclamationGo')]
  0010  GETTABUP  R3 = _ENV[K6('math')]
  0011  GETTABLE  R3 = R3[K7('floor')]
  0012  GETTABLE  R4 = R0[K8('m_value')]
  0013  ADD       R4 = K9(0.5) add R4
  0014  CALL      R3 = call(R3, 1 args, 1 rets)
  0015  LT        if R1 lt R3   -> 5140
  0016  JMP       (jump)   -> 18
  0017  LOADBOOL  R3 = false
  0018  LOADBOOL  R3 = true
  0019  CALL      R1 = call(R1, 0 args, 2 rets)
  0020  RETURN    return R0..R-1
; ---------- proto4 [OnPropertyConsumed] ----------
  ; fn ?  line 32-38 np=2 va=0 ms=5 code=14 consts=6 upvals=1 protos=0
  ;   K[0]='HudPropertyButton'
  ;   K[1]='OnPropertyConsumed'
  ;   K[2]='property'
  ;   K[3]='PROPERTY_TYPE'
  ;   K[4]='ePropertyType'
  ;   K[5]='SyncToModelValue'
  ;   upvals: _ENV
  ;   locals: self(0-14), msg(0-14), type(8-14)
  0000  GETTABUP  R2 = _ENV[K0('HudPropertyButton')]
  0001  GETTABLE  R2 = R2[K1('OnPropertyConsumed')]
  0002  MOVE      R3 = R0
  0003  MOVE      R4 = R0
  0004  CALL      R2 = call(R2, 0 args, 2 rets)
  0005  GETTABLE  R2 = R1[K2('property')]
  0006  GETTABUP  R3 = _ENV[K3('PROPERTY_TYPE')]
  0007  GETTABLE  R2 = R2[R3]
  0008  GETTABLE  R3 = R0[K4('ePropertyType')]
  0009  EQ        if R0 eq R3   -> -130034
  0010  JMP       (jump)   -> 13
  0011  SELF      R4 = R0[K5('SyncToModelValue')] (self)
  0012  CALL      R3 = call(R3, 0 args, 1 rets)
  0013  RETURN    return R0..R-1
; ---------- proto5 [UpdateNumForPlace] ----------
  ; fn ?  line 40-43 np=1 va=0 ms=6 code=10 consts=7 upvals=1 protos=0
  ;   K[0]='GetPropertyNum'
  ;   K[1]='m_valueText'
  ;   K[2]='text'
  ;   K[3]='math'
  ;   K[4]='max'
  ;   K[5]=1
  ;   K[6]=0
  ;   upvals: _ENV
  ;   locals: self(0-10), curVal(2-10)
  0000  SELF      R2 = R0[K0('GetPropertyNum')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  GETTABLE  R2 = R0[K1('m_valueText')]
  0003  GETTABUP  R3 = _ENV[K3('math')]
  0004  GETTABLE  R3 = R3[K4('max')]
  0005  SUB       R4 = K5(1) sub R1
  0006  LOADK     R5 = K6 0
  0007  CALL      R3 = call(R3, 1 args, 2 rets)
  0008  SETTABLE  R2[K2('text')] = R3
  0009  RETURN    return R0..R-1
