# BlockActivity_View_BlockActivityEntry_1540.luac
; fn @BlockActivityEntry.lua  line 0-0 np=0 va=1 ms=3 code=39 consts=14 upvals=1 protos=10
;   K[0]='BlockActivityEntry'
;   K[1]='setmetatable'
;   K[2]='HudPropertyButton'
;   K[3]='__index'
;   K[4]='Awake'
;   K[5]='Init'
;   K[6]='_AddListeners'
;   K[7]='OnGameModeChanged'
;   K[8]='UpdatePerSecond'
;   K[9]='OnBtnClicked'
;   K[10]='OnStateChanged'
;   K[11]='UpdateValueText'
;   K[12]='OnPropertyConsumed'
;   K[13]='_OnCloseView'
;   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('BlockActivityEntry')] = R0
0005  GETTABUP  R0 = _ENV[K0('BlockActivityEntry')]
0006  GETTABUP  R1 = _ENV[K0('BlockActivityEntry')]
0007  SETTABLE  R0[K3('__index')] = R1
0008  GETTABUP  R0 = _ENV[K0('BlockActivityEntry')]
0009  CLOSURE   R1 = closure proto0
0010  SETTABLE  R0[K4('Awake')] = R1
0011  GETTABUP  R0 = _ENV[K0('BlockActivityEntry')]
0012  CLOSURE   R1 = closure proto1
0013  SETTABLE  R0[K5('Init')] = R1
0014  GETTABUP  R0 = _ENV[K0('BlockActivityEntry')]
0015  CLOSURE   R1 = closure proto2
0016  SETTABLE  R0[K6('_AddListeners')] = R1
0017  GETTABUP  R0 = _ENV[K0('BlockActivityEntry')]
0018  CLOSURE   R1 = closure proto3
0019  SETTABLE  R0[K7('OnGameModeChanged')] = R1
0020  GETTABUP  R0 = _ENV[K0('BlockActivityEntry')]
0021  CLOSURE   R1 = closure proto4
0022  SETTABLE  R0[K8('UpdatePerSecond')] = R1
0023  GETTABUP  R0 = _ENV[K0('BlockActivityEntry')]
0024  CLOSURE   R1 = closure proto5
0025  SETTABLE  R0[K9('OnBtnClicked')] = R1
0026  GETTABUP  R0 = _ENV[K0('BlockActivityEntry')]
0027  CLOSURE   R1 = closure proto6
0028  SETTABLE  R0[K10('OnStateChanged')] = R1
0029  GETTABUP  R0 = _ENV[K0('BlockActivityEntry')]
0030  CLOSURE   R1 = closure proto7
0031  SETTABLE  R0[K11('UpdateValueText')] = R1
0032  GETTABUP  R0 = _ENV[K0('BlockActivityEntry')]
0033  CLOSURE   R1 = closure proto8
0034  SETTABLE  R0[K12('OnPropertyConsumed')] = R1
0035  GETTABUP  R0 = _ENV[K0('BlockActivityEntry')]
0036  CLOSURE   R1 = closure proto9
0037  SETTABLE  R0[K13('_OnCloseView')] = R1
0038  RETURN    return R0..R-1
; ---------- proto0 [Awake] ----------
  ; fn ?  line 4-10 np=1 va=0 ms=3 code=12 consts=6 upvals=1 protos=0
  ;   K[0]='HudPropertyButton'
  ;   K[1]='Awake'
  ;   K[2]='m_activityDefinition'
  ;   K[3]=nil
  ;   K[4]='OnStateChanged'
  ;   K[5]='UpdatePerSecond'
  ;   upvals: _ENV
  ;   locals: self(0-12)
  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  GETTABLE  R1 = R0[K2('m_activityDefinition')]
  0005  EQ        if R1 eq K3(nil)   -> -130294
  0006  JMP       (jump)   -> 11
  0007  SELF      R2 = R0[K4('OnStateChanged')] (self)
  0008  CALL      R1 = call(R1, 0 args, 1 rets)
  0009  SELF      R2 = R0[K5('UpdatePerSecond')] (self)
  0010  CALL      R1 = call(R1, 0 args, 1 rets)
  0011  RETURN    return R0..R-1
