mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-07-13 07:25:07 +00:00
improve mission select ordering
This commit is contained in:
parent
1ef4231c11
commit
1b3ff5ff00
14 changed files with 82 additions and 50 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { getResourceList } from "../manifest";
|
||||
import { useControls, useDebug, useSettings } from "./SettingsProvider";
|
||||
import orderBy from "lodash.orderby";
|
||||
|
||||
const excludeMissions = new Set([
|
||||
"SkiFree",
|
||||
|
|
@ -7,11 +8,15 @@ const excludeMissions = new Set([
|
|||
"SkiFree_Randomizer",
|
||||
]);
|
||||
|
||||
const missions = getResourceList()
|
||||
.map((resourcePath) => resourcePath.match(/^missions\/(.+)\.mis$/))
|
||||
.filter(Boolean)
|
||||
.map((match) => match[1])
|
||||
.filter((name) => !excludeMissions.has(name));
|
||||
const missions = orderBy(
|
||||
getResourceList()
|
||||
.map((resourcePath) => resourcePath.match(/^missions\/(.+)\.mis$/))
|
||||
.filter(Boolean)
|
||||
.map((match) => match[1])
|
||||
.filter((name) => !excludeMissions.has(name)),
|
||||
[(name) => name.toLowerCase().replace(/_/g, " ")],
|
||||
["asc"]
|
||||
);
|
||||
|
||||
export function InspectorControls({
|
||||
missionName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue