Built in modding support wip
This commit is contained in:
3 files changed
+13
-1
No files matched your search
@@ -57,6 +57,7 @@ export const launcherVersionManifest = mysqlTable('launcherversionmanifest', {
|
||||
versionName: text('versionName').notNull(),
|
||||
downloads: text('downloads').default('{}').notNull(),
|
||||
executables: text('executables').default('[]').notNull(),
|
||||
modSupportDownloads: text('modSupportDownloads').default('{}').notNull(),
|
||||
releaseDate: bigint('releaseDate', { mode: 'number' }).notNull(),
|
||||
hidden: boolean('hidden').default(false).notNull(),
|
||||
game: bigint('game', { mode: 'number' })
|
||||
|
||||
@@ -93,6 +93,7 @@ export const handler = async (context: Context) => {
|
||||
versionName: launcherVersionManifest.versionName,
|
||||
downloads: launcherVersionManifest.downloads,
|
||||
executables: launcherVersionManifest.executables,
|
||||
modSupportDownloads: launcherVersionManifest.modSupportDownloads,
|
||||
place: launcherVersionManifest.place,
|
||||
changelog: launcherVersionManifest.changelog,
|
||||
category: launcherVersionManifest.category,
|
||||
@@ -117,6 +118,9 @@ export const handler = async (context: Context) => {
|
||||
.map(v => {
|
||||
const downloads: Record<string, number> = JSON.parse(v.downloads)
|
||||
const executables: (string | null)[] = JSON.parse(v.executables)
|
||||
const modSupportDownload: Record<string, number> = JSON.parse(
|
||||
v.modSupportDownloads
|
||||
)
|
||||
|
||||
let download: string | undefined = undefined
|
||||
let executable: string | null | undefined = undefined
|
||||
@@ -139,11 +143,17 @@ export const handler = async (context: Context) => {
|
||||
executables: platformsToShow ? undefined : executables,
|
||||
executable: platformsToShow ? executable : undefined,
|
||||
downloads: platformsToShow ? undefined : downloads,
|
||||
modSupportDownloads: platformsToShow ? undefined : modSupportDownload,
|
||||
download: platformsToShow
|
||||
? download
|
||||
? downloads[download]
|
||||
: undefined
|
||||
: undefined,
|
||||
modSupportDownload: platformsToShow
|
||||
? download
|
||||
? modSupportDownload[download]
|
||||
: undefined
|
||||
: undefined,
|
||||
wine:
|
||||
platformsToShow &&
|
||||
platform == 'linux' &&
|
||||
|
||||
Reference in new issue
Block a user