summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2013-07-13 01:36:58 +0200
committerPilzAdam <pilzadam@minetest.net>2013-07-22 18:09:59 +0200
commit5c7ecdb7c583c98cbe6bdf54ae7a07e6a6a61007 (patch)
tree3f169f5908df7afd7a20331f3bb96d37d3e81212 /builtin
parent80a2acaa86de99356879f3c79adb63fea47d00ee (diff)
downloadminetest-5c7ecdb7c583c98cbe6bdf54ae7a07e6a6a61007.tar.gz
minetest-5c7ecdb7c583c98cbe6bdf54ae7a07e6a6a61007.tar.bz2
minetest-5c7ecdb7c583c98cbe6bdf54ae7a07e6a6a61007.zip
Add support for modstore screenshots
Add error output on invalid mmdb entries
Diffstat (limited to 'builtin')
-rw-r--r--builtin/modstore.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/builtin/modstore.lua b/builtin/modstore.lua
index 2c9e69069..fe0ceb75f 100644
--- a/builtin/modstore.lua
+++ b/builtin/modstore.lua
@@ -216,10 +216,12 @@ function modstore.getmodlist(list)
if details.screenshot_url ~= nil and
details.screenshot_url ~= "" then
if list.data[i].texturename == nil then
- print("downloading screenshot: " .. details.screenshot_url)
+ local fullurl = engine.setting_get("modstore_download_url") ..
+ details.screenshot_url
+ print("downloading screenshot: " .. fullurl)
local filename = os.tempfolder()
- if engine.download_file(details.screenshot_url,filename) then
+ if engine.download_file(fullurl,filename) then
list.data[i].texturename = filename
end
end
@@ -238,7 +240,7 @@ function modstore.getmodlist(list)
--description
local descriptiony = screenshot_ypos + 0.5
- retval = retval .. "textarea[3," .. descriptiony .. ";6.5,1.6;;" ..
+ retval = retval .. "textarea[3," .. descriptiony .. ";6.5,1.55;;" ..
fs_escape_string(details.description) .. ";]"
--rating
local ratingy = screenshot_ypos + 0.6