mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 07:05:35 +00:00
Fixes for fragment cannons
This commit is contained in:
@@ -6,6 +6,8 @@
|
|||||||
* Provide damage dealt statistics for both shields and hull
|
* Provide damage dealt statistics for both shields and hull
|
||||||
* Damage dealt panel only shows enabled weapons
|
* Damage dealt panel only shows enabled weapons
|
||||||
* Add engagement range to damage received panel
|
* Add engagement range to damage received panel
|
||||||
|
* Handle burst rate of fire as an absolute number rather than a perentage modification
|
||||||
|
* Ensure that clip values are always rounded up
|
||||||
|
|
||||||
#2.2.10
|
#2.2.10
|
||||||
* Fix detailed export of module reinforcement packages
|
* Fix detailed export of module reinforcement packages
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export default class Modification extends TranslatedComponent {
|
|||||||
let symbol;
|
let symbol;
|
||||||
if (name === 'jitter') {
|
if (name === 'jitter') {
|
||||||
symbol = '°';
|
symbol = '°';
|
||||||
} else if (name !== 'burst') {
|
} else if (name !== 'burst' && name != 'burstrof') {
|
||||||
symbol = '%';
|
symbol = '%';
|
||||||
}
|
}
|
||||||
if (symbol) {
|
if (symbol) {
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ export default class Module {
|
|||||||
if (!modification) {
|
if (!modification) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We store percentages as decimals, so to get them back we need to divide by 10000. Otherwise
|
// We store percentages as decimals, so to get them back we need to divide by 10000. Otherwise
|
||||||
// we divide by 100. Both ways we end up with a value with two decimal places
|
// we divide by 100. Both ways we end up with a value with two decimal places
|
||||||
let modValue;
|
let modValue;
|
||||||
@@ -534,7 +535,10 @@ export default class Module {
|
|||||||
* @return {Number} the clip size of this module
|
* @return {Number} the clip size of this module
|
||||||
*/
|
*/
|
||||||
getClip() {
|
getClip() {
|
||||||
return this._getModifiedValue('clip');
|
// Clip size is always rounded up
|
||||||
|
let result = this._getModifiedValue('clip');
|
||||||
|
if (result) { result = Math.ceil(result) };
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ function _addModifications(module, modifiers, blueprint, grade) {
|
|||||||
// This is an absolute number that acts as an override
|
// This is an absolute number that acts as an override
|
||||||
module.setModValue('burst', modifiers.modifiers[i].value * 100);
|
module.setModValue('burst', modifiers.modifiers[i].value * 100);
|
||||||
} else if (modifiers.modifiers[i].name === 'mod_weapon_burst_rof') {
|
} else if (modifiers.modifiers[i].name === 'mod_weapon_burst_rof') {
|
||||||
// For some reason this is a non-normalised percentage (i.e. 12.23% is 12.23 value rather than 0.1223 as everywhere else), so fix that here
|
// This is an absolute number that acts as an override
|
||||||
module.setModValue('burstrof', modifiers.modifiers[i].value * 100);
|
module.setModValue('burstrof', modifiers.modifiers[i].value * 100);
|
||||||
} else if (modifiers.modifiers[i].name === 'mod_weapon_falloffrange_from_range') {
|
} else if (modifiers.modifiers[i].name === 'mod_weapon_falloffrange_from_range') {
|
||||||
// Obtain the falloff value directly from the range
|
// Obtain the falloff value directly from the range
|
||||||
|
|||||||
Reference in New Issue
Block a user