local save = require("#Celeste.Mod.CrossoverCollab.Code.PointsStuff.PointsModule")
local bettertext = require("#Celeste.Mod.CrossoverCollab.Code.PointsStuff.BetterTextbox")

--returns a bool, checks if the value [points] is greter than their total points, example, they have 400 points, if value = 390, it returns true, if value is 410 returns false
function ispointsgreaterthan(points)
    return save.SaveData:CheckPoints(tonumber(points));
end

--returns an int that equals their points
function getpoints()
    return save.SaveData:GetPoints();
end

-- adds points equal to points
function addpoints(points)
    save.SaveData:AddPoints(tonumber(points))
end

-- Adds a flag with the name inside the function
function addflag(flag)
    save.SaveData:AddFlag(flag)
end

-- Returns if a flag exists, if it does, returns true, if it doesn't returns false
function isflagtrue(flag)
    return save.SaveData:IsFlagTrue(flag)
end

-- Removes a flag
function removeflag(flag)
    save.SaveData:RemoveFlag(flag)
end

function onEnter()
    if not isflagtrue("NetscapeNavigator_heart") then
        addflag("NetscapeNavigator_heart")
		addpoints(25)
	end
end
    