Add classic items and fix initial showcase responses

Store and activate boosters, personal discounts, wagers, and universal
spares. Apply active personal discounts when pricing vehicle purchases.
Return the server time and default fields for every showcase type.

Add developer commands for inspecting game logs, strings, references,
callers, and disassembly.
This commit is contained in:
N0VAN0M4LY committed 2026-11-25 04:17:34 +08:00
1 parent 76670121a9
commit ae6958f291
21 files changed
+880 -35

No files matched your search

+5 -1
View File
@@ -1,7 +1,8 @@
/**
* Assemble the players' profiles with the rules they depend on, the same way for the local
* service and for the save editor (save-cli.ts): static data from the dataset cache, the
* save store with its format upgrades, and the research and modification state kept up to date.
* save store with its format upgrades, and the research and modification state kept up to date
* (expired classic items removed).
*/
import type { DatasetCache } from './game-data/datasets/dataset-cache.ts';
import { reserveVehicles } from './game-data/datasets/reserve-vehicles.ts';
@@ -11,6 +12,8 @@ import { PlayerProfiles } from './profile/player-profiles.ts';
import { profileUpgrades } from './profile/profile-upgrades.ts';
import type { StartingContent } from './profile/starting-content.ts';
import { refreshModuleState } from './modifications/module-state.ts';
import { removeExpiredItems } from './items/item-expiry.ts';
import { serverTimeNow } from './profile/server-time.ts';
import { refreshResearchState } from './research/research-state.ts';
import { loadResearchRules, type ResearchRules } from './research/research-rules.ts';
import { SaveStore } from './saves/save-store.ts';
@@ -27,6 +30,7 @@ export function setUpProfiles(dataFolder: string, gameFiles: GameFiles, datasets
const profiles = new PlayerProfiles(saves, gameFiles, startingContent, (profile) => {
refreshResearchState(profile, research);
refreshModuleState(profile, research.equipment);
removeExpiredItems(profile, serverTimeNow());
});
return { profiles, research };
}