ScriptName aaaKimachuuCOWTuitionMCM Extends MCM_ConfigBase

GlobalVariable Property aaaKimachuuCOWTGloTui Auto
GlobalVariable Property aaaKimachuuCOWTGloInt Auto
ReferenceAlias Property raPlayer Auto

Bool Property bTest Auto
Bool Property bTestB Auto
Float Property fInter Auto
Int Property iTuition Auto

Event OnPlayerLoadGame()
	utility.Wait(3.00000)
	self.SetV()
EndEvent

Event OnConfigInit()
	utility.Wait(3.00000)
	self.SetV()
	aaaKimachuuCOWTuitionRA scrRun = raPlayer as aaaKimachuuCOWTuitionRA
	scrRun.forceSUGTFunction()
	Debug.Notification("KimachuuCOWT Boot...")
EndEvent

;Event OnConfigOpen()

;EndEvent

Event OnConfigClose()
	aaaKimachuuCOWTGloInt.SetValue(Self.GetModSettingFloat("fInter:General"))
	aaaKimachuuCOWTGloTui.SetValueInt(Self.GetModSettingInt("iTuition:General"))
	If bTest == True
		bTest = False
		bTestB = False
		aaaKimachuuCOWTuitionRA scrRun = raPlayer as aaaKimachuuCOWTuitionRA
		scrRun.tuitionFunctionD()
		scrRun.forceSUGTFunction()
		self.SetModSettingBool("bTestTuition:General", false)
		self.SetModSettingBool("bTestInter:General", false)
	EndIf

	If bTestB == True
		bTestB = False
		aaaKimachuuCOWTuitionRA scrRun = raPlayer as aaaKimachuuCOWTuitionRA
		scrRun.forceSUGTFunction()
		self.SetModSettingBool("bTestInter:General", false)
		Debug.Notification("The interval has been reset.")
	EndIf
EndEvent

Event OnSettingChange(String a_ID)
	If a_ID == "fInter:General"
		fInter = Self.GetModSettingFloat(a_ID)
	ElseIf a_ID == "iTuition:General"
		iTuition = Self.GetModSettingInt(a_ID)
	ElseIf a_ID == "bTestTuition:General"
		bTest = Self.GetModSettingBool(a_ID)
	ElseIf a_ID == "bTestInter:General"
		bTestB = Self.GetModSettingBool(a_ID)
	EndIf
EndEvent

Function SetV()
	aaaKimachuuCOWTGloInt.SetValue(Self.GetModSettingFloat("fInter:General"))
	aaaKimachuuCOWTGloTui.SetValueInt(Self.GetModSettingInt("iTuition:General"))
EndFunction