Skip to content

Commit

Permalink
Improve some diagnostics (#41)
Browse files Browse the repository at this point in the history
CSEnt  inherits Entity
WEAPON  inherits Weapon
Weapon inherits Entity
NETVERSIONSTR  global
SENSORBONE, TEXFILTER  enum globals
string empty default values are imported correctly
  • Loading branch information
robotboy655 authored Feb 15, 2024
1 parent 5213c35 commit fc7d80e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
18 changes: 18 additions & 0 deletions custom/_globals.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ VERSION = nil
---Contains a nicely formatted version of GMod. Example: "2020.12.11"
VERSIONSTR = nil

---@type string
---Contains the current networking version. Menu state only. Example: "2023.06.28"
NETVERSIONSTR = nil

---@type string
---The branch the game is running on. This will be "unknown" on main branch.
BRANCH = nil
Expand Down Expand Up @@ -108,3 +112,17 @@ color_black = Color(0, 0, 0, 255)
---@type Color
---A color with only the alpha value set to 0.
color_transparent = Color(255, 255, 255, 0)

--[[
Table-type enums
--]]

---@type table<string, number>
---Enumerations used by Kinect SDK bindings.
SENSORBONE = nil

---@type table<string, number>
---Enumerations used by render.PushFilterMin and render.PushFilterMag.
---
---See [this](https://msdn.microsoft.com/en-us/library/windows/desktop/bb172615(v=vs.85).aspx) and [this page](https://en.wikipedia.org/wiki/Texture_filtering) for more information on texture filtering.
TEXFILTER = nil
2 changes: 2 additions & 0 deletions custom/class.CSEnt.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---@class CSEnt : Entity
local CSEnt = {}
5 changes: 4 additions & 1 deletion custom/class.WEAPON.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
---@class WEAPON : Entity
---@class Weapon : Entity
local Weapon = {}

---@class WEAPON : Weapon
local WEAPON = {}
2 changes: 1 addition & 1 deletion src/scrapers/wiki-page-markup-scraper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export class WikiPageMarkupScraper extends Scraper<WikiPage> {
description: $el.text()
};

if ($el.attr('default'))
if ($el.attr('default')!= undefined)
argument.default = $el.attr('default')!;

return argument;
Expand Down

0 comments on commit fc7d80e

Please sign in to comment.