mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-11 00:33:03 +00:00
Only update relevant modification parameters
This commit is contained in:
@@ -411,6 +411,32 @@ export default class Ship {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all modification values for a module
|
||||
* @param {Number} m The module for which to clear the modifications
|
||||
*/
|
||||
clearModifications(m) {
|
||||
m.mods = {};
|
||||
this.updatePowerGenerated()
|
||||
.updatePowerUsed()
|
||||
.updateJumpStats()
|
||||
.recalculateShield()
|
||||
.recalculateShieldCells()
|
||||
.recalculateArmour()
|
||||
.recalculateDps()
|
||||
.recalculateEps()
|
||||
.recalculateHps()
|
||||
.updateMovement();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear blueprint for a module
|
||||
* @param {Number} m The module for which to clear the modifications
|
||||
*/
|
||||
clearBlueprint(m) {
|
||||
m.blueprint = {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a modification value
|
||||
* @param {Object} m The module to change
|
||||
|
||||
Reference in New Issue
Block a user