diff --git a/README.md b/README.md index 7e2cbb8..14f8d8a 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,9 @@ which should be the same between all instances of a game are not reloaded unnecc `FONT:Exists(name)` -Used to check if a font has already been created. Do not use `surface.CreateFont` without first checking if the font has already been created as it is expensive! +Has stopped working following an update to GMod, don't use! + +~~Used to check if a font has already been created. Do not use `surface.CreateFont` without first checking if the font has already been created as it is expensive!~~ #### Images diff --git a/lua/arcade_cabinet_games/2048.lua b/lua/arcade_cabinet_games/2048.lua index 658a85a..3baf29f 100644 --- a/lua/arcade_cabinet_games/2048.lua +++ b/lua/arcade_cabinet_games/2048.lua @@ -184,7 +184,7 @@ for i = 1, 11 do } end -if not FONT:Exists("2048_title") then +--if not FONT:Exists("2048_title") then surface.CreateFont("2048_title", { size = 80, weight = 800, @@ -202,7 +202,7 @@ if not FONT:Exists("2048_title") then weight = 800, font = "Roboto" }) -end +--end local GAME = {} diff --git a/lua/arcade_cabinet_games/blitz.lua b/lua/arcade_cabinet_games/blitz.lua index 32a3cc4..46beda5 100644 --- a/lua/arcade_cabinet_games/blitz.lua +++ b/lua/arcade_cabinet_games/blitz.lua @@ -37,7 +37,7 @@ local gameOverAt = 0 local gameState = 0 -if not FONT:Exists("CustomFont0022") then +--if not FONT:Exists("CustomFont0022") then surface.CreateFont("CustomFont0022", { font = "Consolas", extended = false, @@ -54,9 +54,9 @@ if not FONT:Exists("CustomFont0022") then additive = false, outline = false }) -end +--end -if not FONT:Exists("CustomFont0023") then +--if not FONT:Exists("CustomFont0023") then surface.CreateFont("CustomFont0023", { font = "Consolas", extended = false, @@ -73,7 +73,7 @@ if not FONT:Exists("CustomFont0023") then additive = false, outline = false }) -end +--end -- local state = 9 diff --git a/lua/arcade_cabinet_games/snake.lua b/lua/arcade_cabinet_games/snake.lua index 0d42b15..072bb52 100644 --- a/lua/arcade_cabinet_games/snake.lua +++ b/lua/arcade_cabinet_games/snake.lua @@ -3,36 +3,36 @@ -- https://github.com/ukgamer/gmod-arcademachines -- Made by Jule -if not FONT:Exists( "Snake32" ) then - surface.CreateFont( "Snake32", { +--if not FONT:Exists("Snake32") then + surface.CreateFont("Snake32", { font = "Trebuchet MS", size = 32, weight = 500, antialias = 1, additive = 1 - } ) -end + }) +--end -if not FONT:Exists( "SnakeTitle" ) then - surface.CreateFont( "SnakeTitle", { +--if not FONT:Exists("SnakeTitle") then + surface.CreateFont("SnakeTitle", { font = "Trebuchet MS", size = 70, italic = true, weight = 500, antialias = 1, additive = 1 - } ) -end + }) +--end -local function PlayLoaded( loaded ) - if IsValid( SOUND.Sounds[loaded].sound ) then - SOUND.Sounds[loaded].sound:SetTime( 0 ) +local function PlayLoaded(loaded) + if IsValid(SOUND.Sounds[loaded].sound) then + SOUND.Sounds[loaded].sound:SetTime(0) SOUND.Sounds[loaded].sound:Play() end end -local function StopLoaded( loaded ) - if IsValid( SOUND.Sounds[loaded].sound ) then +local function StopLoaded(loaded) + if IsValid(SOUND.Sounds[loaded].sound) then SOUND.Sounds[loaded].sound:Pause() end end diff --git a/lua/arcade_cabinet_lib/font.lua b/lua/arcade_cabinet_lib/font.lua index cc93e3d..9902ec0 100644 --- a/lua/arcade_cabinet_lib/font.lua +++ b/lua/arcade_cabinet_lib/font.lua @@ -1,7 +1,8 @@ local FONT = {} function FONT:Exists(name) - return pcall(function() surface.SetFont(name) end) + return false + -- return pcall(function() surface.SetFont(name) end) end return FONT \ No newline at end of file