Skip to content
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

feat(GUI): enable race seed button for dev with spoiler log lock #2311

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions GUI/src/app/pages/generator/generator.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,10 @@ <h3>{{section.text}}</h3>
<input class="footerInputShort" nbInput type="text" maxlength="260" fieldSize="small" [(ngModel)]="seedString">
<!--Padding-->
<div class="tabsetPadding"></div>
<!--Release Versions Only-->
<ng-container *ngIf="global.getGlobalVar('webIsMasterVersion')">
<ng-container>
<button class="footerGenerateButtonNormalSmall" nbButton status="success" [disabled]="!generateSeedButtonEnabled" (click)="generateSeed()">Generate Seed!</button>
<button class="footerGenerateButtonRaceSmall" nbButton status="info" [disabled]="!generateSeedButtonEnabled" (click)="generateSeed(false, true)">Generate Race Seed!</button>
</ng-container>
<!--Dev Version-->
<ng-container *ngIf="!global.getGlobalVar('webIsMasterVersion')">
<button class="footerGenerateButton" nbButton fullWidth status="success" [disabled]="!generateSeedButtonEnabled" (click)="generateSeed()">Generate Seed!</button>
</ng-container>
</ng-container>
</nb-tab>
<nb-tab [tabTitle]="generateFromFileTabTitle" [active]="global.getGlobalVar('appType') !== 'generator'">
Expand Down
10 changes: 9 additions & 1 deletion GUI/src/app/providers/GUIGlobal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1506,9 +1506,17 @@ export class GUIGlobal implements OnDestroy {
}

if (raceSeed) {
let masterVersion = this.getGlobalVar("webIsMasterVersion");

useStaticSeed = ""; //Static seeds aren't allowed in race mode
settingsFile["create_spoiler"] = true; //Force spoiler mode to on
settingsFile["encrypt"] = true;

if (masterVersion) {
settingsFile["encrypt"] = true;
}
else {
settingsFile["web_lock"] = true; //This is filtered out by the web endpoint before generation
}
}
else {
delete settingsFile["encrypt"];
Expand Down
Loading