feat(server): add experimental JS/TS mod runtime, hooks, tuning list ops, and isolated mod storage
This commit is contained in:
1 parent
fd9d25d346
commit
aa7a6e7d02
14 files changed
+743
-61
No files matched your search
@@ -5,6 +5,7 @@
|
||||
* (with the modifications the mission support planes' presets need) and the free repair over time (repair/repair-over-time.ts) kept up to date and persisted on
|
||||
* every read or write.
|
||||
*/
|
||||
import type { BlkBlock } from '@wto/blk';
|
||||
import type { AccountStore } from './accounts/account-store.ts';
|
||||
import type { ClanStore } from './clans/clan-store.ts';
|
||||
import type { DatasetCache } from './game-data/datasets/dataset-cache.ts';
|
||||
@@ -50,6 +51,7 @@ export function setUpProfiles(
|
||||
tuning: Tuning,
|
||||
sync?: ProfileSyncContext,
|
||||
vehicles: readonly CatalogueVehicle[] = datasets.load(vehicleCatalogue),
|
||||
onProfileRefresh?: (profile: BlkBlock, userId: string) => void,
|
||||
): ProfileServices {
|
||||
const startingContent: StartingContent = {
|
||||
reserveVehicles: datasets.load(reserveVehicles),
|
||||
@@ -70,6 +72,7 @@ export function setUpProfiles(
|
||||
removeExpiredItems(profile, serverTimeNow());
|
||||
repairVehiclesOverTime(profile, repair, serverTimeNow());
|
||||
trimUserLogs(profile, tuning.limits.userLogsKept);
|
||||
onProfileRefresh?.(profile, userId);
|
||||
});
|
||||
return { profiles, research, equipment, repair };
|
||||
}
|
||||
Reference in new issue
Block a user