Built in modding support wip

This commit is contained in:
Lncvrt committed 2026-03-13 17:08:53 -07:00
1 parent 1d4f274f58
commit 46f8c45f53
3 files changed
+13 -1

No files matched your search

+2 -1
View File
@@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/ -- https://www.phpmyadmin.net/
-- --
-- Host: localhost -- Host: localhost
-- Generation Time: Feb 27, 2026 at 06:09 AM -- Generation Time: Mar 14, 2026 at 12:08 AM
-- Server version: 11.8.6-MariaDB-log -- Server version: 11.8.6-MariaDB-log
-- PHP Version: 8.5.3 -- PHP Version: 8.5.3
@@ -78,6 +78,7 @@ CREATE TABLE `launcherversionmanifest` (
`versionName` text NOT NULL, `versionName` text NOT NULL,
`downloads` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}', `downloads` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}',
`executables` text NOT NULL DEFAULT '[]', `executables` text NOT NULL DEFAULT '[]',
`modSupportDownloads` text NOT NULL DEFAULT '{}',
`releaseDate` bigint(20) NOT NULL, `releaseDate` bigint(20) NOT NULL,
`hidden` tinyint(1) NOT NULL DEFAULT 1, `hidden` tinyint(1) NOT NULL DEFAULT 1,
`game` bigint(20) NOT NULL DEFAULT 0, `game` bigint(20) NOT NULL DEFAULT 0,
+1
View File
@@ -57,6 +57,7 @@ export const launcherVersionManifest = mysqlTable('launcherversionmanifest', {
versionName: text('versionName').notNull(), versionName: text('versionName').notNull(),
downloads: text('downloads').default('{}').notNull(), downloads: text('downloads').default('{}').notNull(),
executables: text('executables').default('[]').notNull(), executables: text('executables').default('[]').notNull(),
modSupportDownloads: text('modSupportDownloads').default('{}').notNull(),
releaseDate: bigint('releaseDate', { mode: 'number' }).notNull(), releaseDate: bigint('releaseDate', { mode: 'number' }).notNull(),
hidden: boolean('hidden').default(false).notNull(), hidden: boolean('hidden').default(false).notNull(),
game: bigint('game', { mode: 'number' }) game: bigint('game', { mode: 'number' })
+10
View File
@@ -93,6 +93,7 @@ export const handler = async (context: Context) => {
versionName: launcherVersionManifest.versionName, versionName: launcherVersionManifest.versionName,
downloads: launcherVersionManifest.downloads, downloads: launcherVersionManifest.downloads,
executables: launcherVersionManifest.executables, executables: launcherVersionManifest.executables,
modSupportDownloads: launcherVersionManifest.modSupportDownloads,
place: launcherVersionManifest.place, place: launcherVersionManifest.place,
changelog: launcherVersionManifest.changelog, changelog: launcherVersionManifest.changelog,
category: launcherVersionManifest.category, category: launcherVersionManifest.category,
@@ -117,6 +118,9 @@ export const handler = async (context: Context) => {
.map(v => { .map(v => {
const downloads: Record<string, number> = JSON.parse(v.downloads) const downloads: Record<string, number> = JSON.parse(v.downloads)
const executables: (string | null)[] = JSON.parse(v.executables) const executables: (string | null)[] = JSON.parse(v.executables)
const modSupportDownload: Record<string, number> = JSON.parse(
v.modSupportDownloads
)
let download: string | undefined = undefined let download: string | undefined = undefined
let executable: string | null | undefined = undefined let executable: string | null | undefined = undefined
@@ -139,11 +143,17 @@ export const handler = async (context: Context) => {
executables: platformsToShow ? undefined : executables, executables: platformsToShow ? undefined : executables,
executable: platformsToShow ? executable : undefined, executable: platformsToShow ? executable : undefined,
downloads: platformsToShow ? undefined : downloads, downloads: platformsToShow ? undefined : downloads,
modSupportDownloads: platformsToShow ? undefined : modSupportDownload,
download: platformsToShow download: platformsToShow
? download ? download
? downloads[download] ? downloads[download]
: undefined : undefined
: undefined, : undefined,
modSupportDownload: platformsToShow
? download
? modSupportDownload[download]
: undefined
: undefined,
wine: wine:
platformsToShow && platformsToShow &&
platform == 'linux' && platform == 'linux' &&