ExperimentalGear/scripts/components/danbadge.lua

35 lines
874 B
Lua
Raw Normal View History

local badges = game.GetSkinSetting("badges")
local customBadges = game.GetSkinSetting("custom_badges")
local isBadge = game.GetSkinSetting("is_badges")
local none = gfx.CreateSkinImage("dan/none.png", 1)
local badger = function(isDemo)
local newBadge
local finalBadge
if not isBadge then
newBadge = gfx.CreateSkinImage("dan/original/"..badges..".png", 1)
if isDemo then
finalBadge = none
elseif badges ~= "NONE" then
finalBadge = newBadge
else
finalBadge = none
end
else
newBadge = gfx.CreateSkinImage("dan/custom/"..customBadges..".png", 1)
if isDemo then
finalBadge = none
elseif badges ~= "NONE" then
finalBadge = newBadge
else
finalBadge = none
end
end
return finalBadge
end
return badger