mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2026-08-26 15:36:35 +00:00
map-check: add T17 mods tag
This commit is contained in:
@@ -20,6 +20,7 @@ export interface Stat {
|
||||
matchers: StatMatcher[]
|
||||
better: StatBetter
|
||||
fromAreaMods?: true
|
||||
fromUberAreaMods?: true
|
||||
fromHeistAreaMods?: true
|
||||
anointments?: Array<{ roll: number, oils: string }> // Ring anointments
|
||||
trade: {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<div class="flex-1 flex items-center px-2 overflow-hidden gap-x-1 whitespace-nowrap">
|
||||
<span v-if="matcher.outdated" :class="[$style['tag'], $style['tag-outdated']]">{{ t('map.mods.outdated') }}</span>
|
||||
<span v-if="matcher.heist" :class="[$style['tag'], $style['tag-heist']]">{{ t('map.mods.heist') }}</span>
|
||||
<span v-if="matcher.uber" :class="[$style['tag'], $style['tag-uber']]">{{ t('map.mods.uber') }}</span>
|
||||
<span class="truncate">{{ matcher.str }}</span>
|
||||
</div>
|
||||
<div class="flex items-baseline gap-x-4" :class="{ [$style['controls-auto-hide']]: !removable }">
|
||||
@@ -114,6 +115,9 @@ export default defineComponent({
|
||||
.tag-heist {
|
||||
@apply bg-red-800;
|
||||
}
|
||||
.tag-uber {
|
||||
@apply bg-purple-600;
|
||||
}
|
||||
.tag-outdated {
|
||||
@apply bg-red-400 text-black;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export interface MapStatMatcher {
|
||||
str: string
|
||||
heist?: boolean
|
||||
uber?: boolean
|
||||
outdated: boolean
|
||||
}
|
||||
|
||||
@@ -40,8 +40,10 @@ import VirtualScroll from '../../ui/VirtualScroll.vue'
|
||||
import type { MapStatMatcher } from './interfaces'
|
||||
|
||||
function statToShowOrder (stat: Omit<MapStatMatcher, 'outdated'>) {
|
||||
if (stat.heist) {
|
||||
if (stat.uber) {
|
||||
return 1
|
||||
} else if (stat.heist) {
|
||||
return 2
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
@@ -61,15 +63,16 @@ export default defineComponent({
|
||||
const widget = computed(() => findWidget<ItemCheckWidget>('item-check', props.config)!)
|
||||
|
||||
const statList = computed(() => {
|
||||
const out: Array<{ str: string, searchStr: string, heist: boolean }> = []
|
||||
const out: Array<{ str: string, searchStr: string, heist: boolean, uber: boolean }> = []
|
||||
for (const stat of STATS_ITERATOR('AreaMods')) {
|
||||
if (!stat.fromAreaMods && !stat.fromHeistAreaMods) continue
|
||||
if (!stat.fromAreaMods && !stat.fromUberAreaMods && !stat.fromHeistAreaMods) continue
|
||||
|
||||
for (const c of stat.matchers) {
|
||||
out.push({
|
||||
str: c.string,
|
||||
searchStr: c.string.toLowerCase(),
|
||||
heist: (stat.fromHeistAreaMods && !stat.fromAreaMods) || false
|
||||
heist: (stat.fromHeistAreaMods && !stat.fromAreaMods) || false,
|
||||
uber: (stat.fromUberAreaMods && !stat.fromAreaMods) || false
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -100,7 +103,7 @@ export default defineComponent({
|
||||
entry.decision[idx] !== '-' &&
|
||||
entry.decision[idx] !== 's' &&
|
||||
STAT_BY_MATCH_STR(entry.matcher) == null)
|
||||
.map(entry => ({ str: entry.matcher, heist: undefined, outdated: true }))
|
||||
.map(entry => ({ str: entry.matcher, heist: undefined, uber: undefined, outdated: true }))
|
||||
})
|
||||
|
||||
const { t } = useI18nNs('map_check')
|
||||
@@ -120,7 +123,7 @@ export default defineComponent({
|
||||
? selectedMatchers.value.has(stat.str)
|
||||
: true)
|
||||
)
|
||||
.map(({ str, heist }) => ({ str, heist, outdated: false }))
|
||||
.map(({ str, heist, uber }) => ({ str, heist, uber, outdated: false }))
|
||||
|
||||
return [
|
||||
...hasOutdatedTranslation.value,
|
||||
|
||||
Reference in New Issue
Block a user