Re-enable dps graph again and add some info about how to process inputs and outputs

Real calculation hasn't been transferred yet
This commit is contained in:
DarkPhoenix
2019-06-28 18:56:57 +03:00
parent 428cb5c888
commit 60933a309f
3 changed files with 15 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
# noinspection PyUnresolvedReferences
from gui.builtinGraphs import ( # noqa: E402,F401
# fitDamageStats,
fitDamageStats,
# fitDmgVsTime,
# fitShieldRegenVsShieldPerc,
# fitShieldAmountVsTime,

View File

@@ -18,8 +18,6 @@
# =============================================================================
import math
from .base import FitGraph, XDef, YDef, Input, VectorDef
@@ -27,6 +25,7 @@ class FitDamageStatsGraph(FitGraph):
name = 'Damage Stats'
# UI stuff
@property
def xDefs(self):
return [
@@ -64,5 +63,18 @@ class FitDamageStatsGraph(FitGraph):
def hasTargets(self):
return True
# Calculation stuff
_normalizers = {
('atkSpeed', '%'): lambda v, fit, tgt: v * fit.ship.getModifiedItemAttr('maxVelocity', 0),
('tgtSpeed', '%'): lambda v, fit, tgt: v * tgt.ship.getModifiedItemAttr('maxVelocity', 0),
('tgtSigRad', '%'): lambda v, fit, tgt: v * fit.ship.getModifiedItemAttr('signatureRadius', 0)}
_limiters = {
'time': lambda fit, tgt: (0, 2500)}
_denormalizers = {
('tgtSpeed', '%'): lambda v, fit, tgt: v / tgt.ship.getModifiedItemAttr('maxVelocity', 0),
('tgtSigRad', '%'): lambda v, fit, tgt: v / fit.ship.getModifiedItemAttr('signatureRadius', 0)}
FitDamageStatsGraph.register()