Skip to content

Commit

Permalink
Merge pull request #799 from EDCD/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
alex-williams authored Nov 23, 2024
2 parents c3cb2cf + 070bead commit ed6cc49
Show file tree
Hide file tree
Showing 34 changed files with 2,035 additions and 1,538 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## About

The Coriolis project was inspired by [E:D Shipyard](http://www.edshipyard.com/) and, of course, [Elite Dangerous](http://www.elitedangerous.com). The ultimate goal of Coriolis is to provide rich features to support in-game play and planning while engaging the E:D community to support its development.
The Coriolis project was inspired by E:D Shipyard and, of course, [Elite Dangerous](http://www.elitedangerous.com). The ultimate goal of Coriolis is to provide rich features to support in-game play and planning while engaging the E:D community to support its development.

Coriolis was created using assets and imagery from Elite: Dangerous, with the permission of Frontier Developments plc, for non-commercial purposes. It is not endorsed by nor reflects the views or opinions of Frontier Developments and no employee of Frontier Developments was involved in the making of it.

Expand Down
3 changes: 2 additions & 1 deletion src/app/Coriolis.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export default class Coriolis extends React.Component {
this.state = {
noTouch: !('ontouchstart' in window || navigator.msMaxTouchPoints || navigator.maxTouchPoints),
page: null,
announcements: [],
// Announcements must have an expiry date in format "YYYY-MM-DDTHH:MM:SSZ"
announcements: [{expiry: "2024-11-30T00:00:00Z", text: "Mandalay added"}, {expiry: "2024-12-06T00:00:00Z", text: "Concord Cannon added"}, {expiry: "2024-12-08T00:00:00Z", text: "Boost Interval Feature added"}],
language: getLanguage(Persist.getLangCode()),
route: {},
sizeRatio: Persist.getSizeRatio()
Expand Down
44 changes: 36 additions & 8 deletions src/app/components/AvailableModulesMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,18 @@ const GRPCAT = {
'ml': 'lasers',
'c': 'projectiles',
'mc': 'projectiles',
'advmc': 'projectiles',
'axmc': 'experimental',
'axmce': 'experimental',
'ntp': 'experimental',
'fc': 'projectiles',
'rfl': 'experimental',
'pa': 'projectiles',
'rg': 'projectiles',
'mr': 'ordnance',
'amr': 'ordnance',
'axmr': 'experimental',
'axmre': 'experimental',
'rcpl': 'experimental',
'dtl': 'experimental',
'tbsc': 'experimental',
Expand Down Expand Up @@ -104,16 +109,16 @@ const CATEGORIES = {

// Hardpoints
'lasers': ['pl', 'ul', 'bl'],
'projectiles': ['mc', 'c', 'fc', 'pa', 'rg'],
'ordnance': ['mr', 'tp', 'nl'],
'projectiles': ['mc', 'advmc', 'c', 'fc', 'pa', 'rg'],
'ordnance': ['mr', 'amr', 'tp', 'nl'],
// Utilities
'sb': ['sb'],
'hs': ['hs'],
'csl': ['csl'],
'defence': ['ch', 'po', 'ec'],
'scanners': ['sc', 'ss', 'cs', 'kw', 'ws'], // Overloaded with internal scanners
// Experimental
'experimental': ['axmc', 'axmr', 'rfl', 'tbrfl', 'tbsc', 'tbem', 'xs', 'sfn', 'rcpl', 'dtl', 'rsl', 'mahr',],
'experimental': ['axmc', 'axmce', 'axmr', 'axmre', 'ntp','rfl', 'tbrfl', 'tbsc', 'tbem', 'xs', 'sfn', 'rcpl', 'dtl', 'rsl', 'mahr',],
'weapon stabilizers': ['ews'],
// Guardian
'guardian': ['gpp', 'gpd', 'gpc', 'ggc', 'gsrp', 'gfsb', 'ghrp', 'gmrp', 'gsc'],
Expand Down Expand Up @@ -213,16 +218,30 @@ export default class AvailableModulesMenu extends TranslatedComponent {
if (categories.length === 1) {
// Show category header instead of group header
if (m && grp == m.grp) {
list.push(<div ref={(elem) => this.groupElem = elem} key={category}
// If this is a missing module/weapon, skip it
if (m.grp == "mh" || m.grp == "mm"){
continue;
} else {
list.push(<div ref={(elem) => this.groupElem = elem} key={category}
className={'select-category upp'}>{translate(category)}</div>);
}
} else {
list.push(<div key={category} className={'select-category upp'}>{translate(category)}</div>);
if (category == "mh" || category == "mm"){
continue;
} else {
list.push(<div key={category} className={'select-category upp'}>{translate(category)}</div>);
}
}
} else {
// Show category header as well as group header
if (!categoryHeader) {
list.push(<div key={category} className={'select-category upp'}>{translate(category)}</div>);
categoryHeader = true;
if (category == "mh" || category == "mm"){
continue;
}
else {
list.push(<div key={category} className={'select-category upp'}>{translate(category)}</div>);
categoryHeader = true;
}
}
if (m && grp == m.grp) {
list.push(<div ref={(elem) => this.groupElem = elem} key={grp}
Expand All @@ -241,7 +260,11 @@ export default class AvailableModulesMenu extends TranslatedComponent {
} else if (i.mount === 'T') {
mount = 'Turreted';
}
const fuzz = { grp, m: i, name: `${i.class}${i.rating}${mount ? ' ' + mount : ''} ${translate(grp)}` };
let special = '';
if (typeof(i.special) !== 'undefined') {
special = `(${translate(i.special)})`;
}
const fuzz = { grp, m: i, name: `${i.class}${i.rating}${mount ? ' ' + mount : ''} ${translate(grp)} ${translate(special)}` };
fuzzy.push(fuzz);
}
}
Expand Down Expand Up @@ -298,6 +321,11 @@ export default class AvailableModulesMenu extends TranslatedComponent {
let itemsOnThisRow = 0;
for (let i = 0; i < sortedModules.length; i++) {
let m = sortedModules[i];
// If m.grp is mh or mm, or m.symbol contains 'Missing' skip it
if (m.grp == 'mh' || m.grp == 'mm' || (typeof(m.symbol) !== 'undefined' && m.symbol.includes("Missing"))) {
// If this is a missing module, skip it
continue;
}
let mount = null;
let disabled = false;
prevName = m.name;
Expand Down
1 change: 1 addition & 0 deletions src/app/components/HardpointSlot.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export default class HardpointSlot extends Slot {
{showModuleResistances && m.getThermalResistance() ? <div
className='l'>{translate('thermres')}: {formats.pct(m.getThermalResistance())}</div> : null}
{m.getIntegrity() ? <div className='l'>{translate('integrity')}: {formats.int(m.getIntegrity())}</div> : null}
{m.getInfo() ? <div className='l'>{translate(m.getInfo())}</div> : null}
{m && validMods.length > 0 ? <div className='r' tabIndex="0" ref={modButton => this.modButton = modButton}>
<button tabIndex="-1" onClick={this._toggleModifications.bind(this)} onContextMenu={stopCtxPropagation}
onMouseOver={termtip.bind(null, 'modifications')} onMouseOut={tooltip.bind(null, null)}>
Expand Down
5 changes: 3 additions & 2 deletions src/app/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -388,17 +388,18 @@ export default class Header extends TranslatedComponent {
if (this.props.announcements) {
announcements = [];
for (let announce of this.props.announcements) {
if (announce.expiry < Date.now()) {
// Announcement has expired, skip it
if (Date.now() > Date.parse(announce.expiry)) {
continue;
}
// Add announcements which have not expired to the menu
announcements.push(<Announcement text={announce.text} />);
announcements.push(<hr/>);
}
}
return (
<div className='menu-list' onClick={ (e) => e.stopPropagation() } style={{ whiteSpace: 'nowrap' }}>
{announcements}
<hr />
</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions src/app/components/InternalSlot.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export default class InternalSlot extends Slot {
{ m.getHullReinforcement() ? <div className='l'>{translate('armour')}: {formats.int(m.getHullReinforcement() + ship.baseArmour * m.getModValue('hullboost') / 10000)}</div> : null }
{ m.getProtection() ? <div className='l'>{translate('protection')}: {formats.rPct(m.getProtection())}</div> : null }
{ m.getIntegrity() ? <div className='l'>{translate('integrity')}: {formats.int(m.getIntegrity())}</div> : null }
{ m.getInfo() ? <div className='l'>{translate(m.getInfo())}</div> : null }
{ m && validMods.length > 0 ? <div className='r' tabIndex="0" ref={ modButton => this.modButton = modButton }><button tabIndex="-1" onClick={this._toggleModifications.bind(this)} onContextMenu={stopCtxPropagation} onMouseOver={termtip.bind(null, 'modifications')} onMouseOut={tooltip.bind(null, null)}><ListModifications /></button></div> : null }
</div>
</div>;
Expand Down
Loading

0 comments on commit ed6cc49

Please sign in to comment.