Fixed rendering of some tiles for certain sizes of tilesets, more rubocopping

This commit is contained in:
Maruno17
2023-04-12 21:14:26 +01:00
parent 956a511ec5
commit a714086a39
42 changed files with 392 additions and 374 deletions

View File

@@ -1,8 +1,6 @@
#############################
#
#===============================================================================
# HTTP utility functions
#
#############################
#===============================================================================
def pbPostData(url, postdata, filename = nil, depth = 0)
if url[/^http:\/\/([^\/]+)(.*)$/]
host = $1
@@ -21,11 +19,11 @@ def pbPostData(url, postdata, filename = nil, depth = 0)
body,
"application/x-www-form-urlencoded",
{
"Host" => host, # might not be necessary
"Host" => host, # might not be necessary
"Proxy-Connection" => "Close",
"Content-Length" => body.bytesize.to_s,
"Pragma" => "no-cache",
"User-Agent" => userAgent
"Content-Length" => body.bytesize.to_s,
"Pragma" => "no-cache",
"User-Agent" => userAgent
}
) rescue ""
return ret if !ret.is_a?(Hash)
@@ -40,8 +38,8 @@ end
def pbDownloadData(url, filename = nil, authorization = nil, depth = 0, &block)
headers = {
"Proxy-Connection" => "Close",
"Pragma" => "no-cache",
"User-Agent" => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14"
"Pragma" => "no-cache",
"User-Agent" => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14"
}
headers["authorization"] = authorization if authorization
ret = HTTPLite.get(url, headers) rescue ""