Scriptname SLAppRegisterPlayerHouseScript extends Quest  

ReferenceAlias Property CustomHouseXmarkerRef Auto
ReferenceAlias Property CenterLocationMarker Auto
ReferenceAlias Property CustomPlayerHouseDoorRef Auto
ReferenceAlias Property PlayerHouseCOC Auto
Formlist Property SLApproachCustomPlayerHouseList Auto
Keyword Property LocTypePlayerHouse auto
ObjectReference[] Property SLAPCustomPlayerHouseXmarker Auto

Actor Property PlayerRef Auto

Function RegisterCustomHouseStart()

if CustomHouseXmarkerRef
	Debug.Notification("Sexlab Approach: The place is already registered")
	Return;already registered
endif
	Start()
if CenterLocationMarker && CustomPlayerHouseDoorRef && PlayerHouseCOC
	int ip = 0
	While ip < 10 
	if SLApproachCustomPlayerHouseList.find(SLAPCustomPlayerHouseXmarker[ip]) == -1
		SLAPCustomPlayerHouseXmarker[ip].moveto(PlayerRef)
		SLApproachCustomPlayerHouseList.addform(SLAPCustomPlayerHouseXmarker[ip])
		ip = 11		
	else
		IP += 1
	endif
	Endwhile

	if ip == 11
		Debug.Notification("Sexlab Approach: The place is registered as Player House")
	else
		Debug.Notification("Sexlab Approach: No available slots for custom Player House")
	endif
else
	Debug.Notification("Sexlab Approach: This place does not meet the requirements")
endif
	Reset()
	Stop()
EndFunction