diff --git a/ChangeLog.md b/ChangeLog.md index 74664027..ea37576a 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -3,6 +3,7 @@ * Handle display when summary values show thrusters disabled but current mass keeps them enabled * Added updated German translations (thanks to @sweisgerber-dev) * Power state (enabled and priority) now follows modules when they are swapped or copied + * Grey out modules that are powered off to provide a clearer visual indication #2.3.4 * Fix crash when removing the special effect from a module diff --git a/src/app/components/HardpointSlot.jsx b/src/app/components/HardpointSlot.jsx index b10d22df..cc73e03d 100644 --- a/src/app/components/HardpointSlot.jsx +++ b/src/app/components/HardpointSlot.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import cn from 'classnames'; import Slot from './Slot'; import Persist from '../stores/Persist'; import { DamageAbsolute, DamageKinetic, DamageThermal, DamageExplosive, MountFixed, MountGimballed, MountTurret, ListModifications, Modified } from './SvgIcons'; @@ -32,12 +33,13 @@ export default class HardpointSlot extends Slot { /** * Generate the slot contents * @param {Object} m Mounted Module + * @param {Boolean} enabled Slot enabled * @param {Function} translate Translate function * @param {Object} formats Localized Formats map * @param {Object} u Localized Units Map * @return {React.Component} Slot contents */ - _getSlotDetails(m, translate, formats, u) { + _getSlotDetails(m, enabled, translate, formats, u) { if (m) { let classRating = `${m.class}${m.rating}${m.missile ? '/' + m.missile : ''}`; let { drag, drop } = this.props; @@ -60,7 +62,8 @@ export default class HardpointSlot extends Slot { ); } - return