From 31e137bac717b1289aa357a078eac0fb577aafa7 Mon Sep 17 00:00:00 2001 From: Jadon L <56563658+koerismo@users.noreply.github.com> Date: Sat, 21 Dec 2024 23:37:46 -0500 Subject: [PATCH 1/2] feat: (WIP) Add GetAddonContributions function --- p2ce/workshop.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/p2ce/workshop.d.ts b/p2ce/workshop.d.ts index c011f60..882ed73 100644 --- a/p2ce/workshop.d.ts +++ b/p2ce/workshop.d.ts @@ -109,6 +109,9 @@ declare namespace WorkshopAPI { /** Returns the download state of the addon at the specified index. */ function GetAddonState(index: uint32): DownloadState; + + /** Returns the list of files currently being provided by the addon. Files overridden by other addons are not listed here. */ + function GetAddonContributions(index: uint32): string[]; } interface GlobalEventNameMap { From e8a7d1c6c5513ec2abe55a1f3882510a0f7e888d Mon Sep 17 00:00:00 2001 From: Jadon L <56563658+koerismo@users.noreply.github.com> Date: Sat, 21 Dec 2024 23:59:40 -0500 Subject: [PATCH 2/2] Update workshop.d.ts --- p2ce/workshop.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/p2ce/workshop.d.ts b/p2ce/workshop.d.ts index 882ed73..a1edff3 100644 --- a/p2ce/workshop.d.ts +++ b/p2ce/workshop.d.ts @@ -110,8 +110,8 @@ declare namespace WorkshopAPI { /** Returns the download state of the addon at the specified index. */ function GetAddonState(index: uint32): DownloadState; - /** Returns the list of files currently being provided by the addon. Files overridden by other addons are not listed here. */ - function GetAddonContributions(index: uint32): string[]; + /** Returns the types of files contributed by the addon at the specified index. */ + function GetAddonContributions(index: uint32): ('sounds'|'models'|'materials'|'maps'|'scripts'|'panorama')[]; } interface GlobalEventNameMap {