Skip to content

Commit

Permalink
- Account for if someone has latest data but not latest bridge
Browse files Browse the repository at this point in the history
Incase there's a new toggle
  • Loading branch information
Xterionix committed Sep 19, 2023
1 parent 7039423 commit 74b7aff
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,22 @@ export function compileCondition(condition: string) {
}

export function compileSingleCondition(condition: any) {

const conditions: string[] = [
"$format_version",
"$project_target_version",
"$holiday_creator_features",
"$custom_biomes",
"$upcoming_creator_features",
"$scripting",
"$molang_features",
"$experimental_cameras"
]

let [v1, operator, v2] = condition.split(/\s+/)

if (!conditions.includes(v1)) return false;

if (v1 === '$format_version') v1 = getFormatVersion()
if (v2 === '$format_version') v2 = getFormatVersion()
if (v1 === '$project_target_version')
Expand Down

0 comments on commit 74b7aff

Please sign in to comment.