diff --git a/src/preflight/loader.lua b/src/preflight/loader.lua index aee2dbdc0..38b48feda 100644 --- a/src/preflight/loader.lua +++ b/src/preflight/loader.lua @@ -146,6 +146,7 @@ function loadMods(modsDirectory) priority = { type = 'number', default = 0 }, badge_colour = { type = 'string', check = function(mod, s) local success, hex = pcall(sUtil.hex, s); mod.badge_colour = success and hex or sUtil.hex('666665FF') end }, badge_text_colour = { type = 'string', check = function(mod, s) local success, hex = pcall(sUtil.hex, s); mod.badge_text_colour = success and hex or sUtil.hex('FFFFFFFF') end}, + badge_shader = { type = 'string', }, prefix = { type = 'string', required = true, check = function(mod, s) if string.find(s, '%$') then error("Disallowed use of reserved prefix "..s) end end }, version = { type = 'string', check = function(mod, x) return x and sUtil.V(x):is_valid() and x or '0.0.0' end }, dump_loc = { type = 'boolean' }, diff --git a/src/utils.lua b/src/utils.lua index 8fdc30765..ba8a2405e 100644 --- a/src/utils.lua +++ b/src/utils.lua @@ -555,7 +555,7 @@ function SMODS.create_mod_badge(mod, obj, width, text_height) end end, }) - return {n=G.UIT.R, config={align = "cm", id = 'badge_'..mod.id, colour = mod.badge_colour or G.C.GREEN, r = 0.1, minw = 2, minh = 0.36, emboss = 0.05, padding = 0.027}, nodes={ + return {n=G.UIT.R, config={align = "cm", id = 'badge_'..mod.id, colour = mod.badge_colour or G.C.GREEN, shader = not obj.no_shader_on_modbadge and mod.badge_shader or nil, r = 0.1, minw = 2, minh = 0.36, emboss = 0.05, padding = 0.027}, nodes={ {n=G.UIT.B, config={h=0.1,w=0.03}}, {n=G.UIT.O, config={id = 'smods_mod_badge_text', object=badge_scroll}}, {n=G.UIT.B, config={h=0.1,w=0.03}},