Created new var file structure

master
AlmTech Software 5 years ago
parent 9351395981
commit bfed037a5d
  1. 3
      gamemode/cl_init.lua
  2. 4
      gamemode/engine/lib/server/sv_inventory.lua
  3. 9
      gamemode/engine/vars/cl_vars.lua
  4. 17
      gamemode/engine/vars/sh_vars.lua
  5. 6
      gamemode/engine/vars/sv_vars.lua
  6. 6
      gamemode/init.lua
  7. 2
      gamemode/shared.lua

@ -8,6 +8,9 @@
if CLIENT then if CLIENT then
include( "shared.lua" ) include( "shared.lua" )
Quantum.Client = Quantum.Client || {} Quantum.Client = Quantum.Client || {}
Quantum.Client.Cache = Quantum.Client.Cache || {}
include( "engine/vars/cl_vars.lua" )
local function loadCoreFiles() local function loadCoreFiles()
local fol = GM.FolderName .. "/gamemode/engine/core/" local fol = GM.FolderName .. "/gamemode/engine/core/"

@ -45,7 +45,9 @@ function Quantum.Server.Inventory.EquipItem( pl, itemindex )
else else
if( Quantum.EquipSlots[equipslot] != nil ) then if( Quantum.EquipSlots[equipslot] != nil ) then
char.equiped[equipslot] = slotitem[1] -- set it in the table char.equiped[equipslot] = slotitem[1] -- set it in the table
if( itemTbl.equipeffect != nil ) then
Quantum.Effect.Give( pl, itemTbl.equipeffect ) -- give the player the effect
end
else else
Quantum.Error( tostring(pl) .. " tried to equip an item in a non-existent equip slot: (" .. tostring(equipslot) .. ")" ) Quantum.Error( tostring(pl) .. " tried to equip an item in a non-existent equip slot: (" .. tostring(equipslot) .. ")" )
return return

@ -0,0 +1,9 @@
-- __ _ _______ _ __
-- / / /\ | | |__ __| | | \ \
-- / / / \ | |_ __ ___ | | ___ ___| |__ \ \
-- < < / /\ \ | | '_ ` _ \| |/ _ \/ __| '_ \ > >
-- \ \ / ____ \| | | | | | | | __/ (__| | | | / /
-- \_\ /_/ \_\_|_| |_| |_|_|\___|\___|_| |_| /_/
Quantum.Client.ResolutionScale = ScrH() / 1080
Quantum.Client.ServerBannerPath = "gamemodes/" .. GM.FolderName .. "/gamemode/content/materials/quantum/server_banner.png"

@ -5,21 +5,6 @@
-- \ \ / ____ \| | | | | | | | __/ (__| | | | / / -- \ \ / ____ \| | | | | | | | __/ (__| | | | / /
-- \_\ /_/ \_\_|_| |_| |_|_|\___|\___|_| |_| /_/ -- \_\ /_/ \_\_|_| |_| |_|_|\___|\___|_| |_| /_/
if SERVER then -- SERVER VARS UNDER THIS LINE
end --
if CLIENT then -- SERVER VARS UNDER THIS LINE
Quantum.Client.Cache = Quantum.Client.Cache || {}
Quantum.Client.ResolutionScale = ScrH() / 1080
Quantum.Client.ServerBannerPath = "gamemodes/" .. GM.FolderName .. "/gamemode/content/materials/quantum/server_banner.png"
end --
-- SHARED VARS UNDER THIS LINE
Quantum.ItemInfoDisplayMaxDistance = 200 Quantum.ItemInfoDisplayMaxDistance = 200
Quantum.CharInfoDisplayDistance = 400 Quantum.CharInfoDisplayDistance = 400
@ -55,7 +40,7 @@ Quantum.IntCode = {
USE_ITEM = 2, USE_ITEM = 2,
EAT_ITEM = 3, EAT_ITEM = 3,
EQUIP_ITEM = 4, EQUIP_ITEM = 4,
DESTROY_ITEM = 5, DESTROY_ITEM = 5, -- to be added
UPDATE = 6, UPDATE = 6,
BIT_SIZE = 3 BIT_SIZE = 3
} }

@ -0,0 +1,6 @@
-- __ _ _______ _ __
-- / / /\ | | |__ __| | | \ \
-- / / / \ | |_ __ ___ | | ___ ___| |__ \ \
-- < < / /\ \ | | '_ ` _ \| |/ _ \/ __| '_ \ > >
-- \ \ / ____ \| | | | | | | | __/ (__| | | | / /
-- \_\ /_/ \_\_|_| |_| |_|_|\___|\___|_| |_| /_/

@ -7,8 +7,13 @@
if SERVER then if SERVER then
AddCSLuaFile( "engine/sh_debug.lua" ) AddCSLuaFile( "engine/sh_debug.lua" )
AddCSLuaFile( "engine/vars/sh_vars.lua" )
AddCSLuaFile( "engine/vars/cl_vars.lua" )
AddCSLuaFile( "settings/sh_settings.lua" ) AddCSLuaFile( "settings/sh_settings.lua" )
AddCSLuaFile( "settings/sh_items.lua" ) AddCSLuaFile( "settings/sh_items.lua" )
AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" ) AddCSLuaFile( "shared.lua" )
@ -23,6 +28,7 @@ if SERVER then
Quantum.Server = {} Quantum.Server = {}
include( "settings/sv_settings.lua" ) -- include the settings include( "settings/sv_settings.lua" ) -- include the settings
include( "engine/vars/sv_vars.lua" ) -- include vars
local function loadCoreFiles() local function loadCoreFiles()

@ -13,6 +13,8 @@ GM.Website = "N/A"
Quantum = {} Quantum = {}
Quantum.Version = "v0.3-alpha" Quantum.Version = "v0.3-alpha"
include( "engine/vars/sh_vars.lua" ) -- include the shared constant vars
include( "engine/sh_debug.lua" ) -- add the debug functions and stuff include( "engine/sh_debug.lua" ) -- add the debug functions and stuff
include( "settings/sh_settings.lua" ) include( "settings/sh_settings.lua" )

Loading…
Cancel
Save