# lover

if $ARGS[0] = 'add':
	if mid($boy,1,1) = 'C': gs 'npcpreservec', $boy & gs 'boyStat', $npclastsaved
	i = arrsize('pcs_lovers')
	$lover[i] = $boy									& !boyStat: = $npclastcalled
	$loverdesc[i] = $boydesc							& !boystat (new)
	loverbodyrand[i] = boybodyrand						& !boy/girl
	$loverbody[i] = $boybody							& !boy/girl
	loverbodrand[i] = boybodrand						& !boy/girl
	$loverbod[i] = $boybod								& !boy/girl
	loverfacerand[i] = boyfacerand						& !boy/girl
	$loverface[i] = $boyface							& !boy/girl
	loverdick[i] = npc_dick[$boy]
	$loverdick_girth[i] = $npc_thdick[$npclastsaved]
	loversilaVag[i] = npc_sexskill[$npclastsaved]
	loverfinance[i] = npc_finance[$npclastsaved]
	vneshlover[i] = npc_apprnc[$npclastsaved]
	$loverClo[i] = $boyClo								& !boy/girl
	figurlover[i] = figurBoy							& !boy/girl
	titlover[i] = npc_bust[$npclastsaved]
	hairlover[i] = npc_haircol[$npclastsaved]
	haraklover[i] = harakBoy							& !boy/girl
	loverday[i] = daystart
	loverrelation[i] = 3
	loverdays[i] = 0
	boyonce[i] = 0
	loverizvrat[i] = izvrat								& !boy/girl
	giftDay[i] = 0
	giftNum[i] = 0
	loverlove[i] = 0
	loverscompliance[i] = 0
	lover_picture[i] = lover_picrand[$npclastsaved]
	meethour[i] = 0
	svidanie[i] = 0
	meetday[i] = 0

	!!new preferences
	clotTypePref[i] = clotTypePrefTmp					& !boy/girl
	clotQualPref[i] = clotQualPrefTmp					& !boy/girl
	clotTopPref[i] = clotTopPrefTmp						& !boy/girl
	bottShorPref[i] = bottShorPrefTmp					& !boy/girl
	clotThinPref[i] = clotThinPrefTmp					& !boy/girl
	bimbPref[i] = bimbPrefTmp							& !boy/girl
	pierPref[i] = pierPrefTmp							& !boy/girl
	tattPref[i] = tattPrefTmp							& !boy/girl
	lipsPref[i] = lipsPrefTmp							& !boy/girl
	bodyPref[i] = bodyPrefTmp							& !boy/girl
	makePref[i] = makePrefTmp							& !boy/girl
	IQPref[i] = IQPrefTmp								& !boy/girl
	loverGender[i] = npc_gender[$npclastsaved]

	!! making sure lover has pronouns
	gs 'pronouns', loverGender[i], 0
	$loverXe[i] = $xe[0]
	$loverXec[i] = $xec[0]
	$loverXem[i] = $xem[0]
	$loverXemc[i] = $xemc[0]
	$loverXyr[i] = $xyr[0]
	$loverXyrc[i] = $xyrc[0]
	$loverXyrs[i] = $xyrs[0]
	$loverXyrsc[i] = $xyrsc[0]
	$loverXemself[i] = $xemself[0]
	$loverXemselfc[i] = $xemselfc[0]
	
	pcs_lovers[i] = 1
	!!pcs_lover +=1
	stat['total_lovers_current'] += 1
	$pcs_lover_arr[] = $boy
	if loverGender[i] = 1:
		stat['girlfriends_current'] += 1
	else
		stat['boyfriends_current'] += 1
	end
end

