refac: utilGame/getNPCColor
This commit is contained in:
@@ -55,7 +55,7 @@ import {
|
||||
type procNationItem,
|
||||
type procNationList,
|
||||
} from "../processingRes";
|
||||
import { getNpcColor } from "@/common_legacy";
|
||||
import { getNPCColor } from "@/utilGame";
|
||||
|
||||
const commandName = staticValues.commandName;
|
||||
const searchable = getProcSearchable();
|
||||
@@ -63,7 +63,7 @@ const generalList = ref<procGeneralList>([]);
|
||||
const selectedGeneralID = ref(0);
|
||||
|
||||
function textHelpGeneral(gen: procGeneralItem): string {
|
||||
const nameColor = getNpcColor(gen.npc);
|
||||
const nameColor = getNPCColor(gen.npc);
|
||||
const name = nameColor ? `<span style="color:${nameColor}">${gen.name}</span>` : gen.name;
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ import {
|
||||
type procGeneralKey,
|
||||
type procGeneralRawItemList,
|
||||
} from "../processingRes";
|
||||
import { getNpcColor } from "@/common_legacy";
|
||||
import { getNPCColor } from "@/utilGame";
|
||||
|
||||
const commandName = staticValues.commandName;
|
||||
const searchable = getProcSearchable();
|
||||
@@ -64,7 +64,7 @@ const generalList = convertGeneralList(procRes.generalsKey, procRes.generals);
|
||||
const selectedGeneralID = ref(generalList[0].no);
|
||||
|
||||
function textHelpGeneral(gen: procGeneralItem): string {
|
||||
const nameColor = getNpcColor(gen.npc);
|
||||
const nameColor = getNPCColor(gen.npc);
|
||||
const name = nameColor ? `<span style="color:${nameColor}">${gen.name}</span>` : gen.name;
|
||||
return `${name} (${gen.leadership}/${gen.strength}/${gen.intel})`;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ import {
|
||||
type procNationItem,
|
||||
type procNationList,
|
||||
} from "../processingRes";
|
||||
import { getNpcColor } from "@/common_legacy";
|
||||
import { getNPCColor } from "@/utilGame";
|
||||
import { isBrightColor } from "@/util/isBrightColor";
|
||||
|
||||
const commandName = staticValues.commandName;
|
||||
@@ -106,7 +106,7 @@ const toggleZoom = ref(true);
|
||||
const selectedGeneralID = ref(generalList[0].no);
|
||||
|
||||
function textHelpGeneral(gen: procGeneralItem): string {
|
||||
const nameColor = getNpcColor(gen.npc);
|
||||
const nameColor = getNPCColor(gen.npc);
|
||||
const name = nameColor ? `<span style="color:${nameColor}">${gen.name}</span>` : gen.name;
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ import {
|
||||
type procGeneralRawItemList,
|
||||
type procTroopList,
|
||||
} from "../processingRes";
|
||||
import { getNpcColor } from "@/common_legacy";
|
||||
import { getNPCColor } from "@/utilGame";
|
||||
import type { MapResult } from '@/defs';
|
||||
import { SammoAPI } from '@/SammoAPI';
|
||||
import { getGameConstStore, type GameConstStore } from '@/GameConstStore';
|
||||
@@ -159,7 +159,7 @@ function textHelpGeneral(gen: procGeneralItem): string {
|
||||
|
||||
return `,<span style="text-decoration: underline;">${troopName}</span>`;
|
||||
})();
|
||||
const nameColor = getNpcColor(gen.npc);
|
||||
const nameColor = getNPCColor(gen.npc);
|
||||
const name = nameColor ? `<span style="color:${nameColor}">${gen.name}</span>` : gen.name;
|
||||
return `${name} [${citiesMap.value.get(unwrap(gen.cityID))?.name}${troops}] (${gen.leadership}/${gen.strength}/${
|
||||
gen.intel
|
||||
|
||||
@@ -70,7 +70,7 @@ import {
|
||||
type procGeneralKey,
|
||||
type procGeneralRawItemList,
|
||||
} from "./processingRes";
|
||||
import { getNpcColor } from "@/common_legacy";
|
||||
import { getNPCColor } from "@/utilGame";
|
||||
|
||||
const citiesMap = ref(new Map<
|
||||
number,
|
||||
@@ -90,7 +90,7 @@ const isGold = ref(true);
|
||||
const selectedGeneralID = ref(generalList[0].no);
|
||||
|
||||
function textHelpGeneral(gen: procGeneralItem): string {
|
||||
const nameColor = getNpcColor(gen.npc);
|
||||
const nameColor = getNPCColor(gen.npc);
|
||||
const name = nameColor ? `<span style="color:${nameColor}">${gen.name}</span>` : gen.name;
|
||||
return `${name} (금${unwrap(gen.gold).toLocaleString()}/쌀${unwrap(gen.rice).toLocaleString()}) (${gen.leadership}/${
|
||||
gen.strength
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</v-multiselect>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getNpcColor } from "@/common_legacy";
|
||||
import { getNPCColor } from "@/utilGame";
|
||||
import { convertSearch초성 } from "@/util/convertSearch초성";
|
||||
import { isBrightColor } from "@/util/isBrightColor";
|
||||
import { unwrap } from "@/util/unwrap";
|
||||
@@ -143,7 +143,7 @@ watch(
|
||||
}
|
||||
}
|
||||
|
||||
const nameColor = getNpcColor(gen.npc);
|
||||
const nameColor = getNPCColor(gen.npc);
|
||||
const name = nameColor ? `<span style="color:${nameColor}">${gen.name}</span>` : gen.name;
|
||||
|
||||
const searchText = convertSearch초성(gen.name);
|
||||
|
||||
Reference in New Issue
Block a user