From b9432709cc685e153fa7a3bd684297a4dc8fbb1b Mon Sep 17 00:00:00 2001 From: GGG KILLER Date: Mon, 17 Jul 2017 03:02:20 -0300 Subject: [PATCH] Initial commit --- .gitattributes | 2 + .gitignore | 275 +++++++++++++ LICENSE | 21 + README.md | 19 + WorkshopUtils.sln | 28 ++ WorkshopUtils/App.config | 6 + WorkshopUtils/GlobalSuppressions.cs | 16 + ... Managed Recommended + MS Security.ruleset | 5 + WorkshopUtils/Program.cs | 32 ++ WorkshopUtils/Properties/AssemblyInfo.cs | 34 ++ .../Properties/Resources.Designer.cs | 63 +++ WorkshopUtils/Properties/Resources.resx | 117 ++++++ WorkshopUtils/Properties/Settings.Designer.cs | 26 ++ WorkshopUtils/Properties/Settings.settings | 7 + WorkshopUtils/UI/ChoiceForm.Designer.cs | 75 ++++ WorkshopUtils/UI/ChoiceForm.cs | 31 ++ WorkshopUtils/UI/ChoiceForm.resx | 120 ++++++ WorkshopUtils/UI/Dbg.cs | 38 ++ WorkshopUtils/UI/FolderSelectDialog.cs | 372 ++++++++++++++++++ WorkshopUtils/UI/GLuaCode.Designer.cs | 36 ++ WorkshopUtils/UI/GLuaCode.cs | 77 ++++ .../GLuaHighlightTokenizer.Fns.cs | 20 + .../GLuaHighlighter/GLuaHighlightTokenizer.cs | 318 +++++++++++++++ .../UI/GLuaHighlighter/HighlightToken.cs | 12 + .../UI/GLuaHighlighter/HighlightTokenTypes.cs | 13 + WorkshopUtils/UI/GMAParserForm.Designer.cs | 321 +++++++++++++++ WorkshopUtils/UI/GMAParserForm.cs | 150 +++++++ WorkshopUtils/UI/GMAParserForm.resx | 120 ++++++ WorkshopUtils/UI/WorkshopDLForm.Designer.cs | 82 ++++ WorkshopUtils/UI/WorkshopDLForm.cs | 70 ++++ WorkshopUtils/UI/WorkshopDLForm.resx | 120 ++++++ WorkshopUtils/WorkshopAddon.cs | 69 ++++ WorkshopUtils/WorkshopHTTPAPI.cs | 125 ++++++ WorkshopUtils/WorkshopUtils.csproj | 166 ++++++++ WorkshopUtils/packages.config | 5 + highlighter-scrapper.js | 33 ++ 36 files changed, 3024 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 WorkshopUtils.sln create mode 100644 WorkshopUtils/App.config create mode 100644 WorkshopUtils/GlobalSuppressions.cs create mode 100644 WorkshopUtils/MS Managed Recommended + MS Security.ruleset create mode 100644 WorkshopUtils/Program.cs create mode 100644 WorkshopUtils/Properties/AssemblyInfo.cs create mode 100644 WorkshopUtils/Properties/Resources.Designer.cs create mode 100644 WorkshopUtils/Properties/Resources.resx create mode 100644 WorkshopUtils/Properties/Settings.Designer.cs create mode 100644 WorkshopUtils/Properties/Settings.settings create mode 100644 WorkshopUtils/UI/ChoiceForm.Designer.cs create mode 100644 WorkshopUtils/UI/ChoiceForm.cs create mode 100644 WorkshopUtils/UI/ChoiceForm.resx create mode 100644 WorkshopUtils/UI/Dbg.cs create mode 100644 WorkshopUtils/UI/FolderSelectDialog.cs create mode 100644 WorkshopUtils/UI/GLuaCode.Designer.cs create mode 100644 WorkshopUtils/UI/GLuaCode.cs create mode 100644 WorkshopUtils/UI/GLuaHighlighter/GLuaHighlightTokenizer.Fns.cs create mode 100644 WorkshopUtils/UI/GLuaHighlighter/GLuaHighlightTokenizer.cs create mode 100644 WorkshopUtils/UI/GLuaHighlighter/HighlightToken.cs create mode 100644 WorkshopUtils/UI/GLuaHighlighter/HighlightTokenTypes.cs create mode 100644 WorkshopUtils/UI/GMAParserForm.Designer.cs create mode 100644 WorkshopUtils/UI/GMAParserForm.cs create mode 100644 WorkshopUtils/UI/GMAParserForm.resx create mode 100644 WorkshopUtils/UI/WorkshopDLForm.Designer.cs create mode 100644 WorkshopUtils/UI/WorkshopDLForm.cs create mode 100644 WorkshopUtils/UI/WorkshopDLForm.resx create mode 100644 WorkshopUtils/WorkshopAddon.cs create mode 100644 WorkshopUtils/WorkshopHTTPAPI.cs create mode 100644 WorkshopUtils/WorkshopUtils.csproj create mode 100644 WorkshopUtils/packages.config create mode 100644 highlighter-scrapper.js diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..eba1110 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..79db921 --- /dev/null +++ b/.gitignore @@ -0,0 +1,275 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates +*.vcxproj.filters + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ce91b71 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 GGG KILLER + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..3e8dba9 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# WorkshopUtils +A workshop utility tool to download GMAD files and extract or look at files in-memory + +# Dependencies +- [GMADFileFormat](https://github.com/GGG-KILLER/GMADFileFormat) +- [Newtonsoft.Json](http://www.newtonsoft.com/json) + +# Requirements +- VS 2017 Community (not tested with previous versions) +- .NET Core SDK +- .NET Framework 2.6.1 + +# Re-generating highlight functions list +1. Copy contents of `highlighter-scrapper.js` to Chrome (should work in other browsers but untested) console +2. Paste output into `WorkshopUtils/UI/GLuaHighlighter/GLuaHighlightTokenizer.Fns.cs` (don't worry about what was there previously) +3. Re-compile + +# License +MIT, do whatever the license lets you but at least give me credits \ No newline at end of file diff --git a/WorkshopUtils.sln b/WorkshopUtils.sln new file mode 100644 index 0000000..bd286a3 --- /dev/null +++ b/WorkshopUtils.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26430.13 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkshopUtils", "WorkshopUtils\WorkshopUtils.csproj", "{A5E30662-65FB-4F73-957D-40AFD1D30F49}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GMADFileFormat", "GMADFileFormat\GMADFileFormat.csproj", "{A1CB8F0B-BD90-4F73-B675-DCADF98572EC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A5E30662-65FB-4F73-957D-40AFD1D30F49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5E30662-65FB-4F73-957D-40AFD1D30F49}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5E30662-65FB-4F73-957D-40AFD1D30F49}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5E30662-65FB-4F73-957D-40AFD1D30F49}.Release|Any CPU.Build.0 = Release|Any CPU + {A1CB8F0B-BD90-4F73-B675-DCADF98572EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A1CB8F0B-BD90-4F73-B675-DCADF98572EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A1CB8F0B-BD90-4F73-B675-DCADF98572EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A1CB8F0B-BD90-4F73-B675-DCADF98572EC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/WorkshopUtils/App.config b/WorkshopUtils/App.config new file mode 100644 index 0000000..bae5d6d --- /dev/null +++ b/WorkshopUtils/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/WorkshopUtils/GlobalSuppressions.cs b/WorkshopUtils/GlobalSuppressions.cs new file mode 100644 index 0000000..2377401 --- /dev/null +++ b/WorkshopUtils/GlobalSuppressions.cs @@ -0,0 +1,16 @@ +// This file is used by Code Analysis to maintain SuppressMessage +// attributes that are applied to this project. Project-level +// suppressions either have no target or are given a specific +// target and scoped to a namespace, type, member, etc. + +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage ( "Design", "CC0021:Use nameof", Justification = "", Scope = "member", Target = "~M:WorkshopUtils.WorkshopHTTPAPI.GetWorkshopAddonIDs(WorkshopUtils.EPublishedFileQueryType,System.UInt32,System.String[],System.Int32,System.Boolean)~System.Threading.Tasks.Task{System.Int32[]}" )] +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage ( "Design", "CC0091:Use static method", Justification = "", Scope = "member", Target = "~M:WorkshopUtils.WorkshopHTTPAPI.DownloadAddonAsync(WorkshopUtils.WorkshopAddon,System.String)~System.Threading.Tasks.Task" )] +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage ( "Design", "CC0021:Use nameof", Justification = "", Scope = "member", Target = "~M:WorkshopUtils.WorkshopHTTPAPI.GetWorkshopAddonIDsAsync(WorkshopUtils.EPublishedFileQueryType,System.UInt32,System.String[],System.Int32)~System.Threading.Tasks.Task{System.Int32[]}" )] +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage ( "Design", "CC0091:Use static method", Justification = "", Scope = "member", Target = "~M:WorkshopUtils.WorkshopHTTPAPI.DownloadAddonDataAsync(WorkshopUtils.WorkshopAddon)~System.Threading.Tasks.Task{System.Byte[]}" )] +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage ( "Design", "CC0091:Use static method", Justification = "", Scope = "member", Target = "~M:WorkshopUtils.WorkshopHTTPAPI.DownloadAddonFileAsync(WorkshopUtils.WorkshopAddon,System.String)~System.Threading.Tasks.Task" )] +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage ( "Design", "CC0021:Use nameof", Justification = "", Scope = "member", Target = "~M:WorkshopUtils.WorkshopHTTPAPI.GetWorkshopAddonsAsync(System.String,WorkshopUtils.EPublishedFileQueryType,System.UInt32,System.Int32)~System.Threading.Tasks.Task{WorkshopUtils.WorkshopAddon[]}" )] +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage ( "Design", "CC0091:Use static method", Justification = "", Scope = "member", Target = "~M:WorkshopUtils.UI.ChoiceForm.Button1_Click(System.Object,System.EventArgs)" )] +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage ( "Style", "CC0061:Asynchronous method can be terminated with the 'Async' keyword.", Justification = "", Scope = "member", Target = "~M:WorkshopUtils.UI.ChoiceForm.Button1_Click(System.Object,System.EventArgs)" )] +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage ( "Design", "CC0021:Use nameof", Justification = "", Scope = "member", Target = "~M:WorkshopUtils.UI.GLuaHighlightTokenizer.IsGLuaFuncName(System.String)~System.Boolean" )] +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage ( "Design", "CC0021:Use nameof", Justification = "", Scope = "member", Target = "~M:WorkshopUtils.WorkshopHTTPAPI.GetWorkshopAddonsAsync(System.String,WorkshopUtils.EPublishedFileQueryType,System.UInt32,System.Int32)~System.Threading.Tasks.Task{WorkshopUtils.WorkshopAddon[]}" )] +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage ( "Design", "CC0021:Use nameof", Justification = "", Scope = "member", Target = "~F:WorkshopUtils.UI.GLuaHighlighter.GLuaHighlightTokenizer.Fns" )] diff --git a/WorkshopUtils/MS Managed Recommended + MS Security.ruleset b/WorkshopUtils/MS Managed Recommended + MS Security.ruleset new file mode 100644 index 0000000..64d7bcc --- /dev/null +++ b/WorkshopUtils/MS Managed Recommended + MS Security.ruleset @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/WorkshopUtils/Program.cs b/WorkshopUtils/Program.cs new file mode 100644 index 0000000..725578e --- /dev/null +++ b/WorkshopUtils/Program.cs @@ -0,0 +1,32 @@ +using System; +using System.Windows.Forms; + +namespace WorkshopUtils +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + private static void Main ( ) + { + Application.EnableVisualStyles ( ); + Application.SetCompatibleTextRenderingDefault ( false ); + using ( var choiceForm = new UI.ChoiceForm ( ) ) + Application.Run ( choiceForm ); + } + } +} + +public static class ISynchronizeInvokeExtensions +{ + public static void InvokeEx ( this T @this, Action action ) + where T : System.ComponentModel.ISynchronizeInvoke + { + if ( @this.InvokeRequired ) + @this.Invoke ( action, new Object[] { @this } ); + else + action?.Invoke ( @this ); + } +} \ No newline at end of file diff --git a/WorkshopUtils/Properties/AssemblyInfo.cs b/WorkshopUtils/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..665a4e8 --- /dev/null +++ b/WorkshopUtils/Properties/AssemblyInfo.cs @@ -0,0 +1,34 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the +// following set of attributes. Change these attribute values to +// modify the information associated with an assembly. +[assembly: AssemblyTitle ( "WorkshopUtils" )] +[assembly: AssemblyDescription ( "" )] +[assembly: AssemblyConfiguration ( "" )] +[assembly: AssemblyCompany ( "" )] +[assembly: AssemblyProduct ( "WorkshopUtils" )] +[assembly: AssemblyCopyright ( "Copyright © GGG KILLER 2017" )] +[assembly: AssemblyTrademark ( "" )] +[assembly: AssemblyCulture ( "" )] + +// Setting ComVisible to false makes the types in this assembly +// not visible to COM components. If you need to access a type in +// this assembly from COM, set the ComVisible attribute to true on +// that type. +[assembly: ComVisible ( false )] + +// The following GUID is for the ID of the typelib if this project +// is exposed to COM +[assembly: Guid ( "a5e30662-65fb-4f73-957d-40afd1d30f49" )] + +// Version information for an assembly consists of the following +// four values: +// +// Major Version Minor Version Build Number Revision +// +// You can specify all the values or you can default the Build and +// Revision Numbers by using the '*' as shown below: [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion ( "1.0.0.0" )] +[assembly: AssemblyFileVersion ( "1.0.0.0" )] diff --git a/WorkshopUtils/Properties/Resources.Designer.cs b/WorkshopUtils/Properties/Resources.Designer.cs new file mode 100644 index 0000000..81b884b --- /dev/null +++ b/WorkshopUtils/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WorkshopUtils.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WorkshopUtils.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/WorkshopUtils/Properties/Resources.resx b/WorkshopUtils/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/WorkshopUtils/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/WorkshopUtils/Properties/Settings.Designer.cs b/WorkshopUtils/Properties/Settings.Designer.cs new file mode 100644 index 0000000..5f9af7b --- /dev/null +++ b/WorkshopUtils/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WorkshopUtils.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.1.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/WorkshopUtils/Properties/Settings.settings b/WorkshopUtils/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/WorkshopUtils/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/WorkshopUtils/UI/ChoiceForm.Designer.cs b/WorkshopUtils/UI/ChoiceForm.Designer.cs new file mode 100644 index 0000000..691e6e3 --- /dev/null +++ b/WorkshopUtils/UI/ChoiceForm.Designer.cs @@ -0,0 +1,75 @@ +namespace WorkshopUtils.UI +{ + partial class ChoiceForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.button5 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // button5 + // + this.button5.Location = new System.Drawing.Point(12, 41); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(221, 23); + this.button5.TabIndex = 1; + this.button5.Text = "Get GMA From Workshop"; + this.button5.UseVisualStyleBackColor = true; + this.button5.Click += new System.EventHandler(this.Button5_Click); + // + // button4 + // + this.button4.Location = new System.Drawing.Point(12, 12); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(221, 23); + this.button4.TabIndex = 0; + this.button4.Text = "Parse GMA File"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.Button4_Click); + // + // ChoiceForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(245, 73); + this.Controls.Add(this.button5); + this.Controls.Add(this.button4); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "ChoiceForm"; + this.ShowIcon = false; + this.Text = "WS Utils"; + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.Button button5; + private System.Windows.Forms.Button button4; + } +} + diff --git a/WorkshopUtils/UI/ChoiceForm.cs b/WorkshopUtils/UI/ChoiceForm.cs new file mode 100644 index 0000000..992eb40 --- /dev/null +++ b/WorkshopUtils/UI/ChoiceForm.cs @@ -0,0 +1,31 @@ +using System; +using System.Windows.Forms; + +namespace WorkshopUtils.UI +{ + public partial class ChoiceForm : Form + { + public ChoiceForm ( ) + { + InitializeComponent ( ); + } + + private void Button4_Click ( Object sender, EventArgs e ) + { + using ( var f = new GMAParserForm ( ) ) + { + f.ShowInTaskbar = false; + f.ShowDialog ( this ); + } + } + + private void Button5_Click ( Object sender, EventArgs e ) + { + using ( var f = new WorkshopDLForm ( ) ) + { + f.ShowInTaskbar = false; + f.ShowDialog ( this ); + } + } + } +} \ No newline at end of file diff --git a/WorkshopUtils/UI/ChoiceForm.resx b/WorkshopUtils/UI/ChoiceForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WorkshopUtils/UI/ChoiceForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/WorkshopUtils/UI/Dbg.cs b/WorkshopUtils/UI/Dbg.cs new file mode 100644 index 0000000..76a792b --- /dev/null +++ b/WorkshopUtils/UI/Dbg.cs @@ -0,0 +1,38 @@ +using System; +using System.Drawing; +using System.Windows.Forms; + +namespace WorkshopUtils.UI +{ + internal static class Dbg + { + internal static Form GetTbForm ( String str ) + { + var frm = new Form ( ); + var tb = new TextBox + { + Multiline = true, + Text = str, + Location = Point.Empty, + Dock = DockStyle.Fill + }; + frm.Controls.Add ( tb ); + frm.FormClosing += ( o, e ) => tb.Dispose ( ); + return frm; + } + + internal static Form GetGLuaForm ( String str ) + { + var frm = new Form ( ); + var cb = new GLuaCode + { + Location = Point.Empty, + Dock = DockStyle.Fill + }; + cb.SetCode ( str ); + frm.Controls.Add ( cb ); + frm.FormClosing += ( o, e ) => cb.Dispose ( ); + return frm; + } + } +} \ No newline at end of file diff --git a/WorkshopUtils/UI/FolderSelectDialog.cs b/WorkshopUtils/UI/FolderSelectDialog.cs new file mode 100644 index 0000000..04b3ed8 --- /dev/null +++ b/WorkshopUtils/UI/FolderSelectDialog.cs @@ -0,0 +1,372 @@ +using System; +using System.Reflection; +using System.Windows.Forms; + +namespace GUtils.Forms +{ + // Credit goes to http://www.lyquidity.com/devblog/?p=136 + /// + /// Wraps System.Windows.Forms.OpenFileDialog to make it + /// present a vista-style dialog. + /// + public class FolderSelectDialog + { + // Wrapped dialog + private readonly OpenFileDialog ofd; + + /// + /// Default constructor + /// + public FolderSelectDialog ( ) + { + ofd = new OpenFileDialog + { + Filter = "Folders|\n", + AddExtension = false, + CheckFileExists = false, + DereferenceLinks = true, + Multiselect = false + }; + } + + #region Properties + + /// + /// Gets/Sets the initial folder to be selected. A null + /// value selects the current directory. + /// + public string InitialDirectory + { + get { return ofd.InitialDirectory; } + set { ofd.InitialDirectory = value == null || value.Length == 0 ? Environment.CurrentDirectory : value; } + } + + /// + /// Gets/Sets the title to show in the dialog + /// + public string Title + { + get { return ofd.Title; } + set { ofd.Title = value == null ? "Select a folder" : value; } + } + + /// + /// Gets the selected folder + /// + public string FileName + { + get { return ofd.FileName; } + } + + #endregion Properties + + #region Methods + + /// + /// Shows the dialog + /// + /// True if the user presses OK else false + public bool ShowDialog ( ) + { + return ShowDialog ( IntPtr.Zero ); + } + + /// + /// Shows the dialog + /// + /// + /// Handle of the control to be parent + /// + /// True if the user presses OK else false + public bool ShowDialog ( IntPtr hWndOwner ) + { + var flag = false; + + if ( Environment.OSVersion.Version.Major >= 6 ) + { + var r = new Reflector ( "System.Windows.Forms" ); + + var num = 0U; + var typeIFileDialog = r.GetType ( "FileDialogNative.IFileDialog" ); + var dialog = Reflector.Call ( ofd, "CreateVistaDialog" ); + Reflector.Call ( ofd, "OnBeforeVistaDialog", dialog ); + + var options = ( uint ) Reflector.CallAs ( typeof ( FileDialog ), ofd, "GetOptions" ); + options |= ( uint ) r.GetEnum ( "FileDialogNative.FOS", "FOS_PICKFOLDERS" ); + Reflector.CallAs ( typeIFileDialog, dialog, "SetOptions", options ); + + var pfde = r.New ( "FileDialog.VistaDialogEvents", ofd ); + var parameters = new object[] { pfde, num }; + Reflector.CallAs2 ( typeIFileDialog, dialog, "Advise", parameters ); + num = ( uint ) parameters[1]; + try + { + var num2 = ( int ) Reflector.CallAs ( typeIFileDialog, dialog, "Show", hWndOwner ); + flag = 0 == num2; + } + finally + { + Reflector.CallAs ( typeIFileDialog, dialog, "Unadvise", num ); + GC.KeepAlive ( pfde ); + } + } + else + { + using ( var fbd = new FolderBrowserDialog + { + Description = Title, + SelectedPath = InitialDirectory, + ShowNewFolderButton = false + } ) + { + if ( fbd.ShowDialog ( new WindowWrapper ( hWndOwner ) ) != DialogResult.OK ) + return false; + ofd.FileName = fbd.SelectedPath; + flag = true; + } + } + + return flag; + } + + #endregion Methods + } + + /// + /// Creates IWin32Window around an IntPtr + /// + public class WindowWrapper : IWin32Window + { + /// + /// Constructor + /// + /// Handle to wrap + public WindowWrapper ( IntPtr handle ) + { + _hwnd = handle; + } + + /// + /// Original ptr + /// + public IntPtr Handle + { + get { return _hwnd; } + } + + private readonly IntPtr _hwnd; + } + + /// + /// This class is from the Front-End for Dosbox and is used to + /// present a 'vista' dialog box to select folders. Being able + /// to use a vista style dialog box to select folders is much + /// better then using the shell folder browser. http://code.google.com/p/fed/ + /// + /// Example: var r = new Reflector("System.Windows.Forms"); + /// + public class Reflector + { + #region variables + + private readonly String m_ns; + private readonly Assembly m_asmb; + + #endregion variables + + #region Constructors + + /// + /// Constructor + /// + /// + /// The namespace containing types to be used + /// + public Reflector ( string ns ) + : this ( ns, ns ) + { } + + /// + /// Constructor + /// + /// + /// A specific assembly name (used if the assembly name + /// does not tie exactly with the namespace) + /// + /// + /// The namespace containing types to be used + /// + public Reflector ( String an, String ns ) + { + m_ns = ns; + m_asmb = null; + foreach ( AssemblyName aN in Assembly.GetExecutingAssembly ( ).GetReferencedAssemblies ( ) ) + { + if ( aN.FullName.StartsWith ( an ) ) + { + m_asmb = Assembly.Load ( aN ); + break; + } + } + } + + #endregion Constructors + + #region Methods + + /// + /// Return a Type instance for a type 'typeName' + /// + /// The name of the type + /// A type instance + public Type GetType ( String typeName ) + { + Type type = null; + var names = typeName.Split ( '.' ); + + if ( names.Length > 0 ) + type = m_asmb.GetType ( m_ns + "." + names[0] ); + + for ( int i = 1 ; i < names.Length ; ++i ) + { + type = type.GetNestedType ( names[i], BindingFlags.NonPublic ); + } + return type; + } + + /// + /// Create a new object of a named type passing along any params + /// + /// The name of the type to create + /// + /// An instantiated type + public Object New ( String name, params Object[] parameters ) + { + var type = GetType ( name ); + + var ctorInfos = type.GetConstructors ( ); + foreach ( ConstructorInfo ci in ctorInfos ) + { + try + { + return ci.Invoke ( parameters ); + } + catch ( Exception ) + { + continue; + } + } + + return null; + } + + /// + /// Calls method 'func' on object 'obj' passing parameters 'parameters' + /// + /// + /// The object on which to excute function 'func' + /// + /// The function to execute + /// + /// The parameters to pass to function 'func' + /// + /// The result of the function invocation + public static Object Call ( Object obj, String func, params Object[] parameters ) + { + return Call2 ( obj, func, parameters ); + } + + /// + /// Calls method 'func' on object 'obj' passing parameters 'parameters' + /// + /// + /// The object on which to excute function 'func' + /// + /// The function to execute + /// + /// The parameters to pass to function 'func' + /// + /// The result of the function invocation + public static Object Call2 ( Object obj, String func, Object[] parameters ) + { + return CallAs2 ( obj.GetType ( ), obj, func, parameters ); + } + + /// + /// Calls method 'func' on object 'obj' which is of type + /// 'type' passing parameters 'parameters' + /// + /// The type of 'obj' + /// + /// The object on which to excute function 'func' + /// + /// The function to execute + /// + /// The parameters to pass to function 'func' + /// + /// The result of the function invocation + public static Object CallAs ( Type type, Object obj, String func, params Object[] parameters ) + { + return CallAs2 ( type, obj, func, parameters ); + } + + /// + /// Calls method 'func' on object 'obj' which is of type + /// 'type' passing parameters 'parameters' + /// + /// The type of 'obj' + /// + /// The object on which to excute function 'func' + /// + /// The function to execute + /// + /// The parameters to pass to function 'func' + /// + /// The result of the function invocation + public static Object CallAs2 ( Type type, Object obj, String func, Object[] parameters ) + { + var methInfo = type.GetMethod ( func, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic ); + return methInfo.Invoke ( obj, parameters ); + } + + /// + /// Returns the value of property 'prop' of object 'obj' + /// + /// The object containing 'prop' + /// The property name + /// The property value + public static Object Get ( Object obj, String prop ) + { + return GetAs ( obj.GetType ( ), obj, prop ); + } + + /// + /// Returns the value of property 'prop' of object 'obj' + /// which has type 'type' + /// + /// The type of 'obj' + /// The object containing 'prop' + /// The property name + /// The property value + public static Object GetAs ( Type type, Object obj, String prop ) + { + var propInfo = type.GetProperty ( prop, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic ); + return propInfo.GetValue ( obj, null ); + } + + /// + /// Returns an enum value + /// + /// The name of enum type + /// The name of the value + /// The enum value + public Object GetEnum ( String typeName, String name ) + { + var type = GetType ( typeName ); + var fieldInfo = type.GetField ( name ); + return fieldInfo.GetValue ( null ); + } + + #endregion Methods + } +} \ No newline at end of file diff --git a/WorkshopUtils/UI/GLuaCode.Designer.cs b/WorkshopUtils/UI/GLuaCode.Designer.cs new file mode 100644 index 0000000..6604e83 --- /dev/null +++ b/WorkshopUtils/UI/GLuaCode.Designer.cs @@ -0,0 +1,36 @@ +namespace WorkshopUtils.UI +{ + partial class GLuaCode + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose ( bool disposing ) + { + if ( disposing && ( components != null ) ) + { + components.Dispose ( ); + } + base.Dispose ( disposing ); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent ( ) + { + components = new System.ComponentModel.Container ( ); + } + + #endregion + } +} diff --git a/WorkshopUtils/UI/GLuaCode.cs b/WorkshopUtils/UI/GLuaCode.cs new file mode 100644 index 0000000..e9f8391 --- /dev/null +++ b/WorkshopUtils/UI/GLuaCode.cs @@ -0,0 +1,77 @@ +using System; +using System.Drawing; +using System.Windows.Forms; +using WorkshopUtils.UI.GLuaHighlighter; + +namespace WorkshopUtils.UI +{ + public partial class GLuaCode : RichTextBox + { + public readonly Color + Background = ColorTranslator.FromHtml ( "#2f3136" ), + Literals = ColorTranslator.FromHtml ( "#2aa198" ), + Keyword = ColorTranslator.FromHtml ( "#859900" ), + Comment = ColorTranslator.FromHtml ( "#586e75" ), + Builtin = ColorTranslator.FromHtml ( "#dc322f" ), + // hsla(0,0%,100%,.7) + NormalText = Color.FromArgb ( ( Int32 ) Math.Round ( 0.7 * 255 ), 255, 255, 255 ); + + public new Color BackColor => base.BackColor; + + public new BorderStyle BorderStyle => base.BorderStyle; + + public new Boolean ReadOnly => base.ReadOnly; + + public GLuaCode ( ) + { + InitializeComponent ( ); + base.BackColor = Background; + base.BorderStyle = BorderStyle.None; + base.ReadOnly = true; + } + + public void SetCode ( String Code ) + { + var tokens = GLuaHighlightTokenizer.Tokenize ( Code ); + foreach ( var token in tokens ) + { + switch ( token.Type ) + { + case HighlightTokenTypes.Comment: + this.AppendText ( token.Raw, Comment ); + break; + + case HighlightTokenTypes.GLuaFunc: + this.AppendText ( token.Raw, Builtin ); + break; + + case HighlightTokenTypes.Whitespace: + case HighlightTokenTypes.JustPrintTM: + this.AppendText ( token.Raw, NormalText ); + break; + + case HighlightTokenTypes.Number: + case HighlightTokenTypes.String: + this.AppendText ( token.Raw, Literals ); + break; + + case HighlightTokenTypes.SyntaxIdentifier: + this.AppendText ( token.Raw, Keyword ); + break; + } + } + this.SelectionStart = 0; + this.SelectionLength = 0; + } + + public void AppendText ( string text, Color color ) + { + this.SelectionStart = this.TextLength; + this.SelectionLength = 0; + + this.SelectionColor = color; + this.AppendText ( text ); + this.SelectionColor = this.ForeColor; + } + } +} diff --git a/WorkshopUtils/UI/GLuaHighlighter/GLuaHighlightTokenizer.Fns.cs b/WorkshopUtils/UI/GLuaHighlighter/GLuaHighlightTokenizer.Fns.cs new file mode 100644 index 0000000..511381c --- /dev/null +++ b/WorkshopUtils/UI/GLuaHighlighter/GLuaHighlightTokenizer.Fns.cs @@ -0,0 +1,20 @@ +using System; +using System.Linq; + +namespace WorkshopUtils.UI.GLuaHighlighter +{ + public partial class GLuaHighlightTokenizer + { + // This is auto-generated by a Js browser console script, + // ignore the lack of identation and organization + private static readonly String[] Fns = ( new String[] { + #region GLua Functions + + "EndTouch", "Init", "PhysicsCollide", "Render", "StartTouch", "Think", "Touch", "AcceptInput", "Initialize", "KeyValue", "OnReloaded", "OnRemove", "OnRestore", "SpawnFunction", "StoreOutput", "Think", "TriggerOutput", "CalcAbsolutePosition", "CanProperty", "FireAnimationEvent", "HandleAnimEvent", "OnDuplicated", "OnEntityCopyTableFinish", "PostEntityCopy", "PostEntityPaste", "PreEntityCopy", "RenderOverride", "SetAutomaticFrameAdvance", "SetupDataTables", "DoingEngineSchedule", "DoSchedule", "EndTouch", "EngineScheduleFinish", "ExpressionFinished", "GetAttackSpread", "GetRelationship", "NextTask", "OnCondition", "OnTakeDamage", "OnTaskComplete", "RunAI", "RunEngineTask", "RunTask", "ScheduleFinished", "SelectSchedule", "SetTask", "StartEngineSchedule", "StartEngineTask", "StartSchedule", "StartTask", "StartTouch", "TaskFinished", "TaskTime", "Touch", "UpdateTransmitState", "Use", "Blocked", "Draw", "DrawTranslucent", "EndTouch", "ImpactTrace", "OnTakeDamage", "PhysicsCollide", "PhysicsSimulate", "PhysicsUpdate", "StartTouch", "TestCollision", "Touch", "UpdateTransmitState", "Use", "EndTouch", "PassesTriggerFilters", "StartTouch", "Touch", "PassesDamageFilter", "PassesFilter", "BehaveStart", "BehaveUpdate", "BodyUpdate", "OnContact", "OnIgnite", "OnInjured", "OnKilled", "OnLandOnGround", "OnLeaveGround", "OnNavAreaChanged", "OnOtherKilled", "OnStuck", "OnUnStuck", "Think", "Use", "UpdateTransmitState", "AcceptInput", "AddDeathNotice", "AdjustMouseSensitivity", "AllowPlayerPickup", "CalcMainActivity", "CalcVehicleView", "CalcView", "CalcViewModelView", "CanEditVariable", "CanExitVehicle", "CanPlayerEnterVehicle", "CanPlayerSuicide", "CanPlayerUnfreeze", "CaptureVideo", "ChatText", "ChatTextChanged", "CheckPassword", "CloseDermaMenus", "ContextMenuOpen", "CreateClientsideRagdoll", "CreateEntityRagdoll", "CreateMove", "CreateTeams", "DoAnimationEvent", "DoPlayerDeath", "DrawDeathNotice", "DrawMonitors", "DrawOverlay", "DrawPhysgunBeam", "EndEntityDriving", "EntityEmitSound", "EntityFireBullets", "EntityKeyValue", "EntityNetworkedVarChanged", "EntityRemoved", "EntityTakeDamage", "FindUseEntity", "FinishChat", "FinishMove", "ForceDermaSkin", "GameContentChanged", "GetFallDamage", "GetGameDescription", "GetMotionBlurValues", "GetPreferredCarryAngles", "GetTeamColor", "GetTeamNumColor", "GrabEarAnimation", "GravGunOnDropped", "GravGunOnPickedUp", "GravGunPickupAllowed", "GravGunPunt", "GUIMouseDoublePressed", "GUIMousePressed", "GUIMouseReleased", "HandlePlayerDriving", "HandlePlayerDucking", "HandlePlayerJumping", "HandlePlayerLanding", "HandlePlayerNoClipping", "HandlePlayerSwimming", "HandlePlayerVaulting", "HideTeam", "HUDAmmoPickedUp", "HUDDrawPickupHistory", "HUDDrawScoreBoard", "HUDDrawTargetID", "HUDItemPickedUp", "HUDPaint", "HUDPaintBackground", "HUDShouldDraw", "HUDWeaponPickedUp", "Initialize", "InitPostEntity", "InputMouseApply", "IsSpawnpointSuitable", "KeyPress", "KeyRelease", "MenuStart", "MouthMoveAnimation", "Move", "NeedsDepthPass", "NetworkEntityCreated", "NetworkIDValidated", "NotifyShouldTransmit", "OnAchievementAchieved", "OnChatTab", "OnContextMenuClose", "OnContextMenuOpen", "OnDamagedByExplosion", "OnEntityCreated", "OnGamemodeLoaded", "OnLuaError", "OnNPCKilled", "OnPhysgunFreeze", "OnPhysgunReload", "OnPlayerChangedTeam", "OnPlayerChat", "OnPlayerHitGround", "OnReloaded", "OnSpawnMenuClose", "OnSpawnMenuOpen", "OnTextEntryGetFocus", "OnTextEntryLoseFocus", "OnUndo", "OnViewModelChanged", "PhysgunDrop", "PhysgunPickup", "PlayerAuthed", "PlayerBindPress", "PlayerButtonDown", "PlayerButtonUp", "PlayerCanHearPlayersVoice", "PlayerCanJoinTeam", "PlayerCanPickupItem", "PlayerCanPickupWeapon", "PlayerCanSeePlayersChat", "PlayerConnect", "PlayerDeath", "PlayerDeathSound", "PlayerDeathThink", "PlayerDisconnected", "PlayerDriveAnimate", "PlayerEndVoice", "PlayerEnteredVehicle", "PlayerFootstep", "PlayerFrozeObject", "PlayerHurt", "PlayerInitialSpawn", "PlayerJoinTeam", "PlayerLeaveVehicle", "PlayerLoadout", "PlayerNoClip", "PlayerPostThink", "PlayerRequestTeam", "PlayerSay", "PlayerSelectSpawn", "PlayerSelectTeamSpawn", "PlayerSetHandsModel", "PlayerSetModel", "PlayerShouldTakeDamage", "PlayerShouldTaunt", "PlayerSilentDeath", "PlayerSpawn", "PlayerSpawnAsSpectator", "PlayerSpray", "PlayerStartTaunt", "PlayerStartVoice", "PlayerStepSoundTime", "PlayerSwitchFlashlight", "PlayerSwitchWeapon", "PlayerTick", "PlayerTraceAttack", "PlayerUnfrozeObject", "PlayerUse", "PopulateMenuBar", "PopulateSTOOLMenu", "PopulateToolMenu", "PostCleanupMap", "PostDraw2DSkyBox", "PostDrawEffects", "PostDrawHUD", "PostDrawOpaqueRenderables", "PostDrawPlayerHands", "PostDrawSkyBox", "PostDrawTranslucentRenderables", "PostDrawViewModel", "PostGamemodeLoaded", "PostPlayerDeath", "PostPlayerDraw", "PostProcessPermitted", "PostReloadToolsMenu", "PostRender", "PostRenderVGUI", "PreCleanupMap", "PreDrawEffects", "PreDrawHalos", "PreDrawHUD", "PreDrawOpaqueRenderables", "PreDrawPlayerHands", "PreDrawSkyBox", "PreDrawTranslucentRenderables", "PreDrawViewModel", "PreGamemodeLoaded", "PrePlayerDraw", "PreReloadToolsMenu", "PreRender", "PreventScreenClicks", "PropBreak", "RenderScene", "RenderScreenspaceEffects", "Restored", "Saved", "ScaleNPCDamage", "ScalePlayerDamage", "ScoreboardHide", "ScoreboardShow", "SetPlayerSpeed", "SetupMove", "SetupPlayerVisibility", "SetupSkyboxFog", "SetupWorldFog", "ShouldCollide", "ShouldDrawLocalPlayer", "ShowHelp", "ShowSpare1", "ShowSpare2", "ShowTeam", "ShutDown", "SpawniconGenerated", "StartChat", "StartCommand", "StartEntityDriving", "StartGame", "Think", "Tick", "TranslateActivity", "UpdateAnimation", "VariableEdited", "VehicleMove", "VGUIMousePressAllowed", "VGUIMousePressed", "WeaponEquip", "WorkshopDownloadedFile", "WorkshopDownloadFile", "WorkshopDownloadProgress", "WorkshopDownloadTotals", "WorkshopEnd", "WorkshopStart", "WorkshopSubscriptionsProgress", "ActionSignal", "AnimationThink", "ApplySchemeSettings", "GenerateExample", "Init", "LoadCookies", "OnChangeTargetURL", "OnChangeTitle", "OnChildAdded", "OnChildRemoved", "OnChildViewCreated", "OnCursorEntered", "OnCursorExited", "OnCursorMoved", "OnDocumentReady", "OnDrop", "OnFocusChanged", "OnKeyCodePressed", "OnKeyCodeReleased", "OnMousePressed", "OnMouseReleased", "OnMouseWheeled", "OnRemove", "OnStartDragging", "OnStopDragging", "Paint", "PaintOver", "PerformLayout", "Think", "FinishMove", "GetHandsModel", "Init", "Loadout", "Move", "PostDrawViewModel", "PreDrawViewModel", "SetModel", "SetupDataTables", "Spawn", "StartMove", "ViewModelChanged", "AddGamemodeToolMenuCategories", "AddGamemodeToolMenuTabs", "AddToolMenuCategories", "AddToolMenuTabs", "CanDrive", "CanProperty", "CanTool", "ContentSidebarSelection", "ContextMenuCreated", "PersistenceLoad", "PersistenceSave", "PlayerGiveSWEP", "PlayerSpawnedEffect", "PlayerSpawnedNPC", "PlayerSpawnedProp", "PlayerSpawnedRagdoll", "PlayerSpawnedSENT", "PlayerSpawnedSWEP", "PlayerSpawnedVehicle", "PlayerSpawnEffect", "PlayerSpawnNPC", "PlayerSpawnObject", "PlayerSpawnProp", "PlayerSpawnRagdoll", "PlayerSpawnSENT", "PlayerSpawnSWEP", "PlayerSpawnVehicle", "PopulatePropMenu", "SpawnMenuEnabled", "SpawnMenuOpen", "AcceptInput", "AdjustMouseSensitivity", "Ammo1", "Ammo2", "CalcView", "CalcViewModelView", "CanPrimaryAttack", "CanSecondaryAttack", "CustomAmmoDisplay", "Deploy", "DoDrawCrosshair", "DoImpactEffect", "DrawHUD", "DrawHUDBackground", "DrawWeaponSelection", "DrawWorldModel", "DrawWorldModelTranslucent", "Equip", "EquipAmmo", "FireAnimationEvent", "FreezeMovement", "GetCapabilities", "GetTracerOrigin", "GetViewModelPosition", "Holster", "HUDShouldDraw", "Initialize", "KeyValue", "OnDrop", "OnReloaded", "OnRemove", "OnRestore", "OwnerChanged", "PostDrawViewModel", "PreDrawViewModel", "PrimaryAttack", "PrintWeaponInfo", "Reload", "RenderScreen", "SecondaryAttack", "SetDeploySpeed", "SetupDataTables", "SetWeaponHoldType", "ShootBullet", "ShootEffects", "ShouldDropOnDie", "TakePrimaryAmmo", "TakeSecondaryAmmo", "Think", "TranslateActivity", "TranslateFOV", "ViewModelDrawn", "Deploy", "DrawHUD", "DrawToolScreen", "FreezeMovement", "Holster", "LeftClick", "Reload", "RightClick", "Think", "AccessorFunc", "Add_NPC_Class", "AddBackgroundImage", "AddConsoleCommand", "AddCSLuaFile", "AddonMaterial", "AddOriginToPVS", "AddWorldTip", "Angle", "AngleRand", "assert", "BroadcastLua", "BuildNetworkedVarsTable", "CancelLoading", "ChangeBackground", "ChangeTooltip", "ClearBackgroundImages", "ClientsideModel", "ClientsideRagdoll", "ClientsideScene", "CloseDermaMenus", "collectgarbage", "Color", "ColorAlpha", "ColorRand", "ColorToHSV", "CompileFile", "CompileString", "ConsoleAutoComplete", "ConVarExists", "CreateClientConVar", "CreateConVar", "CreateMaterial", "CreateParticleSystem", "CreateSound", "CreateSprite", "CurTime", "DamageInfo", "DebugInfo", "DEFINE_BASECLASS", "DeriveGamemode", "Derma_Anim", "Derma_DrawBackgroundBlur", "Derma_Hook", "Derma_Install_Convar_Functions", "Derma_Message", "Derma_Query", "Derma_StringRequest", "DermaMenu", "DisableClipping", "DOF_Kill", "DOF_Start", "DOFModeHack", "DrawBackground", "DrawBloom", "DrawColorModify", "DrawMaterialOverlay", "DrawMotionBlur", "DrawSharpen", "DrawSobel", "DrawSunbeams", "DrawTexturize", "DrawToyTown", "DropEntityIfHeld", "DynamicLight", "EffectData", "Either", "EmitSentence", "EmitSound", "EndTooltip", "Entity", "Error", "error", "ErrorNoHalt", "EyeAngles", "EyePos", "EyeVector", "FindMetaTable", "FindTooltip", "Format", "FrameNumber", "FrameTime", "GameDetails", "gcinfo", "GetConVar", "GetConVar_Internal", "GetConVarNumber", "GetConVarString", "GetDefaultLoadingHTML", "GetDemoFileDetails", "GetDownloadables", "getfenv", "GetGlobalAngle", "GetGlobalBool", "GetGlobalEntity", "GetGlobalFloat", "GetGlobalInt", "GetGlobalString", "GetGlobalVector", "GetHostName", "GetHUDPanel", "GetLoadPanel", "GetLoadStatus", "GetMapList", "getmetatable", "GetOverlayPanel", "GetRenderTarget", "GetRenderTargetEx", "GetSaveFileDetails", "GetViewEntity", "HSVToColor", "HTTP", "include", "IncludeCS", "ipairs", "isangle", "isbool", "IsColor", "IsEnemyEntityName", "IsEntity", "isentity", "IsFirstTimePredicted", "IsFriendEntityName", "isfunction", "IsInGame", "ismatrix", "IsMounted", "isnumber", "ispanel", "isstring", "istable", "IsTableOfEntitiesValid", "IsUselessModel", "IsValid", "isvector", "JoinServer", "JS_Language", "JS_Utility", "JS_Workshop", "Label", "LanguageChanged", "Lerp", "LerpAngle", "LerpVector", "LoadLastMap", "LoadPresets", "Localize", "LocalPlayer", "LocalToWorld", "Material", "Matrix", "Mesh", "Model", "module", "Msg", "MsgAll", "MsgC", "MsgN", "NamedColor", "newproxy", "next", "NumDownloadables", "NumModelSkins", "OnModelLoaded", "OpenFolder", "OrderVectors", "pairs", "Particle", "ParticleEffect", "ParticleEffectAttach", "ParticleEmitter", "Path", "pcall", "Player", "PositionSpawnIcon", "PrecacheParticleSystem", "PrecacheScene", "PrecacheSentenceFile", "PrecacheSentenceGroup", "print", "PrintMessage", "PrintTable", "ProjectedTexture", "ProtectedCall", "RandomPairs", "rawequal", "rawget", "rawset", "RealFrameTime", "RealTime", "RecipientFilter", "RecordDemoFrame", "RegisterDermaMenuForClose", "RememberCursorPosition", "RemoveTooltip", "RenderAngles", "RenderDoF", "RenderStereoscopy", "RenderSuperDoF", "require", "RestoreCursorPosition", "RunConsoleCommand", "RunGameUICommand", "RunString", "RunStringEx", "SafeRemoveEntity", "SafeRemoveEntityDelayed", "SaveLastMap", "SavePresets", "ScreenScale", "ScrH", "ScrW", "select", "SendUserMessage", "ServerLog", "SetClipboardText", "setfenv", "SetGlobalAngle", "SetGlobalBool", "SetGlobalEntity", "SetGlobalFloat", "SetGlobalInt", "SetGlobalString", "SetGlobalVector", "setmetatable", "SetPhysConstraintSystem", "SortedPairs", "SortedPairsByMemberValue", "SortedPairsByValue", "Sound", "SoundDuration", "SQLStr", "SScale", "STNDRD", "SuppressHostEvents", "SysTime", "TauntCamera", "TextEntryLoseFocus", "TimedCos", "TimedSin", "tobool", "ToggleFavourite", "tonumber", "tostring", "TranslateDownloadableName", "type", "TypeID", "unpack", "UnPredictedCurTime", "UpdateLoadPanel", "UTIL_IsUselessModel", "ValidPanel", "Vector", "VectorRand", "VGUIFrameTime", "VGUIRect", "VisualizeLayout", "WorkshopFileBase", "WorldToLocal", "xpcall", "Forward", "IsZero", "Normalize", "Right", "RotateAroundAxis", "Set", "SnapTo", "Up", "Zero", "GetAngles", "GetAttachment", "GetColor", "GetDamageType", "GetEntIndex", "GetEntity", "GetFlags", "GetHitBox", "GetMagnitude", "GetMaterialIndex", "GetNormal", "GetOrigin", "GetRadius", "GetScale", "GetStart", "GetSurfaceProp", "SetAngles", "SetAttachment", "SetColor", "SetDamageType", "SetEntIndex", "SetEntity", "SetFlags", "SetHitBox", "SetMagnitude", "SetMaterialIndex", "SetNormal", "SetOrigin", "SetRadius", "SetScale", "SetStart", "SetSurfaceProp", "Add", "Draw", "Finish", "GetNumActiveParticles", "GetPos", "Is3D", "SetBBox", "SetNearClip", "SetNoDraw", "SetParticleCullRadius", "SetPos", "Approach", "ClearStuck", "FaceTowards", "GetAcceleration", "GetCurrentAcceleration", "GetDeathDropHeight", "GetDeceleration", "GetGroundMotionVector", "GetJumpHeight", "GetMaxJumpHeight", "GetMaxYawRate", "GetStepHeight", "GetVelocity", "IsAreaTraversable", "IsAttemptingToMove", "IsClimbingOrJumping", "IsOnGround", "IsStuck", "IsUsingLadder", "Jump", "JumpAcrossGap", "SetAcceleration", "SetDeathDropHeight", "SetDeceleration", "SetDesiredSpeed", "SetJumpHeight", "SetMaxYawRate", "SetStepHeight", "SetVelocity", "GetAirResistance", "GetAngles", "GetAngleVelocity", "GetBounce", "GetColor", "GetDieTime", "GetEndAlpha", "GetEndLength", "GetEndSize", "GetGravity", "GetLifeTime", "GetPos", "GetRoll", "GetRollDelta", "GetStartAlpha", "GetStartLength", "GetStartSize", "GetVelocity", "SetAirResistance", "SetAngles", "SetAngleVelocity", "SetBounce", "SetCollide", "SetCollideCallback", "SetColor", "SetDieTime", "SetEndAlpha", "SetEndLength", "SetEndSize", "SetGravity", "SetLifeTime", "SetLighting", "SetNextThink", "SetPos", "SetRoll", "SetRollDelta", "SetStartAlpha", "SetStartLength", "SetStartSize", "SetThinkFunction", "SetVelocity", "SetVelocityScale", "AddKey", "GetAbsMoveAngles", "GetAngles", "GetButtons", "GetConstraintRadius", "GetForwardSpeed", "GetImpulseCommand", "GetMaxClientSpeed", "GetMaxSpeed", "GetMoveAngles", "GetOldAngles", "GetOldButtons", "GetOrigin", "GetSideSpeed", "GetUpSpeed", "GetVelocity", "KeyDown", "KeyPressed", "KeyReleased", "KeyWasDown", "SetAbsMoveAngles", "SetAngles", "SetButtons", "SetConstraintRadius", "SetForwardSpeed", "SetImpulseCommand", "SetMaxClientSpeed", "SetMaxSpeed", "SetMoveAngles", "SetOldAngles", "SetOldButtons", "SetOrigin", "SetSideSpeed", "SetUpSpeed", "SetVelocity", "AddToClosedList", "AddToOpenList", "ClearSearchLists", "ComputeAdjacentConnectionHeightChange", "ComputeDirection", "ComputeGroundHeightChange", "Contains", "Draw", "DrawSpots", "GetAdjacentAreas", "GetAdjacentAreasAtSide", "GetAdjacentCount", "GetAdjacentCountAtSide", "GetAttributes", "GetCenter", "GetClosestPointOnArea", "GetCorner", "GetCostSoFar", "GetExposedSpots", "GetExtentInfo", "GetHidingSpots", "GetID", "GetIncomingConnections", "GetIncomingConnectionsAtSide", "GetLadders", "GetLaddersAtSide", "GetParent", "GetParentHow", "GetRandomAdjacentAreaAtSide", "GetRandomPoint", "GetSizeX", "GetSizeY", "GetTotalCost", "GetZ", "HasAttributes", "IsBlocked", "IsClosed", "IsConnected", "IsConnectedAtSide", "IsCoplanar", "IsFlat", "IsOpen", "IsOpenListEmpty", "IsOverlapping", "IsOverlappingArea", "IsRoughlySquare", "IsUnderwater", "IsValid", "IsVisible", "PopOpenList", "RemoveFromClosedList", "SetAttributes", "SetParent", "SetTotalCost", "UpdateOnOpenList", "ConnectTo", "GetBottomArea", "GetID", "GetLength", "GetNormal", "GetPosAtHeight", "GetTopBehindArea", "GetTopForwardArea", "GetTopLeftArea", "GetTopRightArea", "IsConnectedAtSide", "IsValid", "SetBottomArea", "SetTopBehindArea", "SetTopForwardArea", "SetTopLeftArea", "SetTopRightArea", "AddControlPoint", "GetAutoUpdateBBox", "GetEffectName", "GetHighestControlPoint", "GetOwner", "IsFinished", "IsValid", "IsViewModelEffect", "Render", "Restart", "SetControlPoint", "SetControlPointEntity", "SetControlPointForwardVector", "SetControlPointOrientation", "SetControlPointParent", "SetControlPointRightVector", "SetControlPointUpVector", "SetIsViewModelEffect", "SetShouldDraw", "SetSortOrigin", "StartEmission", "StopEmission", "StopEmissionAndDestroyImmediately", "AddAllPlayers", "AddPAS", "AddPlayer", "AddPVS", "AddRecipientsByTeam", "GetCount", "GetPlayers", "RemoveAllPlayers", "RemovePAS", "RemovePlayer", "RemovePVS", "RemoveRecipientsByTeam", "RemoveRecipientsNotOnTeam", "Remove", "ChangePitch", "ChangeVolume", "FadeOut", "GetDSP", "GetPitch", "GetSoundLevel", "GetVolume", "IsPlaying", "Play", "PlayEx", "SetDSP", "SetSoundLevel", "Stop", "AddDamage", "GetAmmoType", "GetAttacker", "GetBaseDamage", "GetDamage", "GetDamageBonus", "GetDamageCustom", "GetDamageForce", "GetDamagePosition", "GetDamageType", "GetInflictor", "GetMaxDamage", "GetReportedPosition", "IsBulletDamage", "IsDamageType", "IsExplosionDamage", "IsFallDamage", "ScaleDamage", "SetAmmoType", "SetAttacker", "SetDamage", "SetDamageBonus", "SetDamageCustom", "SetDamageForce", "SetDamagePosition", "SetDamageType", "SetInflictor", "SetMaxDamage", "SetReportedPosition", "SubtractDamage", "ClearButtons", "ClearMovement", "CommandNumber", "GetButtons", "GetForwardMove", "GetImpulse", "GetMouseWheel", "GetMouseX", "GetMouseY", "GetSideMove", "GetUpMove", "GetViewAngles", "IsForced", "KeyDown", "RemoveKey", "SelectWeapon", "SetButtons", "SetForwardMove", "SetImpulse", "SetMouseWheel", "SetMouseX", "SetMouseY", "SetSideMove", "SetUpMove", "SetViewAngles", "TickCount", "GetBool", "GetDefault", "GetFloat", "GetHelpText", "GetInt", "GetName", "GetString", "SetBool", "SetFloat", "SetInt", "SetString", "GetTitle", "Activate", "AddCallback", "AddEffects", "AddEFlags", "AddFlags", "AddGesture", "AddGestureSequence", "AddLayeredSequence", "AddSolidFlags", "AddToMotionController", "AlignAngles", "BecomeRagdollOnClient", "Blocked", "BodyTarget", "BoneHasFlag", "BoneLength", "BoundingRadius", "CallOnRemove", "ClearPoseParameters", "CollisionRulesChanged", "CreatedByMap", "CreateParticleEffect", "CreateShadow", "DeleteOnRemove", "DestroyShadow", "DisableMatrix", "DispatchTraceAttack", "DontDeleteOnRemove", "DrawModel", "DrawShadow", "DropToFloor", "DTVar", "EmitSound", "EnableConstraints", "EnableCustomCollisions", "EnableMatrix", "EntIndex", "Extinguish", "EyeAngles", "EyePos", "FindBodygroupByName", "FindTransitionSequence", "Fire", "FireBullets", "FollowBone", "ForcePlayerDrop", "FrameAdvance", "GetAbsVelocity", "GetAngles", "GetAnimInfo", "GetAnimTime", "GetAttachment", "GetAttachments", "GetBaseVelocity", "GetBloodColor", "GetBodygroup", "GetBodygroupCount", "GetBodygroupName", "GetBodyGroups", "GetBoneController", "GetBoneCount", "GetBoneMatrix", "GetBoneName", "GetBoneParent", "GetBonePosition", "GetBrushPlane", "GetBrushPlaneCount", "GetCallbacks", "GetChildBones", "GetChildren", "GetClass", "GetCollisionBounds", "GetCollisionGroup", "GetColor", "GetConstrainedEntities", "GetConstrainedPhysObjects", "GetCreationID", "GetCreationTime", "GetCreator", "GetCustomCollisionCheck", "GetCycle", "GetDTAngle", "GetDTBool", "GetDTEntity", "GetDTFloat", "GetDTInt", "GetDTString", "GetDTVector", "GetEffects", "GetEFlags", "GetElasticity", "GetFlags", "GetFlexBounds", "GetFlexIDByName", "GetFlexName", "GetFlexNum", "GetFlexScale", "GetFlexWeight", "GetForward", "GetFriction", "GetGravity", "GetGroundEntity", "GetGroundSpeedVelocity", "GetHitBoxBone", "GetHitboxBone", "GetHitBoxBounds", "GetHitBoxCount", "GetHitBoxGroupCount", "GetHitboxSet", "GetHitboxSetCount", "GetInternalVariable", "GetKeyValues", "GetLayerCycle", "GetLayerDuration", "GetLayerWeight", "GetLocalAngles", "GetLocalAngularVelocity", "GetLocalPos", "GetManipulateBoneAngles", "GetManipulateBoneJiggle", "GetManipulateBonePosition", "GetManipulateBoneScale", "GetMaterial", "GetMaterials", "GetMaterialType", "GetMaxHealth", "GetModel", "GetModelBounds", "GetModelPhysBoneCount", "GetModelRadius", "GetModelRenderBounds", "GetModelScale", "GetMomentaryRotButtonPos", "GetMoveCollide", "GetMoveParent", "GetMoveType", "GetName", "GetNetworkAngles", "GetNetworkedAngle", "GetNetworkedBool", "GetNetworkedEntity", "GetNetworkedFloat", "GetNetworkedInt", "GetNetworkedString", "GetNetworkedVarProxy", "GetNetworkedVarTable", "GetNetworkedVector", "GetNetworkOrigin", "GetNoDraw", "GetNumBodyGroups", "GetNumPoseParameters", "GetNWAngle", "GetNWBool", "GetNWEntity", "GetNWFloat", "GetNWInt", "GetNWString", "GetNWVarProxy", "GetNWVarTable", "GetNWVector", "GetOwner", "GetParent", "GetParentAttachment", "GetParentPhysNum", "GetPersistent", "GetPhysicsAttacker", "GetPhysicsObject", "GetPhysicsObjectCount", "GetPhysicsObjectNum", "GetPlaybackRate", "GetPos", "GetPoseParameter", "GetPoseParameterName", "GetPoseParameterRange", "GetPredictable", "GetRagdollOwner", "GetRenderAngles", "GetRenderBounds", "GetRenderFX", "GetRenderGroup", "GetRenderMode", "GetRenderOrigin", "GetRight", "GetRotatedAABB", "GetSaveTable", "GetSequence", "GetSequenceActivity", "GetSequenceActivityName", "GetSequenceCount", "GetSequenceGroundSpeed", "GetSequenceInfo", "GetSequenceList", "GetSequenceMoveDist", "GetSequenceMoveYaw", "GetSequenceName", "GetShouldPlayPickupSound", "GetShouldServerRagdoll", "GetSkin", "GetSolid", "GetSolidFlags", "GetSpawnEffect", "GetSpawnFlags", "GetSubMaterial", "GetSubModels", "GetTable", "GetTouchTrace", "GetTransmitWithParent", "GetUnFreezable", "GetUp", "GetVar", "GetVelocity", "GetWorkshopID", "GibBreakClient", "GibBreakServer", "HasBoneManipulations", "HasFlexManipulatior", "HasSpawnFlags", "HeadTarget", "Health", "Ignite", "InitializeAsClientEntity", "Input", "InstallDataTable", "InvalidateBoneCache", "IsConstrained", "IsConstraint", "IsDormant", "IsEffectActive", "IsEFlagSet", "IsFlagSet", "IsInWorld", "IsLagCompensated", "IsLineOfSightClear", "IsNPC", "IsOnFire", "IsOnGround", "IsPlayer", "IsPlayerHolding", "IsPlayingGesture", "IsRagdoll", "IsSolid", "IsValid", "IsValidLayer", "IsVehicle", "IsWeapon", "IsWidget", "IsWorld", "LocalToWorld", "LocalToWorldAngles", "LookupAttachment", "LookupBone", "LookupSequence", "MakePhysicsObjectAShadow", "ManipulateBoneAngles", "ManipulateBoneJiggle", "ManipulateBonePosition", "ManipulateBoneScale", "MapCreationID", "MarkShadowAsDirty", "MuzzleFlash", "NearestPoint", "NetworkVar", "NetworkVarNotify", "NextThink", "OBBCenter", "OBBMaxs", "OBBMins", "ObjectCaps", "OnGround", "PassesDamageFilter", "PassesFilter", "PhysicsDestroy", "PhysicsFromMesh", "PhysicsInit", "PhysicsInitBox", "PhysicsInitConvex", "PhysicsInitMultiConvex", "PhysicsInitShadow", "PhysicsInitSphere", "PhysicsInitStatic", "PhysWake", "PlayScene", "PointAtEntity", "PrecacheGibs", "RagdollSolve", "RagdollStopControlling", "RagdollUpdatePhysics", "Remove", "RemoveAllDecals", "RemoveAllGestures", "RemoveCallback", "RemoveCallOnRemove", "RemoveEffects", "RemoveEFlags", "RemoveFlags", "RemoveFromMotionController", "RemoveGesture", "RemoveSolidFlags", "ResetSequence", "ResetSequenceInfo", "Respawn", "RestartGesture", "SelectWeightedSequence", "SelectWeightedSequenceSeeded", "SendViewModelMatchingSequence", "SequenceDuration", "SetAbsVelocity", "SetAngles", "SetAnimation", "SetAnimTime", "SetAttachment", "SetBloodColor", "SetBodygroup", "SetBodyGroups", "SetBoneController", "SetBoneMatrix", "SetBonePosition", "SetCollisionBounds", "SetCollisionBoundsWS", "SetCollisionGroup", "SetColor", "SetCreator", "SetCustomCollisionCheck", "SetCycle", "SetDTAngle", "SetDTBool", "SetDTEntity", "SetDTFloat", "SetDTInt", "SetDTString", "SetDTVector", "SetElasticity", "SetEntity", "SetEyeTarget", "SetFlexScale", "SetFlexWeight", "SetFriction", "SetGravity", "SetGroundEntity", "SetHealth", "SetHitboxSet", "SetIK", "SetKeyValue", "SetLagCompensated", "SetLayerBlendIn", "SetLayerBlendOut", "SetLayerCycle", "SetLayerDuration", "SetLayerLooping", "SetLayerPlaybackRate", "SetLayerPriority", "SetLayerWeight", "SetLegacyTransform", "SetLocalAngles", "SetLocalAngularVelocity", "SetLocalPos", "SetLocalVelocity", "SetLOD", "SetMaterial", "SetMaxHealth", "SetModel", "SetModelName", "SetModelScale", "SetMoveCollide", "SetMoveParent", "SetMoveType", "SetName", "SetNetworkAngles", "SetNetworkedAngle", "SetNetworkedBool", "SetNetworkedEntity", "SetNetworkedFloat", "SetNetworkedInt", "SetNetworkedNumber", "SetNetworkedString", "SetNetworkedVarProxy", "SetNetworkedVector", "SetNetworkOrigin", "SetNextClientThink", "SetNoDraw", "SetNotSolid", "SetNWAngle", "SetNWBool", "SetNWEntity", "SetNWFloat", "SetNWInt", "SetNWString", "SetNWVarProxy", "SetNWVector", "SetOwner", "SetParent", "SetParentPhysNum", "SetPersistent", "SetPhysConstraintObjects", "SetPhysicsAttacker", "SetPlaybackRate", "SetPos", "SetPoseParameter", "SetPredictable", "SetPreventTransmit", "SetRagdollAng", "SetRagdollBuildFunction", "SetRagdollPos", "SetRenderAngles", "SetRenderBounds", "SetRenderBoundsWS", "SetRenderClipPlane", "SetRenderClipPlaneEnabled", "SetRenderFX", "SetRenderMode", "SetRenderOrigin", "SetSaveValue", "SetSequence", "SetShouldPlayPickupSound", "SetShouldServerRagdoll", "SetSkin", "SetSolid", "SetSolidFlags", "SetSpawnEffect", "SetSubMaterial", "SetTable", "SetTransmitWithParent", "SetTrigger", "SetUnFreezable", "SetupBones", "SetupPhonemeMappings", "SetUseType", "SetVar", "SetVelocity", "SetWeaponModel", "SkinCount", "SnatchModelInstance", "Spawn", "StartLoopingSound", "StartMotionController", "StopAndDestroyParticles", "StopLoopingSound", "StopMotionController", "StopParticleEmission", "StopParticles", "StopParticlesNamed", "StopParticlesWithNameAndAttachment", "StopSound", "TakeDamage", "TakeDamageInfo", "TakePhysicsDamage", "TestPVS", "TranslateBoneToPhysBone", "TranslatePhysBoneToBone", "Use", "UseClientSideAnimation", "UseTriggerBounds", "ViewModelIndex", "Visible", "VisibleVec", "WaterLevel", "Weapon_SetActivity", "Weapon_TranslateActivity", "WorldSpaceAABB", "WorldSpaceCenter", "WorldToLocal", "WorldToLocalAngles", "Close", "Flush", "Read", "ReadBool", "ReadByte", "ReadDouble", "ReadFloat", "ReadLine", "ReadLong", "ReadShort", "Seek", "Size", "Skip", "Tell", "Write", "WriteBool", "WriteByte", "WriteDouble", "WriteFloat", "WriteLong", "WriteShort", "EnableLooping", "FFT", "Get3DCone", "Get3DFadeDistance", "GetBitsPerSample", "GetFileName", "GetLength", "GetLevel", "GetPlaybackRate", "GetPos", "GetSamplingRate", "GetState", "GetTime", "GetVolume", "Is3D", "IsBlockStreamed", "IsLooping", "IsOnline", "IsValid", "Pause", "Play", "Set3DCone", "Set3DFadeDistance", "SetPlaybackRate", "SetPos", "SetTime", "SetVolume", "Stop", "GetColor", "GetFloat", "GetInt", "GetKeyValues", "GetMatrix", "GetName", "GetShader", "GetString", "GetTexture", "GetVector", "Height", "IsError", "Recompute", "SetFloat", "SetInt", "SetMatrix", "SetShader", "SetString", "SetTexture", "SetUndefined", "SetVector", "Width", "BuildFromTriangles", "Destroy", "Draw", "EndBlock", "ReadAngle", "ReadBool", "ReadEntity", "ReadFloat", "ReadInt", "ReadString", "ReadVector", "StartBlock", "EndBlock", "StartBlock", "WriteAngle", "WriteBool", "WriteEntity", "WriteFloat", "WriteInt", "WriteString", "WriteVector", "Download", "GetColor", "GetMappingHeight", "GetMappingWidth", "GetName", "Height", "IsError", "Width", "AddFrame", "Finish", "Height", "SetRecordSound", "Width", "Create", "Draw", "GetHeight", "GetWidth", "Size", "AddEntityRelationship", "AddRelationship", "AlertSound", "CapabilitiesAdd", "CapabilitiesClear", "CapabilitiesGet", "CapabilitiesRemove", "Classify", "ClearCondition", "ClearEnemyMemory", "ClearExpression", "ClearGoal", "ClearSchedule", "ConditionName", "Disposition", "ExitScriptedSequence", "FearSound", "FoundEnemySound", "GetActiveWeapon", "GetActivity", "GetAimVector", "GetArrivalActivity", "GetArrivalSequence", "GetBlockingEntity", "GetCurrentWeaponProficiency", "GetEnemy", "GetExpression", "GetHullType", "GetMovementActivity", "GetMovementSequence", "GetNPCState", "GetPathDistanceToGoal", "GetPathTimeToGoal", "GetShootPos", "GetTarget", "Give", "HasCondition", "IdleSound", "IsCurrentSchedule", "IsMoving", "IsRunningBehavior", "IsUnreachable", "LostEnemySound", "MaintainActivity", "MarkEnemyAsEluded", "MoveOrder", "NavSetGoal", "NavSetGoalTarget", "NavSetRandomGoal", "NavSetWanderGoal", "PlaySentence", "RemoveMemory", "RunEngineTask", "SentenceStop", "SetArrivalActivity", "SetArrivalDirection", "SetArrivalDistance", "SetArrivalSequence", "SetArrivalSpeed", "SetCondition", "SetCurrentWeaponProficiency", "SetEnemy", "SetExpression", "SetHullSizeNormal", "SetHullType", "SetLastPosition", "SetMaxRouteRebuildTime", "SetMovementActivity", "SetMovementSequence", "SetNPCState", "SetSchedule", "SetTarget", "StartEngineTask", "StopMoving", "TargetOrder", "TaskComplete", "TaskFail", "UpdateEnemyMemory", "UseActBusyBehavior", "UseAssaultBehavior", "UseFollowBehavior", "UseFuncTankBehavior", "UseLeadBehavior", "UseNoBehavior", "BecomeRagdoll", "BodyMoveXY", "FindSpot", "FindSpots", "GetActivity", "GetRangeSquaredTo", "GetRangeTo", "GetSolidMask", "HandleStuck", "MoveToPos", "PlaySequenceAndWait", "SetSolidMask", "StartActivity", "Add", "AddText", "AlignBottom", "AlignLeft", "AlignRight", "AlignTop", "AlphaTo", "AnimationThinkInternal", "AnimTail", "AppendText", "ApplyGWEN", "Center", "CenterHorizontal", "CenterVertical", "ChildCount", "ChildrenSize", "Clear", "ColorTo", "Command", "ConVarChanged", "ConVarNumberThink", "ConVarStringThink", "CopyBase", "CopyBounds", "CopyHeight", "CopyPos", "CopySelected", "CopyWidth", "CursorPos", "CutSelected", "DeleteCookie", "DisableLerp", "Distance", "DistanceFrom", "Dock", "DockMargin", "DockPadding", "DoModal", "DragClick", "DragHover", "DragHoverClick", "DragHoverEnd", "DragMousePress", "DragMouseRelease", "DrawDragHover", "DrawFilledRect", "DrawOutlinedRect", "DrawSelections", "DrawTextEntryText", "DrawTexturedRect", "Droppable", "DroppedOn", "EndBoxSelection", "Exec", "Find", "FocusNext", "FocusPrevious", "GetAlpha", "GetBounds", "GetCaretPos", "GetChild", "GetChildPosition", "GetChildren", "GetChildrenInRect", "GetClassName", "GetClosestChild", "GetContentSize", "GetCookie", "GetCookieName", "GetCookieNumber", "GetDock", "GetDockMargin", "GetDockPadding", "GetFont", "GetHTMLMaterial", "GetName", "GetNumLines", "GetParent", "GetPos", "GetSelectedChildren", "GetSelectionCanvas", "GetSize", "GetSkin", "GetTable", "GetTall", "GetText", "GetTextInset", "GetTextSize", "GetValidReceiverSlot", "GetValue", "GetWide", "GetZPos", "GoBack", "GoForward", "GoToHistoryOffset", "GotoTextEnd", "GotoTextStart", "GWEN_SetCheckboxText", "GWEN_SetControlName", "GWEN_SetDock", "GWEN_SetHorizontalAlign", "GWEN_SetMargin", "GWEN_SetMax", "GWEN_SetMin", "GWEN_SetPosition", "GWEN_SetSize", "GWEN_SetText", "HasChildren", "HasFocus", "HasHierarchicalFocus", "HasParent", "Hide", "InsertClickableTextEnd", "InsertClickableTextStart", "InsertColorChange", "InsertFade", "InvalidateChildren", "InvalidateLayout", "InvalidateParent", "IsChildHovered", "IsDraggable", "IsDragging", "IsEnabled", "IsHovered", "IsKeyboardInputEnabled", "IsLoading", "IsMarkedForDeletion", "IsMouseInputEnabled", "IsMultiline", "IsOurChild", "IsSelectable", "IsSelected", "IsSelectionCanvas", "IsValid", "IsVisible", "KillFocus", "LerpPositions", "LoadControlsFromFile", "LoadControlsFromString", "LoadGWENFile", "LoadGWENString", "LoadTGAImage", "LocalCursorPos", "LocalToScreen", "MakePopup", "MouseCapture", "MoveAbove", "MoveBelow", "MoveBy", "MoveLeftOf", "MoveRightOf", "MoveTo", "MoveToAfter", "MoveToBack", "MoveToBefore", "MoveToFront", "NewAnimation", "NewObject", "NewObjectCallback", "NoClipping", "NumSelectedChildren", "OpenURL", "PaintAt", "PaintManual", "ParentToHUD", "Paste", "PositionLabel", "PostMessage", "Prepare", "Queue", "RebuildSpawnIcon", "RebuildSpawnIconEx", "Receiver", "Refresh", "Remove", "RequestFocus", "ResetAllFades", "RunJavascript", "SaveUndoState", "ScreenToLocal", "SelectAll", "SelectAllOnFocus", "SelectAllText", "SelectNone", "SetAchievement", "SetActionFunction", "SetAllowNonAsciiCharacters", "SetAlpha", "SetAnimationEnabled", "SetAutoDelete", "SetBGColor", "SetBGColorEx", "SetCaretPos", "SetCommand", "SetContentAlignment", "SetConVar", "SetCookie", "SetCookieName", "SetCursor", "SetDragParent", "SetDrawLanguageID", "SetDrawLanguageIDAtLeft", "SetDrawOnTop", "SetDropTarget", "SetEnabled", "SetExpensiveShadow", "SetFGColor", "SetFGColorEx", "SetFocusTopLevel", "SetFontInternal", "SetHeight", "SetHTML", "SetKeyBoardInputEnabled", "SetKeyboardInputEnabled", "SetMinimumSize", "SetModel", "SetMouseInputEnabled", "SetMultiline", "SetName", "SetPaintBackgroundEnabled", "SetPaintBorderEnabled", "SetPaintedManually", "SetPaintFunction", "SetParent", "SetPlayer", "SetPopupStayAtBack", "SetPos", "SetRenderInScreenshots", "SetSelectable", "SetSelected", "SetSelectionCanvas", "SetSize", "SetSkin", "SetSpawnIcon", "SetSteamID", "SetTabPosition", "SetTall", "SetTerm", "SetText", "SetTextInset", "SetToFullHeight", "SetToolTip", "SetTooltip", "SetToolTipPanel", "SetTooltipPanel", "SetURL", "SetVerticalScrollbarEnabled", "SetVisible", "SetWide", "SetWidth", "SetWorldClicker", "SetWrap", "SetZPos", "Show", "SizeTo", "SizeToChildren", "SizeToContents", "SizeToContentsX", "SizeToContentsY", "SlideDown", "SlideUp", "StartBoxSelection", "Stop", "StopLoading", "StretchBottomTo", "StretchRightTo", "StretchToParent", "ToggleSelection", "ToggleVisible", "Undo", "UnselectAll", "UpdateHTMLTexture", "Valid", "Chase", "Compute", "Draw", "FirstSegment", "GetAge", "GetAllSegments", "GetClosestPosition", "GetCurrentGoal", "GetCursorData", "GetCursorPosition", "GetEnd", "GetHindrance", "GetLength", "GetPositionOnPath", "GetStart", "Invalidate", "IsValid", "LastSegment", "MoveCursor", "MoveCursorTo", "MoveCursorToClosestPosition", "MoveCursorToEnd", "MoveCursorToStart", "ResetAge", "SetGoalTolerance", "SetMinLookAheadDistance", "Update", "AddAngleVelocity", "AddGameFlag", "AddVelocity", "AlignAngles", "ApplyForceCenter", "ApplyForceOffset", "CalculateForceOffset", "CalculateVelocityOffset", "ClearGameFlag", "ComputeShadowControl", "EnableCollisions", "EnableDrag", "EnableGravity", "EnableMotion", "GetAABB", "GetAngles", "GetAngleVelocity", "GetDamping", "GetEnergy", "GetEntity", "GetInertia", "GetInvInertia", "GetInvMass", "GetMass", "GetMassCenter", "GetMaterial", "GetMesh", "GetMeshConvexes", "GetName", "GetPos", "GetRotDamping", "GetSpeedDamping", "GetStress", "GetSurfaceArea", "GetVelocity", "GetVolume", "HasGameFlag", "IsAsleep", "IsCollisionEnabled", "IsDragEnabled", "IsGravityEnabled", "IsMotionEnabled", "IsMoveable", "IsPenetrating", "IsValid", "LocalToWorld", "LocalToWorldVector", "OutputDebugInfo", "RecheckCollisionFilter", "RotateAroundAxis", "SetAngleDragCoefficient", "SetAngles", "SetBuoyancyRatio", "SetDamping", "SetDragCoefficient", "SetInertia", "SetMass", "SetMaterial", "SetPos", "SetVelocity", "SetVelocityInstantaneous", "Sleep", "UpdateShadow", "Wake", "WorldToLocal", "WorldToLocalVector", "AccountID", "AddCleanup", "AddCount", "AddDeaths", "AddFrags", "AddFrozenPhysicsObject", "AddPlayerOption", "AddVCDSequenceToGestureSlot", "Alive", "AllowFlashlight", "AllowImmediateDecalPainting", "AnimResetGestureSlot", "AnimRestartGesture", "AnimRestartMainSequence", "AnimSetGestureSequence", "AnimSetGestureWeight", "Armor", "Ban", "CanUseFlashlight", "ChatPrint", "CheckLimit", "ConCommand", "CreateRagdoll", "CrosshairDisable", "CrosshairEnable", "Crouching", "Deaths", "DebugInfo", "DetonateTripmines", "DoAnimationEvent", "DoAttackEvent", "DoCustomAnimEvent", "DoReloadEvent", "DoSecondaryAttack", "DrawViewModel", "DrawWorldModel", "DropNamedWeapon", "DropObject", "DropWeapon", "EnterVehicle", "EquipSuit", "ExitVehicle", "Flashlight", "FlashlightIsOn", "Frags", "Freeze", "GetActiveWeapon", "GetAimVector", "GetAllowFullRotation", "GetAllowWeaponsInVehicle", "GetAmmoCount", "GetAvoidPlayers", "GetCanWalk", "GetCanZoom", "GetClassID", "GetCount", "GetCrouchedWalkSpeed", "GetCurrentCommand", "GetCurrentViewOffset", "GetDrivingEntity", "GetDrivingMode", "GetDuckSpeed", "GetEyeTrace", "GetEyeTraceNoCursor", "GetFOV", "GetFriendStatus", "GetHands", "GetHoveredWidget", "GetHull", "GetHullDuck", "GetInfo", "GetInfoNum", "GetJumpPower", "GetLaggedMovementValue", "GetMaxSpeed", "GetName", "GetNoCollideWithTeammates", "GetObserverMode", "GetObserverTarget", "GetPData", "GetPlayerColor", "GetPlayerInfo", "GetPreferredCarryAngles", "GetPressedWidget", "GetPunchAngle", "GetRagdollEntity", "GetRenderAngles", "GetRunSpeed", "GetShootPos", "GetStepSize", "GetTimeoutSeconds", "GetTool", "GetUnDuckSpeed", "GetUserGroup", "GetVehicle", "GetViewEntity", "GetViewModel", "GetViewOffset", "GetViewOffsetDucked", "GetViewPunchAngles", "GetWalkSpeed", "GetWeapon", "GetWeaponColor", "GetWeapons", "Give", "GiveAmmo", "GodDisable", "GodEnable", "HasGodMode", "HasWeapon", "InVehicle", "IPAddress", "IsAdmin", "IsBot", "IsConnected", "IsDrivingEntity", "IsFrozen", "IsFullyAuthenticated", "IsListenServerHost", "IsMuted", "IsPlayingTaunt", "IsSpeaking", "IsSuitEquipped", "IsSuperAdmin", "IsTimingOut", "IsTyping", "IsUserGroup", "IsVoiceAudible", "IsWorldClicking", "KeyDown", "KeyDownLast", "KeyPressed", "KeyReleased", "Kick", "Kill", "KillSilent", "LagCompensation", "LastHitGroup", "LimitHit", "Lock", "MotionSensorPos", "Name", "Nick", "PacketLoss", "PhysgunUnfreeze", "PickupObject", "Ping", "PlayStepSound", "PrintMessage", "RemoveAllAmmo", "RemoveAllItems", "RemoveAmmo", "RemovePData", "RemoveSuit", "ResetHull", "Say", "ScreenFade", "SelectWeapon", "SendHint", "SendLua", "SetActiveWeapon", "SetAllowFullRotation", "SetAllowWeaponsInVehicle", "SetAmmo", "SetArmor", "SetAvoidPlayers", "SetCanWalk", "SetCanZoom", "SetClassID", "SetCrouchedWalkSpeed", "SetCurrentViewOffset", "SetDeaths", "SetDrivingEntity", "SetDSP", "SetDuckSpeed", "SetEyeAngles", "SetFOV", "SetFrags", "SetHands", "SetHoveredWidget", "SetHull", "SetHullDuck", "SetJumpPower", "SetLaggedMovementValue", "SetMaxSpeed", "SetMuted", "SetNoCollideWithTeammates", "SetNoTarget", "SetObserverMode", "SetPData", "SetPlayerColor", "SetPressedWidget", "SetRenderAngles", "SetRunSpeed", "SetStepSize", "SetSuppressPickupNotices", "SetTeam", "SetUnDuckSpeed", "SetupHands", "SetUserGroup", "SetViewEntity", "SetViewOffset", "SetViewOffsetDucked", "SetViewPunchAngles", "SetWalkSpeed", "SetWeaponColor", "ShouldDrawLocalPlayer", "ShouldDropWeapon", "ShowProfile", "SimulateGravGunDrop", "SimulateGravGunPickup", "Spectate", "SpectateEntity", "SprayDecal", "SprintDisable", "SprintEnable", "StartSprinting", "StartWalking", "SteamID", "SteamID64", "StopSprinting", "StopWalking", "StopZooming", "StripAmmo", "StripWeapon", "StripWeapons", "SuppressHint", "SwitchToDefaultWeapon", "Team", "TimeConnected", "TraceHullAttack", "TranslateWeaponActivity", "UnfreezePhysicsObjects", "UniqueID", "UniqueIDTable", "UnLock", "UnSpectate", "UserID", "ViewPunch", "ViewPunchReset", "VoiceVolume", "GetAngles", "GetBrightness", "GetColor", "GetEnableShadows", "GetFarZ", "GetHorizontalFOV", "GetNearZ", "GetOrthographic", "GetPos", "GetTexture", "GetTextureFrame", "GetVerticalFOV", "IsValid", "Remove", "SetAngles", "SetBrightness", "SetColor", "SetEnableShadows", "SetFarZ", "SetFOV", "SetHorizontalFOV", "SetNearZ", "SetOrthographic", "SetPos", "SetTexture", "SetTextureFrame", "SetVerticalFOV", "Update", "AddTask", "AddTaskEx", "EngTask", "GetTask", "Init", "NumTasks", "Pop", "Push", "Size", "Top", "Init", "InitEngine", "InitFunctionName", "IsEngineType", "IsFNameType", "Run", "Run_FName", "Start", "Start_FName", "ClearObjects", "GetBone", "GetClientInfo", "GetClientNumber", "GetEnt", "GetOperation", "GetOwner", "GetServerInfo", "GetStage", "NumObjects", "SetObject", "SetOperation", "SetStage", "GetAngles", "GetField", "GetForward", "GetInverse", "GetInverseTR", "GetRight", "GetScale", "GetTranslation", "GetUp", "Identity", "Invert", "InvertTR", "IsIdentity", "IsRotationMatrix", "Rotate", "Scale", "ScaleTranslation", "Set", "SetAngles", "SetField", "SetForward", "SetRight", "SetScale", "SetTranslation", "SetUp", "ToTable", "Translate", "Add", "Angle", "AngleEx", "Cross", "Distance", "DistToSqr", "Dot", "DotProduct", "GetNormal", "GetNormalized", "IsEqualTol", "IsZero", "Length", "Length2D", "Length2DSqr", "LengthSqr", "Mul", "Normalize", "Rotate", "Set", "Sub", "ToColor", "ToScreen", "WithinAABox", "Zero", "BoostTimeLeft", "CheckExitPoint", "EnableEngine", "GetAmmo", "GetCameraDistance", "GetDriver", "GetHLSpeed", "GetMaxSpeed", "GetOperatingParams", "GetPassenger", "GetPassengerSeatPoint", "GetRPM", "GetSpeed", "GetSteering", "GetSteeringDegrees", "GetThirdPersonMode", "GetThrottle", "GetVehicleClass", "GetVehicleParams", "GetVehicleViewPosition", "GetWheel", "GetWheelBaseHeight", "GetWheelContactPoint", "GetWheelCount", "GetWheelTotalHeight", "HasBoost", "HasBrakePedal", "IsBoosting", "IsEngineEnabled", "IsEngineStarted", "IsValidVehicle", "IsVehicleBodyInWater", "ReleaseHandbrake", "SetBoost", "SetCameraDistance", "SetHandbrake", "SetHasBrakePedal", "SetMaxReverseThrottle", "SetMaxThrottle", "SetSpringLength", "SetSteering", "SetSteeringDegrees", "SetThirdPersonMode", "SetThrottle", "SetVehicleClass", "SetVehicleEntryAnim", "SetVehicleParams", "SetWheelFriction", "StartEngine", "AllowsAutoSwitchFrom", "AllowsAutoSwitchTo", "CallOnClient", "Clip1", "Clip2", "DefaultReload", "GetActivity", "GetHoldType", "GetMaxClip1", "GetMaxClip2", "GetNextPrimaryFire", "GetNextSecondaryFire", "GetPrimaryAmmoType", "GetPrintName", "GetSecondaryAmmoType", "GetSlot", "GetSlotPos", "GetWeaponViewModel", "GetWeaponWorldModel", "GetWeight", "HasAmmo", "IsCarriedByLocalPlayer", "IsScripted", "IsWeaponVisible", "LastShootTime", "SendWeaponAnim", "SetClip1", "SetClip2", "SetHoldType", "SetLastShootTime", "SetNextPrimaryFire", "SetNextSecondaryFire", "ReadAngle", "ReadBool", "ReadChar", "ReadEntity", "ReadFloat", "ReadLong", "ReadShort", "ReadString", "ReadVector", "ReadVectorNormal", "Reset", "GetColor", "GetContentType", "GetNPCWeapon", "GetSpawnName", "OpenMenu", "SetAdminOnly", "SetColor", "SetContentType", "SetMaterial", "SetName", "SetNPCWeapon", "SetSpawnName", "ControlValues", "ConVar", "SetConVar", "TestForChanges", "AddControl", "AddConVar", "GetConVars", "SetLabel", "CaptureMouse", "FirstPersonControls", "GetFirstPerson", "SetFirstPerson", "GetBarColor", "GetValue", "OnChange", "SetBarColor", "SetValue", "GetSelectedNumber", "GetValue", "SetSelected", "SetSelectedNumber", "SetValue", "UpdateText", "OpenForPos", "GetDrawBorder", "IsDown", "SetConsoleCommand", "SetDisabled", "SetDrawBorder", "SetEnabled", "SetImage", "UpdateColours", "Add", "AddItem", "UnselectAll", "DoClick", "GetChecked", "IsEditing", "OnChange", "SetChecked", "SetValue", "Toggle", "GetChecked", "OnChange", "SetChecked", "SetText", "SetTextColor", "SetValue", "GetExpanded", "OnToggle", "SetAnimTime", "SetContents", "SetExpanded", "SetLabel", "Toggle", "GetRGB", "OnUserChanged", "SetBaseRGB", "SetColor", "TranslateValues", "UpdateColor", "GetAlphaBar", "GetColor", "GetPalette", "GetWangs", "SetAlphaBar", "SetColor", "SetPalette", "SetWangs", "AddSheet", "SetActiveButton", "UseButtonOnlyStyle", "AddChoice", "ChooseOption", "ChooseOptionID", "Clear", "CloseMenu", "GetOptionData", "GetOptionText", "GetSelected", "GetSelectedID", "IsMenuOpen", "OnSelect", "OpenMenu", "SetSortItems", "SetValue", "GetDnD", "MakeDroppable", "SetDnD", "SetDropPos", "GetOpenSize", "GetOpenTime", "SetOpenSize", "SetOpenTime", "Toggle", "Clear", "GetBaseFolder", "GetCurrentFolder", "GetFileTypes", "GetFolderNode", "GetModels", "GetName", "GetOpen", "GetPath", "GetSearch", "OnDoubleClick", "OnRightClick", "OnSelect", "SetBaseFolder", "SetCurrentFolder", "SetFileTypes", "SetModels", "SetName", "SetOpen", "SetPath", "SetSearch", "Setup", "SetupFiles", "SetupTree", "ShowFolder", "SortFiles", "AddItem", "Button", "CheckBox", "Clear", "ComboBox", "ControlHelp", "Help", "ListBox", "NumberWang", "NumSlider", "PanelSelect", "SetName", "TextEntry", "Center", "Close", "GetBackgroundBlur", "GetDeleteOnClose", "GetDraggable", "GetIsMenu", "GetMinHeight", "GetMinWidth", "GetPaintShadow", "GetScreenLock", "GetSizable", "IsActive", "OnClose", "SetBackgroundBlur", "SetDeleteOnClose", "SetDraggable", "SetIsMenu", "SetMinHeight", "SetMinWidth", "SetPaintShadow", "SetScreenLock", "SetSizable", "SetTitle", "ShowCloseButton", "AddFunction", "Call", "ConsoleMessage", "GetAllowLua", "SetAllowLua", "SetScrollbars", "Copy", "CopyContents", "GetBorder", "GetLayoutDir", "GetSpaceX", "GetSpaceY", "Layout", "OnModified", "SetBorder", "SetLayoutDir", "SetSpaceX", "SetSpaceY", "DoLoadMaterial", "FixVertexLitMaterial", "GetFailsafeMatName", "GetImage", "GetImageColor", "GetKeepAspect", "GetMaterial", "GetMatName", "LoadMaterial", "PaintAt", "SetFailsafeMatName", "SetImage", "SetImageColor", "SetKeepAspect", "SetMaterial", "SetMatName", "SetOnViewMaterial", "Unloaded", "GetImage", "GetStretchToFit", "SetColor", "SetIcon", "SetImage", "SetImageVisible", "SetKeepAspect", "SetMaterial", "SetOnViewMaterial", "SetStretchToFit", "GetName", "SetName", "SizeToContents", "DoClick", "DoRightClick", "GetDisabled", "GetFont", "GetIsToggle", "GetToggle", "OnToggled", "SetAutoStretchVertical", "SetBright", "SetDark", "SetDisabled", "SetFont", "SetIsToggle", "SetText", "SetTextColor", "SetToggle", "Toggle", "UpdateColours", "GetColor", "GetTextColor", "SetColor", "SetTextColor", "OnModified", "AddColumn", "AddLine", "Clear", "ClearSelection", "ColumnWidth", "DataLayout", "DisableScrollbar", "DoDoubleClick", "FixColumnsLayout", "GetCanvas", "GetDataHeight", "GetDirty", "GetHeaderHeight", "GetHideHeaders", "GetInnerTall", "GetLine", "GetLines", "GetMultiSelect", "GetSelected", "GetSelectedLine", "GetSortable", "GetSortedID", "OnClickLine", "OnRequestResize", "OnRowRightClick", "OnRowSelected", "RemoveLine", "SelectFirstItem", "SelectItem", "SetDataHeight", "SetDirty", "SetHeaderHeight", "SetHideHeaders", "SetMultiSelect", "SetSortable", "SortByColumn", "SortByColumns", "GetColumnText", "AddOption", "AddSpacer", "AddSubMenu", "GetChild", "Open", "AddMenu", "AddOrGetMenu", "GetBackgroundColor", "GetDisabled", "GetDrawBackground", "GetIsMenu", "GetOpenMenu", "GetPaintBackground", "SetBackgroundColor", "SetDisabled", "SetDrawBackground", "SetIsMenu", "SetPaintBackground", "DrawModel", "GetAmbientLight", "GetAnimated", "GetAnimSpeed", "GetCamPos", "GetColor", "GetEntity", "GetFOV", "GetLookAng", "GetLookAt", "GetModel", "LayoutEntity", "PostDrawModel", "PreDrawModel", "RunAnimation", "SetAmbientLight", "SetAnimated", "SetAnimSpeed", "SetCamPos", "SetColor", "SetDirectionalLight", "SetEntity", "SetFOV", "SetLookAng", "SetLookAt", "SetModel", "SetModelList", "GetLife", "SetLife", "OnValueChanged", "SetMin", "ValueChanged", "GetFraction", "GetValue", "HideWang", "OnValueChanged", "SetDecimals", "SetFraction", "SetMax", "SetMin", "SetMinMax", "GetBackgroundColor", "GetDisabled", "GetDrawBackground", "GetPaintBackground", "SetBackgroundColor", "SetDisabled", "SetDrawBackground", "SetPaintBackground", "GetFraction", "SetFraction", "AddSheet", "CloseTab", "GetPadding", "SetFadeTime", "SetPadding", "AddChoice", "DataChanged", "SetSelected", "Setup", "Setup", "SetValue", "GetRGB", "OnChange", "SetRGB", "AddItem", "Clear", "GetCanvas", "GetPadding", "GetVBar", "InnerWidth", "Rebuild", "ScrollToChild", "SetCanvas", "SetPadding", "SizeToContents", "SetType", "GetColor", "GetMaterial", "GetRotation", "SetColor", "SetMaterial", "SetRotation", "AllowInput", "CheckNumeric", "GetCursorColor", "GetNumeric", "GetTextColor", "GetUpdateOnType", "IsEditing", "OnChange", "OnEnter", "OnKeyCodeTyped", "OnTextChanged", "OnValueChange", "SetDisabled", "SetEditable", "SetFont", "SetNumeric", "SetUpdateOnType", "ClearTiles", "ConsumeTiles", "Copy", "CopyContents", "FindFreeTile", "FitsInTile", "GetBaseSize", "GetMinHeight", "GetTile", "Layout", "LayoutTiles", "OnModified", "SetBaseSize", "SetMinHeight", "SetTile", "GetIndentSize", "GetSelectedItem", "GetShowIcons", "OnNodeSelected", "Root", "SetIndentSize", "SetSelectedItem", "SetShowIcons", "ShowIcons", "AboveLayout", "BestGuessLayout", "FillAnimations", "FullFrontalLayout", "OriginLayout", "Refresh", "RenderIcon", "RightLayout", "SetDefaultLighting", "SetFromEntity", "SetIcon", "UpdateEntity", "SetAlpha", "SetMaterial", "GWEN.CreateTextureBorder", "GWEN.CreateTextureCentered", "GWEN.CreateTextureNormal", "GWEN.TextureColor", "achievements.BalloonPopped", "achievements.Count", "achievements.EatBall", "achievements.GetCount", "achievements.GetDesc", "achievements.GetGoal", "achievements.GetName", "achievements.IncBaddies", "achievements.IncBystander", "achievements.IncGoodies", "achievements.IsAchieved", "achievements.Remover", "achievements.SpawnedNPC", "achievements.SpawnedProp", "achievements.SpawnedRagdoll", "achievements.SpawnMenuOpen", "ai.GetScheduleID", "ai.GetTaskID", "ai_schedule.New", "ai_task.New", "baseclass.Get", "baseclass.Set", "bit.arshift", "bit.band", "bit.bnot", "bit.bor", "bit.bswap", "bit.bxor", "bit.lshift", "bit.rol", "bit.ror", "bit.rshift", "bit.tobit", "bit.tohex", "cam.ApplyShake", "cam.End", "cam.End2D", "cam.End3D", "cam.End3D2D", "cam.EndOrthoView", "cam.IgnoreZ", "cam.PopModelMatrix", "cam.PushModelMatrix", "cam.Start", "cam.Start2D", "cam.Start3D", "cam.Start3D2D", "cam.StartOrthoView", "chat.AddText", "chat.Close", "chat.GetChatBoxPos", "chat.GetChatBoxSize", "chat.Open", "chat.PlaySound", "cleanup.Add", "cleanup.CC_AdminCleanup", "cleanup.CC_Cleanup", "cleanup.GetList", "cleanup.GetTable", "cleanup.Register", "cleanup.ReplaceEntity", "cleanup.UpdateUI", "concommand.Add", "concommand.AutoComplete", "concommand.GetTable", "concommand.Remove", "concommand.Run", "constraint.AddConstraintTable", "constraint.AddConstraintTableNoDelete", "constraint.AdvBallsocket", "constraint.Axis", "constraint.Ballsocket", "constraint.CanConstrain", "constraint.CreateKeyframeRope", "constraint.CreateStaticAnchorPoint", "constraint.Elastic", "constraint.Find", "constraint.FindConstraint", "constraint.FindConstraintEntity", "constraint.FindConstraints", "constraint.ForgetConstraints", "constraint.GetAllConstrainedEntities", "constraint.GetTable", "constraint.HasConstraints", "constraint.Hydraulic", "constraint.Keepupright", "constraint.Motor", "constraint.Muscle", "constraint.NoCollide", "constraint.Pulley", "constraint.RemoveAll", "constraint.RemoveConstraints", "constraint.Rope", "constraint.Slider", "constraint.Weld", "constraint.Winch", "construct.Magnet", "construct.SetPhysProp", "controlpanel.Clear", "controlpanel.Get", "cookie.Delete", "cookie.GetNumber", "cookie.GetString", "cookie.Set", "coroutine.create", "coroutine.resume", "coroutine.running", "coroutine.status", "coroutine.wait", "coroutine.wrap", "coroutine.yield", "cvars.AddChangeCallback", "cvars.Bool", "cvars.GetConVarCallbacks", "cvars.Number", "cvars.OnConVarChanged", "cvars.RemoveChangeCallback", "cvars.String", "debug.debug", "debug.getfenv", "debug.gethook", "debug.getinfo", "debug.getlocal", "debug.getmetatable", "debug.getregistry", "debug.getupvalue", "debug.setfenv", "debug.sethook", "debug.setlocal", "debug.setmetatable", "debug.setupvalue", "debug.Trace", "debug.traceback", "debug.upvalueid", "debug.upvaluejoin", "debugoverlay.Axis", "debugoverlay.Box", "debugoverlay.BoxAngles", "debugoverlay.Cross", "debugoverlay.EntityTextAtPosition", "debugoverlay.Grid", "debugoverlay.Line", "debugoverlay.ScreenText", "debugoverlay.Sphere", "debugoverlay.SweptBox", "debugoverlay.Text", "debugoverlay.Triangle", "derma.Color", "derma.DefineControl", "derma.DefineSkin", "derma.GetControlList", "derma.GetDefaultSkin", "derma.GetNamedSkin", "derma.GetSkinTable", "derma.RefreshSkins", "derma.SkinChangeIndex", "derma.SkinHook", "derma.SkinTexture", "dragndrop.CallReceiverFunction", "dragndrop.Clear", "dragndrop.Drop", "dragndrop.GetDroppable", "dragndrop.HandleDroppedInGame", "dragndrop.HoverThink", "dragndrop.IsDragging", "dragndrop.StartDragging", "dragndrop.StopDragging", "dragndrop.Think", "dragndrop.UpdateReceiver", "draw.DrawText", "draw.GetFontHeight", "draw.NoTexture", "draw.RoundedBox", "draw.RoundedBoxEx", "draw.SimpleText", "draw.SimpleTextOutlined", "draw.Text", "draw.TextShadow", "draw.TexturedQuad", "draw.WordBox", "drive.CalcView", "drive.CreateMove", "drive.DestroyMethod", "drive.End", "drive.FinishMove", "drive.GetMethod", "drive.Move", "drive.PlayerStartDriving", "drive.PlayerStopDriving", "drive.Register", "drive.Start", "drive.StartMove", "duplicator.Allow", "duplicator.ApplyBoneModifiers", "duplicator.ApplyEntityModifiers", "duplicator.ClearEntityModifier", "duplicator.Copy", "duplicator.CopyEnts", "duplicator.CopyEntTable", "duplicator.CreateConstraintFromTable", "duplicator.CreateEntityFromTable", "duplicator.DoBoneManipulator", "duplicator.DoFlex", "duplicator.DoGeneric", "duplicator.DoGenericPhysics", "duplicator.FindEntityClass", "duplicator.GenericDuplicatorFunction", "duplicator.GetAllConstrainedEntitiesAndConstraints", "duplicator.IsAllowed", "duplicator.Paste", "duplicator.RegisterBoneModifier", "duplicator.RegisterConstraint", "duplicator.RegisterEntityClass", "duplicator.RegisterEntityModifier", "duplicator.RemoveMapCreatedEntities", "duplicator.SetLocalAng", "duplicator.SetLocalPos", "duplicator.StoreBoneModifier", "duplicator.StoreEntityModifier", "duplicator.WorkoutSize", "effects.Create", "effects.Register", "engine.ActiveGamemode", "engine.CloseServer", "engine.GetAddons", "engine.GetDemoPlaybackStartTick", "engine.GetDemoPlaybackTick", "engine.GetDemoPlaybackTimeScale", "engine.GetDemoPlaybackTotalTicks", "engine.GetGamemodes", "engine.GetGames", "engine.IsPlayingDemo", "engine.IsRecordingDemo", "engine.LightStyle", "engine.OpenDupe", "engine.SetMounted", "engine.TickInterval", "engine.VideoSettings", "engine.WriteDupe", "engine.WriteSave", "ents.Create", "ents.CreateClientProp", "ents.FindByClass", "ents.FindByClassAndParent", "ents.FindByModel", "ents.FindByName", "ents.FindInBox", "ents.FindInCone", "ents.FindInPVS", "ents.FindInSphere", "ents.FireTargets", "ents.GetAll", "ents.GetByIndex", "ents.GetCount", "ents.GetMapCreatedEntity", "file.Append", "file.CreateDir", "file.Delete", "file.Exists", "file.Find", "file.IsDir", "file.Open", "file.Read", "file.Size", "file.Time", "file.Write", "frame_blend.AddFrame", "frame_blend.BlendFrame", "frame_blend.CompleteFrame", "frame_blend.DrawPreview", "frame_blend.IsActive", "frame_blend.IsLastFrame", "frame_blend.RenderableFrames", "frame_blend.ShouldSkipFrame", "game.AddAmmoType", "game.AddDecal", "game.AddParticles", "game.BuildAmmoTypes", "game.CleanUpMap", "game.ConsoleCommand", "game.GetAmmoID", "game.GetAmmoMax", "game.GetAmmoName", "game.GetGlobalCounter", "game.GetGlobalState", "game.GetIPAddress", "game.GetMap", "game.GetMapNext", "game.GetMapVersion", "game.GetSkillLevel", "game.GetTimeScale", "game.GetWorld", "game.IsDedicated", "game.KickID", "game.LoadNextMap", "game.MapLoadType", "game.MaxPlayers", "game.MountGMA", "game.RemoveRagdolls", "game.SetGlobalCounter", "game.SetGlobalState", "game.SetSkillLevel", "game.SetTimeScale", "game.SinglePlayer", "game.StartSpot", "gameevent.Listen", "gamemode.Call", "gamemode.Get", "gamemode.Register", "gmod.GetGamemode", "gmsave.LoadMap", "gmsave.PlayerLoad", "gmsave.PlayerSave", "gmsave.SaveMap", "gmsave.ShouldSaveEntity", "gui.ActivateGameUI", "gui.EnableScreenClicker", "gui.HideGameUI", "gui.InternalCursorMoved", "gui.InternalKeyCodePressed", "gui.InternalKeyCodeReleased", "gui.InternalKeyCodeTyped", "gui.InternalKeyTyped", "gui.InternalMouseDoublePressed", "gui.InternalMousePressed", "gui.InternalMouseReleased", "gui.InternalMouseWheeled", "gui.IsConsoleVisible", "gui.IsGameUIVisible", "gui.MousePos", "gui.MouseX", "gui.MouseY", "gui.OpenURL", "gui.ScreenToVector", "gui.SetMousePos", "gui.ShowConsole", "halo.Add", "halo.Render", "halo.RenderedEntity", "hammer.SendCommand", "hook.Add", "hook.Call", "hook.GetTable", "hook.Remove", "hook.Run", "http.Fetch", "http.Post", "input.CheckKeyTrapping", "input.GetCursorPos", "input.GetKeyName", "input.IsButtonDown", "input.IsControlDown", "input.IsKeyDown", "input.IsKeyTrapping", "input.IsMouseDown", "input.IsShiftDown", "input.LookupBinding", "input.LookupKeyBinding", "input.SetCursorPos", "input.StartKeyTrapping", "input.WasKeyPressed", "input.WasKeyReleased", "input.WasKeyTyped", "input.WasMouseDoublePressed", "input.WasMousePressed", "jit.arch", "jit.attach", "jit.flush", "jit.off", "jit.on", "jit.opt.start", "jit.os", "jit.status", "jit.util.funcbc", "jit.util.funcinfo", "jit.util.funck", "jit.util.funcuvname", "jit.util.ircalladdr", "jit.util.traceexitstub", "jit.util.traceinfo", "jit.util.traceir", "jit.util.tracek", "jit.util.tracemc", "jit.util.tracesnap", "jit.version", "jit.version_num", "killicon.Add", "killicon.AddAlias", "killicon.AddFont", "killicon.Draw", "killicon.Exists", "killicon.GetSize", "language.Add", "language.GetPhrase", "list.Add", "list.Contains", "list.Get", "list.GetForEdit", "list.Set", "markup.Parse", "math.abs", "math.acos", "math.AngleDifference", "math.Approach", "math.ApproachAngle", "math.asin", "math.atan", "math.atan2", "math.BinToInt", "math.BSplinePoint", "math.calcBSplineN", "math.ceil", "math.Clamp", "math.cos", "math.cosh", "math.deg", "math.Dist", "math.Distance", "math.EaseInOut", "math.exp", "math.floor", "math.fmod", "math.frexp", "math.huge", "math.IntToBin", "math.ldexp", "math.log", "math.log10", "math.max", "math.min", "math.mod", "math.modf", "math.NormalizeAngle", "math.pi", "math.pow", "math.rad", "math.Rand", "math.random", "math.randomseed", "math.Remap", "math.Round", "math.sin", "math.sinh", "math.sqrt", "math.tan", "math.tanh", "math.TimeFraction", "math.Truncate", "matproxy.Add", "matproxy.Call", "matproxy.Init", "matproxy.ShouldOverrideProxy", "menu.RecordFrame", "menubar.Init", "menubar.IsParent", "menubar.ParentTo", "mesh.AdvanceVertex", "mesh.Begin", "mesh.Color", "mesh.End", "mesh.Normal", "mesh.Position", "mesh.Quad", "mesh.QuadEasy", "mesh.Specular", "mesh.TangentS", "mesh.TangentT", "mesh.TexCoord", "mesh.VertexCount", "motionsensor.BuildSkeleton", "motionsensor.ChooseBuilderFromEntity", "motionsensor.GetColourMaterial", "motionsensor.GetSkeleton", "motionsensor.IsActive", "motionsensor.IsAvailable", "motionsensor.ProcessAngle", "motionsensor.ProcessAnglesTable", "motionsensor.ProcessPositionTable", "motionsensor.Start", "motionsensor.Stop", "navmesh.AddWalkableSeed", "navmesh.BeginGeneration", "navmesh.ClearWalkableSeeds", "navmesh.Find", "navmesh.GetAllNavAreas", "navmesh.GetEditCursorPosition", "navmesh.GetMarkedArea", "navmesh.GetMarkedLadder", "navmesh.GetNavArea", "navmesh.GetNavAreaByID", "navmesh.GetNavAreaCount", "navmesh.GetNavLadderByID", "navmesh.GetNearestNavArea", "navmesh.GetPlayerSpawnName", "navmesh.IsGenerating", "navmesh.IsLoaded", "navmesh.Load", "navmesh.Reset", "navmesh.Save", "navmesh.SetMarkedArea", "navmesh.SetMarkedLadder", "navmesh.SetPlayerSpawnName", "net.Broadcast", "net.BytesWritten", "net.Incoming", "net.ReadAngle", "net.ReadBit", "net.ReadBool", "net.ReadColor", "net.ReadData", "net.ReadDouble", "net.ReadEntity", "net.ReadFloat", "net.ReadHeader", "net.ReadInt", "net.ReadMatrix", "net.ReadNormal", "net.ReadString", "net.ReadTable", "net.ReadType", "net.ReadUInt", "net.ReadVector", "net.Receive", "net.Send", "net.SendOmit", "net.SendPAS", "net.SendPVS", "net.SendToServer", "net.Start", "net.WriteAngle", "net.WriteBit", "net.WriteBool", "net.WriteColor", "net.WriteData", "net.WriteDouble", "net.WriteEntity", "net.WriteFloat", "net.WriteInt", "net.WriteMatrix", "net.WriteNormal", "net.WriteString", "net.WriteTable", "net.WriteType", "net.WriteUInt", "net.WriteVector", "notification.AddLegacy", "notification.AddProgress", "notification.Kill", "numpad.Activate", "numpad.Deactivate", "numpad.FromButton", "numpad.OnDown", "numpad.OnUp", "numpad.Register", "numpad.Remove", "numpad.Toggle", "os.clock", "os.date", "os.difftime", "os.time", "package.seeall", "physenv.AddSurfaceData", "physenv.GetAirDensity", "physenv.GetGravity", "physenv.GetPerformanceSettings", "physenv.SetAirDensity", "physenv.SetGravity", "physenv.SetPerformanceSettings", "player.CreateNextBot", "player.GetAll", "player.GetBots", "player.GetByID", "player.GetBySteamID", "player.GetBySteamID64", "player.GetByUniqueID", "player.GetCount", "player.GetHumans", "player_manager.AddValidHands", "player_manager.AddValidModel", "player_manager.AllValidModels", "player_manager.ClearPlayerClass", "player_manager.GetPlayerClass", "player_manager.OnPlayerSpawn", "player_manager.RegisterClass", "player_manager.RunClass", "player_manager.SetPlayerClass", "player_manager.TranslatePlayerHands", "player_manager.TranslatePlayerModel", "player_manager.TranslateToPlayerModelName", "presets.Add", "presets.GetTable", "presets.Remove", "presets.Rename", "properties.Add", "properties.GetHovered", "properties.OnScreenClick", "properties.OpenEntityMenu", "render.AddBeam", "render.BlurRenderTarget", "render.BrushMaterialOverride", "render.Capture", "render.CapturePixels", "render.Clear", "render.ClearBuffersObeyStencil", "render.ClearDepth", "render.ClearRenderTarget", "render.ClearStencil", "render.ClearStencilBufferRectangle", "render.ComputeDynamicLighting", "render.ComputeLighting", "render.CopyRenderTargetToTexture", "render.CopyTexture", "render.CullMode", "render.DepthRange", "render.DrawBeam", "render.DrawBox", "render.DrawLine", "render.DrawQuad", "render.DrawQuadEasy", "render.DrawScreenQuad", "render.DrawScreenQuadEx", "render.DrawSphere", "render.DrawSprite", "render.DrawTextureToScreen", "render.DrawTextureToScreenRect", "render.DrawWireframeBox", "render.DrawWireframeSphere", "render.EnableClipping", "render.EndBeam", "render.FogColor", "render.FogEnd", "render.FogMaxDensity", "render.FogMode", "render.FogStart", "render.GetAmbientLightColor", "render.GetBlend", "render.GetBloomTex0", "render.GetBloomTex1", "render.GetColorModulation", "render.GetDXLevel", "render.GetFogColor", "render.GetFogDistances", "render.GetFogMode", "render.GetFullScreenDepthTexture", "render.GetLightColor", "render.GetMoBlurTex0", "render.GetMoBlurTex1", "render.GetMorphTex0", "render.GetMorphTex1", "render.GetPowerOfTwoTexture", "render.GetRefractTexture", "render.GetRenderTarget", "render.GetResolvedFullFrameDepth", "render.GetScreenEffectTexture", "render.GetSmallTex0", "render.GetSmallTex1", "render.GetSuperFPTex", "render.GetSuperFPTex2", "render.GetSurfaceColor", "render.GetToneMappingScaleLinear", "render.MaterialOverride", "render.MaterialOverrideByIndex", "render.MaxTextureHeight", "render.MaxTextureWidth", "render.Model", "render.ModelMaterialOverride", "render.OverrideAlphaWriteEnable", "render.OverrideBlendFunc", "render.OverrideColorWriteEnable", "render.OverrideDepthEnable", "render.PerformFullScreenStencilOperation", "render.PopCustomClipPlane", "render.PopFilterMag", "render.PopFilterMin", "render.PopFlashlightMode", "render.PopRenderTarget", "render.PushCustomClipPlane", "render.PushFilterMag", "render.PushFilterMin", "render.PushFlashlightMode", "render.PushRenderTarget", "render.ReadPixel", "render.RedownloadAllLightmaps", "render.RenderHUD", "render.RenderView", "render.ResetModelLighting", "render.ResetToneMappingScale", "render.SetAmbientLight", "render.SetBlend", "render.SetColorMaterial", "render.SetColorMaterialIgnoreZ", "render.SetColorModulation", "render.SetFogZ", "render.SetGoalToneMappingScale", "render.SetLightingMode", "render.SetLightingOrigin", "render.SetLightmapTexture", "render.SetLocalModelLights", "render.SetMaterial", "render.SetModelLighting", "render.SetRenderTarget", "render.SetRenderTargetEx", "render.SetScissorRect", "render.SetShadowColor", "render.SetShadowDirection", "render.SetShadowDistance", "render.SetShadowsDisabled", "render.SetStencilCompareFunction", "render.SetStencilEnable", "render.SetStencilFailOperation", "render.SetStencilPassOperation", "render.SetStencilReferenceValue", "render.SetStencilTestMask", "render.SetStencilWriteMask", "render.SetStencilZFailOperation", "render.SetToneMappingScaleLinear", "render.SetViewPort", "render.SetWriteDepthToDestAlpha", "render.Spin", "render.StartBeam", "render.SupportsHDR", "render.SupportsPixelShaders_1_4", "render.SupportsPixelShaders_2_0", "render.SupportsVertexShaders_2_0", "render.SuppressEngineLighting", "render.TurnOnToneMapping", "render.UpdateFullScreenDepthTexture", "render.UpdatePowerOfTwoTexture", "render.UpdateRefractTexture", "render.UpdateScreenEffectTexture", "resource.AddFile", "resource.AddSingleFile", "resource.AddWorkshop", "saverestore.AddRestoreHook", "saverestore.AddSaveHook", "saverestore.LoadEntity", "saverestore.LoadGlobal", "saverestore.PreRestore", "saverestore.PreSave", "saverestore.ReadTable", "saverestore.ReadVar", "saverestore.SaveEntity", "saverestore.SaveGlobal", "saverestore.WritableKeysInTable", "saverestore.WriteTable", "saverestore.WriteVar", "scripted_ents.Alias", "scripted_ents.Get", "scripted_ents.GetList", "scripted_ents.GetMember", "scripted_ents.GetSpawnable", "scripted_ents.GetStored", "scripted_ents.GetType", "scripted_ents.IsBasedOn", "scripted_ents.OnLoaded", "scripted_ents.Register", "search.AddProvider", "search.GetResults", "serverlist.PlayerList", "serverlist.Query", "sound.Add", "sound.AddSoundOverrides", "sound.Generate", "sound.GetProperties", "sound.GetTable", "sound.Play", "sound.PlayFile", "sound.PlayURL", "spawnmenu.ActivateTool", "spawnmenu.ActivateToolPanel", "spawnmenu.ActiveControlPanel", "spawnmenu.AddContentType", "spawnmenu.AddCreationTab", "spawnmenu.AddPropCategory", "spawnmenu.AddToolCategory", "spawnmenu.AddToolMenuOption", "spawnmenu.AddToolTab", "spawnmenu.ClearToolMenus", "spawnmenu.CreateContentIcon", "spawnmenu.DoSaveToTextFiles", "spawnmenu.GetContentType", "spawnmenu.GetCreationTabs", "spawnmenu.GetPropTable", "spawnmenu.GetToolMenu", "spawnmenu.GetTools", "spawnmenu.PopulateFromEngineTextFiles", "spawnmenu.PopulateFromTextFiles", "spawnmenu.SaveToTextFiles", "spawnmenu.SetActiveControlPanel", "spawnmenu.SwitchToolTab", "sql.Begin", "sql.Commit", "sql.LastError", "sql.Query", "sql.QueryRow", "sql.QueryValue", "sql.SQLStr", "sql.TableExists", "steamworks.ApplyAddons", "steamworks.Download", "steamworks.FileInfo", "steamworks.GetList", "steamworks.GetPlayerName", "steamworks.IsSubscribed", "steamworks.OpenWorkshop", "steamworks.Publish", "steamworks.RequestPlayerInfo", "steamworks.SetFileCompleted", "steamworks.SetFilePlayed", "steamworks.SetShouldMountAddon", "steamworks.ShouldMountAddon", "steamworks.Subscribe", "steamworks.Unsubscribe", "steamworks.ViewFile", "steamworks.Vote", "steamworks.VoteInfo", "string.byte", "string.char", "string.Comma", "string.dump", "string.EndsWith", "string.Explode", "string.find", "string.format", "string.FormattedTime", "string.FromColor", "string.GetChar", "string.GetExtensionFromFilename", "string.GetFileFromFilename", "string.GetPathFromFilename", "string.gfind", "string.gmatch", "string.gsub", "string.Implode", "string.JavascriptSafe", "string.Left", "string.len", "string.lower", "string.match", "string.NiceSize", "string.NiceTime", "string.PatternSafe", "string.rep", "string.Replace", "string.reverse", "string.Right", "string.SetChar", "string.Split", "string.StartWith", "string.StripExtension", "string.sub", "string.ToColor", "string.ToMinutesSeconds", "string.ToMinutesSecondsMilliseconds", "string.ToTable", "string.Trim", "string.TrimLeft", "string.TrimRight", "string.upper", "surface.CreateFont", "surface.DisableClipping", "surface.DrawCircle", "surface.DrawLine", "surface.DrawOutlinedRect", "surface.DrawPoly", "surface.DrawRect", "surface.DrawText", "surface.DrawTexturedRect", "surface.DrawTexturedRectRotated", "surface.DrawTexturedRectUV", "surface.GetHUDTexture", "surface.GetTextSize", "surface.GetTextureID", "surface.GetTextureSize", "surface.PlaySound", "surface.ScreenHeight", "surface.ScreenWidth", "surface.SetAlphaMultiplier", "surface.SetDrawColor", "surface.SetFont", "surface.SetMaterial", "surface.SetTextColor", "surface.SetTextPos", "surface.SetTexture", "system.AppTime", "system.BatteryPower", "system.FlashWindow", "system.GetCountry", "system.HasFocus", "system.IsLinux", "system.IsOSX", "system.IsWindowed", "system.IsWindows", "system.SteamTime", "system.UpTime", "table.Add", "table.ClearKeys", "table.CollapseKeyValue", "table.concat", "table.Copy", "table.CopyFromTo", "table.Count", "table.DeSanitise", "table.Empty", "table.FindNext", "table.FindPrev", "table.ForceInsert", "table.foreach", "table.ForEach", "table.foreachi", "table.GetFirstKey", "table.GetFirstValue", "table.GetKeys", "table.GetLastKey", "table.GetLastValue", "table.getn", "table.GetWinningKey", "table.HasValue", "table.Inherit", "table.insert", "table.IsSequential", "table.KeyFromValue", "table.KeysFromValue", "table.LowerKeyNames", "table.maxn", "table.Merge", "table.Random", "table.remove", "table.RemoveByValue", "table.Reverse", "table.Sanitise", "table.sort", "table.SortByKey", "table.SortByMember", "table.SortDesc", "table.ToString", "team.AddScore", "team.BestAutoJoinTeam", "team.GetAllTeams", "team.GetClass", "team.GetColor", "team.GetName", "team.GetPlayers", "team.GetScore", "team.GetSpawnPoint", "team.GetSpawnPoints", "team.Joinable", "team.NumPlayers", "team.SetClass", "team.SetColor", "team.SetScore", "team.SetSpawnPoint", "team.SetUp", "team.TotalDeaths", "team.TotalFrags", "team.Valid", "timer.Adjust", "timer.Check", "timer.Create", "timer.Destroy", "timer.Exists", "timer.Pause", "timer.Remove", "timer.RepsLeft", "timer.Simple", "timer.Start", "timer.Stop", "timer.TimeLeft", "timer.Toggle", "timer.UnPause", "umsg.Angle", "umsg.Bool", "umsg.Char", "umsg.End", "umsg.Entity", "umsg.Float", "umsg.Long", "umsg.PoolString", "umsg.Short", "umsg.Start", "umsg.String", "umsg.Vector", "umsg.VectorNormal", "undo.AddEntity", "undo.AddFunction", "undo.Create", "undo.Do_Undo", "undo.Finish", "undo.GetTable", "undo.MakeUIDirty", "undo.ReplaceEntity", "undo.SetCustomUndoText", "undo.SetPlayer", "undo.SetupUI", "usermessage.GetTable", "usermessage.Hook", "usermessage.IncomingMessage", "utf8.char", "utf8.charpattern", "utf8.codepoint", "utf8.codes", "utf8.force", "utf8.len", "utf8.offset", "util.AddNetworkString", "util.AimVector", "util.Base64Encode", "util.BlastDamage", "util.BlastDamageInfo", "util.Compress", "util.CRC", "util.DateStamp", "util.Decal", "util.DecalEx", "util.DecalMaterial", "util.Decompress", "util.DistanceToLine", "util.Effect", "util.GetModelInfo", "util.GetPData", "util.GetPixelVisibleHandle", "util.GetPlayerTrace", "util.GetSunInfo", "util.GetSurfaceIndex", "util.GetSurfacePropName", "util.GetUserGroups", "util.IntersectRayWithOBB", "util.IntersectRayWithPlane", "util.IsInWorld", "util.IsModelLoaded", "util.IsSkyboxVisibleFromPoint", "util.IsValidModel", "util.IsValidPhysicsObject", "util.IsValidProp", "util.IsValidRagdoll", "util.JSONToTable", "util.KeyValuesToTable", "util.KeyValuesToTablePreserveOrder", "util.LocalToWorld", "util.NetworkIDToString", "util.NetworkStringToID", "util.NiceFloat", "util.ParticleTracer", "util.ParticleTracerEx", "util.PixelVisible", "util.PointContents", "util.PrecacheModel", "util.PrecacheSound", "util.QuickTrace", "util.RelativePathToFull", "util.RemovePData", "util.ScreenShake", "util.SetPData", "util.SharedRandom", "util.SpriteTrail", "util.Stack", "util.SteamIDFrom64", "util.SteamIDTo64", "util.StringToType", "util.TableToJSON", "util.TableToKeyValues", "util.Timer", "util.TimerCycle", "util.tobool", "util.TraceEntity", "util.TraceEntityHull", "util.TraceHull", "util.TraceLine", "util.TypeToString", "vgui.Create", "vgui.CreateFromTable", "vgui.CreateX", "vgui.CursorVisible", "vgui.FocusedHasParent", "vgui.GetControlTable", "vgui.GetHoveredPanel", "vgui.GetKeyboardFocus", "vgui.GetWorldPanel", "vgui.IsHoveringWorld", "vgui.Register", "vgui.RegisterFile", "vgui.RegisterTable", "video.Record", "weapons.Get", "weapons.GetList", "weapons.GetStored", "weapons.IsBasedOn", "weapons.OnLoaded", "weapons.Register", "widgets.PlayerTick", "widgets.RenderMe" + + #endregion GLua Functions + } ) + .OrderBy ( x => x ) + .ToArray ( ); + } +} \ No newline at end of file diff --git a/WorkshopUtils/UI/GLuaHighlighter/GLuaHighlightTokenizer.cs b/WorkshopUtils/UI/GLuaHighlighter/GLuaHighlightTokenizer.cs new file mode 100644 index 0000000..a3ab696 --- /dev/null +++ b/WorkshopUtils/UI/GLuaHighlighter/GLuaHighlightTokenizer.cs @@ -0,0 +1,318 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace WorkshopUtils.UI.GLuaHighlighter +{ + public partial class GLuaHighlightTokenizer + { + private readonly String Code; + private Int32 Position; + + public GLuaHighlightTokenizer ( String Code ) + { + this.Code = Code; + } + + public static IEnumerable Tokenize ( String code ) + { + return new GLuaHighlightTokenizer ( code ) + .Tokenize ( ); + } + + public IEnumerable Tokenize ( ) + { + Position = -1; + var buff = new StringBuilder ( ); + var ret = new List ( ); + Char next; + + void SubmitBuffer ( ) + { + if ( buff.Length == 0 ) + return; + + ret.Add ( new HighlightToken + { + Type = HighlightTokenTypes.JustPrintTM, + Raw = buff.ToString ( ) + } ); + buff.Clear ( ); + } + + while ( ( next = Next ( ) ) != '\0' ) + { + if ( Char.IsWhiteSpace ( next ) ) + { + SubmitBuffer ( ); + ret.Add ( new HighlightToken + { + Type = HighlightTokenTypes.Whitespace, + Raw = ReadUntilNot ( Char.IsWhiteSpace ) + } ); + } + else if ( IsValidFirstIdentifierChar ( next ) ) + { + SubmitBuffer ( ); + ret.Add ( ReadIdentifier ( ) ); + } + else if ( Char.IsDigit ( next ) ) + { + SubmitBuffer ( ); + ret.Add ( new HighlightToken + { + Type = HighlightTokenTypes.Number, + Raw = ReadUntilNot ( PossibleNumberPart ) + } ); + } + // Strings + else if ( next == '"' || next == '\'' ) + { + SubmitBuffer ( ); + ret.Add ( ReadString ( Read ( ) ) ); + } + else if ( next == '[' && ( Next ( 2 ) == '[' || Next ( 2 ) == '=' ) ) + { + SubmitBuffer ( ); + ret.Add ( ReadLongString ( $"{Read ( )}{ReadUntil ( '[' )}{Read ( )}" ) ); + } + // Comments + else if ( next == '-' && Next ( 2 ) == '-' ) + { + SubmitBuffer ( ); + ret.Add ( ReadComment ( ) ); + } + else if ( next == '/' && Next ( 2 ) == '*' ) + { + SubmitBuffer ( ); + ret.Add ( new HighlightToken + { + Type = HighlightTokenTypes.Comment, + Raw = $"{Read ( )}{Read ( )}{ReadUntil ( "*/" )}{Read ( )}{Read ( )}" + } ); + } + else if ( next == '/' && Next ( 2 ) == '/' ) + { + SubmitBuffer ( ); + ret.Add ( new HighlightToken + { + Type = HighlightTokenTypes.Comment, + Raw = $"{Read ( )}{Read ( )}{ReadUntil ( x => x == '\n' || x == '\r' )}" + } ); + } + else + buff.Append ( Read ( ) ); + } + SubmitBuffer ( ); + + return ret; + } + + #region Moving Around + + private Boolean CanMove ( Int32 Delta ) + { + var newPos = Position + Delta; + return -1 < newPos && newPos < Code.Length; + } + + private Char Read ( Int32 len = 1 ) + { + if ( !CanMove ( len ) ) + return '\0'; + return Code[Position += len]; + } + + private Char Next ( Int32 len = 1 ) + { + if ( !CanMove ( len ) ) + return '\0'; + return Code[Position + len]; + } + + private Int32 IndexOf ( Char ch ) + { + for ( int i = Position ; i < Code.Length ; i++ ) + if ( Code[i] == ch ) + return i - Position; + return -1; + } + + private Int32 IndexOf ( Func Filter ) + { + for ( int i = Position ; i < Code.Length ; i++ ) + if ( Filter?.Invoke ( Code[i] ) ?? default ( Boolean ) ) + return i - Position; + return -1; + } + + #endregion Moving Around + + #region Advanced Moving Around + + private String ReadUntil ( Char ch ) + { + var buff = new StringBuilder ( ); + while ( Next ( ) != ch ) + buff.Append ( Read ( ) ); + return buff.ToString ( ); + } + + private String ReadUntil ( String str ) + { + var buff = new StringBuilder ( ); + while ( true ) + { + var alleq = true; + for ( int i = 0 ; i < str.Length ; i++ ) + { + if ( Next ( 1 + i ) != str[i] ) + { + alleq = false; + break; + } + } + if ( alleq ) + break; + + buff.Append ( Read ( ) ); + } + return buff.ToString ( ); + } + + private String ReadUntil ( Func Filter ) + { + var buff = new StringBuilder ( ); + while ( !Filter?.Invoke ( Next ( ) ) ?? default ( Boolean ) ) + buff.Append ( Read ( ) ); + return buff.ToString ( ); + } + + private String ReadUntilNot ( Func Filter ) + { + var buff = new StringBuilder ( ); + while ( Filter?.Invoke ( Next ( ) ) ?? default ( Boolean ) ) + buff.Append ( Read ( ) ); + return buff.ToString ( ); + } + + private String ReadUntilNot ( Char ch ) + { + var buff = new StringBuilder ( ); + while ( Next ( ) == ch ) + buff.Append ( Read ( ) ); + return buff.ToString ( ); + } + + #endregion Advanced Moving Around + + #region Actually Reading Stuff + + public HighlightToken ReadIdentifier ( ) + { + var raw = ReadUntilNot ( IsValidIdentifierChar ); + return new HighlightToken + { + Type = IsSyntaxIdentifier ( raw ) ? + HighlightTokenTypes.SyntaxIdentifier : + ( IsGLuaFuncName ( raw ) ? + HighlightTokenTypes.GLuaFunc : + HighlightTokenTypes.JustPrintTM ), + Raw = raw + }; + } + + public HighlightToken ReadString ( Char quoteStart ) + { + var buff = new StringBuilder ( ); + buff.Append ( quoteStart ); + while ( Next ( ) != quoteStart && Next ( ) != '\0' ) + { + if ( Next ( ) == '\\' ) // Ignore char if it's a \ + buff.Append ( Read ( ) ); + buff.Append ( Read ( ) ); + } + buff.Append ( Read ( ) ); + return new HighlightToken + { + Type = HighlightTokenTypes.String, + Raw = buff.ToString ( ) + }; + } + + public HighlightToken ReadLongString ( String start ) + { + var buff = new StringBuilder ( ); + buff.Append ( start ); + start = start.Replace ( '[', ']' ); + buff.Append ( ReadUntil ( start ) ); + buff.Append ( start ); + Read ( start.Length + 1 ); + return new HighlightToken + { + Type = HighlightTokenTypes.String, + Raw = buff.ToString ( ) + }; + } + + public HighlightToken ReadComment ( ) + { + var buff = new StringBuilder ( "--" ); + if ( Next ( ) == '[' && ( + Next ( 2 ) == '[' || + // Make sure the long string/comment actually + // starts before the line ends + ( Next ( 2 ) == '=' && IndexOf ( '\n' ) > IndexOf ( '[' ) ) + ) ) + { + // Get [ and then all the way until the other [ + var init = Read ( ) + ReadUntil ( '[' ); + var ret = ReadLongString ( init ); + ret.Type = HighlightTokenTypes.Comment; + ret.Raw = "--" + ret.Raw; + return ret; + } + + return new HighlightToken + { + Type = HighlightTokenTypes.Comment, + Raw = "--" + ReadUntil ( x => x == '\r' || x == '\n' ) + }; + } + + #endregion Actually Reading Stuff + + private static Boolean IsSyntaxIdentifier ( String str ) + { + return str == "in" || str == "do" || str == "or" || + str == "if" || str == "not" || str == "end" || + str == "nil" || str == "for" || str == "and" || + str == "else" || str == "then" || str == "true" || + str == "while" || str == "local" || str == "false" || + str == "break" || str == "until" || str == "repeat" || + str == "elseif" || str == "return" || str == "function"; + } + + // Fns is in another file where I actually generate the code + private static Boolean IsGLuaFuncName ( String str ) + { + return Array.IndexOf ( Fns, str ) != -1; + } + + private static Boolean IsValidFirstIdentifierChar ( Char ch ) + { + return !Char.IsDigit ( ch ) && IsValidIdentifierChar ( ch ); + } + + private static Boolean IsValidIdentifierChar ( Char ch ) + { + return !Char.IsWhiteSpace ( ch ) && ( Char.IsLetterOrDigit ( ch ) || ch == '.' ); + } + + private static Boolean PossibleNumberPart ( Char ch ) + { + return Char.IsDigit ( ch ) || ( 'a' <= ch && ch < 'h' ) || ch == '.' || + ch == 'x' || ch == 'e' || ch == 'E' || ch == '-' || ch == '+'; + } + } +} diff --git a/WorkshopUtils/UI/GLuaHighlighter/HighlightToken.cs b/WorkshopUtils/UI/GLuaHighlighter/HighlightToken.cs new file mode 100644 index 0000000..be6dad6 --- /dev/null +++ b/WorkshopUtils/UI/GLuaHighlighter/HighlightToken.cs @@ -0,0 +1,12 @@ +using System; + +namespace WorkshopUtils.UI.GLuaHighlighter +{ + public struct HighlightToken + { + internal HighlightTokenTypes Type; + internal String Raw; + + public override String ToString ( ) => $"HighlightToken<{Type}, {Raw}>"; + } +} diff --git a/WorkshopUtils/UI/GLuaHighlighter/HighlightTokenTypes.cs b/WorkshopUtils/UI/GLuaHighlighter/HighlightTokenTypes.cs new file mode 100644 index 0000000..33aa4d0 --- /dev/null +++ b/WorkshopUtils/UI/GLuaHighlighter/HighlightTokenTypes.cs @@ -0,0 +1,13 @@ +namespace WorkshopUtils.UI.GLuaHighlighter +{ + public enum HighlightTokenTypes + { + SyntaxIdentifier, // IsSyntaxIdentifier + GLuaFunc, // IsGLuaFuncName ( 97 KiB return :V ) + JustPrintTM, // JustPrint(tm) + Whitespace, // Duh x 2 + Number, // 1, 1.2, 0xFF, 12.2[Ee][+-]2, 0.31416[Ee]1 + String, // 'x', "x" + Comment, // --, -- + } +} diff --git a/WorkshopUtils/UI/GMAParserForm.Designer.cs b/WorkshopUtils/UI/GMAParserForm.Designer.cs new file mode 100644 index 0000000..ca0a589 --- /dev/null +++ b/WorkshopUtils/UI/GMAParserForm.Designer.cs @@ -0,0 +1,321 @@ +namespace WorkshopUtils.UI +{ + partial class GMAParserForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose ( bool disposing ) + { + if ( disposing && ( components != null ) ) + { + components.Dispose ( ); + } + base.Dispose ( disposing ); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent ( ) + { + this.txtFn = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.lbFiles = new System.Windows.Forms.ListBox(); + this.txtAddonVersion = new System.Windows.Forms.Label(); + this.txtDescription = new System.Windows.Forms.Label(); + this.txtAddonName = new System.Windows.Forms.Label(); + this.txtTimestamp = new System.Windows.Forms.Label(); + this.txtFormatVersion = new System.Windows.Forms.Label(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.txtAuthorName = new System.Windows.Forms.Label(); + this.txtAuthorSteamID = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.button2 = new System.Windows.Forms.Button(); + this.groupBox1.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.SuspendLayout(); + // + // txtFn + // + this.txtFn.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtFn.Location = new System.Drawing.Point(13, 13); + this.txtFn.Name = "txtFn"; + this.txtFn.ReadOnly = true; + this.txtFn.Size = new System.Drawing.Size(467, 20); + this.txtFn.TabIndex = 0; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button1.Location = new System.Drawing.Point(486, 11); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(25, 23); + this.button1.TabIndex = 1; + this.button1.Text = "..."; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.Button1_Click); + // + // groupBox1 + // + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Controls.Add(this.button2); + this.groupBox1.Controls.Add(this.groupBox3); + this.groupBox1.Controls.Add(this.txtAddonVersion); + this.groupBox1.Controls.Add(this.txtDescription); + this.groupBox1.Controls.Add(this.txtAddonName); + this.groupBox1.Controls.Add(this.txtTimestamp); + this.groupBox1.Controls.Add(this.txtFormatVersion); + this.groupBox1.Controls.Add(this.groupBox2); + this.groupBox1.Controls.Add(this.label5); + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Location = new System.Drawing.Point(13, 40); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(498, 295); + this.groupBox1.TabIndex = 2; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Addon Info"; + // + // groupBox3 + // + this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox3.Controls.Add(this.lbFiles); + this.groupBox3.Location = new System.Drawing.Point(259, 16); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(233, 273); + this.groupBox3.TabIndex = 10; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Files"; + // + // lbFiles + // + this.lbFiles.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbFiles.FormattingEnabled = true; + this.lbFiles.Location = new System.Drawing.Point(3, 16); + this.lbFiles.Name = "lbFiles"; + this.lbFiles.Size = new System.Drawing.Size(227, 254); + this.lbFiles.TabIndex = 0; + this.lbFiles.DoubleClick += new System.EventHandler(this.LbFiles_DoubleClick); + // + // txtAddonVersion + // + this.txtAddonVersion.AutoSize = true; + this.txtAddonVersion.Location = new System.Drawing.Point(93, 100); + this.txtAddonVersion.Name = "txtAddonVersion"; + this.txtAddonVersion.Size = new System.Drawing.Size(79, 13); + this.txtAddonVersion.TabIndex = 9; + this.txtAddonVersion.Text = "-- Nothing yet --"; + // + // txtDescription + // + this.txtDescription.AutoSize = true; + this.txtDescription.Location = new System.Drawing.Point(93, 55); + this.txtDescription.Name = "txtDescription"; + this.txtDescription.Size = new System.Drawing.Size(79, 13); + this.txtDescription.TabIndex = 8; + this.txtDescription.Text = "-- Nothing yet --"; + // + // txtAddonName + // + this.txtAddonName.AutoSize = true; + this.txtAddonName.Location = new System.Drawing.Point(93, 42); + this.txtAddonName.Name = "txtAddonName"; + this.txtAddonName.Size = new System.Drawing.Size(79, 13); + this.txtAddonName.TabIndex = 7; + this.txtAddonName.Text = "-- Nothing yet --"; + // + // txtTimestamp + // + this.txtTimestamp.AutoSize = true; + this.txtTimestamp.Location = new System.Drawing.Point(93, 29); + this.txtTimestamp.Name = "txtTimestamp"; + this.txtTimestamp.Size = new System.Drawing.Size(79, 13); + this.txtTimestamp.TabIndex = 6; + this.txtTimestamp.Text = "-- Nothing yet --"; + // + // txtFormatVersion + // + this.txtFormatVersion.AutoSize = true; + this.txtFormatVersion.Location = new System.Drawing.Point(93, 16); + this.txtFormatVersion.Name = "txtFormatVersion"; + this.txtFormatVersion.Size = new System.Drawing.Size(79, 13); + this.txtFormatVersion.TabIndex = 4; + this.txtFormatVersion.Text = "-- Nothing yet --"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.txtAuthorName); + this.groupBox2.Controls.Add(this.txtAuthorSteamID); + this.groupBox2.Controls.Add(this.label7); + this.groupBox2.Controls.Add(this.label6); + this.groupBox2.Location = new System.Drawing.Point(10, 117); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(243, 60); + this.groupBox2.TabIndex = 5; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Author"; + // + // txtAuthorName + // + this.txtAuthorName.AutoSize = true; + this.txtAuthorName.Location = new System.Drawing.Point(79, 20); + this.txtAuthorName.Name = "txtAuthorName"; + this.txtAuthorName.Size = new System.Drawing.Size(79, 13); + this.txtAuthorName.TabIndex = 3; + this.txtAuthorName.Text = "-- Nothing yet --"; + // + // txtAuthorSteamID + // + this.txtAuthorSteamID.AutoSize = true; + this.txtAuthorSteamID.Location = new System.Drawing.Point(79, 37); + this.txtAuthorSteamID.Name = "txtAuthorSteamID"; + this.txtAuthorSteamID.Size = new System.Drawing.Size(79, 13); + this.txtAuthorSteamID.TabIndex = 2; + this.txtAuthorSteamID.Text = "-- Nothing yet --"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(10, 37); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(63, 13); + this.label7.TabIndex = 1; + this.label7.Text = "SteamID64:"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(7, 20); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(38, 13); + this.label6.TabIndex = 0; + this.label6.Text = "Name:"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(7, 100); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(45, 13); + this.label5.TabIndex = 4; + this.label5.Text = "Version:"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(7, 55); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(63, 13); + this.label4.TabIndex = 3; + this.label4.Text = "Description:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(7, 42); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(38, 13); + this.label3.TabIndex = 2; + this.label3.Text = "Name:"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(7, 29); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(61, 13); + this.label2.TabIndex = 1; + this.label2.Text = "Timestamp:"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(7, 16); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(80, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Format Version:"; + // + // button2 + // + this.button2.Location = new System.Drawing.Point(0, 272); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 11; + this.button2.Text = "Save"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.Button2_Click); + // + // GMAParserForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(523, 347); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.button1); + this.Controls.Add(this.txtFn); + this.MinimumSize = new System.Drawing.Size(539, 386); + this.Name = "GMAParserForm"; + this.ShowIcon = false; + this.Text = "GMA Parser Test"; + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox txtFn; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label txtAuthorName; + private System.Windows.Forms.Label txtAuthorSteamID; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label txtAddonVersion; + private System.Windows.Forms.Label txtDescription; + private System.Windows.Forms.Label txtAddonName; + private System.Windows.Forms.Label txtTimestamp; + private System.Windows.Forms.Label txtFormatVersion; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.ListBox lbFiles; + private System.Windows.Forms.Button button2; + } +} \ No newline at end of file diff --git a/WorkshopUtils/UI/GMAParserForm.cs b/WorkshopUtils/UI/GMAParserForm.cs new file mode 100644 index 0000000..1b6de24 --- /dev/null +++ b/WorkshopUtils/UI/GMAParserForm.cs @@ -0,0 +1,150 @@ +using GMADFileFormat; +using GUtils.Forms; +using System; +using System.ComponentModel; +using System.IO; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace WorkshopUtils.UI +{ + public partial class GMAParserForm : Form + { + private readonly BackgroundWorker bw; + private GMADAddon addon; + private Boolean ParsingUnderway; + + public GMAParserForm ( ) + { + InitializeComponent ( ); + bw = new BackgroundWorker ( ); + bw.DoWork += this.Bw_DoWork; + } + + public void ParseData ( Byte[] data, Int64 ID, String WorkshopURL ) + { + var addon = GMADParser.Parse ( data); + this.addon = addon; + + this.InvokeEx ( a => + { + txtAddonName.Text = addon.Name; + txtAddonVersion.Text = addon.Version.ToString ( ); + txtAuthorName.Text = addon.Author.Name; + txtAuthorSteamID.Text = addon.Author.SteamID64.ToString ( ); + txtDescription.Text = addon.Description; + txtFormatVersion.Text = addon.FormatVersion.ToString ( ); + txtTimestamp.Text = addon.Timestamp.ToString ( ); + + lbFiles.Items.Clear ( ); + foreach ( var file in addon.Files ) + lbFiles.Items.Add ( file.Path ); + } ); + } + + private static String GetString ( Byte[] data ) + { + return String.Join ( "", data.Select ( d => ( Char ) d ).ToArray ( ) ); + } + + private void Button1_Click ( Object sender, EventArgs e ) + { + if ( ParsingUnderway ) + return; + + using ( var ofd = new OpenFileDialog + { + CheckFileExists = true, + CheckPathExists = true, + Filter = "GMA Files | *.gma", + RestoreDirectory = true, + Title = "GMA Parser" + } ) + { + var r = ofd.ShowDialog ( ); + if ( r != DialogResult.OK ) + return; + + txtFn.Text = ofd.FileName; + TriggerGMAParse ( ); + } + } + + private void Button2_Click ( Object sender, EventArgs e ) + { + var fsd = new FolderSelectDialog { Title = "GMAD Extractor | Select Directory" }; + if ( !fsd.ShowDialog ( this.Handle ) ) + return; + + foreach ( var file in addon.Files ) + { + var path = Path.Combine ( fsd.FileName, file.Path ); + var di = new DirectoryInfo ( Path.GetDirectoryName ( path ) ); + var fi = new FileInfo ( path ); + di.Create ( ); + using ( var writer = fi.OpenWrite ( ) ) + writer.Write ( file.Data, 0, file.Data.Length ); + } + } + + private void Bw_DoWork ( Object _, DoWorkEventArgs __ ) + { + ParsingUnderway = true; + var fn = txtFn.Text; + Byte[] data; + try + { + using ( var reader = File.OpenRead ( fn ) ) + using ( var ms = new MemoryStream ( ) ) + { + reader.CopyTo ( ms ); + data = ms.ToArray ( ); + } + ParseData ( data, -1, null ); + } + catch ( Exception e ) + { + L ( "Error:\n" + e ); + } + } + + private void L ( String a ) + { + this.InvokeEx ( d => + { + using ( var w = Dbg.GetTbForm ( a ) ) + w.ShowDialog ( d ); + } ); + } + + private void LbFiles_DoubleClick ( Object sender, EventArgs e ) + { + if ( lbFiles.SelectedItem != null ) + { + var name = lbFiles.SelectedItem.ToString ( ); + foreach ( var file in addon.Files ) + { + if ( file.Path == name ) + { + using ( var w = Dbg.GetGLuaForm ( + Encoding.UTF8.GetString ( file.Data ) + .Replace ( "\n", Environment.NewLine ) + .Replace ( "\r\r", "\r" ) ) ) + { + w.ShowInTaskbar = false; + w.ShowDialog ( this ); + } + } + } + } + } + + private void TriggerGMAParse ( ) + { + if ( ParsingUnderway ) + return; + bw.RunWorkerAsync ( ); + } + } +} \ No newline at end of file diff --git a/WorkshopUtils/UI/GMAParserForm.resx b/WorkshopUtils/UI/GMAParserForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WorkshopUtils/UI/GMAParserForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/WorkshopUtils/UI/WorkshopDLForm.Designer.cs b/WorkshopUtils/UI/WorkshopDLForm.Designer.cs new file mode 100644 index 0000000..9301cb7 --- /dev/null +++ b/WorkshopUtils/UI/WorkshopDLForm.Designer.cs @@ -0,0 +1,82 @@ +namespace WorkshopUtils.UI +{ + partial class WorkshopDLForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose ( bool disposing ) + { + if ( disposing && ( components != null ) ) + { + components.Dispose ( ); + } + base.Dispose ( disposing ); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent ( ) + { + this.txturl = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.SuspendLayout(); + // + // txturl + // + this.txturl.Location = new System.Drawing.Point(13, 13); + this.txturl.Name = "txturl"; + this.txturl.Size = new System.Drawing.Size(259, 20); + this.txturl.TabIndex = 0; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(12, 71); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(260, 23); + this.button1.TabIndex = 1; + this.button1.Text = "Download + Parse"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.Button1_ClickAsync); + // + // progressBar1 + // + this.progressBar1.Location = new System.Drawing.Point(13, 40); + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(259, 23); + this.progressBar1.TabIndex = 2; + // + // WorkshopDLForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(284, 106); + this.Controls.Add(this.progressBar1); + this.Controls.Add(this.button1); + this.Controls.Add(this.txturl); + this.Name = "WorkshopDLForm"; + this.ShowIcon = false; + this.Text = "Workshop Download Test"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox txturl; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.ProgressBar progressBar1; + } +} \ No newline at end of file diff --git a/WorkshopUtils/UI/WorkshopDLForm.cs b/WorkshopUtils/UI/WorkshopDLForm.cs new file mode 100644 index 0000000..aca31d4 --- /dev/null +++ b/WorkshopUtils/UI/WorkshopDLForm.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Net; +using System.Security; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace WorkshopUtils.UI +{ + public partial class WorkshopDLForm : Form + { + private static readonly Regex wsurl = new Regex ( @"https?:\/\/steamcommunity\.com\/sharedfiles\/filedetails\/\?id=(\d+)" ); + + public WorkshopDLForm ( ) + { + InitializeComponent ( ); + } + + private async void Button1_ClickAsync ( Object sender, EventArgs e ) + { + if ( String.IsNullOrEmpty ( txturl.Text ) || String.IsNullOrWhiteSpace ( txturl.Text ) ) + { + L ( "Empty ID/URL." ); + return; + } + + Int32 id; + if ( wsurl.IsMatch ( txturl.Text ) ) + { + id = Int32.Parse ( wsurl.Match ( txturl.Text ).Groups[1].ToString ( ) ); + } + else if ( !Int32.TryParse ( txturl.Text, out id ) ) + { + L ( "Invalid ID/URL." ); + return; + } + + var addon = await WorkshopHTTPAPI.GetAddonByIDAsync ( id ); + using ( var wc = new WebClient ( ) ) + { + wc.DownloadProgressChanged += ( a, b ) => + this.progressBar1.Value = b.ProgressPercentage; + var data = await wc.DownloadDataTaskAsync ( addon.URL ); + + using ( var f = new GMAParserForm ( ) ) + { + f.ShowInTaskbar = false; + f.ParseData ( data, addon.ID, addon.URL ); + f.ShowDialog ( this ); + + // Clean shit up + addon = null; + data = new Byte[0]; + GC.Collect ( ); + } + } + } + + private void L ( String s ) + { + this.InvokeEx ( d => MessageBox.Show ( d, s ) ); + } + } +} diff --git a/WorkshopUtils/UI/WorkshopDLForm.resx b/WorkshopUtils/UI/WorkshopDLForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WorkshopUtils/UI/WorkshopDLForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/WorkshopUtils/WorkshopAddon.cs b/WorkshopUtils/WorkshopAddon.cs new file mode 100644 index 0000000..3114553 --- /dev/null +++ b/WorkshopUtils/WorkshopAddon.cs @@ -0,0 +1,69 @@ +using GMADFileFormat; +using Newtonsoft.Json; +using System; + +namespace WorkshopUtils +{ + public class WorkshopAddon + { + [JsonProperty ( PropertyName = "publishedfileid" )] + public Int64 ID; + + [JsonProperty ( PropertyName = "creator" )] + public Int64 SteamID64; + + [JsonProperty ( PropertyName = "file_size" )] + public Int32 Size; + + [JsonProperty ( PropertyName = "file_url" )] + public String URL; + + [JsonProperty ( PropertyName = "preview_url" )] + public String Thumbnail; + + [JsonProperty ( PropertyName = "title" )] + public String Title; + + [JsonProperty ( PropertyName = "description" )] + public String Description; + + [JsonProperty ( PropertyName = "time_created" )] + [JsonConverter ( typeof ( WorkshopTimeConverter ) )] + public DateTime Created; + + [JsonProperty ( PropertyName = "time_updated" )] + [JsonConverter ( typeof ( WorkshopTimeConverter ) )] + public DateTime Updated; + + [JsonProperty ( PropertyName = "subscriptions" )] + public UInt32 Subscriptions; + + [JsonProperty ( PropertyName = "lifetime_subscriptions" )] + public UInt32 LifetimeSubs; + + [JsonIgnore] + public GMADAddon GMAD; + } + + internal class WorkshopTimeConverter : Newtonsoft.Json.Converters.DateTimeConverterBase + { + private static readonly DateTime epoch = new DateTime ( 1970, 1, 1, 0, 0, 0, DateTimeKind.Utc ); + + public override Boolean CanConvert ( Type objectType ) + { + return objectType == typeof ( DateTime ); + } + + public override Object ReadJson ( JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer ) + { + if ( reader.Value == null ) + return null; + return epoch.AddMilliseconds ( ( Int64 ) reader.Value ); + } + + public override void WriteJson ( JsonWriter writer, Object value, JsonSerializer serializer ) + { + throw new NotImplementedException ( ); + } + } +} \ No newline at end of file diff --git a/WorkshopUtils/WorkshopHTTPAPI.cs b/WorkshopUtils/WorkshopHTTPAPI.cs new file mode 100644 index 0000000..f9cc0f8 --- /dev/null +++ b/WorkshopUtils/WorkshopHTTPAPI.cs @@ -0,0 +1,125 @@ +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Specialized; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + +namespace WorkshopUtils +{ + public enum EPublishedFileInfoMatchingFileType + { + FileTypeCommunity, + FileTypeMicrotransaction, + FileTypeCollection, + FileTypeArt, + FileTypeVideo, + FileTypeScreenshot, + FileTypeGame, + FileTypeSoftware, + FileTypeConcept, + FileTypeWebGuide, + FileTypeIntegratedGuide, + FileTypeMerch, + FileTypeControllerBinding, + FileTypeSteamworksAccessInvite, + FileTypeSteamVideo, + FileTypeGameManagedItem + } + + public enum EPublishedFileQueryType + { + RankedByVote, + RankedByPublicationDate, + AcceptedForGameRankedByAcceptanceDate, + RankedByTrend, + FavoritedByFriendsRankedByPublicationDate, + CreatedByFriendsRankedByPublicationDate, + RankedByNumTimesReported, + CreatedByFollowedUsersRankedByPublicationDate, + NotYetRated, + RankedByTotalVotesAsc, + RankedByVotesUp, + RankedByTextSearch, + RankedByTotalUniqueSubscriptions, + RankedByPlaytimeTrend, + RankedByTotalPlaytime, + RankedByAveragePlaytimeTrend, + RankedByLifetimeAveragePlaytime, + RankedByPlaytimeSessionsTrend, + RankedByLifetimePlaytimeSessions + } + + public static class WorkshopHTTPAPI + { + public static Task DownloadAddonDataAsync ( WorkshopAddon Addon ) + { + using ( var wc = new WebClient ( ) ) + return wc.DownloadDataTaskAsync ( Addon.URL ); + } + + public static Task DownloadAddonFileAsync ( WorkshopAddon Addon, String path ) + { + using ( var wc = new WebClient ( ) ) + return wc.DownloadFileTaskAsync ( Addon.URL, path ); + } + + public async static Task GetAddonByIDAsync ( Int32 ID ) + { + var resp = await WebClientPOSTAsync ( + "https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/v1/", + new NameValueCollection + { + { "itemcount", "1" }, + { "publishedfileids[0]", ID.ToString ( ) } + } + ); + var addon = JToken.Parse ( resp ) + ["response"] + ["publishedfiledetails"] + [0] + .ToObject ( ); + addon.ID = ID; + return addon; + } + + public static async Task GetWorkshopAddonsAsync ( String APIKey, EPublishedFileQueryType query_type, UInt32 page, Int32 numperpage = 50 ) + { + using ( var wc = new WebClient + { + QueryString = new NameValueCollection + { + { "key", APIKey }, + { "creator_appid", "4000" }, + { "page", page.ToString ( ) }, + { "numperpage", numperpage.ToString ( ) }, + { "appid", "4000" }, + { "return_tags", "1" }, + { "return_kv_tags", "0" }, + { "return_previews", "1" }, + { "return_children", "0" }, + { "return_metadata", "1" }, + { "return_vote_data", "0" }, + { "query_type", ( ( Int32 ) query_type ).ToString ( ) }, + { "excludedtags[0]", "Dupe" }, + { "excludedtags[1]", "Save" }, + { "excludedtags[2]", "Demo" } + } + } ) + { + var data = JObject.Parse ( await wc.DownloadStringTaskAsync ( + "http://api.steampowered.com/IPublishedFileService/QueryFiles/v1/" ) ); + return data["response"]["publishedfiledetails"] + .Select ( tok => tok.ToObject ( ) ) + .ToArray ( ); + } + } + + public static async Task WebClientPOSTAsync ( String URL, NameValueCollection Data ) + { + using ( var wc = new WebClient ( ) ) + return Encoding.UTF8.GetString ( await wc.UploadValuesTaskAsync ( URL, Data ) ); + } + } +} \ No newline at end of file diff --git a/WorkshopUtils/WorkshopUtils.csproj b/WorkshopUtils/WorkshopUtils.csproj new file mode 100644 index 0000000..de15890 --- /dev/null +++ b/WorkshopUtils/WorkshopUtils.csproj @@ -0,0 +1,166 @@ + + + + + Debug + AnyCPU + {A5E30662-65FB-4F73-957D-40AFD1D30F49} + WinExe + WorkshopUtils + WorkshopUtils + v4.6.1 + 512 + true + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + MS Managed Recommended + MS Security.ruleset + true + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + + + + + ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll + + + + + + + + + + + + + + + + + Form + + + ChoiceForm.cs + + + + + + + + + + Form + + + GMAParserForm.cs + + + Component + + + GLuaCode.cs + + + Form + + + WorkshopDLForm.cs + + + ChoiceForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + GMAParserForm.cs + + + WorkshopDLForm.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + False + Microsoft .NET Framework 4.6.1 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + + {a1cb8f0b-bd90-4f73-b675-dcadf98572ec} + GMADFileFormat + + + + + dotnet build $(SolutionDir)GMADFileFormat\GMADFileFormat.csproj +dotnet publish $(SolutionDir)GMADFileFormat\GMADFileFormat.csproj +copy /Y /B "$(SolutionDir)GMADFileFormat\bin\Debug\netstandard1.4\publish\GMADFileFormat.dll" "$(ProjectDir)$(OutDir)GMADFileFormat.dll" +copy /Y /B "$(SolutionDir)GMADFileFormat\bin\Debug\netstandard1.4\publish\Newtonsoft.Json.dll" "$(ProjectDir)$(OutDir)Newtonsoft.Json.dll" +copy /Y /B "$(SolutionDir)GMADFileFormat\bin\Debug\netstandard1.4\publish\SevenZip.dll" "$(ProjectDir)$(OutDir)SevenZip.dll" + + \ No newline at end of file diff --git a/WorkshopUtils/packages.config b/WorkshopUtils/packages.config new file mode 100644 index 0000000..acaf480 --- /dev/null +++ b/WorkshopUtils/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/highlighter-scrapper.js b/highlighter-scrapper.js new file mode 100644 index 0000000..75f753e --- /dev/null +++ b/highlighter-scrapper.js @@ -0,0 +1,33 @@ +var funcs = Array.from ( document.querySelectorAll ( 'pagelist > ul > li' ) ); +var areas = { Hooks: 0, Libs: 1, Global: 2, Classes: 3, Panels: 4 }; +var lines = [ + 'using System;', + 'using System.Linq;', + 'namespace WorkshopUtils.UI.GLuaHighlighter', + '{', + ' public partial class GLuaHighlightTokenizer', + ' {', + ' private static readonly String[] Fns = ( new String[] {', + ' #region GLua Functions', + '' +]; +let fns = []; +fns = fns.concat ( Array.from ( funcs[areas.Hooks].querySelectorAll ( 'ul > li > a' ) ).map ( x => `"${x.innerText}"` ) ) + .concat ( Array.from ( funcs[areas.Global].querySelectorAll ( 'ul > li > a' ) ).map ( x => `"${x.innerText}"` ) ) + .concat ( Array.from ( funcs[areas.Classes].querySelectorAll ( 'ul > li > a' ) ).map ( x => `"${x.innerText}"` ) ) + .concat ( Array.from ( funcs[areas.Panels].querySelectorAll ( 'ul > li > a' ) ).map ( x => `"${x.innerText}"` ) ); +Array.from ( funcs[areas.Libs].querySelectorAll ( 'ul > li' ) ) + .map ( x => Array.from ( ( x.children[1] || { children: [] } ).children ).map ( y => `"${x.children[0].innerText.split(' ')[0]}.${y.innerText}"` ) ) + .forEach ( x => fns = fns.concat ( x ) ); +lines = lines.concat ( [ + ' ' + fns.join ( ', ' ), + '', + ' #endregion GLua Functions', + ' } )', + ' .OrderBy ( x => x )', + ' .ToArray ( );', + ' }', + '}' +] ); + +document.write ( lines.join ( '
' ).replace ( /\t/ig, "    " ) ); \ No newline at end of file