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

Merged
merged 15 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 11 additions & 137 deletions .github/nativefuncs.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,17 @@
"argTypes":""
},
{
"name":"NSIsModEnabled",
"name":"NSGetModsInformation",
"helpText":"",
"returnTypeString":"bool",
"argTypes":"string modName"
"returnTypeString":"array<ModInfo>",
"argTypes":""
},
{
"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",
"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 @@ -260,60 +218,12 @@
"returnTypeString":"array<string>",
"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",
"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 +377,22 @@
"argTypes":""
},
{
"name":"NSIsModEnabled",
"helpText":"",
"returnTypeString":"bool",
"argTypes":"string modName"
},
{
"name":"NSSetModEnabled",
"helpText":"",
"returnTypeString":"void",
"argTypes":"string modName, bool enabled"
},
{
"name":"NSIsModRemote",
"name":"NSGetModsInformation",
"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"
"returnTypeString":"array<ModInfo>",
"argTypes":""
},
{
"name":"NSIsModRequiredOnClient",
"name":"NSGetModInformation",
"helpText":"",
"returnTypeString":"bool",
"returnTypeString":"array<ModInfo>",
"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