Quantum is a Garry's Mod RPG framework.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
quantum/gamemode/cl_init.lua

68 lines
1.9 KiB

5 years ago
-- __ _ _______ _ __
-- / / /\ | | |__ __| | | \ \
-- / / / \ | |_ __ ___ | | ___ ___| |__ \ \
-- < < / /\ \ | | '_ ` _ \| |/ _ \/ __| '_ \ > >
-- \ \ / ____ \| | | | | | | | __/ (__| | | | / /
-- \_\ /_/ \_\_|_| |_| |_|_|\___|\___|_| |_| /_/
if CLIENT then
include( "shared.lua" )
Quantum.Client = Quantum.Client || {}
Quantum.Client.Cache = Quantum.Client.Cache || {}
Quantum.Client.ResolutionScale = ScrH() / 1080
Quantum.Client.ServerBannerPath = "gamemodes/" .. GM.FolderName .. "/gamemode/content/materials/quantum/server_banner.png"
local function loadCoreFiles()
local fol = GM.FolderName .. "/gamemode/engine/core/"
local shFiles = file.Find( fol .. "/sh_*.lua", "LUA" )
for _, file in pairs( shFiles ) do
include( fol .. file )
end
local clFiles = file.Find( fol .. "/client/cl_*.lua", "LUA" )
for _, file in pairs( clFiles ) do
include( fol .. "client/" .. file )
end
end
local function loadLibFiles()
local fol = GM.FolderName .. "/gamemode/engine/lib/"
local shFiles = file.Find( fol .. "/sh_*.lua", "LUA" )
for _, file in pairs( shFiles ) do
AddCSLuaFile( fol .. file )
include( fol .. file )
end
5 years ago
local clFiles = file.Find( fol .. "/client/cl_*.lua", "LUA" )
for _, file in pairs( clFiles ) do
include( fol .. "client/" .. file )
end
end
local function loadAllDermaMenus()
local fol = GM.FolderName .. "/gamemode/engine/derma/"
include( fol .. "cl_menu.lua" )
end
local function loadAllItems()
include( "settings/sh_items.lua" )
end
function Quantum.Client.Load()
local fol = GM.FolderName .. "/gamemode/engine/core/"
loadCoreFiles()
loadLibFiles()
loadAllDermaMenus()
5 years ago
Quantum.Debug( "Loaded all files." )
-- add all of the items
loadAllItems()
Quantum.Debug( "Loaded all items." )
end
5 years ago
Quantum.Client.Load()
end