if $ARGS[0] = 'remove':
	i = ARGS[1]

	killvar '$lover', i
	killvar '$loverdesc', i
	killvar 'loverbodyrand', i
	killvar '$loverbody', i
	killvar 'loverbodrand', i
	killvar '$loverbod', i
	killvar 'loverfacerand', i
	killvar '$loverface', i
	killvar 'loverdick', i
	killvar '$loverdick_girth', i
	killvar 'loversilaVag', i
	killvar 'loverfinance', i
	killvar 'vneshlover', i
	killvar '$loverClo', i
	killvar 'figurlover', i
	killvar 'titlover', i
	killvar 'hairlover', i
	killvar 'haraklover', i
	killvar 'loverday', i
	killvar 'loverrelation', i
	killvar 'loverdays', i
	killvar 'boyonce', i
	killvar 'loverizvrat', i
	killvar 'giftDay', i
	killvar 'giftNum', i
	killvar 'loverlove', i
	killvar 'loverscompliance', i
	killvar 'lover_picture', i
	killvar 'meethour', i
	killvar 'svidanie', i
	killvar 'meetday', i
	if loverGender[i] = 1:
		stat['girlfriends_current'] -= 1
		stat['ex_girlfriends'] += 1
	else
		stat['boyfriends_current'] -= 1
		stat['ex_boyfriends'] += 1
	end
	killvar 'loverGender', i
	
	!!new preferences
	killvar 'clotTypePref', i
	killvar 'clotQualPref', i
	killvar 'clotTopPref', i
	killvar 'bottShorPref', i
	killvar 'clotThinPref', i
	killvar 'bimbPref', i
	killvar 'pierPref', i
	killvar 'tattPref', i
	killvar 'lipsPref', i
	killvar 'bodyPref', i
	killvar 'makePref', i
	killvar 'IQPref', i

	killvar '$loverXe', i
	killvar '$loverXec', i
	killvar '$loverXem', i
	killvar '$loverXemc', i
	killvar '$loverXyr', i
	killvar '$loverXyrc', i
	killvar '$loverXyrs', i
	killvar '$loverXyrsc', i
	killvar '$loverXemself', i
	killvar '$loverXemselfc', i

	killvar 'pcs_lovers', i
	pcs_lover -=1
	
end

if $ARGS[0] = 'add_fuckbuddy':
	if mid($ARGS[1],1,1) = 'C' :
		gs 'npcpreservec', $ARGS[1]
		gs 'boyStat', $npclastsaved
	else
		gs 'boyStat',$ARGS[1]
	end
	! Do not add when he has already been added.
	if arrpos('$fuckbuddy',$boy) = -1:
		$fuckbuddy[] = $boy
		$npc_rel_type[$boy] = 'fuckbuddy'
		gs 'telefon', 'AddContact', $boy, $npc_pic[$boy],'',"hour >= 8 and hour <= 22",'', "hour >= 8 and hour <= 22", 0
	end
end

if $ARGS[0] = 'add_sugar_daddy':
	if mid($ARGS[1],1,1) = 'C' :
		gs 'npcpreservec', $ARGS[1]
		gs 'boyStat', $npclastsaved
	else
		gs 'boyStat',$ARGS[1]
	end
	! Do not add when he has already been added.
	if arrpos('$sugar_daddy',$boy) = -1:
		$sugar_daddy[] = $boy
		$npc_rel_type[$boy] = 'sugar_daddy'
		gs 'telefon', 'AddContact', $boy, $npc_pic[$boy],'',"hour >= 8 and hour <= 22",'', "hour >= 8 and hour <= 22", 0
	end
end

if $ARGS[0] = 'remove_fuckbuddy':
	gs 'telefon', 'DeleteContact', $ARGS[1]
	$ex_fuckbuddy[] = $ARGS[1]
	$npc_rel_type[$ARGS[1]] = 'ex_fuckbuddy'
	killvar '$fuckbuddy', arrpos('$fuckbuddy',$ARGS[1])
end


if $ARGS[0] = 'remove_sugar_daddy':
	gs 'telefon', 'DeleteContact', $ARGS[1]
	npc_sugar_daddy_price[$ARGS[1]] = 0
	$ex_sugar_daddy[] = $ARGS[1]
	$npc_rel_type[$ARGS[1]] = 'ex_sugar_daddy'
	killvar '$sugar_daddy', arrpos('$sugar_daddy',$ARGS[1])
end

if $ARGS[0] = 'clear_all':
	! CLEAR LOVERS
	:clear_lovers_loop
	if arrsize('pcs_lovers') > 0:
		gs 'lover', 'remove', 0
		jump 'clear_lovers_loop'
	end

	! CLEAR FUCKBUDDIES
	:clear_fb_loop
	if arrsize('$fuckbuddy') > 0:
		gs 'lover', 'remove_fuckbuddy', $fuckbuddy[0]
		jump 'clear_fb_loop'
	end
	
	! CLEAR SUGAR DADIES
	:clear_sd_loop
	if arrsize('$sugar_daddy') > 0:
		gs 'lover', 'remove_sugar_daddy', $sugar_daddy[0]
		jump 'clear_sd_loop'
	end
	
end



--- lover ---------------------------------
