Add support_langs for inter, MYS: change video & fix profile price auto change (still bug)
This commit is contained in:
parent
6761957213
commit
ed490b440f
8 changed files with 181 additions and 56 deletions
|
|
@ -5,75 +5,121 @@ DEBUGVAR XMLProfile
|
|||
STRCONTAIN "PromoYuzu250" XMLProfile HasProYuzu250Concat
|
||||
STRCONTAIN "PromoReduced" XMLProfile IsProfileReduce
|
||||
|
||||
DEBUGVAR HasProYuzu250Concat
|
||||
DEBUGVAR ProReducedPriceEnable
|
||||
DEBUGVAR IgnoreProfileFromRunEV
|
||||
Var refresh_str = "-RefreshProf"
|
||||
STRCONTAIN refresh_str XMLProfile HasRefreshProf
|
||||
|
||||
If ProReducedPriceEnable = 1 Then
|
||||
DEBUGVAR HasRefreshProf
|
||||
DEBUGVAR NeedRefreshProfile
|
||||
|
||||
Else
|
||||
DEBUGVAR "Case pro reduce end"
|
||||
; case-pro-reduce-end
|
||||
If IgnoreProfileFromRunEV = 1 Then
|
||||
DEBUGVAR "Pro yuzu ongoing"
|
||||
; concat-profile
|
||||
If HasProYuzu250Concat = "true" Then
|
||||
DEBUGVAR "Pro yuzu concat"
|
||||
; refresh-profile-after-promo-end
|
||||
If NeedRefreshProfile = 1 Then
|
||||
|
||||
READ_FILE "/mnt/sdcard/coffeevending/profile/price/profile_MYS_slot_3.json" ProfileSlot3MYS
|
||||
READ_FILE "/mnt/sdcard/coffeevending/profile/price/profile_MYS_slot_4.json" ProfileSlot4MYS
|
||||
|
||||
STRCONTAIN "Drop" ProfileSlot3MYS PromoYuzuDrop
|
||||
STRCONTAIN "Drop" ProfileSlot4MYS PromoYuzuDis50Drop
|
||||
|
||||
DEBUGVAR PromoYuzuDrop
|
||||
DEBUGVAR PromoYuzuDis50Drop
|
||||
|
||||
If HasRefreshProf = "true" Then
|
||||
|
||||
DEBUGVAR "case already refresh"
|
||||
|
||||
; restore-profile
|
||||
CacheVarStr "get" XMLProfilePreEvent
|
||||
Var XMLProfile = XMLProfilePreEvent
|
||||
Var NeedRefreshProfile = 0
|
||||
Else
|
||||
; save-current-as-pre
|
||||
CacheVarStr "put" XMLProfilePreEvent
|
||||
|
||||
If PromoYuzuDrop = "true" Then
|
||||
DEBUGVAR "case yuzu drop --> refresh"
|
||||
Var XMLProfile = XMLProfile + refresh_str
|
||||
Else
|
||||
If PromoYuzuDis50Drop = "true" Then
|
||||
DEBUGVAR "case yuzu drop discount 50% --> refresh"
|
||||
Var XMLProfile = XMLProfile + refresh_str
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
Else
|
||||
|
||||
DEBUGVAR HasProYuzu250Concat
|
||||
DEBUGVAR ProReducedPriceEnable
|
||||
DEBUGVAR IgnoreProfileFromRunEV
|
||||
|
||||
If ProReducedPriceEnable = 1 Then
|
||||
|
||||
Else
|
||||
DEBUGVAR "Case pro reduce end"
|
||||
; case-pro-reduce-end
|
||||
If IgnoreProfileFromRunEV = 1 Then
|
||||
DEBUGVAR "Pro yuzu ongoing"
|
||||
; concat-profile
|
||||
If HasProYuzu250Concat = "true" Then
|
||||
DEBUGVAR "Pro yuzu concat"
|
||||
Else
|
||||
|
||||
If IsProfileReduce = "true" Then
|
||||
DEBUGVAR "Pro reduce was set but disabled from trick"
|
||||
CacheVarStr "get" XMLProfilePreEvent
|
||||
If XMLProfilePreEvent = "" Then
|
||||
DEBUGVAR "Get PreEvent Empty"
|
||||
Var XMLProfile = "General"
|
||||
Else
|
||||
DEBUGVAR "Restore profile by pre-event, also concat Yuzu"
|
||||
DEBUGVAR XMLProfilePreEvent
|
||||
Var XMLProfile = XMLProfilePreEvent + "-"
|
||||
Var XMLProfile = XMLProfile + "PromoYuzu250"
|
||||
|
||||
EndIf
|
||||
|
||||
If IsProfileReduce = "true" Then
|
||||
DEBUGVAR "Pro reduce was set but disabled from trick"
|
||||
CacheVarStr "get" XMLProfilePreEvent
|
||||
If XMLProfilePreEvent = "" Then
|
||||
DEBUGVAR "Get PreEvent Empty"
|
||||
Var XMLProfile = "General"
|
||||
Else
|
||||
DEBUGVAR "Restore profile by pre-event, also concat Yuzu"
|
||||
DEBUGVAR XMLProfilePreEvent
|
||||
Var XMLProfile = XMLProfilePreEvent + "-"
|
||||
DEBUGVAR "No pro reduce, concat pro yuzu"
|
||||
CacheVarStr "put" XMLProfilePreEvent
|
||||
|
||||
Var XMLProfile = XMLProfile + "-"
|
||||
Var XMLProfile = XMLProfile + "PromoYuzu250"
|
||||
|
||||
EndIf
|
||||
|
||||
Else
|
||||
DEBUGVAR "No pro reduce, concat pro yuzu"
|
||||
CacheVarStr "put" XMLProfilePreEvent
|
||||
|
||||
Var XMLProfile = XMLProfile + "-"
|
||||
Var XMLProfile = XMLProfile + "PromoYuzu250"
|
||||
|
||||
EndIf
|
||||
EndIf
|
||||
Else
|
||||
If IsProfileReduce = "true" Then
|
||||
DEBUGVAR "No yuzu but set pro reduce"
|
||||
CacheVarStr "get" XMLProfilePreEvent
|
||||
If XMLProfilePreEvent = "" Then
|
||||
DEBUGVAR "PreEvent empty, set General"
|
||||
Var XMLProfile = "General"
|
||||
Else
|
||||
DEBUGVAR "Restore profile by pre-event"
|
||||
Var XMLProfile = XMLProfilePreEvent
|
||||
EndIf
|
||||
|
||||
Else
|
||||
|
||||
If HasProYuzu250Concat = "true" Then
|
||||
If IsProfileReduce = "true" Then
|
||||
DEBUGVAR "No yuzu but set pro reduce"
|
||||
CacheVarStr "get" XMLProfilePreEvent
|
||||
Var XMLProfile = XMLProfilePreEvent
|
||||
If XMLProfilePreEvent = "" Then
|
||||
DEBUGVAR "PreEvent empty, set General"
|
||||
Var XMLProfile = "General"
|
||||
Else
|
||||
DEBUGVAR "Restore profile by pre-event"
|
||||
Var XMLProfile = XMLProfilePreEvent
|
||||
EndIf
|
||||
|
||||
Else
|
||||
|
||||
If HasProYuzu250Concat = "true" Then
|
||||
CacheVarStr "get" XMLProfilePreEvent
|
||||
Var XMLProfile = XMLProfilePreEvent
|
||||
EndIf
|
||||
|
||||
DEBUGVAR "Store profile pre event"
|
||||
DEBUGVAR XMLProfilePreEvent
|
||||
CacheVarStr "put" XMLProfilePreEvent
|
||||
EndIf
|
||||
|
||||
DEBUGVAR "Store profile pre event"
|
||||
DEBUGVAR XMLProfilePreEvent
|
||||
CacheVarStr "put" XMLProfilePreEvent
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
|
||||
|
||||
|
||||
If IgnoreProfileFromRunEV = 1 Then
|
||||
Var ToggleAfterEventProfileOff = 1
|
||||
|
||||
|
||||
If IgnoreProfileFromRunEV = 1 Then
|
||||
Var ToggleAfterEventProfileOff = 1
|
||||
EndIf
|
||||
|
||||
|
||||
EndIf
|
||||
|
|
|
|||
|
|
@ -58,8 +58,25 @@ If SystemDateMonthInt = 9 Then
|
|||
EndIf
|
||||
EndIf
|
||||
|
||||
If SystemDateMonthInt = 10 Then
|
||||
|
||||
Var IgnoreProfileFromRunEV = 0
|
||||
|
||||
EndIf
|
||||
|
||||
If SystemDateMonthInt = 11 Then
|
||||
|
||||
Var IgnoreProfileFromRunEV = 0
|
||||
EndIf
|
||||
|
||||
If SystemDateMonthInt = 12 Then
|
||||
Var IgnoreProfileFromRunEV = 0
|
||||
|
||||
EndIf
|
||||
|
||||
If SystemDateMonthInt < 10 Then
|
||||
Var ProReducedPriceEnable = 0
|
||||
Var IgnoreProfileFromRunEV = 0
|
||||
EndIf
|
||||
|
||||
If ProReducedPriceEnable = 0 Then
|
||||
|
|
@ -69,6 +86,23 @@ If ProReducedPriceEnable = 0 Then
|
|||
EndIf
|
||||
EndIf
|
||||
|
||||
|
||||
; zone-refresh-once
|
||||
|
||||
READ_FILE "/mnt/sdcard/coffeevending/need_refresh_file" NeedRefreshStr
|
||||
STRCONTAIN "1" NeedRefreshStr need_refresh
|
||||
|
||||
If need_refresh = "true" Then
|
||||
|
||||
Var NeedRefreshProfile = 1
|
||||
WRITE_FILE "/mnt/sdcard/coffeevending/need_refresh_file" "0"
|
||||
|
||||
Else
|
||||
Var NeedRefreshProfile = 0
|
||||
EndIf
|
||||
|
||||
|
||||
|
||||
If BoxID = 177746 Then
|
||||
Var ProThaiTeaEnable = 1
|
||||
Var ProYuzuEnable = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue