From 1f19abbcfcc3baa6c7f93a9b6dab5822801b8537 Mon Sep 17 00:00:00 2001 From: CoreyLee Hassell Date: Wed, 20 May 2020 07:14:24 -0400 Subject: [PATCH] lowercased all files and updated file includes --- .../gmod_wire_hud_indicator_2/H2Editor.lua | 2 +- .../gmod_wire_hud_indicator_2/cl_init.lua | 4 +- .../gmod_wire_hud_indicator_2/demo.lua | 6 +- .../gmod_wire_hud_indicator_2/h2editor.lua | 53 +++++ .../gmod_wire_hud_indicator_2/init.lua | 8 +- .../gmod_wire_hud_indicator_2/parse_test.lua | 4 +- .../parser/Constants.lua | 2 +- .../parser/HMLParser.lua | 2 +- .../parser/constants.lua | 104 ++++++++++ .../parser/hmlparser.lua | 193 ++++++++++++++++++ .../renderer/hmlrenderer.lua | 108 ++++++++++ .../entities/gmod_wire_ramcard_default024.vmt | 2 +- .../gmod_wire_ramcard_default1024.vmt | 2 +- .../entities/gmod_wire_ramcard_default128.vmt | 2 +- .../entities/gmod_wire_ramcard_default32.vmt | 2 +- .../entities/gmod_wire_ramcard_default64.vmt | 2 +- .../entities/gmod_wire_ramcard_proxy024.vmt | 2 +- .../entities/gmod_wire_ramcard_proxy32.vmt | 2 +- .../entities/gmod_wire_ramcard_default024.vmt | 2 +- .../gmod_wire_ramcard_default1024.vmt | 2 +- .../entities/gmod_wire_ramcard_default128.vmt | 2 +- .../entities/gmod_wire_ramcard_default32.vmt | 2 +- .../entities/gmod_wire_ramcard_default64.vmt | 2 +- .../entities/gmod_wire_ramcard_proxy024.vmt | 2 +- .../entities/gmod_wire_ramcard_proxy32.vmt | 2 +- 25 files changed, 486 insertions(+), 28 deletions(-) create mode 100644 lua/entities/gmod_wire_hud_indicator_2/h2editor.lua create mode 100644 lua/entities/gmod_wire_hud_indicator_2/parser/constants.lua create mode 100644 lua/entities/gmod_wire_hud_indicator_2/parser/hmlparser.lua create mode 100644 lua/entities/gmod_wire_hud_indicator_2/renderer/hmlrenderer.lua diff --git a/lua/entities/gmod_wire_hud_indicator_2/H2Editor.lua b/lua/entities/gmod_wire_hud_indicator_2/H2Editor.lua index dad28cad..649a183f 100644 --- a/lua/entities/gmod_wire_hud_indicator_2/H2Editor.lua +++ b/lua/entities/gmod_wire_hud_indicator_2/H2Editor.lua @@ -1,4 +1,4 @@ -include( "parser/HMLParser.lua" ) +include( "parser/hmlparser.lua" ) H2Editor = {} diff --git a/lua/entities/gmod_wire_hud_indicator_2/cl_init.lua b/lua/entities/gmod_wire_hud_indicator_2/cl_init.lua index d97f7979..f8b965af 100644 --- a/lua/entities/gmod_wire_hud_indicator_2/cl_init.lua +++ b/lua/entities/gmod_wire_hud_indicator_2/cl_init.lua @@ -1,8 +1,8 @@ include('util/errors.lua') include('shared.lua') include('H2Editor.lua') -include('parser/HMLParser.lua') -include('renderer/HMLRenderer.lua') +include('parser/hmlparser.lua') +include('renderer/hmlrenderer.lua') include('expression_parser.lua') //--RUNS CLIENTSIDE--// diff --git a/lua/entities/gmod_wire_hud_indicator_2/demo.lua b/lua/entities/gmod_wire_hud_indicator_2/demo.lua index a09caf69..556448b2 100644 --- a/lua/entities/gmod_wire_hud_indicator_2/demo.lua +++ b/lua/entities/gmod_wire_hud_indicator_2/demo.lua @@ -4,7 +4,7 @@ dofile( "fakelib/system.lua" ) -- Set up alias paths for non-direct loading of includes... damn you Garry... -mapInclude( "Constants.lua", "parser/Constants.lua" ) +mapInclude( "constants.lua", "parser/constants.lua" ) mapInclude( "entities/gmod_wire_hud_indicator_2/util/tables.lua", "util/tables.lua" ) mapInclude( "valid_fonts.lua", "renderer/valid_fonts.lua" ) mapInclude( "tags/core.lua", "renderer/tags/core.lua" ) @@ -17,9 +17,9 @@ include( "util/tables.lua" ) include( "expressions/expr_tokenizer.lua" ) include( "expressions/expr_stack.lua" ) -include( "parser/HMLParser.lua" ) +include( "parser/hmlparser.lua" ) -include( "renderer/HMLRenderer.lua" ) +include( "renderer/hmlrenderer.lua" ) include( "expression_parser.lua" ) -- ------------------------------------------------------------------- -- diff --git a/lua/entities/gmod_wire_hud_indicator_2/h2editor.lua b/lua/entities/gmod_wire_hud_indicator_2/h2editor.lua new file mode 100644 index 00000000..649a183f --- /dev/null +++ b/lua/entities/gmod_wire_hud_indicator_2/h2editor.lua @@ -0,0 +1,53 @@ +include( "parser/hmlparser.lua" ) + +H2Editor = {} + +function H2Editor:new( newFile ) + + if( newFile == nil ) then return nil end + + local obj = {} + setmetatable( obj, {__index = H2Editor} ) + obj.file = newFile + + + self.panel = vgui.Create( "Expression2EditorFrame" ) + self.panel:Setup( " Editor", "HUD2") + self.panel:Center() + self.panel:SetV( true ) + self.panel:MakePopup() + self.panel.chip = chip + self.panel.tool = self + self.panel:SetCode("\n\n\n\n") + + return obj +end + + +function H2Editor:open( newFile ) + self.file = newFile + + GAMEMODE:AddNotify(' Opening editor...', NOTIFY_GENERIC, 7); + + --Customize various stuff-- + function self.panel:SaveFile(Line, close) + self:ExtractName() + if(close and self.chip) then + if(tool.HUD_Validate(HUD_EditorPanel:GetCode())) then return end + --tool.HUD_SyncAndUpload() + self:Close() + return end + if(!Line or Line == self.Location .. "/" .. ".txt") then + Derma_StringRequest( "Save to New File", "", "filename", + function( strTextOut ) + self:SaveFile( self.Location .. "/" .. string.Replace(strTextOut," ","_") .. ".txt", close ) + end ) + return end + file.Write(Line , self:GetCode()) + if(!self.chip) then self:ChosenFile(Line) end + if(close) then self:Close() end + + GAMEMODE:AddNotify(' Saved!', NOTIFY_GENERIC, 7); + end + +end diff --git a/lua/entities/gmod_wire_hud_indicator_2/init.lua b/lua/entities/gmod_wire_hud_indicator_2/init.lua index 8056bc3f..d4fb6c98 100644 --- a/lua/entities/gmod_wire_hud_indicator_2/init.lua +++ b/lua/entities/gmod_wire_hud_indicator_2/init.lua @@ -8,9 +8,9 @@ AddCSLuaFile( "expressions/libs/corelib.lua" ) AddCSLuaFile( "expressions/libs/logiclib.lua" ) AddCSLuaFile( "expressions/libs/mathlib.lua" ) AddCSLuaFile( "expressions/libs/stringlib.lua" ) -AddCSLuaFile( "parser/Constants.lua" ) -AddCSLuaFile( "parser/HMLParser.lua" ) -AddCSLuaFile( "renderer/HMLRenderer.lua" ) +AddCSLuaFile( "parser/constants.lua" ) +AddCSLuaFile( "parser/hmlparser.lua" ) +AddCSLuaFile( "renderer/hmlrenderer.lua" ) AddCSLuaFile( "renderer/valid_fonts.lua" ) AddCSLuaFile( "renderer/tags/core.lua" ) AddCSLuaFile( "renderer/tags/presets.lua" ) @@ -27,7 +27,7 @@ util.AddNetworkString( "RenderTableUpdate" ) include('shared.lua') include('util/errors.lua') -include('parser/HMLParser.lua') +include('parser/hmlparser.lua') include("util/tables.lua") ENT.WireDebugName = "Wire HUD Indicator 2" diff --git a/lua/entities/gmod_wire_hud_indicator_2/parse_test.lua b/lua/entities/gmod_wire_hud_indicator_2/parse_test.lua index 3d02ad9b..ff8479f1 100644 --- a/lua/entities/gmod_wire_hud_indicator_2/parse_test.lua +++ b/lua/entities/gmod_wire_hud_indicator_2/parse_test.lua @@ -1,8 +1,8 @@ dofile( "fakelib/system.lua" ) -include( "parser/HMLParser.lua" ) -include( "renderer/HMLRenderer.lua" ) +include( "parser/hmlparser.lua" ) +include( "renderer/hmlrenderer.lua" ) diff --git a/lua/entities/gmod_wire_hud_indicator_2/parser/Constants.lua b/lua/entities/gmod_wire_hud_indicator_2/parser/Constants.lua index 295bdb64..018d8990 100644 --- a/lua/entities/gmod_wire_hud_indicator_2/parser/Constants.lua +++ b/lua/entities/gmod_wire_hud_indicator_2/parser/Constants.lua @@ -1,4 +1,4 @@ --- Constants.lua +-- constants.lua -- -- Constants for the parser to replace in HML. -- Place any additional replacements here. diff --git a/lua/entities/gmod_wire_hud_indicator_2/parser/HMLParser.lua b/lua/entities/gmod_wire_hud_indicator_2/parser/HMLParser.lua index 5066db47..7b901662 100644 --- a/lua/entities/gmod_wire_hud_indicator_2/parser/HMLParser.lua +++ b/lua/entities/gmod_wire_hud_indicator_2/parser/HMLParser.lua @@ -1,4 +1,4 @@ -include( "Constants.lua" ) +include( "constants.lua" ) include("entities/gmod_wire_hud_indicator_2/util/tables.lua") HMLParser = {} diff --git a/lua/entities/gmod_wire_hud_indicator_2/parser/constants.lua b/lua/entities/gmod_wire_hud_indicator_2/parser/constants.lua new file mode 100644 index 00000000..018d8990 --- /dev/null +++ b/lua/entities/gmod_wire_hud_indicator_2/parser/constants.lua @@ -0,0 +1,104 @@ +-- constants.lua +-- +-- Constants for the parser to replace in HML. +-- Place any additional replacements here. +-- +-- Table keys should be in UPPERCASE always, otherwise they wont be replaced +-- when the parser sees the argument. +-- +-- NOTE: Parser only currently replaces constants in arguments. +-- +-- Moggie100. + + +function HMLConstants() + constants = {} + constants["BLACK"] = { type="vector_3d", x=000, y=000, z=000 } + constants["BLACK25"] = { type="vector_4d", x=000, y=000, z=000, w=64 } + constants["BLACK50"] = { type="vector_4d", x=000, y=000, z=000, w=128 } + constants["BLACK75"] = { type="vector_4d", x=000, y=000, z=000, w=192 } + + constants["SILVER"] = { type="vector_3d", x=192, y=192, z=192 } + constants["SILVER25"] = { type="vector_4d", x=192, y=192, z=192, w=64 } + constants["SILVER50"] = { type="vector_4d", x=192, y=192, z=192, w=128 } + constants["SILVER75"] = { type="vector_4d", x=192, y=192, z=192, w=192 } + + constants["GRAY"] = { type="vector_3d", x=128, y=128, z=128 } + constants["GRAY25"] = { type="vector_4d", x=128, y=128, z=128, w=64 } + constants["GRAY50"] = { type="vector_4d", x=128, y=128, z=128, w=128 } + constants["GRAY75"] = { type="vector_4d", x=128, y=128, z=128, w=192 } + + constants["WHITE"] = { type="vector_3d", x=255, y=255, z=255 } + constants["WHITE25"] = { type="vector_4d", x=255, y=255, z=255, w=64 } + constants["WHITE50"] = { type="vector_4d", x=255, y=255, z=255, w=128 } + constants["WHITE75"] = { type="vector_4d", x=255, y=255, z=255, w=192 } + + constants["MAROON"] = { type="vector_3d", x=128, y=000, z=000 } + constants["MAROON25"] = { type="vector_4d", x=128, y=000, z=000, w=64 } + constants["MAROON50"] = { type="vector_4d", x=128, y=000, z=000, w=128 } + constants["MAROON75"] = { type="vector_4d", x=128, y=000, z=000, w=192 } + + constants["RED"] = { type="vector_3d", x=255, y=000, z=000 } + constants["RED25"] = { type="vector_4d", x=255, y=000, z=000, w=64 } + constants["RED50"] = { type="vector_4d", x=255, y=000, z=000, w=128 } + constants["RED75"] = { type="vector_4d", x=255, y=000, z=000, w=192 } + + constants["PURPLE"] = { type="vector_3d", x=128, y=000, z=128 } + constants["PURPLE25"] = { type="vector_4d", x=128, y=000, z=128, w=64 } + constants["PURPLE50"] = { type="vector_4d", x=128, y=000, z=128, w=128 } + constants["PURPLE75"] = { type="vector_4d", x=128, y=000, z=128, w=192 } + + constants["FUCHSIA"] = { type="vector_3d", x=255, y=000, z=255 } + constants["FUCHSIA25"] = { type="vector_4d", x=255, y=000, z=255, w=64 } + constants["FUCHSIA50"] = { type="vector_4d", x=255, y=000, z=255, w=128 } + constants["FUCHSIA75"] = { type="vector_4d", x=255, y=000, z=255, w=192 } + + constants["GREEN"] = { type="vector_3d", x=000, y=128, z=000 } + constants["GREEN25"] = { type="vector_4d", x=000, y=128, z=000, w=64 } + constants["GREEN50"] = { type="vector_4d", x=000, y=128, z=000, w=128 } + constants["GREEN75"] = { type="vector_4d", x=000, y=128, z=000, w=192 } + + constants["LIME"] = { type="vector_3d", x=000, y=255, z=000 } + constants["LIME25"] = { type="vector_4d", x=000, y=255, z=000, w=64 } + constants["LIME50"] = { type="vector_4d", x=000, y=255, z=000, w=128 } + constants["LIME75"] = { type="vector_4d", x=000, y=255, z=000, w=192 } + + constants["OLIVE"] = { type="vector_3d", x=128, y=128, z=000 } + constants["OLIVE25"] = { type="vector_4d", x=128, y=128, z=000, w=64 } + constants["OLIVE50"] = { type="vector_4d", x=128, y=128, z=000, w=128 } + constants["OLIVE75"] = { type="vector_4d", x=128, y=128, z=000, w=192 } + + constants["YELLOW"] = { type="vector_3d", x=255, y=255, z=000 } + constants["YELLOW25"] = { type="vector_4d", x=255, y=255, z=000, w=64 } + constants["YELLOW50"] = { type="vector_4d", x=255, y=255, z=000, w=128 } + constants["YELLOW75"] = { type="vector_4d", x=255, y=255, z=000, w=192 } + + constants["NAVY"] = { type="vector_3d", x=000, y=000, z=128 } + constants["NAVY25"] = { type="vector_4d", x=000, y=000, z=128, w=64 } + constants["NAVY50"] = { type="vector_4d", x=000, y=000, z=128, w=128 } + constants["NAVY75"] = { type="vector_4d", x=000, y=000, z=128, w=192 } + + constants["BLUE"] = { type="vector_3d", x=000, y=000, z=255 } + constants["BLUE25"] = { type="vector_4d", x=000, y=000, z=255, w=64 } + constants["BLUE50"] = { type="vector_4d", x=000, y=000, z=255, w=128 } + constants["BLUE75"] = { type="vector_4d", x=000, y=000, z=255, w=192 } + + constants["TEAL"] = { type="vector_3d", x=000, y=128, z=128 } + constants["TEAL25"] = { type="vector_4d", x=000, y=128, z=128, w=64 } + constants["TEAL50"] = { type="vector_4d", x=000, y=128, z=128, w=128 } + constants["TEAL75"] = { type="vector_4d", x=000, y=128, z=128, w=192 } + + constants["AQUA"] = { type="vector_3d", x=000, y=255, z=255 } + constants["AQUA25"] = { type="vector_4d", x=000, y=255, z=255, w=64 } + constants["AQUA50"] = { type="vector_4d", x=000, y=255, z=255, w=128 } + constants["AQUA75"] = { type="vector_4d", x=000, y=255, z=255, w=192 } + + + constants["DERMA"] = { type="vector_4d", x=050, y=050, z=075, w=100 } + constants["DERMA25"] = { type="vector_4d", x=050, y=050, z=075, w=64 } + constants["DERMA50"] = { type="vector_4d", x=050, y=050, z=075, w=128 } + constants["DERMA75"] = { type="vector_4d", x=050, y=050, z=075, w=192 } + constants["DERMA100"] = { type="vector_4d", x=050, y=050, z=075, w=255 } + + return constants +end diff --git a/lua/entities/gmod_wire_hud_indicator_2/parser/hmlparser.lua b/lua/entities/gmod_wire_hud_indicator_2/parser/hmlparser.lua new file mode 100644 index 00000000..7b901662 --- /dev/null +++ b/lua/entities/gmod_wire_hud_indicator_2/parser/hmlparser.lua @@ -0,0 +1,193 @@ +include( "constants.lua" ) +include("entities/gmod_wire_hud_indicator_2/util/tables.lua") + +HMLParser = {} + +function HMLParser:new( code ) + local obj = {} + setmetatable( obj, {__index = HMLParser} ) + + + obj.code = code + obj.tree = {} + obj.valid = false + obj.constants = HMLConstants() + obj.inputs = {} + obj.validTypes = {} + obj.tagIndex = 0 + + obj.validTypes['2'] = "vector2" + obj.validTypes['3'] = "vector3" + obj.validTypes['4'] = "vector4" + obj.validTypes['s'] = "string" + obj.validTypes['c'] = "color" + obj.validTypes['a'] = "alpha_color" + obj.validTypes[''] = "numeric" + + return obj +end + +function HMLParser:exec( newcode ) + local result = nil + + if( newcode ~= nil ) then + self.code = newcode + end + + + if( self.code ~= nil ) then + + Msg("Currently attempting to parse:\n" .. self.code .. "\n") + + self.inputs = {} + + Msg("Parsing HML...") + result = self:collect( self.code ) + Msg("Done\n") + else + result = false + Msg("No code to parse!\n") + end + + return result +end + +function HMLParser:toString( var ) + if( type(var) == "string" ) then return var end + return "" +end + +function HMLParser:getInputTable() + return self.inputs +end + +function HMLParser:toNumber( var ) + local output = tonumber( var ) + + print( type( var ), " = ", output ) + + if( output ~= nil ) then return output end + + return 0 +end + +function HMLParser:toBoolean( var ) + if( type(var) == "boolean" ) then return var end + return false +end + +function HMLParser:toTable( var ) + if( type(var) == "table" ) then return var end + return {} +end + +function HMLParser:parseargs(s) + local arg = {} + local foundInputs = false + + --print( "--Parsing Arguments--" ) + --print( "string: ", s ) + + --These should have inputs created on the SENT... + for key, value in string.gmatch(s, "([%a_]+)%=([^;]-);") do + foundInputs = false + + for type, name in string.gmatch(value, "([234sca]?)@(%u[%w_]+)") do + print("Input: ", type, name) + + if( self.validTypes[type] ~= nil ) then + self.inputs[name] = {} + self.inputs[name].type = self.validTypes[type] + self.inputs[name].value = 0 + else + print("[WW]", "Input " ..tostring(name).. " was an unknown type (" ..tostring(type).. ") and was not added to the input table! No updates will be performed on this input!") + end + + foundInputs = true + + end + + arg[key] = value + end + + return arg +end + +function HMLParser:collect(s) + local stack = {} + local top = {} + table.insert(stack, top) + local ni,c,tag,xarg, empty + local i, j = 1, 1 + + while true do + ni,j,c,tag,xarg, empty = string.find(s, "<(%/?)([!%-%w]+)(.-)(%/?)>", i) + if not ni then break end + local text = string.sub(s, i, ni-1) + + if not string.find(text, "^%s*$") then + table.insert(top, text) + end + + self.tagIndex = self.tagIndex + 1 + + if( tag == "!--" ) then + --print("Skipped comment -> '" ..tostring(xarg).. "'" ) + + else + if empty == "/" then -- empty element tag + local newTag = self:parseargs(xarg) + newTag.empty = 1 + newTag.tag = tag + newTag.uid = self.tagIndex + table.insert(top, newTag) + + elseif c == "" then -- start tag + top = self:parseargs(xarg) + top.tag = tag + top.uid = self.tagIndex + table.insert(stack, top) -- new level + + else -- end tag + local toclose = table.remove(stack) -- remove top + top = stack[#stack] + top.uid = self.tagIndex + if #stack < 1 then + HMLError("nothing to close with "..tag) + end + + if toclose.tag ~= tag then + toclose.tag = toclose.tag or "nil" + HMLError("trying to close "..toclose.tag.." with "..tag) + else + table.insert(top, toclose) + end + + + end + end + + i = j + 1 + end + + local text = string.sub(s, i) + + if not string.find(text, "^%s*$") then + table.insert(stack[#stack], text) + end + + if #stack > 1 then + local output = "UNKNOWN, probably syntax" + if( stack ~= nil and stack.n ~= nil ) then + output = output .. "stack=" .. tostring(stack) .. ", stack=" .. tostring(stack.n) + if( stack[stack.n] ~= nil and stack[stack.n].tag ~= nil ) then + output = output .. "stack[n]=" .. tostring(stack[stack.n]) .. ", stack[n].tag=" .. tostring(stack[stack.n].tag) + end + end + + HMLError("Incomplete XML: Unclosed/Missing tags '"..output) + return false + end + + return stack[1] +end diff --git a/lua/entities/gmod_wire_hud_indicator_2/renderer/hmlrenderer.lua b/lua/entities/gmod_wire_hud_indicator_2/renderer/hmlrenderer.lua new file mode 100644 index 00000000..292598dc --- /dev/null +++ b/lua/entities/gmod_wire_hud_indicator_2/renderer/hmlrenderer.lua @@ -0,0 +1,108 @@ +HMLRenderer = {} +HMLRenderer.coreTags = {} +HMLRenderer.customTags = {} + +include( "valid_fonts.lua" ) + +include( "tags/core.lua" ) +include( "tags/primitives.lua" ) +include( "tags/presets.lua" ) +--include( "tags/vgui.lua" ) + +function HMLRenderer:new() + local obj = {} + setmetatable( obj, {__index = HMLRenderer} ) + + obj.default = {} + obj.default.color = {} + obj.default.color.background = {50,50,75,100} + obj.default.color.foreground = {255,255,255,255} + obj.default.font = "Default" + obj.default.clip = false + obj.clip = false + obj.cacheRefresh = false + obj.inputs = {} + obj.parser = EXPR_Parser:new() + obj.skip = 0 + + obj.renderTable = nil + + return obj +end + +function HMLRenderer:SetDefaults() + --Do nothing, stuff will happen later! +end + +function HMLRenderer:SetRenderTable( newTable ) + self.renderTable = newTable +end + +function HMLRenderer:GetRenderTable() + return self.renderTable +end + +function HMLRenderer:Draw() + local t = self.renderTable + + if( self.skip > 0 ) then + self.skip = self.skip - 1 + return true + end + + HUD_System.showStatus = false + + if( SERVER ) then + Msg("[EE]\tRenderer invoked serverside!\n") + return true + end + + if( t == nil ) then + --Abort! Nothing to render! + return true + end + + if( type(t) ~= "table" ) then + HMLError("Invalid variable type supplied! Expects a table!") + self.renderTable = nil + return false + end + + --Set the defaults here, can be overridden with custom defaults!-- + self:SetDefaults() + + --For each group, run!-- + for k, v in ipairs(t) do + if( type(v.tag) == "string" ) then + v.tagName = v.tag + v.tag = self.coreTags[v.tag] + end + v.xOffset = 0 + v.yOffset = 0 + v.width = surface.ScreenWidth() + v.height = surface.ScreenHeight() + + if( type(v.tag) == "function" ) then + status = v:tag() + if( !status or type(status) == "string" ) then + HMLError( "ROOT > " ..tostring(status) ) + self.skip = 500 + end + else + HMLError( "ROOT > Unknown tag! <" ..tostring(v.tagName).. "> has no handler!", 15 ) + self.skip = 500 + end + end + + if( HUD_System.showStatus ) then + local usage = math.floor((HUD_System.opCount/HUD_System.maxOps)*100) + local position = { x=30, y=200 } + + draw.RoundedBox( 8, position.x, position.y, 320, 70, Color( 50, 50, 75, 128 ) ) + draw.DrawText( "HUD 2 Status", "default", position.x+10, position.y+10, Color(255,255,255,255), TEXT_ALIGN_LEFT ) + draw.DrawText( "OpCount: " ..tostring(HUD_System.opCount).. " of " ..tostring(HUD_System.maxOps), "ConsoleText", position.x+10, position.y+35, Color(255,255,255,255), TEXT_ALIGN_LEFT ) + draw.DrawText( "Usage: " ..tostring(usage).. "%", "ConsoleText", position.x+10, position.y+45, Color(255,255,255,255), TEXT_ALIGN_LEFT ) + end + + return true +end diff --git a/materials/VGUI/entities/gmod_wire_ramcard_default024.vmt b/materials/VGUI/entities/gmod_wire_ramcard_default024.vmt index 38582465..fd69e1d4 100644 --- a/materials/VGUI/entities/gmod_wire_ramcard_default024.vmt +++ b/materials/VGUI/entities/gmod_wire_ramcard_default024.vmt @@ -1,6 +1,6 @@ "UnlitGeneric" { - "$basetexture" "VGUI/entities/gmod_wire_ramcard_default024" + "$basetexture" "vgui/entities/gmod_wire_ramcard_default024" "$vertexcolor" 1 "$vertexalpha" 1 "$nolod" 1 diff --git a/materials/VGUI/entities/gmod_wire_ramcard_default1024.vmt b/materials/VGUI/entities/gmod_wire_ramcard_default1024.vmt index 781dc246..10eee18b 100644 --- a/materials/VGUI/entities/gmod_wire_ramcard_default1024.vmt +++ b/materials/VGUI/entities/gmod_wire_ramcard_default1024.vmt @@ -1,6 +1,6 @@ "UnlitGeneric" { - "$basetexture" "VGUI/entities/gmod_wire_ramcard_default1024" + "$basetexture" "vgui/entities/gmod_wire_ramcard_default1024" "$vertexcolor" 1 "$vertexalpha" 1 "$nolod" 1 diff --git a/materials/VGUI/entities/gmod_wire_ramcard_default128.vmt b/materials/VGUI/entities/gmod_wire_ramcard_default128.vmt index 4799175f..2dc18d9a 100644 --- a/materials/VGUI/entities/gmod_wire_ramcard_default128.vmt +++ b/materials/VGUI/entities/gmod_wire_ramcard_default128.vmt @@ -1,6 +1,6 @@ "UnlitGeneric" { - "$basetexture" "VGUI/entities/gmod_wire_ramcard_default128" + "$basetexture" "vgui/entities/gmod_wire_ramcard_default128" "$vertexcolor" 1 "$vertexalpha" 1 "$nolod" 1 diff --git a/materials/VGUI/entities/gmod_wire_ramcard_default32.vmt b/materials/VGUI/entities/gmod_wire_ramcard_default32.vmt index fe86d69c..0f9c0817 100644 --- a/materials/VGUI/entities/gmod_wire_ramcard_default32.vmt +++ b/materials/VGUI/entities/gmod_wire_ramcard_default32.vmt @@ -1,6 +1,6 @@ "UnlitGeneric" { - "$basetexture" "VGUI/entities/gmod_wire_ramcard_default32" + "$basetexture" "vgui/entities/gmod_wire_ramcard_default32" "$vertexcolor" 1 "$vertexalpha" 1 "$nolod" 1 diff --git a/materials/VGUI/entities/gmod_wire_ramcard_default64.vmt b/materials/VGUI/entities/gmod_wire_ramcard_default64.vmt index 4fad62d4..9e7a7de3 100644 --- a/materials/VGUI/entities/gmod_wire_ramcard_default64.vmt +++ b/materials/VGUI/entities/gmod_wire_ramcard_default64.vmt @@ -1,6 +1,6 @@ "UnlitGeneric" { - "$basetexture" "VGUI/entities/gmod_wire_ramcard_default64" + "$basetexture" "vgui/entities/gmod_wire_ramcard_default64" "$vertexcolor" 1 "$vertexalpha" 1 "$nolod" 1 diff --git a/materials/VGUI/entities/gmod_wire_ramcard_proxy024.vmt b/materials/VGUI/entities/gmod_wire_ramcard_proxy024.vmt index e1299f87..6fd59309 100644 --- a/materials/VGUI/entities/gmod_wire_ramcard_proxy024.vmt +++ b/materials/VGUI/entities/gmod_wire_ramcard_proxy024.vmt @@ -1,6 +1,6 @@ "UnlitGeneric" { - "$basetexture" "VGUI/entities/gmod_wire_ramcard_proxy024" + "$basetexture" "vgui/entities/gmod_wire_ramcard_proxy024" "$vertexcolor" 1 "$vertexalpha" 1 "$nolod" 1 diff --git a/materials/VGUI/entities/gmod_wire_ramcard_proxy32.vmt b/materials/VGUI/entities/gmod_wire_ramcard_proxy32.vmt index 2242be71..87cdf686 100644 --- a/materials/VGUI/entities/gmod_wire_ramcard_proxy32.vmt +++ b/materials/VGUI/entities/gmod_wire_ramcard_proxy32.vmt @@ -1,6 +1,6 @@ "UnlitGeneric" { - "$basetexture" "VGUI/entities/gmod_wire_ramcard_proxy32" + "$basetexture" "vgui/entities/gmod_wire_ramcard_proxy32" "$vertexcolor" 1 "$vertexalpha" 1 "$nolod" 1 diff --git a/materials/vgui/entities/gmod_wire_ramcard_default024.vmt b/materials/vgui/entities/gmod_wire_ramcard_default024.vmt index a4907d5a..761d13e6 100644 --- a/materials/vgui/entities/gmod_wire_ramcard_default024.vmt +++ b/materials/vgui/entities/gmod_wire_ramcard_default024.vmt @@ -1,6 +1,6 @@ "UnlitGeneric" { - "$basetexture" "VGUI/entities/gmod_wire_ramcard_default024" + "$basetexture" "vgui/entities/gmod_wire_ramcard_default024" "$vertexcolor" 1 "$vertexalpha" 1 "$nolod" 1 diff --git a/materials/vgui/entities/gmod_wire_ramcard_default1024.vmt b/materials/vgui/entities/gmod_wire_ramcard_default1024.vmt index b902fada..5eca0da6 100644 --- a/materials/vgui/entities/gmod_wire_ramcard_default1024.vmt +++ b/materials/vgui/entities/gmod_wire_ramcard_default1024.vmt @@ -1,6 +1,6 @@ "UnlitGeneric" { - "$basetexture" "VGUI/entities/gmod_wire_ramcard_default1024" + "$basetexture" "vgui/entities/gmod_wire_ramcard_default1024" "$vertexcolor" 1 "$vertexalpha" 1 "$nolod" 1 diff --git a/materials/vgui/entities/gmod_wire_ramcard_default128.vmt b/materials/vgui/entities/gmod_wire_ramcard_default128.vmt index 1e25cc46..9b7049bc 100644 --- a/materials/vgui/entities/gmod_wire_ramcard_default128.vmt +++ b/materials/vgui/entities/gmod_wire_ramcard_default128.vmt @@ -1,6 +1,6 @@ "UnlitGeneric" { - "$basetexture" "VGUI/entities/gmod_wire_ramcard_default128" + "$basetexture" "vgui/entities/gmod_wire_ramcard_default128" "$vertexcolor" 1 "$vertexalpha" 1 "$nolod" 1 diff --git a/materials/vgui/entities/gmod_wire_ramcard_default32.vmt b/materials/vgui/entities/gmod_wire_ramcard_default32.vmt index 55f11f49..2edf612a 100644 --- a/materials/vgui/entities/gmod_wire_ramcard_default32.vmt +++ b/materials/vgui/entities/gmod_wire_ramcard_default32.vmt @@ -1,6 +1,6 @@ "UnlitGeneric" { - "$basetexture" "VGUI/entities/gmod_wire_ramcard_default32" + "$basetexture" "vgui/entities/gmod_wire_ramcard_default32" "$vertexcolor" 1 "$vertexalpha" 1 "$nolod" 1 diff --git a/materials/vgui/entities/gmod_wire_ramcard_default64.vmt b/materials/vgui/entities/gmod_wire_ramcard_default64.vmt index 9b66be97..da494ef0 100644 --- a/materials/vgui/entities/gmod_wire_ramcard_default64.vmt +++ b/materials/vgui/entities/gmod_wire_ramcard_default64.vmt @@ -1,6 +1,6 @@ "UnlitGeneric" { - "$basetexture" "VGUI/entities/gmod_wire_ramcard_default64" + "$basetexture" "vgui/entities/gmod_wire_ramcard_default64" "$vertexcolor" 1 "$vertexalpha" 1 "$nolod" 1 diff --git a/materials/vgui/entities/gmod_wire_ramcard_proxy024.vmt b/materials/vgui/entities/gmod_wire_ramcard_proxy024.vmt index b1067466..ac80c6bd 100644 --- a/materials/vgui/entities/gmod_wire_ramcard_proxy024.vmt +++ b/materials/vgui/entities/gmod_wire_ramcard_proxy024.vmt @@ -1,6 +1,6 @@ "UnlitGeneric" { - "$basetexture" "VGUI/entities/gmod_wire_ramcard_proxy024" + "$basetexture" "vgui/entities/gmod_wire_ramcard_proxy024" "$vertexcolor" 1 "$vertexalpha" 1 "$nolod" 1 diff --git a/materials/vgui/entities/gmod_wire_ramcard_proxy32.vmt b/materials/vgui/entities/gmod_wire_ramcard_proxy32.vmt index a0ca9d60..056fcf4e 100644 --- a/materials/vgui/entities/gmod_wire_ramcard_proxy32.vmt +++ b/materials/vgui/entities/gmod_wire_ramcard_proxy32.vmt @@ -1,6 +1,6 @@ "UnlitGeneric" { - "$basetexture" "VGUI/entities/gmod_wire_ramcard_proxy32" + "$basetexture" "vgui/entities/gmod_wire_ramcard_proxy32" "$vertexcolor" 1 "$vertexalpha" 1 "$nolod" 1