Skip to content
Open
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
5 changes: 1 addition & 4 deletions packages/main/src/modules/GameClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@ export class GameClient implements AppModule {
await this.startJavaProcess({
mainClass: "com.ankamagames.dofusarena.client.DofusArenaClient",
settings: this.currentSettings || undefined,
extraArgs: [
"-ONLY_ALLOWED_TEAM_TAB=1",
"-ONLY_ALLOWED_LADDER_TAB=ONE_VS_ONE",
],
extraArgs: this.currentSettings?.devExtraJavaArgs.split(" ").map(arg => `-${arg}`) ?? [],
});
}

Expand Down
1 change: 1 addition & 0 deletions packages/main/src/modules/GameUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export interface GameSettings {
gameRamAllocation: number;
devModeEnabled: boolean;
devExtraJavaArgs: string;
devGameArgs: string;
devForceVersion: string;
devCdnEnvironment: "production" | "staging";
}
Expand Down
1 change: 1 addition & 0 deletions packages/main/src/services/SettingsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export class SettingsManager {
return {
gameRamAllocation: 2,
devModeEnabled: false,
devGameArgs: "ONLY_ALLOWED_TEAM_TAB=1 ONLY_ALLOWED_LADDER_TAB=ONE_VS_ONE",
devExtraJavaArgs: "",
devForceVersion: "",
devCdnEnvironment: "production",
Expand Down
17 changes: 17 additions & 0 deletions packages/renderer/src/components/SettingsMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,23 @@ export const SettingsMenu: React.FC<SettingsMenuProps> = ({
jeu.
</p>
</div>

<div>
<label className="text-white/80 text-base block mb-2">
Options du jeu (séparés par des espaces)
</label>
<textarea
value={localSettings.devGameArgs}
onChange={(e) =>
updateSetting("devGameArgs", e.target.value)
}
className="w-full px-3 py-2 bg-white/5 border border-white/20 rounded-md text-white placeholder-white/40 h-24 resize-none"
placeholder="valid options: CONFIGURATION_FILE,DEV_MODE,HOT_RELOAD_EFFECT,NO_CAMERA_MIN_ZOOM,NO_CLASS_RESTRICTION,ONLY_ALLOWED_LADDER_TAB,ONLY_ALLOWED_TEAM_TAB,REPLAY_FILE_PATH,SKIP_TURN_NO_DELAY,WORLD_FADE"
/>
<p className="text-white/60 text-sm mt-1">
Arguments additionnels passés au jeu.
</p>
</div>
</CardContent>
</Card>
)}
Expand Down
1 change: 1 addition & 0 deletions packages/renderer/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export interface SettingsState {
// Developer mode
devModeEnabled: boolean;
devExtraJavaArgs: string;
devGameArgs: string;
devForceVersion: string;
devCdnEnvironment: "production" | "staging";
}
Expand Down
1 change: 1 addition & 0 deletions packages/renderer/src/vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ interface GameSettings {
gameRamAllocation: number;
devModeEnabled: boolean;
devExtraJavaArgs: string;
devGameArgs: string;
devForceVersion: string;
devCdnEnvironment: "production" | "staging";
}
Expand Down
Loading