Kinkocalypse = Kinkocalypse or {}

local function OnFillWorldObjectContextMenu(playerIndex, context, worldObjects, test)
	
	local playerObj = getSpecificPlayer(playerIndex)
	if playerObj:isAsleep() then return end
	if playerObj:getVehicle() then return end
	-- Disable mod custom  masturbation
	--if Kinkocalypse.ZomboWinAnimationUtils ~= nil then return end
	
	local masturbateMenu = context:addOption(getText("UI_Kincalypse_Masturbate"), worldObjects);
	local masturbateSubMenu = ISContextMenu:getNew(context);

	masturbateSubMenu:addOption(getText("UI_Kincalypse_Masturbate_Anus"), worldobjects, function() 
		Kinkocalypse.MasturbateAnus()
	end);
	if getPlayer():isFemale() then
		masturbateSubMenu:addOption(getText("UI_Kincalypse_Masturbate_Tits"), worldobjects, function() 
			Kinkocalypse.MasturbateTits()
		end);
	end
	if Kinkocalypse.PlayerHasVagina(getPlayer()) then
		masturbateSubMenu:addOption(getText("UI_Kincalypse_Masturbate_Vagina"), worldobjects, function() 
			Kinkocalypse.MasturbateGenetails()
		end);
	else
		masturbateSubMenu:addOption(getText("UI_Kincalypse_Masturbate_Dick"), worldobjects, function() 
			Kinkocalypse.MasturbateGenetails()
		end);
	end	
	context:addSubMenu(masturbateMenu, masturbateSubMenu);
end

Events.OnFillWorldObjectContextMenu.Add(OnFillWorldObjectContextMenu)

