Changed the name of Eve Fleet Fight Simulator to Eve Fleet Simulator and updated refs to match
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,4 @@
|
||||
#Fit and ship export data generated by effs_stat_export.py
|
||||
#Fit and ship export data generated by efs_stat_export.py
|
||||
*JSON.js
|
||||
|
||||
#Python specific
|
||||
|
||||
@@ -543,10 +543,10 @@ def getShipSize(groupID):
|
||||
def parseNeededFitDetails(fit, groupID):
|
||||
includeShipTypeData = groupID > 0
|
||||
fitID = fit.ID
|
||||
if len(fit.modules) > 0:
|
||||
fitName = fit.ship.name + ': ' + fit.name
|
||||
else:
|
||||
if includeShipTypeData:
|
||||
fitName = fit.name
|
||||
else:
|
||||
fitName = fit.ship.name + ': ' + fit.name
|
||||
print('')
|
||||
print('name: ' + fit.name)
|
||||
fitL = Fit.getInstance()
|
||||
@@ -599,9 +599,9 @@ def parseNeededFitDetails(fit, groupID):
|
||||
'rigSlots': fitModAttr['rigSlots'], 'lowSlots': fitModAttr['lowSlots'],
|
||||
'midSlots': fitModAttr['medSlots'], 'highSlots': fitModAttr['hiSlots'],
|
||||
'turretSlots': fitModAttr['turretSlotsLeft'], 'launcherSlots': fitModAttr['launcherSlotsLeft'],
|
||||
'powerOutput': fitModAttr['powerOutput'], 'rigSize': fitModAttr['rigSize'],
|
||||
'effectiveTurrets': effectiveTurretSlots, 'effectiveLaunchers': effectiveLauncherSlots,
|
||||
'effectiveDroneBandwidth': effectiveDroneBandwidth,
|
||||
'powerOutput': fitModAttr['powerOutput'], 'cpuOutput': fitModAttr['cpuOutput'],
|
||||
'rigSize': fitModAttr['rigSize'], 'effectiveTurrets': effectiveTurretSlots,
|
||||
'effectiveLaunchers': effectiveLauncherSlots, 'effectiveDroneBandwidth': effectiveDroneBandwidth,
|
||||
'resonance': resonance, 'typeID': fit.shipID, 'groupID': groupID, 'shipSize': shipSize,
|
||||
'droneControlRange': fitModAttr['droneControlRange'], 'mass': fitModAttr['mass'],
|
||||
'moduleNames': moduleNames, 'projections': projections,
|
||||
@@ -611,6 +611,6 @@ def parseNeededFitDetails(fit, groupID):
|
||||
except TypeError:
|
||||
print('Error parsing fit:' + str(fit))
|
||||
print(TypeError)
|
||||
parsable = {'name': fitName + 'Fit could not be correctly parsed'}
|
||||
dataDict = {'name': fitName + 'Fit could not be correctly parsed'}
|
||||
export = json.dumps(dataDict, skipkeys=True)
|
||||
return export
|
||||
@@ -29,21 +29,21 @@ class CopySelectDialog(wx.Dialog):
|
||||
copyFormatDna = 3
|
||||
copyFormatEsi = 4
|
||||
copyFormatMultiBuy = 5
|
||||
copyFormatEffs = 6
|
||||
copyFormatEfs = 6
|
||||
|
||||
def __init__(self, parent):
|
||||
wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title="Select a format", size=(-1, -1),
|
||||
style=wx.DEFAULT_DIALOG_STYLE)
|
||||
mainSizer = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
copyFormats = ["EFT", "EFT (Implants)", "XML", "DNA", "CREST", "MultiBuy", "EFFS"]
|
||||
copyFormats = ["EFT", "EFT (Implants)", "XML", "DNA", "CREST", "MultiBuy", "EFS"]
|
||||
copyFormatTooltips = {CopySelectDialog.copyFormatEft: "EFT text format",
|
||||
CopySelectDialog.copyFormatEftImps: "EFT text format",
|
||||
CopySelectDialog.copyFormatXml: "EVE native XML format",
|
||||
CopySelectDialog.copyFormatDna: "A one-line text format",
|
||||
CopySelectDialog.copyFormatEsi: "A JSON format used for EVE CREST",
|
||||
CopySelectDialog.copyFormatMultiBuy: "MultiBuy text format",
|
||||
CopySelectDialog.copyFormatEffs: u"EFFS json stats format"}
|
||||
CopySelectDialog.copyFormatEfs: u"EFS json stats format"}
|
||||
selector = wx.RadioBox(self, wx.ID_ANY, label="Copy to the clipboard using:", choices=copyFormats,
|
||||
style=wx.RA_SPECIFY_ROWS)
|
||||
selector.Bind(wx.EVT_RADIOBOX, self.Selected)
|
||||
|
||||
@@ -79,7 +79,7 @@ from eos.db.saveddata.queries import getFit as db_getFit
|
||||
from service.port import Port, IPortUser
|
||||
from service.settings import HTMLExportSettings
|
||||
|
||||
from effs_stat_export import parseNeededFitDetails as exportEffsStats
|
||||
from efs_stat_export import parseNeededFitDetails as exportEfsStats
|
||||
|
||||
from time import gmtime, strftime
|
||||
|
||||
@@ -728,9 +728,9 @@ class MainFrame(wx.Frame):
|
||||
fit = db_getFit(self.getActiveFit())
|
||||
toClipboard(Port.exportMultiBuy(fit))
|
||||
|
||||
def clipboardEffs(self):
|
||||
def clipboardEfs(self):
|
||||
fit = db_getFit(self.getActiveFit())
|
||||
toClipboard(exportEffsStats(fit, 0))
|
||||
toClipboard(exportEfsStats(fit, 0))
|
||||
|
||||
def importFromClipboard(self, event):
|
||||
clipboard = fromClipboard()
|
||||
@@ -748,7 +748,7 @@ class MainFrame(wx.Frame):
|
||||
CopySelectDialog.copyFormatDna: self.clipboardDna,
|
||||
CopySelectDialog.copyFormatEsi: self.clipboardEsi,
|
||||
CopySelectDialog.copyFormatMultiBuy: self.clipboardMultiBuy,
|
||||
CopySelectDialog.copyFormatEffs: self.clipboardEffs}
|
||||
CopySelectDialog.copyFormatEfs: self.clipboardEfs}
|
||||
dlg = CopySelectDialog(self)
|
||||
dlg.ShowModal()
|
||||
selected = dlg.GetSelected()
|
||||
|
||||
@@ -78,7 +78,7 @@ eos.db.saveddata_meta.create_all()
|
||||
|
||||
import json
|
||||
from service.fit import Fit
|
||||
from effs_stat_export import parseNeededFitDetails
|
||||
from efs_stat_export import parseNeededFitDetails
|
||||
|
||||
from sqlalchemy import Column, String, Integer, ForeignKey, Boolean, Table
|
||||
from sqlalchemy.orm import relation, mapper, synonym, deferred
|
||||
@@ -140,7 +140,11 @@ def t3dGetStatSet(dnaString, shipName, groupID, raceID):
|
||||
n = 0
|
||||
while n < len(t3dModes):
|
||||
dna = dnaString + ':' + str(t3dModes[n].ID) + ';1'
|
||||
shipModeData += setFitFromString(dna, t3dModes[n].name, groupID) + ',\n'
|
||||
#Don't add the new line for the last mode
|
||||
if n < len(t3dModes) - 1:
|
||||
shipModeData += setFitFromString(dna, t3dModes[n].name, groupID) + ',\n'
|
||||
else:
|
||||
shipModeData += setFitFromString(dna, t3dModes[n].name, groupID)
|
||||
n += 1
|
||||
return shipModeData
|
||||
|
||||
@@ -168,8 +172,11 @@ def t3cGetStatSet(dnaString, shipName, groupID, raceID):
|
||||
dna = dnaString + ':' + str(ss[0][a].ID) \
|
||||
+ ';1:' + str(ss[1][b].ID) + ';1:' + str(ss[2][c].ID) \
|
||||
+ ';1:' + str(ss[3][d].ID) + ';1'
|
||||
name = shipName + str(a) + str(b) + str(c) + str(d)
|
||||
shipPermutationData += setFitFromString(dna, name, groupID) + ',\n'
|
||||
#Don't add the new line for the last permutation
|
||||
if a == 2 and b == 2 and c == 2 and d == 2:
|
||||
shipPermutationData += setFitFromString(dna, shipName, groupID)
|
||||
else:
|
||||
shipPermutationData += setFitFromString(dna, shipName, groupID) + ',\n'
|
||||
d += 1
|
||||
n += 1
|
||||
c += 1
|
||||
@@ -193,7 +200,6 @@ def setFitFromString(dnaString, fitName, groupID) :
|
||||
print('Cannot find correct link fits for base calculations')
|
||||
return ''
|
||||
modArray = dnaString.split(':')
|
||||
additionalModeFit = ''
|
||||
fitL = Fit()
|
||||
fitID = fitL.newFit(int(modArray[0]), fitName)
|
||||
fit = eos.db.getFit(fitID)
|
||||
@@ -246,4 +252,4 @@ def setFitFromString(dnaString, fitName, groupID) :
|
||||
fitL.addCommandFit(fit.ID, infoLinkShip)
|
||||
jsonStr = parseNeededFitDetails(fit, groupID)
|
||||
Fit.deleteFit(fitID)
|
||||
return jsonStr + additionalModeFit
|
||||
return jsonStr
|
||||
@@ -19,7 +19,7 @@ import eos.db
|
||||
if not os.path.exists(config.savePath):
|
||||
os.mkdir(config.savePath)
|
||||
|
||||
from effs_stat_export import parseNeededFitDetails
|
||||
from efs_stat_export import parseNeededFitDetails
|
||||
|
||||
def exportPyfaFits(opts):
|
||||
nameReq = ''
|
||||
@@ -1,6 +1,6 @@
|
||||
from effs_export_base_fits import *
|
||||
from efs_export_base_fits import *
|
||||
|
||||
def effsFitsFromHTMLExport(opts):
|
||||
def efsFitsFromHTMLExport(opts):
|
||||
if opts:
|
||||
if opts.outputpath:
|
||||
basePath = opts.outputpath
|
||||
@@ -38,16 +38,16 @@ parser.add_option(
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
if options.exportfits:
|
||||
from effs_export_pyfa_fits import exportPyfaFits
|
||||
from efs_export_pyfa_fits import exportPyfaFits
|
||||
exportPyfaFits(options)
|
||||
|
||||
if options.exportbaseships:
|
||||
from effs_export_base_fits import exportBaseShips
|
||||
from efs_export_base_fits import exportBaseShips
|
||||
exportBaseShips(options)
|
||||
|
||||
if options.convertfitsfromhtml:
|
||||
from effs_process_html_export import effsFitsFromHTMLExport
|
||||
effsFitsFromHTMLExport(options)
|
||||
from efs_process_html_export import efsFitsFromHTMLExport
|
||||
efsFitsFromHTMLExport(options)
|
||||
|
||||
#stuff bellow this point is purely scrap diagnostic stuff and should not be public (as it's scrawl)
|
||||
def printGroupData():
|
||||
@@ -16,34 +16,34 @@ else
|
||||
fi
|
||||
if [[ $1 == -f ]] ; then
|
||||
if [[ $MUTE == TRUE ]] ; then
|
||||
python3opt savedata/effs_util.py\ -f | grep awgahwogfa
|
||||
python3opt savedata/efs_util.py\ -f | grep awgahwogfa
|
||||
else
|
||||
python3opt savedata/effs_util.py\ -f\ --search=$4
|
||||
python3opt savedata/efs_util.py\ -f\ --search=$4
|
||||
fi
|
||||
elif [[ $1 == -b ]] ; then
|
||||
if [[ $MUTE == TRUE ]] ; then
|
||||
python3opt savedata/effs_util.py\ -b | grep awgahwogfa
|
||||
python3opt savedata/efs_util.py\ -b | grep awgahwogfa
|
||||
else
|
||||
python3opt savedata/effs_util.py\ -b\ --search=$4
|
||||
python3opt savedata/efs_util.py\ -b\ --search=$4
|
||||
fi
|
||||
elif [[ $1 == -u ]] ; then
|
||||
if [[ $MUTE == TRUE ]] ; then
|
||||
python3opt savedata/effs_util.py\ -b\ -f\ -o\ .. | grep awgahwogfa
|
||||
python3opt savedata/efs_util.py\ -b\ -f\ -o\ .. | grep awgahwogfa
|
||||
else
|
||||
python3opt savedata/effs_util.py\ -b\ -f\ -o\ ..
|
||||
python3opt savedata/efs_util.py\ -b\ -f\ -o\ ..
|
||||
fi
|
||||
elif [[ $1 == -a ]] ; then
|
||||
if [[ $MUTE == TRUE ]] ; then
|
||||
python3opt savedata/effs_util.py\ -b\ -f | grep awgahwogfa
|
||||
python3opt savedata/efs_util.py\ -b\ -f | grep awgahwogfa
|
||||
else
|
||||
python3opt savedata/effs_util.py\ -b\ -f\ --search=$4
|
||||
python3opt savedata/efs_util.py\ -b\ -f\ --search=$4
|
||||
fi
|
||||
else
|
||||
echo Defaulting to fits and base ships.\n
|
||||
if [[ $MUTE == TRUE ]] ; then
|
||||
python3opt savedata/effs_util.py\ -b\ -f | grep awgahwogfa
|
||||
python3opt savedata/efs_util.py\ -b\ -f | grep awgahwogfa
|
||||
else
|
||||
python3opt savedata/effs_util.py\ -b\ -f\ --search=$4
|
||||
python3opt savedata/efs_util.py\ -b\ -f\ --search=$4
|
||||
fi
|
||||
fi
|
||||
if [[ $EXPECTERRORS == True ]] ; then
|
||||
@@ -51,5 +51,5 @@ if [[ $EXPECTERRORS == True ]] ; then
|
||||
else
|
||||
diff -s --color=always ../shipJSON.js ~/.pyfa/shipJSON.js | grep -m 3 --color ''
|
||||
diff -s --color=always ../shipBaseJSON.js ~/.pyfa/shipBaseJSON.js | grep -m 3 --color ''
|
||||
/home/stock/scripts/Pyfa/.tox/pep8/bin/flake8 --exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,venv,tests,.tox,build,dist,__init__.py,floatspin.py --ignore=E121,E126,E127,E128,E203,E731,F401,E722,E741 effs_stat_export.py --max-line-length=165
|
||||
/home/stock/scripts/Pyfa/.tox/pep8/bin/flake8 --exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,venv,tests,.tox,build,dist,__init__.py,floatspin.py --ignore=E121,E126,E127,E128,E203,E731,F401,E722,E741 efs_stat_export.py --max-line-length=165
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user