; ---------- proto1 [Init] ----------
  ; fn ?  line 12-22 np=2 va=0 ms=5 code=23 consts=11 upvals=1 protos=0
  ;   K[0]=nil
  ;   K[1]='m_model'
  ;   K[2]='m_activityType'
  ;   K[3]='GetType'
  ;   K[4]='m_activityDefinition'
  ;   K[5]='GetActivityDefinition'
  ;   K[6]='HudPropertyButton'
  ;   K[7]='Init'
  ;   K[8]='ActivityTokenPropertyType'
  ;   K[9]='UpdatePerSecond'
  ;   K[10]='OnStateChanged'
  ;   upvals: _ENV
  ;   locals: self(0-23), model(0-23)
  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('GetType')] (self)
  0006  CALL      R2 = call(R2, 1 args, 1 rets)
  0007  SETTABLE  R0[K2('m_activityType')] = R2
  0008  GETTABLE  R2 = R0[K1('m_model')]
  0009  SELF      R3 = R2[K5('GetActivityDefinition')] (self)
  0010  CALL      R2 = call(R2, 1 args, 1 rets)
  0011  SETTABLE  R0[K4('m_activityDefinition')] = R2
  0012  GETTABUP  R2 = _ENV[K6('HudPropertyButton')]
  0013  GETTABLE  R2 = R2[K7('Init')]
  0014  MOVE      R3 = R0
  0015  GETTABLE  R4 = R0[K4('m_activityDefinition')]
  0016  GETTABLE  R4 = R4[K8('ActivityTokenPropertyType')]
  0017  CALL      R2 = call(R2, 0 args, 2 rets)
  0018  SELF      R3 = R0[K9('UpdatePerSecond')] (self)
  0019  CALL      R2 = call(R2, 0 args, 1 rets)
  0020  SELF      R3 = R0[K10('OnStateChanged')] (self)
  0021  CALL      R2 = call(R2, 0 args, 1 rets)
  0022  RETURN    return R0..R-1
; ---------- proto2 [_AddListeners] ----------
  ; fn ?  line 24-29 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]='OnStateChanged'
  ;   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('OnStateChanged')]
  0013  CALL      R1 = call(R1, 0 args, 3 rets)
  0014  RETURN    return R0..R-1
