Scriptname __xxsUtilityQuestScript extends Quest conditional

Int property PlayerIsChild = -1 auto conditional
Int property DialActorIsChild = -1 auto conditional

Event OnInit()

	self.RegisterForMenu("RaceSex Menu")
	self.RegisterForMenu("Dialogue Menu")
	
EndEvent

Event OnMenuClose(String MenuName)
	
	If MenuName == "RaceSex Menu"
		xxsUtility.RemoveFromxxsUtility(game.getPlayer())
		If xxsUtility.xxsIsChild(game.getPlayer())
			PlayerIsChild = 1
		Else
			PlayerIsChild = 0
		EndIf
	
	ElseIf MenuName == "Dialogue Menu"
		DialActorIsChild = -1
	
	EndIf
	
EndEvent

Event OnMenuOpen(String MenuName)
	
	If MenuName == "RaceSex Menu"
		PlayerIsChild = -1
	
	ElseIf MenuName == "Dialogue Menu"
		actor Ref = Game.GetCurrentCrosshairRef() as actor
		If Ref
			If xxsUtility.xxsIsChild(Ref)
				DialActorIsChild = 1
			Else
				DialActorIsChild = 0
			EndIf
		Else
			DialActorIsChild = -1
		EndIf
	
	EndIf
	
EndEvent
