mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 22:33:24 +00:00
Handle different specials for dumbfire and seeker missiles
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
* Ensure comparisons with saved stock ships work correctly
|
||||
* Add 'Racer' role
|
||||
* Tidy up shipyard page; remove units from data columns and re-order for legibility
|
||||
* Allow basic drag/drop functionality in Edge/Internet Explorer 11 browser
|
||||
* Provide separate special effects for dumbfire and seeker missiles
|
||||
|
||||
#2.3.3
|
||||
* Remove unused blueprint when hitting reset
|
||||
|
||||
@@ -88,10 +88,11 @@ export default class ModificationsMenu extends TranslatedComponent {
|
||||
const translate = language.translate;
|
||||
|
||||
const specials = [];
|
||||
if (Modifications.modules[m.grp].specials && Modifications.modules[m.grp].specials.length > 0) {
|
||||
const specialsId = m.missile ? 'specials_' + m.missile : 'specials';
|
||||
if (Modifications.modules[m.grp][specialsId] && Modifications.modules[m.grp][specialsId].length > 0) {
|
||||
const close = this._specialSelected.bind(this, null);
|
||||
specials.push(<div style={{ cursor: 'pointer' }} key={ 'none' } onClick={ close }>{translate('PHRASE_NO_SPECIAL')}</div>);
|
||||
for (const specialName of Modifications.modules[m.grp].specials) {
|
||||
for (const specialName of Modifications.modules[m.grp][specialsId]) {
|
||||
const close = this._specialSelected.bind(this, specialName);
|
||||
specials.push(<div style={{ cursor: 'pointer' }} key={ specialName } onClick={ close }>{translate(Modifications.specials[specialName].name)}</div>);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user