From e453ff73b75408b28912f652bdc1a99bf9060a39 Mon Sep 17 00:00:00 2001 From: Felix Linker Date: Fri, 14 May 2021 10:22:28 +0200 Subject: [PATCH] Migrate changes to slot-representation --- src/app/components/Slot.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/components/Slot.jsx b/src/app/components/Slot.jsx index 83567d8c..f2a8ae06 100644 --- a/src/app/components/Slot.jsx +++ b/src/app/components/Slot.jsx @@ -9,7 +9,7 @@ import { diffDetails } from '../utils/SlotFunctions'; import { stopCtxPropagation, wrapCtxMenu } from '../utils/UtilityFunctions'; import { blueprintTooltip } from '../utils/BlueprintFunctions'; import { Module } from 'ed-forge'; -import { REG_MILITARY_SLOT, REG_HARDPOINT_SLOT } from 'ed-forge/lib/data/slots'; +import { TYPES } from 'ed-forge/lib/data/slots'; import autoBind from 'auto-bind'; import { toPairs } from 'lodash'; @@ -79,7 +79,7 @@ export default class Slot extends TranslatedComponent { if (m.isEmpty()) { return
{translate( - m.getSlot().match(REG_MILITARY_SLOT) ? 'emptyrestricted' : 'empty' + m.isOnSlot(TYPES.MILITARY) ? 'emptyrestricted' : 'empty' )}
; } else { @@ -174,7 +174,7 @@ export default class Slot extends TranslatedComponent { case size === 0: // This can also happen for armour but that case was handled above return 'U'; - case Boolean(m.getSlot().match(REG_HARDPOINT_SLOT)): + case m.isOnSlot(TYPES.HARDPOINT): return HARDPOINT_SLOT_LABELS[size]; default: return size;