From feb169b7b008726b8dee349d0021860825ea17c3 Mon Sep 17 00:00:00 2001 From: Rubat <3299036+robotboy655@users.noreply.github.com> Date: Fri, 16 Feb 2024 23:45:31 +0200 Subject: [PATCH 1/2] Fix regression with certain files not being written My oopsie --- src/cli-scraper.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cli-scraper.ts b/src/cli-scraper.ts index b8cef56..baef814 100644 --- a/src/cli-scraper.ts +++ b/src/cli-scraper.ts @@ -137,6 +137,9 @@ async function startScrape() { } } + // Await any after the loop exits + await Promise.allSettled(queue); + console.log(`Took ${Math.floor((performance.now()-scrape_start) / 100) / 10}s!`); writer.writeToDisk(); From 95915075ee6a72423e579155c7da7462c61e93ed Mon Sep 17 00:00:00 2001 From: Rubat <3299036+robotboy655@users.noreply.github.com> Date: Fri, 16 Feb 2024 23:45:47 +0200 Subject: [PATCH 2/2] Add manual overrides for CreateConVar & Panel.Add --- custom/Global.CreateConVar.lua | 14 ++++++++++++++ custom/Panel.Add.lua | 9 +++++++++ 2 files changed, 23 insertions(+) create mode 100644 custom/Global.CreateConVar.lua create mode 100644 custom/Panel.Add.lua diff --git a/custom/Global.CreateConVar.lua b/custom/Global.CreateConVar.lua new file mode 100644 index 0000000..f702e83 --- /dev/null +++ b/custom/Global.CreateConVar.lua @@ -0,0 +1,14 @@ +---[SHARED AND MENU] Creates a console variable (ConVar), in general these are for things like gamemode/server settings. +--- Do not use the FCVAR_NEVER_AS_STRING and FCVAR_REPLICATED flags together, as this can cause the console variable to have strange values on the client. +--- +---[(View on wiki)](https://wiki.facepunch.com/gmod/Global.CreateConVar) +---@param name string Name of the ConVar. +--- +--- This cannot be a name of an engine console command or console variable. It will throw an error if it is. If it is the same name as another lua ConVar, it will return that ConVar object. +---@param value string Default value of the convar. Can also be a number. +---@param flags?|table? number Flags of the convar, see Enums/FCVAR, either as bitflag or as table. +---@param helptext? string The help text to show in the console. +---@param min? number If set, the ConVar cannot be changed to a number lower than this value. +---@param max? number If set, the ConVar cannot be changed to a number higher than this value. +---@return ConVar # The convar created. +function _G.CreateConVar(name, value, flags, helptext, min, max) end diff --git a/custom/Panel.Add.lua b/custom/Panel.Add.lua new file mode 100644 index 0000000..79938cd --- /dev/null +++ b/custom/Panel.Add.lua @@ -0,0 +1,9 @@ +---[CLIENT AND MENU] Adds the specified object to the panel. +--- +---[(View on wiki)](https://wiki.facepunch.com/gmod/Panel:Add) +---@generic T : Panel +---@param object `T` The panel to be added (parented). Can also be: +--- * string Class Name - creates panel with the specified name and adds it to the panel. +--- * table PANEL table - creates a panel from table and adds it to the panel. +---@return `T` # The added or created panel +function Panel:Add(object) end