Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit 1fd94e2

Browse files
committed
Support skipping the impact crater
1 parent 15052bf commit 1fd94e2

File tree

8 files changed

+26
-3
lines changed

8 files changed

+26
-3
lines changed

src/client/src/app/services/randomizer.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export class RandomizerService {
2929
skipFrigate: [this.DEFAULT_SETTINGS.skipFrigate],
3030
skipHudPopups: [this.DEFAULT_SETTINGS.skipHudPopups],
3131
hideItemModels: [this.DEFAULT_SETTINGS.hideItemModels],
32-
enableMainPlazaLedgeDoor: [this.DEFAULT_SETTINGS.enableMainPlazaLedgeDoor]
32+
enableMainPlazaLedgeDoor: [this.DEFAULT_SETTINGS.enableMainPlazaLedgeDoor],
33+
skipImpactCrater: [this.DEFAULT_SETTINGS.skipImpactCrater]
3334
}),
3435
rules: fb.group({
3536
goal: [this.DEFAULT_SETTINGS.goal],

src/client/src/app/settings/read-only-settings-container/read-only-settings-container.component.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ <h1 class="title has-bottom-border">ROM Settings</h1>
1717
<p class="heading">{{ getDisplayName('enableMainPlazaLedgeDoor') }}</p>
1818
<p>{{ getValue('enableMainPlazaLedgeDoor', 'romSettings') }}</p>
1919
</div>
20+
<div class="field">
21+
<p class="heading">{{ getDisplayName('skipImpactCrater') }}</p>
22+
<p>{{ getValue('skipImpactCrater', 'romSettings') }}</p>
23+
</div>
2024
</div>
2125
<div class="column">
2226
<h1 class="title has-bottom-border">Rules</h1>

src/client/src/app/settings/rom-settings/rom-settings.component.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,12 @@
2828
[pTooltip]="DETAILS.enableMainPlazaLedgeDoor.description">{{ getDisplayName('enableMainPlazaLedgeDoor') }}</label>
2929
</div>
3030
</div>
31+
<div class="column is-one-third">
32+
<div class="field">
33+
<input class="is-checkradio" id="skipImpactCrater" type="checkbox" formControlName="skipImpactCrater">
34+
<label for="skipImpactCrater"
35+
[pTooltip]="DETAILS.skipImpactCrater.description">{{ getDisplayName('skipImpactCrater') }}</label>
36+
</div>
37+
</div>
3138
</div>
3239
</form>

src/common/data/settingsDetails.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ export const details: SettingsDetails = {
3535
name: 'Enable Main Plaza Ledge Door',
3636
description: `This door is normally disabled from the Main Plaza side. This option enables it in the patcher, allowing for additional routing options.`,
3737
},
38+
skipImpactCrater: {
39+
name: 'Skip Impact Crater',
40+
description: `Changes the Artifact Temple portal to go directly to the credits, skipping the Impact Crater and Metroid Prime boss fights.`,
41+
},
3842
goal: {
3943
name: 'Goal',
4044
description: `This sets the requirements to access the Meta Ridley fight, and by extension the Impact Crater.

src/common/models/randomizerForm.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export interface RandomizerForm {
88
skipHudPopups: boolean;
99
hideItemModels: boolean;
1010
enableMainPlazaLedgeDoor: boolean;
11+
skipImpactCrater: boolean;
1112
};
1213
rules: {
1314
goal: string;

src/electron/controllers/patcherController.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ function getPatcherConfig(world: PrimeWorld, form: PatchForm): PatcherConfigurat
101101
comment: randomizerComment,
102102
main_menu_message: 'Seed Hash:\n' + seedHashAsString(world) + '\n\n' + 'Randomizer v' + version,
103103
auto_enabled_elevators: !startingWithScanVisor,
104-
enable_vault_ledge_door: world.getSettings().enableMainPlazaLedgeDoor
104+
enable_vault_ledge_door: world.getSettings().enableMainPlazaLedgeDoor,
105+
skip_impact_crater: world.getSettings().skipImpactCrater
105106
};
106107
}
107108

src/electron/models/prime/patcher.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export interface PatcherConfiguration {
1717
main_menu_message: string;
1818
auto_enabled_elevators: boolean;
1919
enable_vault_ledge_door: boolean;
20+
skip_impact_crater: boolean;
2021
}
2122

2223
export function runRandomprimePatcher(config: PatcherConfiguration, callback: (message: string) => void): void {

src/electron/models/prime/randomizerSettings.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export interface PrimeRandomizerSettingsArgs extends RandomizerSettingsArgs {
2525
skipHudPopups?: boolean;
2626
hideItemModels?: boolean;
2727
enableMainPlazaLedgeDoor?: boolean;
28+
skipImpactCrater?: boolean;
2829
goal?: string;
2930
goalArtifacts?: number;
3031
artifactLocationHints?: boolean;
@@ -48,6 +49,7 @@ export class PrimeRandomizerSettings extends RandomizerSettings {
4849
skipHudPopups: boolean = true;
4950
hideItemModels: boolean = false;
5051
enableMainPlazaLedgeDoor = false;
52+
skipImpactCrater = false;
5153
goal: string = 'artifact-collection';
5254
goalArtifacts: number = 12;
5355
artifactLocationHints: boolean = true;
@@ -164,7 +166,8 @@ export class PrimeRandomizerSettings extends RandomizerSettings {
164166
skipFrigate: this.skipFrigate,
165167
skipHudPopups: this.skipHudPopups,
166168
hideItemModels: this.hideItemModels,
167-
enableMainPlazaLedgeDoor: this.enableMainPlazaLedgeDoor
169+
enableMainPlazaLedgeDoor: this.enableMainPlazaLedgeDoor,
170+
skipImpactCrater: this.skipImpactCrater
168171
},
169172
rules: {
170173
goal: this.goal,
@@ -296,6 +299,7 @@ export const settings = [
296299
new Checkbox({ name: 'skipFrigate', shared: true, default: true }),
297300
new Checkbox({ name: 'skipHudPopups', shared: true, default: true }),
298301
new Checkbox({ name: 'enableMainPlazaLedgeDoor', shared: true, default: false }),
302+
new Checkbox({ name: 'skipImpactCrater', shared: true, default: false }),
299303
new Checkbox({ name: 'hideItemModels', shared: true, default: false }),
300304
new SelectOption({
301305
name: 'goal',

0 commit comments

Comments
 (0)