Continue work on projections (adding/removing projected environment and fit)

This commit is contained in:
Ryan Holmes
2018-08-10 12:47:51 -04:00
parent d6b280d3cc
commit bd975becf1
9 changed files with 287 additions and 6 deletions

View File

@@ -132,7 +132,7 @@ class CommandFit(object):
)
es_Fit._Fit__projectedFits = association_proxy(
es_Fit.projectedFitDict = association_proxy(
"victimOf", # look at the victimOf association...
"source_fit", # .. and return the source fits
creator=lambda sourceID, source_fit: ProjectedFit(sourceID, source_fit)

View File

@@ -257,7 +257,7 @@ class Fit(object):
def projectedFits(self):
# only in extreme edge cases will the fit be invalid, but to be sure do
# not return them.
return [fit for fit in list(self.__projectedFits.values()) if not fit.isInvalid]
return [fit for fit in list(self.projectedFitDict.values()) if not fit.isInvalid]
@property
def commandFits(self):
@@ -1615,7 +1615,7 @@ class Fit(object):
forceUpdateSavedata(fit)
for fit in self.projectedFits:
copy_ship.__projectedFits[fit.ID] = fit
copy_ship.projectedFitDict[fit.ID] = fit
forceUpdateSavedata(fit)
copyProjectionInfo = fit.getProjectionInfo(copy_ship.ID)
originalProjectionInfo = fit.getProjectionInfo(self.ID)