Skip to content
Snippets Groups Projects
Commit cfc5cdd9 authored by DarkGod's avatar DarkGod
Browse files

Moved Censor Boot option into the misc game options

Added an option to not use tilesets, for very crapper GPUs/Drivers
parent 1034268f
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,7 @@ sharp_scaling = nil
tilesets = {}
tilesets_texs = {}
function _M:loadTileset(file)
if config.settings.disable_tilesets then return end
if not fs.exists(file) then print("Tileset file "..file.." does not exists.") return end
local f, err = loadfile(file)
if err then error(err) end
......
......@@ -172,15 +172,15 @@ function _M:generateList()
end), 50)
end,}
local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Disallow boot images that could be found 'offensive'.#WHITE#"}
list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Censor boot#WHITE##{normal}#", status=function(item)
return tostring(config.settings.censor_boot and "enabled" or "disabled")
local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Enable/disable usage of tilesets.\nIn some rare cases on very slow machines with bad GPUs/drivers it can be detrimental."}
list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Use tilesets#WHITE##{normal}#", status=function(item)
return tostring(config.settings.disable_tilesets and "disabled" or "enabled")
end, fct=function(item)
config.settings.censor_boot = not config.settings.censor_boot
game:saveSettings("censor_boot", ("censor_boot = %s\n"):format(tostring(config.settings.censor_boot)))
config.settings.disable_tilesets = not config.settings.disable_tilesets
game:saveSettings("disable_tilesets", ("disable_tilesets = %s\n"):format(tostring(config.settings.disable_tilesets)))
self.c_list:drawItem(item)
end,}
-- *Requested* Window Position
-- SDL tends to lie about where windows are positioned in fullscreen mode,
-- so always store the position requests, not the actual positions.
......
......@@ -542,5 +542,14 @@ function _M:generateListMisc()
self.c_list:drawItem(item)
end,}
local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Disallow boot images that could be found 'offensive'.#WHITE#"}
list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Censor boot#WHITE##{normal}#", status=function(item)
return tostring(config.settings.censor_boot and "enabled" or "disabled")
end, fct=function(item)
config.settings.censor_boot = not config.settings.censor_boot
game:saveSettings("censor_boot", ("censor_boot = %s\n"):format(tostring(config.settings.censor_boot)))
self.c_list:drawItem(item)
end,}
self.list = list
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment