mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 14:45:35 +00:00
Clamp modification values to -50k and 50k
This commit is contained in:
@@ -40,6 +40,7 @@ export default class Modification extends TranslatedComponent {
|
||||
*/
|
||||
_updateValue(value) {
|
||||
let { m, name, ship } = this.props;
|
||||
value = Math.max(Math.min(value, 50000), -50000);
|
||||
ship.setModification(m, name, value, true, true);
|
||||
this.setState({ value });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user