function PlayerSpots.applyArt(u,z,c,I)local F=nil for z,I in ipairs(u.placedSpots)do if I.spot.id==c then F=I break end end if not F then return false,constants.Errors.SpotNotFound end if u.toRemove then local z=u.placedSpots[u.toRemove]z.spot:removeArt()u.toRemove=nil end F.spot:applyArt(z,I)return true,nil end
--[[
	Encapsulates logic to apply art onto a single spot owned by the user.

	Parameters:
	- spotId (string): ID of spot to apply art to
	- artId (string): art ID to apply for the spot
]]
function PlayerSpots:applyArt(player, spotId, artId)
	local placedSpot = nil
	for _, value in ipairs(self.placedSpots) do
		if value.spot.id == spotId then
			placedSpot = value
			break
		end
	end

	if not placedSpot then
		return false, constants.Errors.SpotNotFound
	end

	-- Remove old art
	if self.toRemove then
		local placedSpotToRemove = self.placedSpots[self.toRemove]
		placedSpotToRemove.spot:removeArt()
		self.toRemove = nil
	end

	placedSpot.spot:applyArt(player, artId)

	return true, nil
end
