Skip to content

Commit 6235eb8

Browse files
github-actions[bot]NightbladeLocalIdentity
authored
[pob1-port] Fix: EmmyLua annotations, add/improve two stub functions (#1597)
* Apply changes from PathOfBuildingCommunity/PathOfBuilding#9250 * Fix merge conflict --------- Co-authored-by: Nightblade <[email protected]> Co-authored-by: LocalIdentity <[email protected]>
1 parent 34ac595 commit 6235eb8

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/HeadlessWrapper.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function imageHandleClass:ImageSize()
4444
end
4545

4646
-- Rendering
47-
function RenderInit() end
47+
function RenderInit(flag, ...) end
4848
function GetScreenSize()
4949
return 1920, 1080
5050
end
@@ -157,6 +157,7 @@ function OpenURL(url) end
157157
function SetProfiling(isEnabled) end
158158
function Restart() end
159159
function Exit() end
160+
function TakeScreenshot() end
160161

161162
---@return string? provider
162163
---@return string? version

src/Launch.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ end
250250
---Download the given page in the background, and calls the provided callback function when done:
251251
---@param url string
252252
---@param callback fun(response:table, errMsg:string) @ response = { header, body }
253-
---@param params table @ params = { header, body }
253+
---@param params? table @ params = { header, body }
254254
function launch:DownloadPage(url, callback, params)
255255
params = params or {}
256256
local script = [[

src/Modules/BuildSiteTools.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ buildSites.websiteList = {
3232
}
3333

3434
--- Uploads a PoB build code to a website
35-
--- @param websiteInfo Table Contains the postUrl, any postParams, and a prefix to add to the response
36-
--- @param buildCode String The build code that will be uploaded
35+
--- @param websiteInfo table Contains the postUrl, any postParams, and a prefix to add to the response
36+
--- @param buildCode string The build code that will be uploaded
3737
function buildSites.UploadBuild(buildCode, websiteInfo)
3838
local response
3939
if websiteInfo then
@@ -72,9 +72,9 @@ function buildSites.UploadBuild(buildCode, websiteInfo)
7272
end
7373

7474
--- Downloads a PoB build code from a website
75-
--- @param link String A link to the site that contains the link to the raw build code
76-
--- @param websiteInfo Table Contains the downloadUrl
77-
--- @param callback Function The function to call when the download is complete
75+
--- @param link string A link to the site that contains the link to the raw build code
76+
--- @param websiteInfo table? Contains the downloadUrl
77+
--- @param callback function The function to call when the download is complete
7878
function buildSites.DownloadBuild(link, websiteInfo, callback)
7979
local siteCodeURL
8080
-- Only called on program start via protocol handler
@@ -103,7 +103,7 @@ function buildSites.DownloadBuild(link, websiteInfo, callback)
103103
end
104104

105105
-- Parses and converts URI's to import links. Currently only supports protocol handler URI's, extend as needed.
106-
-- @param uri String Example: pob2://pobbin/<id> or pob2://poeninja/<id>
106+
--- @param uri string Example: pob2://pobbin/<id> or pob2://poeninja/<id>
107107
function buildSites.ParseImportLinkFromURI(uri)
108108
local importLink = nil
109109

0 commit comments

Comments
 (0)