Skip to content

Commit

Permalink
lowercased all files and updated file includes
Browse files Browse the repository at this point in the history
  • Loading branch information
Anticept committed May 20, 2020
1 parent 4082dbb commit da7d5db
Show file tree
Hide file tree
Showing 11 changed files with 472 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lua/entities/gmod_wire_hud_indicator_2/H2Editor.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include( "parser/HMLParser.lua" )
include( "parser/hmlparser.lua" )

H2Editor = {}

Expand Down
4 changes: 2 additions & 2 deletions lua/entities/gmod_wire_hud_indicator_2/cl_init.lua
Original file line number Diff line number Diff line change
@@ -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--//
Expand Down
6 changes: 3 additions & 3 deletions lua/entities/gmod_wire_hud_indicator_2/demo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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" )
Expand All @@ -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" )

-- ------------------------------------------------------------------- --
Expand Down
53 changes: 53 additions & 0 deletions lua/entities/gmod_wire_hud_indicator_2/h2editor.lua
Original file line number Diff line number Diff line change
@@ -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( "<HML /> Editor", "HUD2")
self.panel:Center()
self.panel:SetV( true )
self.panel:MakePopup()
self.panel.chip = chip
self.panel.tool = self
self.panel:SetCode("<hml>\n\n<!-- Code here! -->\n\n</hml>")

return obj
end


function H2Editor:open( newFile )
self.file = newFile

GAMEMODE:AddNotify('<HML /> 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('<HML /> Saved!', NOTIFY_GENERIC, 7);
end

end
8 changes: 4 additions & 4 deletions lua/entities/gmod_wire_hud_indicator_2/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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" )
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions lua/entities/gmod_wire_hud_indicator_2/parse_test.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
dofile( "fakelib/system.lua" )


include( "parser/HMLParser.lua" )
include( "renderer/HMLRenderer.lua" )
include( "parser/hmlparser.lua" )
include( "renderer/hmlrenderer.lua" )



Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Constants.lua
-- constants.lua
--
-- Constants for the parser to replace in HML.
-- Place any additional replacements here.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include( "Constants.lua" )
include( "constants.lua" )
include("entities/gmod_wire_hud_indicator_2/util/tables.lua")

HMLParser = {}
Expand Down
104 changes: 104 additions & 0 deletions lua/entities/gmod_wire_hud_indicator_2/parser/constants.lua
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit da7d5db

Please sign in to comment.