WinterScript = {}

function WinterScript.ReadFile(f)
	local l = 0
	local t = {}
	local n = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-",}
	local x = io.open(f, "r")
	if not (x) then
		gerror("WinterScript file '" .. f .. "' not found!", nil)
		return nil
	end
	f:close()
	local x = {}
	for line in io.lines(f) do
		table.insert(t, line)
	end
	for i = 1, #t do
		local stop = false
		l = l + 1
		local l2 = 0
		local str = t[l]
		local str2 = ""
		for j = 1, #str do
			l2 = l2 + 1
			for _, v in pairs(n) do
				if not (str[l2] == v) then
					stop = true
				end
			end
			if (stop == false) then
				str2 = str2 .. str[l2]
			else
				if (#str2 >= 1) then
					x[tonumber(str2)] = substr(str, l2 + 1)
				end
			end
		end
	end
	return x
end