Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Mod information #899

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
136 changes: 20 additions & 116 deletions .github/nativefuncs.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,58 +7,28 @@
"argTypes":""
},
{
"name":"NSIsModEnabled",
"helpText":"",
"returnTypeString":"bool",
"argTypes":"string modName"
},
{
"name":"NSSetModEnabled",
"helpText":"",
"returnTypeString":"void",
"argTypes":"string modName, bool enabled"
},
{
"name":"NSIsModRemote",
"helpText":"",
"returnTypeString":"bool",
"argTypes":"string modName"
},
{
"name":"NSGetModDescriptionByModName",
"helpText":"",
"returnTypeString":"string",
"argTypes":"string modName"
},
{
"name":"NSGetModVersionByModName",
"name":"NSGetModsInformation",
"helpText":"",
"returnTypeString":"string",
"argTypes":"string modName"
},
{
"name":"NSGetModDownloadLinkByModName",
"helpText":"",
"returnTypeString":"string",
"argTypes":"string modName"
"returnTypeString":"array<ModInfo>",
"argTypes":""
},
{
"name":"NSGetModLoadPriority",
"name":"NSGetModVersions",
"helpText":"",
"returnTypeString":"int",
"returnTypeString":"array<string>",
"argTypes":"string modName"
},
{
"name":"NSIsModRequiredOnClient",
"name":"NSIsModEnabled",
"helpText":"",
"returnTypeString":"bool",
"argTypes":"string modName"
},
{
"name":"NSGetModConvarsByModName",
"name":"NSSetModEnabled",
"helpText":"",
"returnTypeString":"array<string>",
"argTypes":"string modName"
"returnTypeString":"void",
"argTypes":"string modName, bool enabled"
},
{
"name":"DecodeJSON",
Expand Down Expand Up @@ -272,48 +242,6 @@
"returnTypeString":"void",
"argTypes":"string modName, bool enabled"
},
{
"name":"NSIsModRemote",
"helpText":"",
"returnTypeString":"bool",
"argTypes":"string modName"
},
{
"name":"NSGetModDescriptionByModName",
"helpText":"",
"returnTypeString":"string",
"argTypes":"string modName"
},
{
"name":"NSGetModVersionByModName",
"helpText":"",
"returnTypeString":"string",
"argTypes":"string modName"
},
{
"name":"NSGetModDownloadLinkByModName",
"helpText":"",
"returnTypeString":"string",
"argTypes":"string modName"
},
{
"name":"NSGetModLoadPriority",
"helpText":"",
"returnTypeString":"int",
"argTypes":"string modName"
},
{
"name":"NSIsModRequiredOnClient",
"helpText":"",
"returnTypeString":"bool",
"argTypes":"string modName"
},
{
"name":"NSGetModConvarsByModName",
"helpText":"",
"returnTypeString":"array<string>",
"argTypes":"string modName"
},
{
"name":"DecodeJSON",
"helpText":"converts a json string to a squirrel table",
Expand Down Expand Up @@ -467,58 +395,34 @@
"argTypes":""
},
{
"name":"NSIsModEnabled",
"helpText":"",
"returnTypeString":"bool",
"argTypes":"string modName"
},
{
"name":"NSSetModEnabled",
"helpText":"",
"returnTypeString":"void",
"argTypes":"string modName, bool enabled"
},
{
"name":"NSIsModRemote",
"helpText":"",
"returnTypeString":"bool",
"argTypes":"string modName"
},
{
"name":"NSGetModDescriptionByModName",
"name":"NSGetModsInformation",
"helpText":"",
"returnTypeString":"string",
"argTypes":"string modName"
},
{
"name":"NSGetModVersionByModName",
"helpText":"",
"returnTypeString":"string",
"argTypes":"string modName"
"returnTypeString":"array<ModInfo>",
"argTypes":""
},
{
"name":"NSGetModDownloadLinkByModName",
"name":"NSGetModVersions",
"helpText":"",
"returnTypeString":"string",
"returnTypeString":"array<string>",
"argTypes":"string modName"
},
{
"name":"NSGetModLoadPriority",
"name":"NSIsModRequiredOnClient",
"helpText":"",
"returnTypeString":"int",
"returnTypeString":"bool",
"argTypes":"string modName"
},
{
"name":"NSIsModRequiredOnClient",
"name":"NSIsModEnabled",
"helpText":"",
"returnTypeString":"bool",
"argTypes":"string modName"
},
{
"name":"NSGetModConvarsByModName",
"name":"NSSetModEnabled",
"helpText":"",
"returnTypeString":"array<string>",
"argTypes":"string modName"
"returnTypeString":"void",
"argTypes":"string modName, bool enabled"
},
{
"name": "NSFetchVerifiedModsManifesto",
Expand Down
13 changes: 13 additions & 0 deletions Northstar.Client/mod/scripts/vscripts/cl_northstar_client_init.nut
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ global struct UIPresenceStruct {
int gameState
}

global struct ModInfo
{
string name = ""
string description = ""
string version = ""
string downloadLink = ""
int loadPriority = 0
bool enabled = false
bool requiredOnClient = false
bool isRemote
array<string> conVars = []
}

global struct RequiredModInfo
{
string name
Expand Down
Loading
Loading