-
Notifications
You must be signed in to change notification settings - Fork 89
Campaigns: Use game data from local git repo #562
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
Open
sorenmarkert
wants to merge
28
commits into
beyond-all-reason:master
Choose a base branch
from
sorenmarkert:campaigns/use-game-data
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
d4c8b7b
Initial commit of a campaign system
Hectate 68d251a
Read campaign and mission data from game files in local git repo
27da658
Update mission model
sorenmarkert fded305
Add mission Launch button with difficulty selection and startscript g…
sorenmarkert f7a8d4f
Add missionOptions to modoptions
sorenmarkert a4e5ac9
Add difficulty settings to campaign, missions can override
sorenmarkert ef42ee1
Add disableInitialCommanderSpawn and disableFactionPicker
sorenmarkert f82e19d
Adjust for changed folder structure
sorenmarkert e693ad1
Refactoring: extract and reuse
sorenmarkert 26be7fc
Refactoring: extract and reuse, and no more 'as any'
sorenmarkert 5259f74
Formatting
sorenmarkert 368deb2
Formatting
sorenmarkert 0f2dcf6
Review comment by Hectate: undo changed imports
sorenmarkert bb6d223
Add comment
sorenmarkert a79d814
Review comment by p2004a: reverts, fix duplicates.
sorenmarkert 3598fd1
Review comment by p2004a: reverts
sorenmarkert ac163e5
.vite ignore, and formatting
sorenmarkert 2a24b00
Review comment by p2004a: no reading game files outside game-content.ts
sorenmarkert 85a04a8
Review comment by p2004a: Convert campaign files to JSON format with …
sorenmarkert 4c21b8e
Review comment by p2004a: Update campaign schema and generate model c…
sorenmarkert a937f9a
formatting and license
sorenmarkert a792da2
erroneous license
sorenmarkert e595e1b
Fix typecheck
sorenmarkert 8fa2cce
Merge branch 'master' into campaigns/use-game-data
sorenmarkert 9634c67
Minor fixes
sorenmarkert 69b3dfa
Add `mission-script-converter.spec.ts`
sorenmarkert 363e530
Replace logger from main with console.log
sorenmarkert e489ff3
Make mission list scrollable
sorenmarkert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // SPDX-FileCopyrightText: 2025 The BAR Lobby Authors | ||
| // | ||
| // SPDX-License-Identifier: MIT | ||
|
|
||
| import type { CampaignDefinition } from "@main/content/game/generated/campaign"; | ||
| import type { MissionModel } from "@main/content/game/mission"; | ||
|
|
||
| /** Difficulty settings as defined in a campaign file. */ | ||
| export type CampaignDifficulty = CampaignDefinition["difficulties"][string]; | ||
|
|
||
| /** | ||
| * Campaign as returned to the lobby: extends the schema-validated {@link CampaignDefinition} | ||
| * with local-cache paths for images and runtime-populated fields. | ||
| */ | ||
| export type CampaignModel = CampaignDefinition & { | ||
| /** Whether this campaign is currently unlocked (from app state, not from the campaign file). */ | ||
| unlocked?: boolean; | ||
| /** Runtime-populated map of missionId to MissionModel. */ | ||
| missions: Record<string, MissionModel>; | ||
| }; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.