refac: utilGame/getNPCColor

This commit is contained in:
2022-08-26 01:06:43 +09:00
parent 63771da876
commit 8a5a3b67f7
17 changed files with 52 additions and 30 deletions
+3 -2
View File
@@ -3,7 +3,8 @@ import 'bootstrap';
import download from 'downloadjs';
import { unwrap } from "@util/unwrap";
import { isInteger } from 'lodash-es';
import { errUnknown, getNpcColor } from '@/common_legacy';
import { errUnknown } from '@/common_legacy';
import { getNPCColor } from './utilGame';
import { combineArray } from "@util/combineArray";
import { isBrightColor } from "@util/isBrightColor";
import { numberWithCommas } from "@util/numberWithCommas";
@@ -999,7 +1000,7 @@ $(function ($) {
for (const general of generalList) {
const $item = $(`<option value="${general.no}">${general.name}</option>`);
if (general.npc) {
$item.css('color', unwrap(getNpcColor(general.npc)));
$item.css('color', unwrap(getNPCColor(general.npc)));
} else {
$item.css('color', 'white');
}