; ---------- proto3 [OnGameModeChanged] ----------
  ; fn ?  line 31-34 np=1 va=0 ms=3 code=7 consts=3 upvals=1 protos=0
  ;   K[0]='HudPropertyButton'
  ;   K[1]='OnGameModeChanged'
  ;   K[2]='OnStateChanged'
  ;   upvals: _ENV
  ;   locals: self(0-7)
  0000  GETTABUP  R1 = _ENV[K0('HudPropertyButton')]
  0001  GETTABLE  R1 = R1[K1('OnGameModeChanged')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  SELF      R2 = R0[K2('OnStateChanged')] (self)
  0005  CALL      R1 = call(R1, 0 args, 1 rets)
  0006  RETURN    return R0..R-1
; ---------- proto4 [UpdatePerSecond] ----------
  ; fn ?  line 36-42 np=1 va=0 ms=9 code=27 consts=14 upvals=1 protos=0
  ;   K[0]='m_model'
  ;   K[1]='GetNextStateTime'
  ;   K[2]=nil
  ;   K[3]='math'
  ;   K[4]='max'
  ;   K[5]=0
  ;   K[6]='GM'
  ;   K[7]='GameModel'
  ;   K[8]='GetServerTime'
  ;   K[9]='m_countDownText'
  ;   K[10]='text'
  ;   K[11]='TimeUtil'
  ;   K[12]='ParseTimeDescription'
  ;   K[13]=2
  ;   upvals: _ENV
  ;   locals: self(0-27), nextStateTime(6-27), delta(17-26)
  0000  GETTABLE  R1 = R0[K0('m_model')]
  0001  TEST      if not R1 then   -> -131069
  0002  JMP       (jump)   -> 6
  0003  GETTABLE  R1 = R0[K0('m_model')]
  0004  SELF      R2 = R1[K1('GetNextStateTime')] (self)
  0005  CALL      R1 = call(R1, 1 args, 1 rets)
  0006  EQ        if R1 eq K2(nil)   -> -130294
  0007  JMP       (jump)   -> 26
  0008  GETTABUP  R2 = _ENV[K3('math')]
  0009  GETTABLE  R2 = R2[K4('max')]
  0010  LOADK     R3 = K5 0
  0011  GETTABUP  R4 = _ENV[K6('GM')]
  0012  GETTABLE  R4 = R4[K7('GameModel')]
  0013  SELF      R5 = R4[K8('GetServerTime')] (self)
  0014  CALL      R4 = call(R4, 1 args, 1 rets)
  0015  SUB       R4 = R4 sub R1
  0016  CALL      R2 = call(R2, 1 args, 2 rets)
  0017  GETTABLE  R3 = R0[K9('m_countDownText')]
  0018  GETTABUP  R4 = _ENV[K11('TimeUtil')]
  0019  GETTABLE  R4 = R4[K12('ParseTimeDescription')]
  0020  MOVE      R5 = R0
  0021  LOADK     R6 = K13 2
  0022  LOADBOOL  R7 = false
  0023  LOADBOOL  R8 = false
  0024  CALL      R4 = call(R4, 1 args, 4 rets)
  0025  SETTABLE  R3[K10('text')] = R4
  0026  RETURN    return R0..R-1
; ---------- proto5 [OnBtnClicked] ----------
  ; fn ?  line 44-48 np=1 va=0 ms=5 code=15 consts=10 upvals=1 protos=0
  ;   K[0]='m_model'
  ;   K[1]='GetState'
  ;   K[2]='ActivityState'
  ;   K[3]='Started'
  ;   K[4]='GM'
  ;   K[5]='UIManager'
  ;   K[6]='OpenView'
  ;   K[7]='m_activityDefinition'
  ;   K[8]='MainWindowPrefabName'
  ;   K[9]='m_activityType'
  ;   upvals: _ENV
  ;   locals: self(0-15)
  0000  GETTABLE  R1 = R0[K0('m_model')]
  0001  SELF      R2 = R1[K1('GetState')] (self)
  0002  CALL      R1 = call(R1, 1 args, 1 rets)
  0003  GETTABUP  R2 = _ENV[K2('ActivityState')]
  0004  GETTABLE  R2 = R2[K3('Started')]
  0005  EQ        if R0 eq R2   -> -130551
  0006  JMP       (jump)   -> 14
  0007  GETTABUP  R1 = _ENV[K4('GM')]
  0008  GETTABLE  R1 = R1[K5('UIManager')]
  0009  SELF      R2 = R1[K6('OpenView')] (self)
  0010  GETTABLE  R3 = R0[K7('m_activityDefinition')]
  0011  GETTABLE  R3 = R3[K8('MainWindowPrefabName')]
  0012  GETTABLE  R4 = R0[K9('m_activityType')]
  0013  CALL      R1 = call(R1, 0 args, 3 rets)
  0014  RETURN    return R0..R-1
; ---------- proto6 [OnStateChanged] ----------
  ; fn ?  line 50-53 np=1 va=0 ms=3 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='SyncToModelValue'
  ;   locals: self(0-3)
  0000  SELF      R2 = R0[K0('SyncToModelValue')] (self)
  0001  CALL      R1 = call(R1, 0 args, 1 rets)
  0002  RETURN    return R0..R-1
; ---------- proto7 [UpdateValueText] ----------
  ; fn ?  line 55-58 np=1 va=0 ms=5 code=18 consts=10 upvals=1 protos=0
  ;   K[0]='HudPropertyButton'
  ;   K[1]='UpdateValueText'
  ;   K[2]='UIUtil'
  ;   K[3]='SetActive'
  ;   K[4]='m_exclamationGo'
  ;   K[5]='math'
  ;   K[6]='floor'
  ;   K[7]='m_value'
  ;   K[8]=0.5
  ;   K[9]=0
  ;   upvals: _ENV
  ;   locals: self(0-18)
  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  GETTABUP  R1 = _ENV[K2('UIUtil')]
  0005  GETTABLE  R1 = R1[K3('SetActive')]
  0006  GETTABLE  R2 = R0[K4('m_exclamationGo')]
  0007  GETTABUP  R3 = _ENV[K5('math')]
  0008  GETTABLE  R3 = R3[K6('floor')]
  0009  GETTABLE  R4 = R0[K7('m_value')]
  0010  ADD       R4 = K8(0.5) add R4
  0011  CALL      R3 = call(R3, 1 args, 1 rets)
  0012  LT        if R1 lt R3   -> 4625
  0013  JMP       (jump)   -> 15
  0014  LOADBOOL  R3 = false
  0015  LOADBOOL  R3 = true
  0016  CALL      R1 = call(R1, 0 args, 2 rets)
  0017  RETURN    return R0..R-1
; ---------- proto8 [OnPropertyConsumed] ----------
  ; fn ?  line 61-67 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
; ---------- proto9 [_OnCloseView] ----------
  ; fn ?  line 69-75 np=2 va=0 ms=5 code=16 consts=6 upvals=1 protos=0
  ;   K[0]='name'
  ;   K[1]='m_activityDefinition'
  ;   K[2]='MainWindowPrefabName'
  ;   K[3]='SyncToModelValue'
  ;   K[4]='HudPropertyButton'
  ;   K[5]='_OnCloseView'
  ;   upvals: _ENV
  ;   locals: self(0-16), msg(0-16)
  0000  TEST      if not R1 then   -> -131070
  0001  JMP       (jump)   -> 10
  0002  GETTABLE  R2 = R1[K0('name')]
  0003  GETTABLE  R3 = R0[K1('m_activityDefinition')]
  0004  GETTABLE  R3 = R3[K2('MainWindowPrefabName')]
  0005  EQ        if R0 eq R3   -> -130038
  0006  JMP       (jump)   -> 10
  0007  SELF      R3 = R0[K3('SyncToModelValue')] (self)
  0008  CALL      R2 = call(R2, 0 args, 1 rets)
  0009  JMP       (jump)   -> 15
  0010  GETTABUP  R2 = _ENV[K4('HudPropertyButton')]
  0011  GETTABLE  R2 = R2[K5('_OnCloseView')]
  0012  MOVE      R3 = R0
  0013  MOVE      R4 = R0
  0014  CALL      R2 = call(R2, 0 args, 2 rets)
  0015  RETURN    return R0..R-1
