local save = require("#Celeste.Mod.CrossoverCollab.Code.PointsStuff.PointsModule")
local bettertext = require("#Celeste.Mod.CrossoverCollab.Code.PointsStuff.BetterTextbox")
--will remove the value [money] from the amount they currently have, all values takes integers
function spendmoney(money)
    save.SaveData:SpendMoney(tonumber(money))
end
--adds the value [money] to their total
function addmoney(money)
    save.SaveData:AddMoney(tonumber(money))
end
--returns a bool, checks if they have more remaining money than the value [money]
function checkmoney(money)
    return save.SaveData:CheckMoney(tonumber(money))
end
--returns the amount of money the have left
function getmoney()
    return save.SaveData:GetMoney()
end
--returns a bool, checks if the value [points] is greater than their total points, example, they have 400 points, if value = 390, it returns true, if value is 410 returns false
function checkpoints(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
-- VERY IMPORTANT must be formatted exactly like this ""name" "TEXTUREPATH", float X position, float Y position, float scale X, float scale Y, int depth
-- Example of a proper implementatiton addfurniture("catslug", "CC/Lobby/furniture/slugcat", 157, 95, 1, 1, 0)
function addfurniture(name, texturepath, X, Y, scaleX, scaleY, depth)
    save.SaveData:AddFurniture(name,texturepath,tonumber(X),tonumber(Y),tonumber(scaleX),tonumber(scaleY),tonumber(depth))
end
--moves the decal with this name to the X and Y position
function movefurniture(name, X, Y)
    save.SaveData:MoveFurniture(name, tonumber(X), tonumber(Y))
end
--removes the furniture with this name
function removefurniture(name)
    save.SaveData:RemoveFurniture(name)
end
-- returns true if a furniture exists with this name
function furniturecheck(name)
    return save.SaveData:FurnitureCheck(name)
end
function bettersay(dialog)
    coroutine.yield(bettertext.Say(tostring(dialog)))
end
function onTalk()
	disableMovement()
    bettersay("[MADELINE distracted left] So... I got 10 moneys and 100 points.{n}I have now "..tostring(getmoney() + 10).." moneys and "..tostring(getpoints() + 100).." points.")
	addmoney(10)
	addpoints(100)
	enableMovement()
end