Adds import support for fitting window copy. Resolves #91
This requires us to pass an active fit to use as a base for the modules, as the format does not include ship information. Features: * If active fit has modules, makes a new fit using same ship * Does basic dummy checking. As the format doesn't include ship info, it will probably be common for someone to accidentally try to import a Legion fit to a Rifter by mistake. Import logic checks module legality for fit and, if fails, silently halts import without saving.
This commit is contained in:
@@ -744,8 +744,8 @@ class Fit(object):
|
||||
fit.damagePattern = self.pattern
|
||||
return fits
|
||||
|
||||
def importFitFromBuffer(self, buffer):
|
||||
type,fits = eos.types.Fit.importAuto(buffer)
|
||||
def importFitFromBuffer(self, buffer, activeFit=None):
|
||||
type,fits = eos.types.Fit.importAuto(buffer, activeFit=activeFit)
|
||||
for fit in fits:
|
||||
fit.character = self.character
|
||||
fit.damagePattern = self.pattern
|
||||
|
||||
Reference in New Issue
Block a user