Skip to content

Commit

Permalink
Merge pull request #383 from CactusPuppy/alive-workshop
Browse files Browse the repository at this point in the history
fix: remove unneeded game mode settings check
  • Loading branch information
CactusPuppy authored Nov 5, 2024
2 parents 42cc4a1 + 6a8c91b commit d1634db
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
"syntaxes/**",
"LICENSE{,.txt}",
"customGameSettingsSchema.json",
"language-configuration.json",
"decompilerui.html"
"language-configuration.json"
],
"contributes": {
"configuration": {
Expand Down
4 changes: 0 additions & 4 deletions src/compiler/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,6 @@ export function compileCustomGameSettings(customGameSettings: Record<string, any
error("The gamemode '" + gamemode + "' is not available in OW2");
}
}
if (["control", "escort", "flashpoint", "hybrid", "push"].includes(gamemode)) {
warn("w_dead_workshop", "The gamemode '" + gamemode + "' cannot be enabled from pasted settings and has been removed from the settings.");
continue;
}
var wsGamemode = tows(gamemode, customGameSettingsSchema.gamemodes.values);
var isGamemodeEnabled = true;
if ("enabled" in customGameSettings.gamemodes[gamemode] && customGameSettings.gamemodes[gamemode].enabled === false) {
Expand Down
6 changes: 6 additions & 0 deletions src/tests/customGameSettings.opy
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ settings {
],
"captureSpeed%": 60
},
"escort": {
"enabledMaps": [
"dorado"
],
"payloadSpeed%": 200
},
"general": {
"gamemodeStartTrigger": "manual",
"heroLimit": "off",
Expand Down
8 changes: 8 additions & 0 deletions src/tests/results/customGameSettings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ settings
}
Capture Speed Modifier: 60%
}
Escort
{
enabled maps
{
Dorado
}
Payload Speed Modifier: 200%
}
General
{
Game Mode Start: Manual
Expand Down

0 comments on commit d1634db

Please sign in to comment.