Compare commits

..

1273 Commits

Author SHA1 Message Date
blitzman
3d8c76209d update database from master 2017-01-29 19:52:56 -05:00
blitzman
c2038a6cf2 Change from UPDATE to DELETE for null damage pattern and target resist names 2017-01-29 19:04:57 -05:00
blitzman
082ac233ad Merge branch 'MissingDamageTargetProfileNames' of https://github.com/Ebag333/Pyfa into development
Conflicts:
	service/prefetch.py
2017-01-29 15:04:56 -05:00
blitzman
5d46fe7e4d Merge branch 'master' into development
Conflicts:
	gui/builtinContextMenus/amount.py
	gui/builtinStatsViews/priceViewFull.py
	service/fit.py
	service/prefetch.py
2017-01-29 15:02:22 -05:00
blitzman
6049c9837c Remove prefetch thread (unneeded and consumes resources?) 2017-01-28 23:35:42 -05:00
blitzman
a76eef01de name all ze threads 2017-01-28 17:46:59 -05:00
blitzman
b3eb4f35cd Max out cargo amount to sys.maxint (#958) 2017-01-28 13:31:03 -05:00
blitzman
6b6dacf94c Fix traceback when trying to cancel an amount dialog with nothing in the field 2017-01-28 13:30:14 -05:00
blitzman
f010f2fef2 Don't loop through all amounts of cargo and drones just to get the price. (#958) 2017-01-28 13:15:25 -05:00
blitzman
a952f80ea4 min version for sqlalchemy 2017-01-28 01:29:08 -05:00
blitzman
6d34ae2960 fix 2017-01-27 23:35:19 -05:00
blitzman
d17ff000c7 Add migration for alpha clone character update 2017-01-27 23:12:08 -05:00
blitzman
6b3d3ecd93 More import fixes for osx deprecated 2017-01-27 22:25:22 -05:00
blitzman
32dc28f48d Move CREST import inside a conditional 2017-01-27 22:17:07 -05:00
blitzman
a210724312 Fix conversion imports for osx deprecated... :( 2017-01-27 22:06:52 -05:00
blitzman
1d69ed7584 Merge branch 'test_import' into development
Conflicts:
	gui/builtinContextMenus/amount.py
	gui/characterEditor.py
	gui/itemStats.py
2017-01-27 20:39:54 -05:00
blitzman
43e864e47b Fix issue in which -s flag was not being honored 2017-01-27 20:36:19 -05:00
blitzman
fb538027f7 Fix issues with paths and linux / os x 2017-01-27 20:30:11 -05:00
blitzman
cbf7f7d320 Merge branch 'master' into development 2017-01-27 19:39:10 -05:00
blitzmann
4111d670a7 Fix possible issue with floats coming through (see #729) 2017-01-26 23:52:18 -05:00
blitzmann
397084a9ff Disable rename and delete button for restricted character on character editor spawn (fix for #930) 2017-01-26 21:33:13 -05:00
blitzmann
968d633d46 Merge branch 'feature/alphaclones' into development 2017-01-26 19:53:27 -05:00
blitzmann
96c3363edc Merge branch 'master' into feature/alphaclones
Conflicts:
	eve.db
2017-01-26 19:39:13 -05:00
Ebag333
a853ed9960 Remove test variable 2017-01-25 18:17:05 -08:00
Ebag333
323a7060ec Fix import 2017-01-25 17:53:04 -08:00
Ebag333
d0fa2510e5 Merge branch 'test_import' of https://github.com/Ebag333/Pyfa into test_import 2017-01-25 17:40:00 -08:00
Ebag333
8d57f641f7 Remove comments about conversion 2017-01-25 17:39:54 -08:00
blitzman
055957567f Fix fit import 2017-01-25 20:28:57 -05:00
blitzman
5aff3f007e Fix crest export 2017-01-25 20:22:07 -05:00
blitzman
c34d86ba80 Fix XML exports 2017-01-25 20:12:30 -05:00
Ebag333
2038f36254 Remove calls to null pattern name cleanup 2017-01-25 13:52:00 -08:00
Ebag333
b1fc07a4cf Abstract out the SQL Query Execution
gives more granular error handling
2017-01-25 13:28:34 -08:00
Ebag333
a366420d65 Catch scenario where names are missing 2017-01-25 09:58:26 -08:00
Ebag333
8095b4852b Clean up another broken reference. Fix broken XML export. 2017-01-24 21:34:24 -08:00
Ebag333
cc3274f245 Add comment to note special snowflakes needs 2017-01-24 18:21:09 -08:00
Ebag333
fbde9ce7bf Fix passing the fit into exportXML 2017-01-24 18:13:57 -08:00
Ebag333
130fc189ad Merge branch 'test_import' of https://github.com/Ebag333/Pyfa into test_import 2017-01-24 17:37:42 -08:00
Ebag333
a50e4fcc46 Fix issue caused by file path and import fix merges 2017-01-24 17:37:37 -08:00
Ebag333
ae96ff244e Fix crest exports 2017-01-24 17:09:48 -08:00
blitzman
1b0cdeedce Fix lack of instance 2017-01-24 19:57:16 -05:00
Ebag333
992820ac42 Redirect to correct module
Function was moved from service.Fit to service.Port
2017-01-24 16:48:28 -08:00
blitzman
c0ecc6a329 tweaks to fix merge issues 2017-01-23 21:07:20 -05:00
blitzman
85131e6166 oh god this isn't gonna work
Merge branch 'ebag_importchanges' into test_import

Conflicts:
	config.py
	eos/db/saveddata/queries.py
	eos/effects/chargebonuswarfarecharge.py
	eos/effects/elitebonuscommandshipinformationhiddencs3.py
	eos/effects/elitebonuslogisticremotearmorrepairoptimalfalloff1.py
	eos/effects/energydestabilizationnew.py
	eos/effects/iceharvestingdroneoperationdurationbonus.py
	eos/effects/miningforemanstrengthbonus.py
	eos/effects/modulebonuswarfarelinkarmor.py
	eos/effects/modulebonuswarfarelinkinfo.py
	eos/effects/modulebonuswarfarelinkmining.py
	eos/effects/modulebonuswarfarelinkshield.py
	eos/effects/modulebonuswarfarelinkskirmish.py
	eos/effects/moduletitaneffectgenerator.py
	eos/effects/remotehullrepair.py
	eos/effects/rolebonusremotearmorrepairoptimalfalloff.py
	eos/effects/shipbonusforceauxiliarya4warfarelinksbonus.py
	eos/effects/shipmodesmallmissiledamagepostdiv.py
	eos/effects/structureenergyneutralizerfalloff.py
	eos/effects/structuremoduleeffectstasiswebifier.py
	eos/effects/structurerigmaxtargets.py
	eos/effects/subsystembonusamarrdefensiveinformationwarfarehidden.py
	eos/effects/subsystembonuscaldaridefensiveinformationwarfarehidden.py
	eos/effects/subsystembonusgallentedefensiveinformationwarfarehidden.py
	eos/effects/techtwocommandburstbonus.py
	eos/saveddata/fighter.py
	eos/saveddata/fit.py
	eos/saveddata/module.py
	eve.db
	gui/bitmapLoader.py
	gui/builtinContextMenus/itemStats.py
	gui/builtinStatsViews/miningyieldViewFull.py
	gui/builtinViewColumns/misc.py
	gui/builtinViews/__init__.py
	gui/builtinViews/fittingView.py
	gui/contextMenu.py
	gui/graphFrame.py
	gui/itemStats.py
	gui/mainFrame.py
	gui/marketBrowser.py
	service/__init__.py
	service/character.py
	service/fit.py
	service/port.py
	service/prefetch.py
	service/pycrest/eve.py
	service/settings.py
2017-01-23 21:06:12 -05:00
blitzman
330983d9dd Merge branch 'master' into development
Conflicts:
	eve.db
2017-01-22 21:10:06 -05:00
Ryan Holmes
1bb7c4e825 Merge pull request #945 from Ebag333/Patch_1111328
Update database to 1111328
2017-01-17 20:39:32 -05:00
Ryan Holmes
450e1427a1 Merge pull request #948 from Ebag333/MiningYield
Revert back to /s for mining. Adds /hour to tooltips.
2017-01-17 20:21:15 -05:00
blitzman
5614cec19d Merge branch 'master' of https://github.com/pyfa-org/Pyfa 2017-01-17 20:18:21 -05:00
blitzman
3f24a4b2c5 Fix for #946 - citadel rig not increasing max targets 2017-01-17 20:18:12 -05:00
Ebag333
4e9e5735dc Revert "Add check for remote resistance"
This reverts commit 269565e959.
2017-01-17 10:03:14 -08:00
Ebag333
b1a6189c55 Revert back to /s for mining. Adds /hour to tooltips. 2017-01-17 09:29:22 -08:00
Ebag333
836504ee01 Expand gitattributes to cover a few more scenarios 2017-01-17 08:53:01 -08:00
Ebag333
269565e959 Add check for remote resistance 2017-01-17 00:28:44 -08:00
Ryan Holmes
e45027a66c Merge pull request #910 from Ebag333/UnicodePaths_v2
Unicode Paths 2: The Reckoning
2017-01-14 02:44:24 -05:00
Ebag333
2d3310d8e0 Update database to 1111328 2017-01-13 15:10:36 -08:00
Ryan Holmes
77066f0389 Fix Rabisu effects (#941) 2017-01-11 15:06:50 -05:00
blitzman
5e0567ef4d Merge branch 'master' of https://github.com/pyfa-org/Pyfa 2017-01-10 22:51:38 -05:00
blitzman
b49de4b0fa Update to 1108313 2017-01-10 22:51:27 -05:00
blitzman
372495a83a Remove vestigial appendage 2017-01-10 22:45:41 -05:00
blitzman
468a4644d6 Merge branch 'development'
Conflicts:
	eos/db/saveddata/queries.py
2017-01-10 22:42:01 -05:00
Ryan Holmes
29d0f102fd Move AT14 ships to the Limited Edition group (#935) 2017-01-05 11:38:47 -05:00
blitzman
ebc7173c50 Fix issues with unexpected module positions (see #932) 2017-01-04 23:48:37 -05:00
blitzman
43f1ac78a6 Keep subsystem module in the same position when swapping them out (see #932) 2017-01-04 23:17:56 -05:00
Ryan Holmes
d489fdd700 Merge pull request #913 from resinneublem/remember-user-filters-take2
Remembers user's meta filtering choices
2017-01-04 00:10:48 -05:00
blitzman
d6b1e4465e Merge branch 'test/cat-has-fits' 2017-01-03 01:32:50 -05:00
blitzman
5cbffcf3ac Handle counting number of fits per ship category more efficiently (see #819) 2017-01-03 01:32:12 -05:00
blitzman
c91723516e Do not calculate projected fits for command fits (see #931) 2017-01-02 23:54:06 -05:00
Ryan Holmes
a68f45d15a Merge pull request #927 from Ebag333/BurstProjectors
ECM Burst Projectors effect
2017-01-02 19:58:10 -05:00
Ryan Holmes
152a708ee8 Merge pull request #920 from Ebag333/Database_Cleanup
Database Validation and Cleanup
2017-01-02 19:25:26 -05:00
blitzman
a0ec13d2ed More tweaks 2017-01-02 18:45:08 -05:00
Ebag333
3313b7421f Move query logic into own function in queries. Tighten up flow in DB repair. Catch null values. 2017-01-02 13:41:39 -08:00
blitzman
a76ee6b2fc more tweaks 2017-01-02 12:07:15 -05:00
Ebag333
0056b704d4 Add other projector effects. Only allow it to affect the specific attribute it's modifying. 2017-01-02 03:18:54 -08:00
Ebag333
c1ead5fe27 change method for retreiving count 2017-01-02 00:29:44 -08:00
blitzman
85a89339a7 Cleaned up database corruption stuff 2017-01-02 00:58:54 -05:00
Ryan Holmes
55f82c48bc Merge pull request #929 from Ebag333/Character_Import_Sanitization
Add some sanity checks and validation of imported character data
2017-01-02 00:38:48 -05:00
Ebag333
f4761e099b Don't let people rename built in chars 2017-01-01 13:17:39 -08:00
Ebag333
be3696deba Add some sanity checks and validation of incoming data 2017-01-01 12:47:28 -08:00
Ebag333
cd41e9e9be Change to use skill rather than group, and modify correct attribute 2017-01-01 03:08:38 -08:00
Resin Neublem
d6db30b7fc We weren't setting user selection in all branches
I heavily refactored the button click handler to make it a little easier to understand
2016-12-28 19:54:37 -05:00
Ryan Holmes
fd066c2150 Merge branch 'Ebag333-EFTBoosterImports' into development 2016-12-28 17:46:33 -05:00
Ebag333
f9ba95b3de Check the ness to see if it's an implant, booster, or something else.
Log it if it's something else and don't try and import it. This prevents
a bad line from failing the entire import, and (hopefully) we know about
it.
2016-12-27 12:32:52 -08:00
Ebag333
7ee4d1d588 Try loading item as a booster if implant fails. 2016-12-26 23:29:22 -08:00
Ebag333
cef5842344 Database validation and cleanup 2016-12-26 21:54:52 -08:00
Resin Neublem
a7b6647135 Remembers user's meta filtering choices
There is a lot of logic that overwrites the user's choices of meta
filtering on every search.

That's a little too clever. Especially if the user is looking for
different variations of a certain meta.

If a user wants to include the other meta buttons they can re-add them
after filtering.

Extra care has to be taken with Windows. If a button is Enabled=False AND
SetValue=True, then it looks like it's Enabled=True, but clicking it
doesn't do anything. So we handle that logic in it's own class

closes: https://github.com/pyfa-org/Pyfa/issues/818
2016-12-19 22:39:56 -05:00
Ebag333
bef17e53c6 Recreating wheels 2016-12-19 00:11:55 -08:00
Ebag333
d4b6099d6e Handle unicode, utf8, and windows-1252
(cherry picked from commit 0d4f24a)
2016-12-18 14:11:55 -08:00
blitzman
ff60538e21 Revert "Merge branch 'Ebag333-UnicodePaths' into development"
This reverts commit 8a6ef788b3, reversing
changes made to cf91ae7627.
2016-12-18 15:56:06 -05:00
Ryan Holmes
50c6133046 Revert "Remembers user's meta filtering choices" 2016-12-18 10:09:55 -05:00
Ryan Holmes
b7d7b80544 Merge pull request #829 from resinneublem/remember-user-filters
Remembers user's meta filtering choices
2016-12-18 10:07:15 -05:00
blitzman
2b9342692d working commit 2016-12-18 09:45:26 -05:00
blitzman
a24e247f1b Merge branch 'master' into development
Conflicts:
	eos/effects/usemissiles.py
	eos/saveddata/fit.py
2016-12-18 09:24:39 -05:00
blitzman
3396056dae bump dev 2016-12-18 09:19:47 -05:00
blitzman
366d6c8971 bump stable 2016-12-18 08:00:19 -05:00
blitzman
14bf7ddf7a fix renders (revert back to previous ones) 2016-12-18 07:52:49 -05:00
blitzman
30cce09063 actually fix database 2016-12-18 06:27:37 -05:00
blitzman
9a50ebfc47 fix database 2016-12-18 05:51:22 -05:00
blitzman
0f05b60c20 Fix for #901 2016-12-18 05:47:56 -05:00
blitzman
4f8493d1bb Merge branch 'Ebag333-Patch_1105543' 2016-12-16 21:27:19 -05:00
blitzman
58dd629956 update db 2016-12-16 21:27:11 -05:00
blitzman
936b746954 update headers 2016-12-16 21:19:00 -05:00
blitzman
ef14bfac58 Merge branch 'Patch_1105543' of https://github.com/Ebag333/Pyfa into Ebag333-Patch_1105543 2016-12-16 21:16:07 -05:00
blitzman
291f73b661 fix for #905 2016-12-16 20:59:54 -05:00
blitzman
3d9dae0d52 fuuu 2016-12-16 20:50:36 -05:00
blitzman
017c37c4af Fix for #892 2016-12-16 20:49:42 -05:00
blitzman
ee0c852ddb Fix titan effects and issue in which all warefarebuffs may not get run (range too short). This should also shore up (#897) 2016-12-16 20:17:20 -05:00
blitzman
d63627a37b More cleanup 2016-12-16 19:26:54 -05:00
blitzman
b1c9e70f95 Merge branch 'command-refactor' 2016-12-16 19:20:44 -05:00
blitzman
3ac2fd870f clean up 2016-12-16 19:20:30 -05:00
Ebag333
af7272cd10 fix dual reference back to same object 2016-12-15 17:08:59 -08:00
Ebag333
d7c71f5d47 fix some, missed import references. 2016-12-15 16:17:10 -08:00
Ebag333
c858fc2859 Remove an inline import. Fix a reference that is missing. 2016-12-15 15:39:19 -08:00
Ebag333
f76f44e9f3 Fix port references, imports, and add some logging 2016-12-15 15:20:29 -08:00
Ebag333
4fb07cc1d0 Bunch of pep8 and inspection cleanup 2016-12-15 12:43:19 -08:00
Ebag333
658a87cbc0 Single line change to fix most (all??) of the problems 2016-12-15 12:10:03 -08:00
Ebag333
956fa7a8b7 Fixing some issues due to import cleanup 2016-12-14 13:06:13 -08:00
blitzman
0ebb992354 more clean up
(cherry picked from commit f198ff1)
2016-12-14 12:44:42 -08:00
blitzman
37f8253836 oops
(cherry picked from commit 0a28fb6)
2016-12-14 12:26:22 -08:00
blitzman
200ff5a1a4 Fix titan command effects
(cherry picked from commit 7875c2a)
2016-12-14 12:26:08 -08:00
blitzman
0d44cbf74a clean up path stuff
(cherry picked from commit d3e360b)
2016-12-14 12:24:35 -08:00
Stefan Dresselhaus
bb216aa6ed wrong index in tuple.
Array looks normally so:

(RunTime, Value, etc., etc.)
("normal", -10, ..., ...)

I guess "RunTime" got added and this is an artifact as it is rarely
called.

Fixes Orca-Mining-Boost onto itself and other ships.

(cherry picked from commit 0ba88d0)
2016-12-14 12:22:41 -08:00
Stefan Dresselhaus
eccf405ba8 fixed parameters in call when adding neuts to structures.
(cherry picked from commit 4f77dff)
2016-12-14 12:22:28 -08:00
blitzman
9df87f61cd bump dev
(cherry picked from commit 2b3e646)
2016-12-14 12:22:17 -08:00
blitzman
4186e19c65 bump stable
(cherry picked from commit e0e7478)
2016-12-14 12:22:10 -08:00
blitzman
57edc32a4b Clean up new tactical mode stats stuff
(cherry picked from commit c9bc234)
2016-12-14 12:21:00 -08:00
blitzman
9cfa0748ac fix for #871
(cherry picked from commit 70af2b0)
2016-12-14 12:20:42 -08:00
blitzman
df859a2132 Fix for #883
(cherry picked from commit 753b5c5)
2016-12-14 12:19:54 -08:00
blitzman
52257d60ac fix a couple command effects
(cherry picked from commit 9bb86b4)
2016-12-14 12:18:46 -08:00
blitzman
96ddb0bbff Fixed a few issues with command bursts
(cherry picked from commit 9071960)
2016-12-14 12:18:41 -08:00
Ebag333
b529a28715 Implement fittingMode
(cherry picked from commit 5eb2fef)
2016-12-14 12:18:34 -08:00
Ebag333
ea3a374ced Add logging, because why not
(cherry picked from commit 9403a1f)
2016-12-14 12:17:55 -08:00
Ebag333
2eacadf08f Don't use try for fittingView, and don't show remove item for modes.
(cherry picked from commit fd224d6)
2016-12-14 12:17:13 -08:00
Ebag333
1a127bb1a6 Add ability to look at tactical mode item info.
(cherry picked from commit f5776a0)
2016-12-14 12:16:51 -08:00
Ebag333
edfa130939 Fix tooltip order
(cherry picked from commit 61d1878)
2016-12-14 12:15:09 -08:00
blitzman
7fbd89392a Revert "Remove effect files that are not used by any item"
This reverts commit b29fa2467a.

(cherry picked from commit 4a95156)
2016-12-14 12:14:39 -08:00
Indiction
9f4b31979c Adding Fighter Support CREST
(cherry picked from commit ab5f348)
2016-12-14 12:14:11 -08:00
blitzman
9ecfc475e3 Bump dev, fix for #874
(cherry picked from commit b375d3c)
2016-12-14 12:13:55 -08:00
blitzman
84dc93ac54 bump release
(cherry picked from commit f160aed)
2016-12-14 12:13:02 -08:00
Ebag333
7532bcda08 Clean up some stuff left over from cherry picks 2016-12-14 10:42:04 -08:00
Ebag333
08b5abc7ad Handle unicode, utf8, and windows-1252
(cherry picked from commit 0d4f24a)
2016-12-14 10:38:56 -08:00
Indiction
38bf143704 Fighters for export and import functions
(cherry picked from commit 04c30e7)
2016-12-14 10:24:45 -08:00
Ebag333
a440ed3b37 Drop unicode
(cherry picked from commit 7fe7056)
2016-12-14 10:20:57 -08:00
Ebag333
39b7d9fdeb Change to shorthand unicode
(cherry picked from commit ab32a3a)
2016-12-14 10:20:53 -08:00
Ebag333
dfa728a486 Handle Lockbreaker, Void, and Focused Void Bombs
(cherry picked from commit ea3e5e2)
2016-12-14 10:20:48 -08:00
Ebag333
7bd8ca5a55 Removed actual fleet files. Cleaned up __init__.py that had references.
(cherry picked from commit b6c5183)
2016-12-14 10:20:20 -08:00
Ebag333
627977ab51 Purging fleet bonuses from code base
(cherry picked from commit 68f4570)
2016-12-14 10:18:19 -08:00
Ebag333
e3b592977a Make some imports more explicit 2016-12-13 23:49:37 -08:00
Ebag333
622a734405 remove lazy import. Fix test 2016-12-13 23:35:29 -08:00
Ebag333
28404cd8bb bajillion pep8 fixes to pass tox 2016-12-13 23:31:39 -08:00
Ebag333
be53dedb18 Large pep8 compliance to make work for Tox 2016-12-13 21:23:01 -08:00
blitzman
8ab6e26def Start refactoring the command burst effects in a way that's not complete and total shit (only slightly shit) 2016-12-13 23:55:56 -05:00
Ebag333
b2a5a20650 Travis and CodeCov files 2016-12-13 20:37:52 -08:00
Ebag333
57f930c83e Cherry pick commits from @a-tal 2016-12-13 20:35:03 -08:00
a-tal
b4dd65cf3e dont use built-in function format as a var name
(cherry picked from commit 74dd6cf)
2016-12-13 20:19:27 -08:00
a-tal
4a9b1df9b4 pep8 fixes
(cherry picked from commit 5dc43b2)
2016-12-13 20:18:57 -08:00
a-tal
874bfb3305 missed a type
(cherry picked from commit f416c77)
2016-12-13 20:18:04 -08:00
a-tal
ab9c925c47 non-standard - use forces coding declarations
(cherry picked from commit 6e17d88)
2016-12-13 20:17:56 -08:00
a-tal
d3b6bc1c93 so many pep8 fixes
(cherry picked from commit bee125d)
2016-12-13 20:16:44 -08:00
Ebag333
cd7d25e4e1 Add skill bonus 2016-12-13 14:28:43 -08:00
Ebag333
1e5e9122ae Change gate to handle missiles with 0 values 2016-12-13 14:09:56 -08:00
Ebag333
506c7d31ca Update DB. Add defender missile effect. 2016-12-13 13:48:58 -08:00
Ryan Holmes
54cc5abf21 Delete implants.py
This also shouldn't have been committed.
2016-12-13 13:49:19 -05:00
Ryan Holmes
18e913d9ba Delete iconIDs.yaml
this shouldn't have been commited. whoops
2016-12-13 13:48:47 -05:00
Ryan Holmes
180de97893 Merge pull request #738 from Ebag333/Remove-Command-Boosts
Purging fleet bonuses from code base
2016-12-12 00:54:06 -05:00
blitzman
f198ff1773 more clean up 2016-12-12 00:49:47 -05:00
blitzman
55c13d1ad0 Merge branch 'master' into Ebag333-Remove-Command-Boosts 2016-12-12 00:43:52 -05:00
blitzman
16505b30bf working commit 2016-12-12 00:43:42 -05:00
blitzman
95b3f0a21c Merge branch 'Remove-Command-Boosts' of https://github.com/Ebag333/Pyfa into Ebag333-Remove-Command-Boosts
Conflicts:
	eos/db/saveddata/fleet.py
	eos/db/saveddata/queries.py
	gui/additionsPane.py
2016-12-12 00:41:47 -05:00
blitzman
6adcfc52cd Merge branch 'master' of https://github.com/pyfa-org/Pyfa 2016-12-12 00:27:41 -05:00
blitzman
0a28fb60df oops 2016-12-12 00:27:36 -05:00
Ryan Holmes
2bab1464ee Merge pull request #811 from Ebag333/requirements.txt
Requirements for Pyfa
2016-12-12 00:25:32 -05:00
blitzman
7875c2acaa Fix titan command effects 2016-12-12 00:24:50 -05:00
blitzman
49bf40484d Merge branch 'Ebag333-VoidBombs' into development 2016-12-11 23:27:40 -05:00
blitzman
07148f1e7f Merge branch 'VoidBombs' of https://github.com/Ebag333/Pyfa into Ebag333-VoidBombs
Conflicts:
	eos/effects/usemissiles.py
2016-12-11 23:27:30 -05:00
blitzman
8a6ef788b3 Merge branch 'Ebag333-UnicodePaths' into development 2016-12-11 23:06:23 -05:00
blitzman
d3e360b7c0 clean up path stuff 2016-12-11 23:03:09 -05:00
blitzman
b1bba74c5a Merge branch 'UnicodePaths' of https://github.com/Ebag333/Pyfa into Ebag333-UnicodePaths 2016-12-11 23:01:08 -05:00
blitzman
a954759012 GUI implementation of alpha clone switching 2016-12-11 22:51:48 -05:00
blitzman
90c1033437 add clone grades to the client extraction list 2016-12-11 20:27:27 -05:00
blitzman
191a065de1 Get skill limits working 2016-12-11 20:26:30 -05:00
Ryan Holmes
cf91ae7627 Merge pull request #890 from Drezil/master
fixed parameters in call when adding neuts to structures.
2016-12-11 19:17:25 -05:00
Stefan Dresselhaus
0ba88d081a wrong index in tuple.
Array looks normally so:

(RunTime, Value, etc., etc.)
("normal", -10, ..., ...)

I guess "RunTime" got added and this is an artifact as it is rarely
called.

Fixes Orca-Mining-Boost onto itself and other ships.
2016-12-11 21:56:17 +01:00
blitzman
b6420b9a4b Get alpha clones in the database 2016-12-11 15:44:14 -05:00
Stefan Dresselhaus
4f77dff6dd fixed parameters in call when adding neuts to structures. 2016-12-11 20:25:55 +01:00
blitzman
2b3e646213 bump dev 2016-12-11 14:18:48 -05:00
blitzman
e0e7478857 bump stable 2016-12-10 19:43:34 -05:00
Ryan Holmes
828d722be8 Merge pull request #807 from IndictionEve/ImportExportFighters
Fighters for export and import functions
2016-12-10 02:09:45 -05:00
Ryan Holmes
1ae55b34ee Merge pull request #886 from Ebag333/T3DRebalance
Add ability to look at tactical mode item info
2016-12-10 02:08:18 -05:00
blitzman
c9bc2341d1 Clean up new tactical mode stats stuff 2016-12-10 02:04:51 -05:00
blitzman
eba98fec33 Merge branch 'T3DRebalance' of https://github.com/Ebag333/Pyfa into Ebag333-T3DRebalance 2016-12-10 01:37:44 -05:00
blitzman
70af2b0df7 fix for #871 2016-12-10 01:27:17 -05:00
blitzman
753b5c5339 Fix for #883 2016-12-10 01:11:38 -05:00
blitzman
9bb86b4ee4 fix a couple command effects 2016-12-10 01:00:14 -05:00
blitzman
2702193337 Merge branch 'master' of https://github.com/pyfa-org/Pyfa 2016-12-09 00:07:44 -05:00
blitzman
907196018b Fixed a few issues with command bursts 2016-12-09 00:07:35 -05:00
Ebag333
5eb2fef89c Implement fittingMode 2016-12-08 18:56:43 -08:00
Ebag333
9403a1fce9 Add logging, because why not 2016-12-08 17:31:04 -08:00
Ebag333
fd224d6781 Don't use try for fittingView, and don't show remove item for modes. 2016-12-08 16:59:26 -08:00
Ebag333
f5776a0cb2 Add ability to look at tactical mode item info. 2016-12-08 13:12:15 -08:00
Ebag333
5b62419520 Add requirements for getting this to work on Travis-Ci 2016-12-08 10:05:22 -08:00
Ebag333
b9e5a47924 Remove gnosis 2016-12-06 13:46:09 -08:00
Ryan Holmes
545c48266c Merge pull request #880 from Ebag333/ECMTooltip
Fix tooltip order for ECM
2016-12-05 09:14:13 -05:00
Ebag333
61d1878494 Fix tooltip order 2016-12-04 22:36:22 -08:00
blitzman
4a95156e35 Revert "Remove effect files that are not used by any item"
This reverts commit b29fa2467a.
2016-12-04 23:10:09 -05:00
Indiction
ab5f3488e7 Adding Fighter Support CREST 2016-12-04 19:56:42 +01:00
Ebag333
510492e5e9 More refactoring, elimited another recursive import 2016-12-03 17:12:16 -08:00
blitzman
b375d3cb6c Bump dev, fix for #874 2016-12-03 18:28:48 -05:00
Ebag333
6ef57e735e Missed imports. Fixed now. 2016-12-03 06:21:52 -08:00
blitzman
f160aede3e bump release 2016-12-02 18:25:31 -05:00
Ebag333
ea8a4c01cb Eliminate export calling fit.py (no need)
Except for 1 (clipboardXML), same number of lines of code in mainFrame,
lots of code gone from fit, and no more complicated.  Also spotted an
import reference that got missed.
2016-12-02 12:50:49 -08:00
Ebag333
d963327ed4 Make it run again 2016-12-02 03:13:54 -08:00
Ryan Holmes
bb96b0af1a Merge pull request #828 from resinneublem/group-drones-for-dna-export
Groups drones before generating DNA
2016-12-02 01:05:37 -05:00
blitzman
34e3aa20ba Merge branch 'Ebag333-T3CSubRemoteRepEffect' 2016-12-02 01:02:27 -05:00
blitzman
5a846c36ab Merge branch 'T3CSubRemoteRepEffect' of https://github.com/Ebag333/Pyfa into Ebag333-T3CSubRemoteRepEffect
Conflicts:
	eos/effects/subsystembonusamarrdefensive2remotearmorrepairamount.py
	eos/effects/subsystembonuscaldaridefensive2remoteshieldtransporteramount.py
	eos/effects/subsystembonusgallentedefensive2remotearmorrepairamount.py
	eos/effects/subsystembonusminmatardefensive2remoteshieldtransporteramount.py
2016-12-02 01:02:17 -05:00
Ryan Holmes
7bd6344359 Merge pull request #790 from IndictionEve/miningyieldperhour
Mining Yield "per hour".
2016-12-02 00:52:00 -05:00
Ryan Holmes
b76e8df1bf Merge pull request #689 from MrNukealizer/RAH-v3
RAH v3
2016-12-01 01:06:24 -05:00
blitzman
5a0165282f Add reverse sorting / name column to sorting 2016-12-01 00:40:27 -05:00
blitzman
597d9f2612 Merge branch 'SortableCompare' of https://github.com/Ebag333/Pyfa into Ebag333-SortableCompare 2016-12-01 00:07:44 -05:00
blitzman
4d9c2898bf Fix orca effects (#866) 2016-12-01 00:07:24 -05:00
Ebag333
1854a21a50 Clicking on the name column now reverts back to default sorting 2016-11-30 13:17:50 -08:00
blitzman
0e4e7525e1 Add runtimes to command effects (defaulting to normal) 2016-11-29 23:18:35 -05:00
blitzman
5259df2828 Quick hack to run command boosts inside the runtime. See #839 2016-11-29 22:58:33 -05:00
blitzman
a5b5da6d27 Update developers 2016-11-28 21:24:17 -05:00
blitzman
b2cf4b8aa5 Delete broken references to in commandFits (#844) 2016-11-28 21:07:09 -05:00
Ryan Holmes
0d874f9ad1 Merge pull request #858 from Ebag333/RemoveIncorrectEffects
Remove Effects
2016-11-27 21:51:55 -05:00
blitzman
019b8e93b4 Remove effect files for effects that no longer exist 2016-11-27 21:33:47 -05:00
blitzman
b29fa2467a Remove effect files that are not used by any item 2016-11-27 21:32:44 -05:00
blitzman
8b17cbfbc8 Fix effects that utilize old commandBonus attribute, and update headers 2016-11-27 21:22:28 -05:00
blitzman
a445509d75 Revert removal of skill check in effect 2016-11-27 20:48:38 -05:00
Ryan Holmes
5a8eac21a3 Merge pull request #855 from Ebag333/MiningDroneRigFix
Fix Mining Rig Effect for Ice Harvesters
2016-11-27 20:47:30 -05:00
Ebag333
45480a0216 These 4 effects break processing, because the bonus gets set to 0 2016-11-27 13:35:56 -08:00
Ebag333
97f72f6df5 Add ability to sort compare list 2016-11-27 12:06:41 -08:00
Ebag333
466b2ac706 Fix multiple issues with effect 2016-11-26 23:15:19 -08:00
Ebag333
0d4f24ade9 Handle unicode, utf8, and windows-1252 2016-11-26 22:57:53 -08:00
blitzman
459d55c31a fix burst jammers 2016-11-23 21:18:20 -05:00
blitzman
7e98d29de0 Fix T3Ds (#835) 2016-11-23 21:12:00 -05:00
blitzman
6bd51ff0d5 Fix for missing market groups (#842) 2016-11-23 20:43:05 -05:00
blitzman
6500e6d467 Fix some drone effects (#840) 2016-11-23 20:01:56 -05:00
blitzman
abcce8879f Fix #834 2016-11-22 23:25:13 -05:00
blitzman
e30040c9fd Bump pre-release 2016-11-22 20:53:57 -05:00
blitzman
6bbfb8e837 Update database to final version for pre-release 2016-11-22 20:50:39 -05:00
blitzman
2ec203a3a2 Update renders 2016-11-22 20:47:28 -05:00
blitzman
4df22d2063 Add new icons 2016-11-22 20:44:56 -05:00
blitzman
bf16246825 Disable booster fit icon (for now) 2016-11-22 20:44:19 -05:00
blitzman
0eed01811c Conversion mappings 2016-11-22 20:36:52 -05:00
blitzman
96b3d5637a Fix industrial core effect 2016-11-22 20:04:57 -05:00
blitzman
4a09cbcec9 Merge branch 'Acendency-IndustrialCoreEffect' of https://github.com/Ebag333/Pyfa into Ebag333-Acendency-IndustrialCoreEffect 2016-11-22 20:00:00 -05:00
Ebag333
964493d701 add logi falloff 2016-11-22 16:52:53 -08:00
Ebag333
f1b9c788f3 Added falloffeffectiveness 2016-11-22 16:38:55 -08:00
Ebag333
a50f89db67 Added stacking penalties, fixed range buff 2016-11-22 16:36:19 -08:00
blitzman
0d94ffe27a Merge branch 'singularity' of https://github.com/pyfa-org/Pyfa into singularity 2016-11-22 18:45:27 -05:00
Ebag333
dc4c4c7353 Change to skill req 2016-11-22 15:03:21 -08:00
Ryan Holmes
8d4e0a259e Fix for #833 2016-11-22 15:35:04 -05:00
Ryan Holmes
91f87b02cc Merge branch 'EffectTest' of https://github.com/Ebag333/Pyfa into Ebag333-EffectTest
Conflicts:
	eos/saveddata/fit.py
	eos/saveddata/module.py
2016-11-22 12:34:10 -05:00
Ebag333
870e333605 Rebase from pyfa.org/master
# Conflicts:
#	eos/effects/boosterarmorhppenalty.py
#	eos/effects/boosterarmorrepairamountpenalty.py
#	eos/effects/boostercapacitorcapacitypenalty.py
#	eos/effects/boostermaxvelocitypenalty.py
#	eos/effects/boostermissileexplosioncloudpenaltyfixed.py
#	eos/effects/boostermissileexplosionvelocitypenalty.py
#	eos/effects/boostermissilevelocitypenalty.py
#	eos/effects/boostershieldcapacitypenalty.py
#	eos/effects/boosterturretfalloffpenalty.py
#	eos/effects/boosterturretoptimalrangepenalty.py
#	eos/effects/boosterturrettrackingpenalty.py
#	eos/saveddata/character.py
#	eos/saveddata/drone.py
#	eos/saveddata/fighter.py
#	eos/saveddata/mode.py
#	eos/saveddata/module.py
2016-11-21 22:21:25 -08:00
Ebag333
7ea3103c25 Updated docstring with more information 2016-11-21 22:02:16 -08:00
Ebag333
3aa60ac669 Make Effects Togglable 2016-11-21 22:02:16 -08:00
blitzman
81612cc32a Remove border from note box text area 2016-11-21 23:51:18 -05:00
Ryan Holmes
d3caee328f Merge pull request #799 from IndictionEve/ActiveFighterAbilities
Activate fighter standard attack and limit active fighters
2016-11-21 23:18:40 -05:00
blitzman
d5af6127e5 Tweaks 2016-11-21 23:02:29 -05:00
blitzman
5eb5fb3310 Merge branch 'drop-null-sec-com' of git://github.com/resinneublem/Pyfa into resinneublem-drop-null-sec-com 2016-11-21 22:56:01 -05:00
blitzman
8605bab4d4 Fix effects running when they shouldn't 2016-11-21 21:59:44 -05:00
Ebag333
1540c9463a Added unused attributes 2016-11-21 13:10:59 -08:00
Ebag333
130105ca9f Fixed attribute, removed duplicate 2016-11-21 12:53:57 -08:00
blitzman
cb225eabb3 Get a working migration for command fits. 2016-11-20 22:06:26 -05:00
blitzman
72245d8ebe Fix bad merge 2016-11-20 21:53:49 -05:00
Ebag333
96505e4421 Industrial core for Rorq 2016-11-20 18:37:12 -08:00
blitzman
fbb1750528 Merge branch 'master' into singularity
Conflicts:
	eos/db/saveddata/fit.py
	gui/additionsPane.py
2016-11-20 20:52:23 -05:00
Ryan Holmes
dad63b6d77 Merge pull request #821 from resinneublem/notes-field
Adds a new notes pane for each fit
2016-11-20 20:48:02 -05:00
blitzman
14e69b1e59 Add "Command Fit" context menu 2016-11-20 19:19:03 -05:00
blitzman
883917d5d6 Add missing effects 2016-11-20 19:17:40 -05:00
blitzman
deeccc85a3 Fix command boosts (attributes renamed) 2016-11-20 19:08:23 -05:00
Resin Neublem
cfa57a70dc Remembers user's meta filtering choices
There is a lot of logic that overwrites the user's choices of meta filtering on every search.

That's a little too clever. Especially if the user is looking for different variations of a certain meta.

If a user wants to include the other meta buttons they can re-add them after filtering.

closes: https://github.com/pyfa-org/Pyfa/issues/818
2016-11-20 16:28:18 -05:00
blitzman
e6dfb1e90a Update some effects and headers 2016-11-20 16:04:32 -05:00
blitzman
e03d3278a0 Update effect headers 2016-11-20 15:37:55 -05:00
blitzman
eae4bb75e5 more fixes 2016-11-20 15:37:12 -05:00
Resin Neublem
e6dead2e27 Groups drones before generating DNA
Drones can and often are in different stacks due to bandwidth and skills. The DNA would mess up in these cases because they would include duplicate ids with different numbers.

This commit groups the drones by the itemID before generating the DNA.

closes: https://github.com/pyfa-org/Pyfa/issues/367
2016-11-20 15:25:30 -05:00
blitzman
59b854b00d Fix some effects 2016-11-20 15:25:27 -05:00
Resin Neublem
675533a732 Drops null-sec.com as an option
It seems like it would be a good idea to make this user configurable so they could enter whatever domain they want.

However with this entire HTML export feature being questionable, I didn't go that far. https://github.com/pyfa-org/Pyfa/issues/825

closes: https://github.com/pyfa-org/Pyfa/issues/826
2016-11-20 14:46:18 -05:00
blitzman
7751a2e072 Merge branch 'AscendencyPatch' of https://github.com/Ebag333/Pyfa into Ebag333-AscendencyPatch 2016-11-20 14:44:53 -05:00
blitzman
b4bbc82ba1 Merge branch 'master' into singularity
Conflicts:
	eos/db/saveddata/fit.py
	eos/effects/armoredwarfaremindlink.py
	eos/effects/elitebonuscommanddestroyerarmored1.py
	eos/effects/elitebonuscommanddestroyerinfo1.py
	eos/effects/elitebonuscommanddestroyerinfohidden1.py
	eos/effects/elitebonuscommanddestroyersiege1.py
	eos/effects/elitebonuscommanddestroyerskirmish1.py
	eos/effects/elitebonuscommandshiparmoredcs3.py
	eos/effects/elitebonuscommandshipinformationcs3.py
	eos/effects/elitebonuscommandshipinformationhiddencs3.py
	eos/effects/elitebonuscommandshipsiegecs3.py
	eos/effects/elitebonuscommandshipskirmishcs3.py
	eos/effects/miningforemanmindlink.py
	eos/effects/shipbonuscarriera4warfarelinksbonus.py
	eos/effects/shipbonuscarrierc4warfarelinksbonus.py
	eos/effects/shipbonuscarrierg4warfarelinksbonus.py
	eos/effects/shipbonuscarrierm4warfarelinksbonus.py
	eos/effects/shipbonusforceauxiliarya4warfarelinksbonus.py
	eos/effects/shipbonusforceauxiliaryc4warfarelinksbonus.py
	eos/effects/shipbonusforceauxiliaryg4warfarelinksbonus.py
	eos/effects/shipbonusforceauxiliarym4warfarelinksbonus.py
	eos/effects/shipbonussupercarriera5warfarelinksbonus.py
	eos/effects/shipbonussupercarrierc5warfarelinksbonus.py
	eos/effects/shipbonussupercarrierg5warfarelinksbonus.py
	eos/effects/shipbonussupercarrierm5warfarelinksbonus.py
	eos/effects/subsystembonusamarrdefensivearmoredwarfare.py
	eos/effects/subsystembonusamarrdefensiveinformationwarfare.py
	eos/effects/subsystembonusamarrdefensiveinformationwarfarehidden.py
	eos/effects/subsystembonusamarrdefensiveskirmishwarfare.py
	eos/effects/subsystembonuscaldaridefensiveinformationwarfare.py
	eos/effects/subsystembonuscaldaridefensiveinformationwarfarehidden.py
	eos/effects/subsystembonuscaldaridefensivesiegewarfare.py
	eos/effects/subsystembonuscaldaridefensiveskirmishwarfare.py
	eos/effects/subsystembonusgallentedefensivearmoredwarfare.py
	eos/effects/subsystembonusgallentedefensiveinformationwarfare.py
	eos/effects/subsystembonusgallentedefensiveinformationwarfarehidden.py
	eos/effects/subsystembonusgallentedefensiveskirmishwarfare.py
	eos/effects/subsystembonusminmatardefensivearmoredwarfare.py
	eos/effects/subsystembonusminmatardefensivesiegewarfare.py
	eos/effects/subsystembonusminmatardefensiveskirmishwarfare.py
	eos/saveddata/fit.py
	eos/saveddata/module.py
	gui/shipBrowser.py
	scripts/prep_data.py
	service/fit.py
2016-11-20 14:42:19 -05:00
blitzman
a0a0ec9b1f Merge branch 'master' of https://github.com/pyfa-org/Pyfa 2016-11-20 14:29:18 -05:00
blitzman
26285cfc95 Tweaks 2016-11-20 14:28:51 -05:00
blitzman
6799e71f1a Merge branch 'projectedRightClickMenu' of git://github.com/IndictionEve/Pyfa into IndictionEve-projectedRightClickMenu 2016-11-20 14:19:45 -05:00
Ryan Holmes
8806c941a8 Merge pull request #816 from Ebag333/LimitLanaguage
Limit lanaguage from multi to en-us
2016-11-20 14:16:47 -05:00
Resin Neublem
78cbed516a Adds a new notes pane for each fit
This allows users to save text notes for each fit. They may do this for history, or usage, etc.
2016-11-20 14:11:42 -05:00
blitzman
2281fae615 Merge branch 'EosCodeCleanup-V2' of https://github.com/Ebag333/Pyfa into Ebag333-EosCodeCleanup-V2
Conflicts:
	eos/effects/mininginfomultiplier.py
2016-11-20 13:59:14 -05:00
Ryan Holmes
1192a0658a Merge pull request #806 from Ebag333/GitIgnore
Ignore temp files
2016-11-20 13:55:18 -05:00
blitzman
7f2ac25455 Remove fleet booster context menu on fit 2016-11-20 13:54:56 -05:00
blitzman
62a696cc4b Only apply command boosts when command module is active, and add t2 command burst effect 2016-11-20 13:21:59 -05:00
blitzman
11716f7f94 Add command processor effect 2016-11-20 03:22:28 -05:00
blitzman
180166156a Revert mining change (#771) 2016-11-20 02:51:15 -05:00
blitzman
3c8bab92b5 Add some missing effects 2016-11-20 02:17:57 -05:00
Ryan Holmes
cf361593a4 Merge pull request #771 from Ebag333/MiningCrystalBonus
Applied Mining Crystal Bonus to modules
2016-11-20 02:00:02 -05:00
blitzman
8ad639a122 Add titan command effects 2016-11-20 01:54:45 -05:00
blitzman
a7cd445cef Add Mining Burst effects 2016-11-20 01:33:22 -05:00
blitzman
380d74b333 Fix issue with gangboost not recalculating. We really should ensure that a command fit that has been calcuated does not need ot recalculate unless it's changed / is needed. But that's for a different time. 2016-11-20 01:14:40 -05:00
blitzman
eade4f0ebd Add the four main combat boost module effects 2016-11-20 00:59:07 -05:00
blitzman
08be50caf2 More work on command boosts 2016-11-19 23:53:49 -05:00
Ebag333
6a5c86b84f Should be all the Rorq and Orca effects. 2016-11-19 18:51:59 -08:00
Ebag333
1fb5bbc36e Effects used by Orca
first pass
2016-11-18 20:53:57 -08:00
Ebag333
d6edb57a10 Update to current TQ DB 2016-11-18 20:53:39 -08:00
Ebag333
d3fdf9854d Add versions
Updated Gnosis to point to at least the current version.

Pinned Requests as there's a bug in the most recent version. (Only applies to Python 3, but....)
2016-11-18 01:01:08 -08:00
Ebag333
3217980ada Revert "Switch Shield/Cap to using new formula"
This reverts commit d2a52e26b2.
2016-11-16 12:11:27 -08:00
Ryan Holmes
29b5a7433d Trying to flesh out how command boosts are gonna work. 2016-11-16 09:54:02 -05:00
Ebag333
5bca2d723e Change from multi to en-us only
Allows this to run in 32 bit Python.
2016-11-15 10:10:19 -08:00
Ebag333
d2a52e26b2 Switch Shield/Cap to using new formula
The old formula was surpsingly close in most scenarios.  It is, however,
hardcoded to 25% which isn't always peak cap/shield regen.
2016-11-14 05:27:16 -08:00
Ebag333
8a4fe1627e Requirements for Pyfa
Caught most of the main ones, I think.
(Yes I'm sneaking EVE-Gnosis in here, just so I don't have a conflict
when I submit the cap/shield sim fix)
2016-11-14 01:37:23 -08:00
Indiction
a9fb55fedd Add "projected" to selected fitting via shipbrowser right click menu 2016-11-13 20:48:44 +01:00
Indiction
04c30e70af Fighters for export and import functions 2016-11-10 23:28:21 +01:00
Ebag333
c0210895e9 Ignore temp files
These don't exist for long, but could catch them in a commit if you
clicked commit too quickly.
2016-11-09 07:44:24 -08:00
Ebag333
fe9917e620 Updated docstring with more information 2016-11-09 07:21:27 -08:00
Ebag333
a3dfa3b5ba Make Effects Togglable 2016-11-09 00:46:19 -08:00
blitzmann
34243b7b71 Get a working UI skeleton going for assigning boost fits 2016-11-08 19:36:57 -05:00
blitzmann
9fd81e8acd Copy projected view into a command view, first step to developing new command burst structure 2016-11-08 00:21:25 -05:00
Indiction
bbc4ef8146 Activate "standard attack" if available.
If there is no "standard attack" all other abilities set active except propmods
2016-11-07 23:28:27 +01:00
Ebag333
7fe7056c12 Drop unicode 2016-11-07 12:18:36 -08:00
Ebag333
ab32a3afb0 Change to shorthand unicode 2016-11-07 12:09:20 -08:00
Ebag333
ea3e5e273f Handle Lockbreaker, Void, and Focused Void Bombs 2016-11-07 10:27:51 -08:00
blitzman
6849478226 Change hyphens in fitting tooltip to unicode dashes 2016-11-06 21:51:33 -05:00
Ebag333
b6c5183d40 Removed actual fleet files. Cleaned up __init__.py that had references. 2016-11-06 16:38:21 -08:00
Ebag333
e5d65b97ce Merged changes from Pyfa.org\Master to branch 2016-11-06 16:33:28 -08:00
Indiction
6cda47be9f Activate all fighter abilities by default and deactivate fighter groups if more than the maximum number of fighters are in bay 2016-11-06 23:19:18 +01:00
Indiction
a0ef1a3d9b change to ternary operators (less ugly) 2016-11-06 20:37:24 +01:00
Indiction
ba47420577 Bugfix: Unable to handle ships without traits (Citadels) 2016-11-06 18:47:56 +01:00
Indiction
806f17545f Moved HTML remover into ShipItem and FitItem function 2016-11-06 16:36:12 +01:00
Indiction
f0f5b4c04c Tooltip to Ships and Fittings 2016-11-06 16:14:49 +01:00
Ebag333
ad76104033 Revert "Create variables before they are referenced. "
1dc15936ed

This is a problem for us.  See #794 for more details.
2016-11-04 14:18:18 -07:00
Ryan Holmes
c6e481efcf Merge pull request #791 from IndictionEve/OpenFittingsInNewPage
open fittings in new page by default
2016-11-04 12:48:23 -04:00
Ryan Holmes
2ad0c00c17 Merge pull request #792 from ppfeufer/patch-1
fixed link to development repository
2016-11-04 12:43:19 -04:00
Peter Pfeufer
26ab7d5e6f fixed link to development repository 2016-11-04 07:18:35 +01:00
Ebag333
832e7e6637 Revert moving projectionInfo out
Need to handle this better. :/
2016-11-03 22:15:40 -07:00
Ryan Holmes
8c7972ed78 Merge pull request #784 from Ebag333/Gitignore
Include more standard exceptions to gitignore
2016-11-03 15:01:23 -04:00
Ryan Holmes
05bbc14965 Merge pull request #789 from Ebag333/BurstJammerStrengthFix
Add Burst Jammer to effects modified by Scorpion hull bonus
2016-11-03 14:59:21 -04:00
Ryan Holmes
e7feee6878 Merge pull request #759 from minlexx/feature/proxy_auth
Add login/password for proxy authorization in network settings
2016-11-03 14:58:08 -04:00
Indiction
791ddcb9a1 load fitting in selected page if ctrl-key pressed and option active 2016-10-30 01:05:22 +02:00
Indiction
12d5a21982 Option to open fittings in a new page by default 2016-10-30 00:43:23 +02:00
Indiction
7493b92d83 Mining Yield set to "per hour". This is the way miners calculate. 2016-10-29 18:57:38 +02:00
Ebag333
e7c79e58b4 Use in instead of or, because that makes sense 2016-10-26 10:09:43 -07:00
Ebag333
0dbdbf7cfe Add Burst Jammer to effects modified by Scorpion hull bonus 2016-10-26 08:42:49 -07:00
Ebag333
f39ca66dbf Include more standard exceptions to gitignore 2016-10-23 13:20:45 -07:00
Ryan Holmes
8d80494b8d Merge pull request #783 from Ebag333/ExportHiddenAttribs
Implement new method for exporting values
2016-10-23 14:40:38 -04:00
Ebag333
058768baab Implement new method for finding values
Original method would only export values that were attached directly to
the ship.  New method starts from the modified dict, which will export
values without attribute IDs or original values.
2016-10-23 10:44:59 -07:00
blitzman
cfee6fdcd0 Add effects for command mindlinks 2016-10-23 03:02:47 -04:00
blitzman
34c95bea5d Apply command burst skills to the bursts and charges. Handle renamed items. 2016-10-23 02:34:29 -04:00
blitzman
50911c7fc8 test 2016-10-22 00:02:12 -04:00
Ryan Holmes
4e1f0f9cc6 Merge pull request #779 from Ebag333/ExportButton
Add button for exports
2016-10-21 22:29:40 -04:00
Ebag333
2b1abfc9b2 No longer refresh GUI. They can click the refresh button themselves, lazy jerks. 2016-10-21 19:28:54 -07:00
Ebag333
595c139ca8 Add button for exports 2016-10-21 10:53:47 -07:00
blitzman
6637feb3a6 Update to sisi 1086428 2016-10-20 00:43:45 -04:00
Ebag333
928246a8ca Even more PEP8 fixes!
Also, create a variable so we can't reference it and have it not exist.
Because that would be bad.
2016-10-19 14:26:46 -07:00
Ebag333
fd3e0bbebf Formatting and spacing 2016-10-19 14:14:34 -07:00
Ebag333
2a0a572b76 PEP8 formatting! \o/ 2016-10-19 14:03:31 -07:00
Ebag333
a314cd7cfd Revert adding the __init___ 2016-10-19 13:33:25 -07:00
Ebag333
cd28375019 Put some imports back. Prooooobably not needed but vOv 2016-10-19 13:32:57 -07:00
Ebag333
7cf4134a73 SQLAlchemy doesns't like is, requires ==
Oops.
2016-10-19 13:32:35 -07:00
Ebag333
44c76f0b98 Even more PEP8 cleanup 2016-10-19 12:29:33 -07:00
Ebag333
69a122a271 more PEP8 cleanup 2016-10-19 12:26:03 -07:00
Ebag333
0c0eb327f7 lots of PEP8 cleanup 2016-10-19 12:25:31 -07:00
Ebag333
74ce79ba8f Add inspection exception to ignore reassignment of self 2016-10-19 12:11:30 -07:00
Ebag333
1dc15936ed Create variables before they are referenced.
Resolves attribute reference validation errors in pyCharm
2016-10-19 12:08:35 -07:00
Ebag333
126fa7be29 remove trailing semicolon 2016-10-19 11:51:12 -07:00
Ebag333
d61251e9b3 Reformatting eos (root) 2016-10-19 11:46:26 -07:00
Ebag333
f9f53a13c0 Reformatting eos.saveddata 2016-10-19 11:42:45 -07:00
Ebag333
b4360d44f1 Reformatting eos.graph 2016-10-19 11:38:43 -07:00
Ebag333
574d575cad Reformatting eos.db 2016-10-19 11:37:28 -07:00
Ebag333
5e10339c20 Reformatting eos.db.saveddata 2016-10-19 11:33:29 -07:00
Ebag333
feb83cf737 Revert "Revert "Reformatting eos.db.gamedata""
This reverts commit 0ff4aec400.
2016-10-19 11:26:40 -07:00
Ebag333
0ff4aec400 Revert "Reformatting eos.db.gamedata"
This reverts commit e2944f6be7.
2016-10-19 11:24:03 -07:00
Ebag333
e2944f6be7 Reformatting eos.db.gamedata 2016-10-19 11:19:24 -07:00
Ebag333
3e842f30f1 Reformatting all effect files for readability and better PEP8 compliance 2016-10-19 11:16:32 -07:00
Ebag333
481619101b Reformatting for PEP8 standards 2016-10-19 11:09:13 -07:00
Ebag333
2ac66d87af commented out reload as not used 2016-10-19 10:54:59 -07:00
Ebag333
e818ce62c8 Removed line from legacy implementation 2016-10-19 10:54:47 -07:00
Ebag333
49851d1131 Removed unnecessary assignment (variable assigned later) 2016-10-19 10:37:59 -07:00
Ebag333
a8061c9276 Remove unnecessary backslash
and a bit of reformatting
2016-10-19 08:58:19 -07:00
Ebag333
4036ac8cd2 Move projectionInfo so it can't be referenced without being assigned 2016-10-19 08:53:11 -07:00
Ebag333
57bbbfcc3b Convert triple single quote docstring to triple double quote docstring
For better consistency
2016-10-19 08:39:12 -07:00
Ebag333
68f769aac2 Remove redundent parentheses 2016-10-19 08:37:07 -07:00
Ebag333
ef9bd3edc8 Change class method from self to cls
Better match coding standards
2016-10-19 08:33:28 -07:00
Ebag333
45f88a92dc Use list literal 2016-10-19 08:27:29 -07:00
Ebag333
02c8b46b74 Fixed formatting issues
Mixed spaces/tabs.  Also converted to using container instead of module.
Reformatted file.
2016-10-19 08:26:18 -07:00
Ebag333
32068e8d8e Create set directly 2016-10-19 08:22:45 -07:00
Ebag333
ccd8ee87f3 Create dictionary directly 2016-10-19 08:18:47 -07:00
Ebag333
c73b446482 Comparison with None performed iwth equality operators 2016-10-19 08:17:34 -07:00
Ebag333
699276ca58 Add __init__ to classes missing it
Mostly just to shut pyCharm up, but it's good practice.
2016-10-19 08:15:36 -07:00
Ebag333
3187bab90a Simplified Chained Comparison 2016-10-19 08:11:20 -07:00
Ebag333
c1dfd676e1 Simplified boolean check 2016-10-19 08:08:50 -07:00
Ebag333
c7554ec400 Removed reassigned var
i was already declared by the parent loop, removed reassignment
2016-10-19 08:06:39 -07:00
Ryan Holmes
f1771a61d0 We're now using Slack for communications \o/ 2016-10-18 11:31:41 -04:00
Ebag333
d3cb968c19 Why the hacks, CCP? 2016-10-16 21:44:11 -07:00
blitzman
9c685263bb Merge branch 'master' of https://github.com/pyfa-org/Pyfa 2016-10-17 00:14:37 -04:00
blitzman
d43db40469 Fix running mining effect for every active drone in the stack 2016-10-17 00:14:06 -04:00
blitzman
a50471c0a6 Merge branch 'MiningDroneBonus' of https://github.com/Ebag333/Pyfa into Ebag333-MiningDroneBonus 2016-10-17 00:01:49 -04:00
Ryan Holmes
8d215f7d7f Merge pull request #764 from Ebag333/MiningDroneRigStackingPenalty
Removed stacking penalty from Mining Drone Rigs
2016-10-17 00:00:23 -04:00
Ebag333
eb9b034d65 Fixed maths with more than 1 drone
Also tightened up code a bit. Does nothing now if there isn't a
miningDroneAmountPercent
2016-10-16 20:52:09 -07:00
blitzman
c52fecead3 Fix fit drag image getting stuck when mouse capture is lost (#479) 2016-10-16 22:32:40 -04:00
Ryan Holmes
5b09cf7c4d Merge pull request #769 from Ebag333/IntegratedAnyalyzersEffectCountedTwice
Integrated Hacking Modules Give Double Bonus Incorrectly
2016-10-16 22:13:55 -04:00
Ebag333
9be9a21b22 Applied Mining Crystal Bonus to modules
Previously the mining crystal bonus was not applied to modules, so
adding a crystal didn't change the amount mined at all.  This now
applies.  Left the old application in place, so it still applies to a
nonsense `specialtyMiningAmount` stat if you want to see that seperated
out for some weird reason.
2016-10-16 15:09:17 -07:00
Ebag333
3e4b748952 Subsystems calculate after projection calcs
Moved the 4 remote rep subsystem effect bonuses to calculate early in
the engine.  This correctly calculates these bonuses for effects,
previously these effect bonuses wouldn't be calculated until after
projection calcs ran.
2016-10-16 12:47:50 -07:00
Ebag333
9fe91472cf Integrated Hacking Modules Give Double Bonus Incorrectl
Because integrated modules are a single module with both Data and Relic
analizer built into one, ship hulls were giving a bonus twice over.
Changed it from adding the bonus for each individually (which worked
fine when it was broken out) to simply adding it if either Hacking or
Archaeology skill is present.
2016-10-16 12:14:21 -07:00
Alexey Min
a06810c7c8 Network settings GUI: Use "Username:" and "Password:" for labels, as you wish 2016-10-09 13:20:20 +05:00
Alexey Min
160de64135 Network settings GUI: be prepared for None return from getProxyAuthDetails() 2016-10-09 13:16:38 +05:00
Alexey Min
2b5535c5d1 service/network: change "if" condition as suggested by @blitzmann 2016-10-09 13:14:37 +05:00
Alexey Min
1e9f911385 service/settings: setProxyAuthDetails(): empty string as login means no password too 2016-10-09 13:07:13 +05:00
Alexey Min
2a9a4fbdff service/settings: make getProxyAuthDetails() return None again 2016-10-09 13:05:39 +05:00
Ryan Holmes
7331c158b6 Merge pull request #756 from MrNukealizer/FighterFixes
Fixed a few fighter/carrier bugs:
2016-10-08 23:07:01 -04:00
Ebag333
ddcbbb7fcf Use the mining effect
This effect is only used by mining drones, and it's not been
implemented.

See #762 for more info
2016-10-07 20:43:14 -07:00
Ebag333
e7ac1597bb Removed stacking penalty 2016-10-07 09:05:18 -07:00
Ryan Holmes
11e8ea4fe8 Merge pull request #761 from petosorus/fix-numCharges
Fix of the number of charges in multibuy
2016-10-06 10:49:50 -04:00
petosorus
1853500729 Fix of the number of charges in multibuy 2016-10-06 08:45:35 +02:00
Mr. Nukealizer
a349626923 Changed fighter selection for NSA bonus 2016-10-05 22:44:10 -07:00
Ryan Holmes
f466f9cc49 Merge pull request #751 from Ebag333/T2-Resist-Profiles
Add T2 resists and 90% resist profile
2016-10-05 22:27:07 -04:00
blitzman
13b452223d bump dev 2016-10-02 22:02:50 -04:00
Alexey Min
c166fa6bf5 service/network: revert to simple ProxyHandler with login:password@host:port format
previous sh@t with password managers and proxy basic auth handlers did not work for me :(
this way is simpler AND working.

Also explicitly use the default urllib2 opener if proxy is disabled (bug fix)
2016-10-02 22:08:58 +05:00
Alexey Min
3a7e343f1c Network preferences settings: GUI to set proxy login/password 2016-10-02 19:15:32 +05:00
Alexey Min
02557701f0 NetworkSettings: never return None in proxy auth details getter,
return a tuple with empty strings instead
2016-10-01 13:47:27 +05:00
Mr. Nukealizer
30755fbb73 Made fighter DPS calculations more accurate when factoring in reload time. 2016-09-30 23:44:12 -07:00
Mr. Nukealizer
c1b3491933 Fixed superiority fighter attack and added Evasive Maneuvers ability. 2016-09-30 21:40:10 -07:00
Mr. Nukealizer
5467a58b04 Fixed a few fighter/carrier bugs:
* Omnidirectional Tracking Link overheat applies to explosion radius/velocity bonuses.
* Networked Sensor Array affects fighters' sensor strengths.
* Long range heavy fighters no longer appear to require Bomb Deployment.
* Carriers and supercarriers are no longer capped at 300km lock range.
2016-09-30 20:25:55 -07:00
Alexey Min
75f07afcb7 NetworkSettings: add setter method for proxy auth details (login, password) 2016-09-29 20:21:11 +05:00
blitzman
c64838f7f5 Update effect headers and bump stable 2016-09-28 00:20:30 -04:00
Alexey Min
a0359b8bd9 [WIP] Add basic proxy authorization support to Network service class.
not tested yet, will test later
2016-09-28 01:42:59 +05:00
Ryan Holmes
e2434619b5 Merge pull request #733 from petosorus/multibuy-export
Multibuy format export feature, adresses #726
2016-09-27 01:49:12 -04:00
blitzman
becb3d4bb6 Fit Citadel imports (#749) 2016-09-27 01:45:21 -04:00
blitzman
44fb4a558c fix some rigs 2016-09-27 01:25:49 -04:00
Ryan Holmes
9a574cb31b Merge pull request #740 from Ebag333/ECM-Burst-Effect
Implementing ECM Burst Jammer as a projected effect
2016-09-27 00:35:26 -04:00
blitzman
4fa4640991 Update to YC118.8 1.3 2016-09-27 00:34:14 -04:00
Ebag333
35b5002eca Add T2 resists and 90% resist profile 2016-09-25 22:52:11 -07:00
blitzman
b5574ca535 bump dev 2016-09-25 22:04:54 -04:00
Alexey Min
8fec03bcbf Add proxy login/pass fields to NetworkSettings class.
Use named "constants" instead of hardcoded numbers for proxy "mode" parameter
2016-09-25 04:16:07 +05:00
Mr. Nukealizer
7de90cc2d8 Changed forceItemAttr to increaseItemAttr 2016-09-19 02:50:00 -07:00
Mr. Nukealizer
c700d9b661 Adjusted the tolerance for finding loops and rounded the result 2016-09-18 06:27:14 -07:00
Ebag333
48f264851d Implementing ECM Burst Jammer as a projected effect 2016-09-16 11:39:00 -07:00
petosorus
467d244bea Booster export in EFT Implants export 2016-09-16 18:40:24 +02:00
petosorus
840c041f8c Fighters get exported in EFT export 2016-09-16 12:06:17 +02:00
Ebag333
c30190f63e Revert "Revert "Purging fleet bonuses from code base""
This reverts commit 6e54d6788c.
2016-09-15 15:27:30 -07:00
Ebag333
6e54d6788c Revert "Purging fleet bonuses from code base"
This reverts commit 68f45706ab.
2016-09-15 15:27:10 -07:00
Ebag333
68f45706ab Purging fleet bonuses from code base 2016-09-15 15:07:59 -07:00
petosorus
43ee031121 Number of charges loaded 2016-09-15 16:01:32 +02:00
petosorus
533c86de16 Removal of empty lines when there are empty slots 2016-09-15 11:20:45 +02:00
petosorus
ba3c9b87b5 Fighters handling in Multibuy export 2016-09-15 08:27:38 +02:00
petosorus
8338b6adb3 Implants and boosters in Multibuy export 2016-09-15 08:19:21 +02:00
petosorus
54c950f951 Multibuy format export feature 2016-09-14 23:38:09 +02:00
blitzman
d1c18d9642 Bump stable 2016-09-06 23:51:25 -04:00
Ryan Holmes
19090e7353 Merge pull request #720 from BartMassey/master
fixed syntax typo in modulebonusomnidirectionaltrackingenhancer.py
2016-09-06 23:45:01 -04:00
Bart Massey
1d52382460 fixed syntax typo in modulebonusomnidirectionaltrackingenhancer.py 2016-09-03 00:26:29 -07:00
blitzman
a074199219 Bump stable 2016-09-01 22:20:51 -04:00
blitzman
c1179ddb40 Fix issue with fighter bomber charges causing skill requirement warnings 2016-08-30 23:45:21 -04:00
blitzman
ef06a1ccb1 Merge remote-tracking branch 'origin/master' 2016-08-30 23:16:12 -04:00
Ryan Holmes
e31f3cb46e Update modulebonusomnidirectionaltrackingenhancer.py 2016-08-30 23:14:48 -04:00
Ryan Holmes
9f9cd29a7f Merge pull request #712 from pyfa-org/feature/citadels
Feature/citadels
2016-08-30 09:23:34 -04:00
blitzman
ed24ef2615 Delete projected modules from citadels 2016-08-28 20:22:30 -04:00
blitzman
c5b78c20e5 Do not allow projection to citadels 2016-08-28 20:00:46 -04:00
blitzman
f98f6a120b Bump dev, fix issue with applying fleet boosts 2016-08-28 19:35:55 -04:00
blitzman
6192343add bump stable 2016-08-26 21:55:52 -04:00
blitzman
6728aba0a5 Fix icons 2016-08-26 21:53:47 -04:00
blitzman
64b75303af Quick fix for override window crashing trying to load items that no longer exist (#706) 2016-08-26 21:52:56 -04:00
blitzman
0eef1ee480 Fix for #705 2016-08-26 21:29:12 -04:00
blitzman
fef087ae46 jk 2016-08-26 21:13:03 -04:00
blitzman
0e15adecf2 Bump stable 2016-08-24 22:31:44 -04:00
blitzman
be6addf4d0 update dist (holy shit how long has this not been in master?) 2016-08-24 22:16:05 -04:00
blitzman
052e9b68b5 add missing service slot 2016-08-24 22:01:39 -04:00
blitzman
fd91f56e55 Give citadels their own Upwell logo 2016-08-24 21:46:14 -04:00
Ryan Holmes
a0a35d60ec Merge pull request #700 from PageArkanis/feature/citadels
fixed exception that froze interface
2016-08-24 20:45:01 -04:00
blitzman
639f3d27b4 Fix citadel rig bonuses 2016-08-24 20:41:38 -04:00
blitzman
e3040854d8 Merge remote-tracking branch 'origin/master' 2016-08-24 20:23:22 -04:00
Ryan Holmes
4597fd27da Merge pull request #701 from shagie/master
Update README.md with current brew instructions
2016-08-19 14:36:50 -04:00
shagie
88bceae6b0 Update README.md with current brew instructions
```
Error: No available formula with the name "pyfa" 
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
This formula was found in a tap:
Caskroom/cask/pyfa
To install it, run:
  brew install Caskroom/cask/pyfa
```
2016-08-19 13:00:07 -05:00
PageArkanis
9ace9815b6 fixed exception that froze interface 2016-08-19 15:11:06 +01:00
blitzman
bfda7014db Fix citadels not showing up in ship search 2016-08-14 21:05:30 -04:00
blitzman
5107d383e0 Merge branch 'citadel' 2016-08-14 20:40:32 -04:00
blitzman
32ba3fa516 Fix targeting delay effect running when rig is offline (#696) 2016-08-12 21:08:21 -04:00
blitzman
69723d1bd0 Fix for #695 2016-08-12 21:01:22 -04:00
blitzman
5a5ab846c2 Fix for search 2016-08-12 20:05:22 -04:00
Mr. Nukealizer
394381c736 I think I changed something...
This still works the same, but I think I changed a couple things that didn't look right.
2016-07-30 04:20:00 -07:00
Mr. Nukealizer
fea1a28760 Grr, tab characters, grr 2016-07-29 22:49:34 -07:00
Mr. Nukealizer
f895e82c69 Commented out logging and made a couple tweaks 2016-07-29 22:44:38 -07:00
Mr. Nukealizer
710d15a66c Add files via upload
New Reactive Armor Hardener code that should work correctly.
2016-07-29 01:04:07 -07:00
blitzman
d81a51bd8c bump version 2016-07-24 18:29:36 -04:00
blitzman
3ac733a30c Merge branch 'master' into citadel 2016-07-24 01:25:57 -04:00
Ryan Holmes
7a715fc471 Merge pull request #684 from Ebag333/Neuts
Applied size reduction effect to neut/nos
2016-07-24 01:25:15 -04:00
Ryan Holmes
b9b72ebf40 Merge pull request #685 from Ebag333/RAHBug
RAH gets pissy if there is no damage profile
2016-07-18 23:26:00 -04:00
Ebag333
071dfaf656 Removed ship size, as this applies only to NPCs 2016-07-18 06:41:50 -07:00
Ebag333
88384a2fd8 RAH gets pissy if there is no damage profile
If there is no damage profile (likely from one that's deleted, and
somehow the profile doesn't get set back to uniform), then RAH tries to
apply null values.  This skips making the RAH reactive if that scenario
happens.
2016-07-17 14:10:58 -07:00
Ebag333
a2c0049488 Moved neut reduction logic into fit.py 2016-07-17 13:43:52 -07:00
Ebag333
60288204fc switched from using container/module to bag_of_dicks
Also cleaned up some warnings PyCharm was throwing.
2016-07-17 11:24:24 -07:00
Ebag333
7d0f65c1f3 Moved the sig size reduction under projected 2016-07-17 10:52:08 -07:00
Ebag333
a35b9b5d3f Added sig reduction for cap neuts 2016-07-17 10:47:15 -07:00
Ebag333
2a2842100a Applied size reduction effect to neut/nos 2016-07-17 00:01:41 -07:00
blitzmann
faed0ce159 Merge remote-tracking branch 'origin/master' into citadel
Conflicts:
	config.py
2016-07-16 21:45:28 -04:00
blitzmann
23a6849fe3 Bump release 2016-07-07 19:40:21 -04:00
blitzmann
91c6e91023 Fix Cataclysmic Variable effects (#628) 2016-07-07 19:21:41 -04:00
blitzmann
8f64c91677 Update effect headers 2016-07-06 23:52:42 -04:00
blitzmann
842ee3d426 Fix Genolution implant set bonus (#672) 2016-07-06 23:50:31 -04:00
blitzmann
45d338ba3d Add price to item compare (#673) 2016-07-06 22:30:31 -04:00
blitzmann
f141fac3a2 Add fighters to overall fitting price (#674) 2016-07-05 23:34:19 -04:00
blitzmann
7b2a89d66b Add structure rig effects (untested) 2016-07-05 23:26:24 -04:00
blitzmann
4d158d99fd Fix crash related to structure rigs not having meta level, and a traceback that might happen occasionally. 2016-07-05 23:23:55 -04:00
blitzmann
c3983a26c5 Add structure rigs 2016-07-05 00:21:08 -04:00
blitzmann
016854a292 Clean up effects 2016-07-04 23:31:41 -04:00
Ebag333
5d7252cbec fixed referencec 2016-07-04 15:50:00 -07:00
Ebag333
0e0bcf51fc Added Effects Files for Citadel Modules 2016-07-04 14:27:35 -07:00
blitzmann
f396077cd6 Remove stacking penalty from Asklepian implants 2016-07-04 13:52:25 -04:00
blitzmann
1c194b67f3 Restrict projected view after speaking with CCP Larrikin about mechanics 2016-07-04 11:18:47 -04:00
blitzmann
72e77d2264 Fix some wording 2016-07-04 11:05:50 -04:00
blitzmann
10c79ac812 More work on restrictions 2016-07-04 11:01:08 -04:00
blitzmann
fe8c3a4957 Disable fit add on pages based on context (ship vs citadel) 2016-07-04 10:30:04 -04:00
blitzmann
3734be21d6 Fix icons and script and version 2016-07-03 20:48:20 -04:00
blitzmann
8ae6ad879e Add structure skill effects 2016-07-03 20:03:00 -04:00
blitzmann
92b2a35888 Fix omega implant 2016-07-03 17:42:12 -04:00
blitzmann
fb2e6e5c17 Restrict skills being applied to citadels. The effect must be of type "structure" for it to apply. Fix issue with agility 2016-07-03 14:52:00 -04:00
blitzmann
2212311a44 Add effects for Asklepian implant set 2016-07-03 14:25:05 -04:00
blitzmann
ef3791f845 bump dev 2016-07-03 01:11:28 -04:00
blitzmann
6e2878194c Merge branch 'master' into citadel
Conflicts:
	config.py
	service/market.py
2016-07-03 01:10:26 -04:00
blitzmann
e7780485f1 Bump release 2016-07-03 00:41:21 -04:00
blitzmann
7831999563 Update effect headers 2016-07-03 00:40:10 -04:00
blitzmann
7020f4bda9 Fix compare when item doesn't have a meta (#667) 2016-07-03 00:38:22 -04:00
Ryan Holmes
dcd21bd165 Merge pull request #669 from Ebag333/VehementDPSEffectsFile
Fixed type of weapon
2016-07-03 00:26:58 -04:00
Ebag333
4a70028762 Fixed type of weapon
Used to be applied to Naglfar, but everyone knows that Vehement is the
new Naglfar, and never use projectiles after memorial day (only
hybrids).
2016-07-02 01:02:03 -07:00
blitzmann
9255a9e638 bump dev 2016-07-01 23:38:06 -04:00
blitzmann
02736ac92d Bump version 2016-07-01 22:07:56 -04:00
blitzmann
2df01c7157 Merge branch 'singularity' 2016-07-01 22:04:25 -04:00
blitzmann
01a0745b9b Update database and fix some icon related bugs 2016-07-01 22:03:51 -04:00
blitzmann
c7573ad4c3 Update icons / fix script 2016-07-01 00:44:17 -04:00
blitzmann
06f402bb9d Add sde icon script 2016-06-28 23:34:39 -04:00
blitzmann
b9f0812b38 Fix issue with entity editor and wxPython 2.8 2016-06-28 23:24:01 -04:00
blitzmann
cdca8fe236 New effects 2016-06-28 22:00:18 -04:00
blitzmann
c8175d1191 Only compare attributes with display names (ones that don't have display names are normally internal attributes) 2016-06-23 23:19:08 -04:00
blitzmann
7a7a0f1eff Merge branch 'feature/item-compare' into singularity 2016-06-23 22:57:09 -04:00
blitzmann
5176fe0366 Sort by meta level 2016-06-23 22:56:40 -04:00
blitzmann
b4bd6e7acd Ensure we have an active fit when exporting to crest 2016-06-23 22:44:24 -04:00
blitzmann
bd4dbf45af Beautify pyfa's CREST login message 2016-06-23 22:16:08 -04:00
blitzmann
d9fc3d436b Allow EHP toggle to persist between fits (#641) 2016-06-19 23:50:42 -04:00
blitzmann
67143cbc0e Fix for siege stacking penalty (#653) 2016-06-19 23:18:59 -04:00
blitzmann
ed3b2eb1bf Fix energy warfare 2016-06-19 23:04:52 -04:00
blitzmann
7a5e4291a5 Handle renamed groups 2016-06-19 12:40:49 -04:00
blitzmann
d1c6810e1e Update to SISI 1050133 2016-06-19 12:39:09 -04:00
blitzmann
faa9c0a2b9 Fix my merge fail 2016-06-18 23:29:53 -04:00
Ryan Holmes
0456973093 Merge pull request #639 from Ebag333/default-database-profiles
Default database profiles
2016-06-18 23:25:07 -04:00
blitzmann
4a79a4e4d9 Merge remote-tracking branch 'origin/master'
Conflicts:
	gui/mainMenuBar.py
2016-06-18 23:14:23 -04:00
blitzmann
ac46d33a60 Fix CREST export (#655) 2016-06-18 23:10:01 -04:00
Ebag333
0f958bef81 Removed _init_ definition as it's redundant 2016-06-16 19:08:29 -07:00
Ebag333
b79009517e Updated po-ta-toe to po-tah-toh 2016-06-16 14:46:22 -07:00
Ebag333
12ccc96f46 Updated as per Blitzmanns feedback
https://github.com/pyfa-org/Pyfa/pull/639#issuecomment-225749245
2016-06-15 23:42:38 -07:00
Ebag333
47828c38d2 Merged differences from master (more catching up) 2016-06-15 19:40:45 -07:00
blitzmann
afdae6a3d6 Added first iteration of item comparisons. 2016-06-15 22:26:48 -04:00
Ebag333
03d1d8f5a4 Merged changes from pyfa-org/master into branch
Merged changes to see if we can clear up the merge conflict warning
2016-06-15 18:24:40 -07:00
Ryan Holmes
cc4e4c0f13 Merge pull request #649 from Ebag333/ECM-Misc-Column-Improvements
Updated ECM to be more descriptive
2016-06-13 21:21:29 -04:00
Ebag333
2f6f14fef2 Update misc.py 2016-06-13 18:14:41 -07:00
Ryan Holmes
fb590ddfdd Merge pull request #644 from Ebag333/Item-Attributes--Show-Base-Value
Added base column to item window
2016-06-13 20:44:15 -04:00
Ryan Holmes
a5e674cdc4 Merge pull request #650 from Ebag333/Group-Attribute-Overrides-Menu
Grouped Attributes override
2016-06-13 20:37:56 -04:00
blitzmann
e28883dd47 Merge branch 'default-database-profiles' of git://github.com/Ebag333/Pyfa 2016-06-13 20:01:35 -04:00
Ebag333
b4694dcf03 Implemented menu option to import default database values
Allows for existing databases to be updated with the current default
profiles.  Can also be used to inject other defaults (maybe 0 and V
chars?)
2016-06-13 14:13:38 -07:00
Ebag333
4c05d9a687 Grouped Attributes override
Users are confused because they find the menu to edit attribute
overrides, change values, then do not see their values reflected.  There
is an option that needs to be enabled under the edit menu to show the
users overrides.

Moved this option from the edit menu to the window menu (next to the
existing attributes override editor), and grouped them together.
Functionality is not changed, merely placement of the overrides toggle.
2016-06-13 13:54:15 -07:00
Ebag333
53da2f9bb2 Many updates
Redid all the values, especially updated target resist profiles.
Re-implemented the _init_ on service\damagePattern.py to check for
default values.
2016-06-13 13:49:56 -07:00
Ebag333
ea106b6064 Updated to round values that are floats to int
Only ints are handled currently, if you throw a float at it, you'll get
a stacktrace.  This is just a little safety to convert it to an int, so
if we somehow get a float (like via database injection/modification), we
quietly convert it to the expected format
2016-06-12 17:24:49 -07:00
Ebag333
32f671b4f2 No longer show "base" column when looking at a market item
Since they are identical.
2016-06-12 17:07:37 -07:00
Ebag333
25e298ff69 Updated ECM to be more descriptive
Gave it the RAH treatment. Now shows min/max values if it's a racial,
and only one for multispectral.  Tooltip shows all four broken out.
2016-06-12 16:46:18 -07:00
Ebag333
45006fe043 reverted back to original 2016-06-12 12:30:29 -07:00
blitzmann
3e1c561752 Implement reload time in fighter dps logic (#627) 2016-06-12 14:15:25 -04:00
blitzmann
be4b78ee1c Module replacement when dropping market module onto fitting view (#528) 2016-06-12 12:38:25 -04:00
Ryan Holmes
5a2989cae4 Update README
Yes, I originally copied it from Osmium, because :effort:
2016-06-12 03:22:21 -04:00
Ryan Holmes
15519fd783 Update misc.py 2016-06-12 02:18:18 -04:00
Ryan Holmes
a357a5b845 Merge pull request #643 from Ebag333/SeBo-Misc-Column-Improvements
Added sensor strength to handle scripting the SeBo
2016-06-12 02:16:13 -04:00
Ryan Holmes
806b8f135b Merge pull request #634 from Ebag333/master
RAH follows damage profile
2016-06-12 02:13:03 -04:00
Ebag333
f2b636bd44 Rewrote function 2016-06-11 00:50:40 -07:00
Ebag333
0d25eca6e5 Added base column 2016-06-10 21:10:04 -07:00
Ebag333
e5dcac43dc Added sensor strength to handle scripting the SeBo 2016-06-10 20:36:20 -07:00
Ebag333
8629710223 Add RAH misc column and tooltip 2016-06-10 19:33:13 -07:00
Ebag333
111e2cc0de Loads default database values on DB creation
Loads defaults for target resists and damage profiles....for now.

Can be extended to add anything we want on DB creation.  Can be extended to add a "load default value to database" button somewhere down the line, to support people who have existing databases and don't want to recreate them.
2016-06-06 16:25:20 -07:00
Ebag333
8eb0b942c8 Remove _init_ hack to import the default pattern
Removed the kludgey method of using _init_ to check to see if the Uniform 25/25/25/25 damage pattern exists, and if missing create it.

Moved creation of it to prefetch.py.
2016-06-06 16:22:08 -07:00
Ebag333
4c55827aa4 call function to import defaults to database 2016-06-06 16:18:16 -07:00
Ebag333
0a1be7d966 Update adaptivearmorhardener.py 2016-06-06 16:16:56 -07:00
Ebag333
8f3370307a Merge branch 'master' of https://github.com/Ebag333/Pyfa 2016-06-05 00:13:22 -07:00
Ebag333
dd1545c7e1 Merge remote-tracking branch 'refs/remotes/pyfa-org/master' 2016-06-05 00:13:09 -07:00
Ebag333
8ea9bee810 Update adaptivearmorhardener.py 2016-06-04 23:58:34 -07:00
blitzmann
6141356754 Add Ice Products to search results (#600) 2016-05-30 22:43:31 -04:00
blitzmann
e70ea67fec Proper fix to attribute caps 2016-05-30 12:29:06 -04:00
blitzmann
62be4c5bce Merge branch 'master' of git://github.com/Timmeey/Pyfa into Timmeey-master 2016-05-28 17:01:58 -04:00
blitzmann
394a9540b0 Bump dev 2016-05-28 17:01:52 -04:00
Ryan Holmes
62d22f0e74 Merge pull request #629 from wolfwood/aar-amount-display 2016-05-28 16:57:51 -04:00
wolfwood
1cd7b9a250 correct '(E)HP restored over duration' calculation to reflect removal of AAR multiplier from armorDamageAmount 2016-05-27 20:19:24 -07:00
TimmeeY
7044534765 Added Shiptype to fitting name in minimal html export
On minimalistic HTMLExport, the shiptype (name) will be added infront of
the fitting name to all fits on export
2016-05-26 15:03:34 +02:00
blitzmann
9c3b50d622 Bump stable 2016-05-23 23:23:27 -04:00
blitzmann
fd62c254a4 Update to Citadel 1.14 and update effect headers0 2016-05-23 23:22:44 -04:00
blitzmann
90e54c6334 Fix Minokawa and Apostle remote effects (#623) 2016-05-23 23:05:50 -04:00
blitzmann
f423c67979 Fix remote ancillary bonus effects (#626) 2016-05-23 20:19:30 -04:00
blitzmann
4607dd788c Implement ewar resists (#597) 2016-05-22 15:15:21 -04:00
Ryan Holmes
f9c595473f Merge pull request #621 from blitzmann/context-menu-ids
Context menu ids
2016-05-22 14:43:27 -04:00
blitzmann
de6c843e1c Remove cap from target range (#620) 2016-05-22 14:24:43 -04:00
blitzmann
b45924aa52 Fix cycle time bonuses for Lif and Ninazu (#591) 2016-05-22 13:54:58 -04:00
blitzmann
d04ea5b061 Fix EV drones (#619) 2016-05-22 13:33:25 -04:00
blitzmann
7406210c4a Fix remote AAR 2016-05-22 01:38:40 -04:00
blitzmann
c24986fba3 Add missing effect for ancil shield boosts 2016-05-18 00:01:49 -04:00
blitzmann
30c1c00b9b Bump dev 2016-05-18 00:01:48 -04:00
blitzmann
655d658a52 Remove prints 2016-05-16 23:56:46 -04:00
Ebag333
a089c4cbc2 Merge remote-tracking branch 'refs/remotes/pyfa-org/master' 2016-05-16 07:55:15 -07:00
blitzmann
62fd545d24 Restrict citadels to only use citadel modules. Rename Ships tab to Fittings as it no longer just carries ships :(. Fix crash on item stats. 2016-05-15 23:18:39 -04:00
blitzmann
4041ecddc4 Create Citadel class that inherits from Ship. Add Service slots 2016-05-15 22:23:23 -04:00
blitzmann
10f51b41b7 Fix context menu with structure modules (no meta information), add citadel icons. 2016-05-15 19:16:51 -04:00
blitzmann
7cf0a35a7a Add citadel fittings to market browser, and get rid of some initial errors 2016-05-15 18:58:47 -04:00
blitzmann
523f7793b5 Add Citadel to ship root 2016-05-15 18:42:01 -04:00
blitzmann
9891aecf19 Bump dev 2016-05-15 18:40:54 -04:00
Ryan Holmes
fd700f73e5 Update README.md 2016-05-15 12:53:37 -04:00
blitzmann
d71b05095d Clean up 2016-05-15 12:43:24 -04:00
blitzmann
d061a13b58 Move ID pool to context menu class rather than individual menu items 2016-05-15 12:18:56 -04:00
blitzmann
5176cc3b06 Testing a new way of generating context menu id's 2016-05-15 02:35:35 -04:00
blitzmann
1e364913cd Bump version 2016-05-14 23:23:04 -04:00
blitzmann
1adc7c77ac Update to Citadel 1.11 2016-05-14 22:54:53 -04:00
blitzmann
51fbcce803 Add middle click to close fit (#608) 2016-05-14 22:47:44 -04:00
blitzmann
80dab63119 Add missing effect for remote ancil reppers 2016-05-14 22:26:07 -04:00
blitzmann
8c769f152b Fix capacitor need bonus for Stasis Grapplers (#615) 2016-05-14 02:00:50 -04:00
blitzmann
3673391f5a Moved DPS calc from fighter to fighter ability, and fixed fighters in the graph to consider target values. 2016-05-14 01:48:22 -04:00
blitzmann
f96a2e72f7 Merge branch 'master' of https://github.com/pyfa-org/Pyfa 2016-05-11 21:35:25 -04:00
blitzmann
19929ef3ba Increment/decrement cargo instead of adding/removing (#610) 2016-05-11 21:29:17 -04:00
blitzmann
e3a3d287bf Strip leading/trailing whitespace from strings when converting data to json (#607) 2016-05-11 21:07:22 -04:00
blitzmann
b2b92b00f3 Update to Citadel 1.10 and fix gang effects (#592) 2016-05-11 21:04:25 -04:00
Ryan Holmes
6bd2c19b21 Merge pull request #595 from evrial/patch-1
Update README.md
2016-05-10 14:28:21 -04:00
TimmeeY
eb8e5c5135 Added an option for HTML Export, to produce a minimal html version
Added an Opton in the HTMLExport menu to set the HTML export to produce
a minimal HTML version, without any styles or Javscript dependencies.
This can be useful if you are not javascript capable, or if you just
want to copy'n'pase the exported HTML into some web-editor (wordpress).
2016-05-08 23:50:41 +02:00
blitzmann
5a07be40f1 Update to 1037828 (Citadel 1.9) 2016-05-07 20:02:24 -04:00
blitzmann
13a15a38c5 Fix line break in some descriptions (#596) 2016-05-06 20:50:34 -04:00
blitzmann
caa10614d9 Bump dev, and fix flex hardeners (#601) 2016-05-06 20:42:46 -04:00
Alex Grigoryev
0943b4b097 Update README.md
Added Homebrew formula 0ed8244441
2016-05-03 17:43:07 +03:00
blitzmann
8823baaef4 Bump stable 2016-05-02 21:11:29 -04:00
blitzmann
5a5e77414a Remove rigs from prereq checking 2016-05-02 21:10:29 -04:00
blitzmann
f524591327 Fix prereq skill checking for fighters 2016-05-02 20:58:35 -04:00
blitzmann
55ae7c39a4 Fix Shield Harmonizing / Shield Efficiency warfare links 2016-05-02 20:19:47 -04:00
blitzmann
d4e5f8d165 Fix damage profile / target resists editor (#587) 2016-05-02 20:06:53 -04:00
blitzmann
b9dad60b61 Fix icon logic / add some missing icons 2016-05-01 22:21:14 -04:00
blitzmann
57b9b916ed Take care of empty market groups 2016-05-01 19:06:34 -04:00
blitzmann
854476db76 Revert "Fix runtime for all ganglink module effects" (#582)
This reverts commit 373ccbcee5.
2016-05-01 17:50:56 -04:00
blitzmann
941c57b4a8 Fix titan fleet bonii (#577) 2016-05-01 16:45:19 -04:00
blitzmann
fb1c5a760f Fix projected remote cap transfers (#585) 2016-05-01 16:18:27 -04:00
blitzmann
e5367127ea Adds migration path from pre-release database to stable (previously unsupported) (#586) 2016-05-01 14:46:51 -04:00
blitzmann
ffebd3f311 Fix charges for small ancillary shield boosters (#581) 2016-05-01 14:15:44 -04:00
blitzmann
d8fcbd4032 Fix market group sourcing when generating database. 2016-05-01 11:54:39 -04:00
blitzmann
583f416373 Fix FSUs 2016-04-30 23:18:52 -04:00
blitzmann
f605b37a1e Fix OTLs (#579) 2016-04-30 22:48:33 -04:00
Ryan Holmes
a1d64acff4 Merge pull request #578 from lunedis/dda_stacking_fix
Fixing Drone Damage Amplifier fighter stacking issue #576
2016-04-30 22:43:27 -04:00
blitzmann
1fe42f6a79 Bump dev 2016-04-30 22:43:12 -04:00
Kalu
3ce5f69225 Fixing Drone Damage Amplifier fighter stacking issue #576 2016-05-01 03:31:19 +02:00
blitzmann
985107c601 Bump version =D 2016-04-30 19:56:49 -04:00
blitzmann
d416124081 Implemented projected fighters, and various fighter bugfixes / improvements 2016-04-30 19:52:13 -04:00
blitzmann
3a62a6c40d Add fighters to DPS graph 2016-04-30 18:37:00 -04:00
blitzmann
8f6f55b001 Merge branch 'singularity' 2016-04-30 18:23:32 -04:00
blitzmann
6d1ae39bc6 Merge branch 'master' of https://github.com/pyfa-org/Pyfa 2016-04-30 18:21:30 -04:00
Ryan Holmes
850197faa1 Merge pull request #572 from Tandrial/master
Import DNA fittings from ingame urls
2016-04-30 18:16:35 -04:00
blitzmann
1aa206bc82 Merge branch 'master' of https://github.com/pyfa-org/Pyfa 2016-04-30 18:10:06 -04:00
Ryan Holmes
5a9cdb67f9 Merge pull request #568 from mmaucher/fix-for-511
fix separation of moving/non-moving drones
2016-04-30 18:07:58 -04:00
blitzmann
c9810cd019 Fix bug when importing fit 2016-04-30 18:03:03 -04:00
blitzmann
8bf75e38ad Add loaded charges export to CREST (#569) 2016-04-29 23:42:47 -04:00
blitzmann
fe9139ae93 Fix issue with adding multiples of the same skill to character via character import (#563) 2016-04-29 23:32:22 -04:00
blitzmann
87a354a314 Add SerializableUriCharacter to EVEMon import check (#557) 2016-04-29 23:15:30 -04:00
blitzmann
270ac99a1e update effects 2016-04-29 22:59:09 -04:00
blitzmann
dc5d6a4ef8 Add conversion pack 2016-04-29 22:54:44 -04:00
blitzmann
4cdb36de09 update icons 2016-04-29 22:42:15 -04:00
blitzmann
7fce1d00d7 Update to TQ again 2016-04-29 22:37:29 -04:00
blitzmann
26c27153f0 Fix FAUX role bonus 2016-04-29 19:11:13 -04:00
blitzmann
b5420e9c6a Add fighter bomb launcher logic 2016-04-29 19:10:51 -04:00
blitzmann
cfd82a6ad4 Add titan gang bonuses, along with other things 2016-04-29 18:47:53 -04:00
Ryan Holmes
7a352b49a0 Merge pull request #534 from Wozbo/EWAR-fix-532
Fixed ewar on damage graphs,
2016-04-29 09:44:26 -04:00
Michael Krane
8a4f3b7642 Code clean Up 2016-04-28 22:59:47 +02:00
Michael Krane
a09d4139d5 Removes everything before and after the DNA 2016-04-28 19:06:53 +02:00
Michael Krane
a257ac87f7 Allows to import DNA fittings via ingame urls 2016-04-28 18:30:41 +02:00
blitzmann
1669a5434c Removing debugging 2016-04-28 00:42:09 -04:00
blitzmann
2fc83aa61c Update to TQ 2016-04-28 00:38:49 -04:00
blitzmann
ed6f00a893 Added column for fighter abilities, fixed some fighter bugs, added some context menus to them 2016-04-28 00:29:25 -04:00
blitzmann
b15f9766c1 * Show fighter bay resources in fighter pane
* Give fighters a state
* Include some toggled stats on the resources pane
* Add some decent icons for fighter stuff
2016-04-28 00:10:01 -04:00
blitzmann
0ad4f07591 Add drone DPS/Volley to stats pane 2016-04-26 22:18:00 -04:00
blitzmann
4704c5a1b0 Limit fighters to fit's available slots. We hijack the module slot bit to do the dirty work >_> 2016-04-25 23:45:01 -04:00
blitzmann
034a9bc3c3 Publish fighter bombs in jsonToSql.py script 2016-04-25 22:49:52 -04:00
Markus Maucher
e7dc9db75a fix separation of moving/non-moving drones 2016-04-25 12:10:00 +02:00
blitzmann
4a2d1b7997 Fix subsystem slots (#553) 2016-04-22 20:49:16 -04:00
blitzmann
a5e2a32fb8 Merge remote-tracking branch 'origin/master' into singularity 2016-04-22 20:38:33 -04:00
blitzmann
43f69bb184 Only show fighter abilites which have been implemented. 2016-04-21 22:20:53 -04:00
blitzmann
71482c2359 Fix network sensor array effect 2016-04-21 22:14:45 -04:00
blitzmann
84a27a60a5 Fix Seige torp bonus 2016-04-19 21:39:56 -04:00
Ryan Holmes
87f865ce1f Merge pull request #562 from DuLLSoN/master
Added website selection for HTML Export
2016-04-17 23:53:36 -04:00
Ryan Holmes
12c78b41af Merge pull request #560 from aacn500/aacn500-t3c-import
Fix importing T3 cruisers #556
2016-04-17 23:52:36 -04:00
blitzmann
c3db808b7c Update 1030624 2016-04-17 23:42:31 -04:00
blitzmann
af9a9c5698 More fighter work. Basic abilities now work correctly. 2016-04-17 13:28:12 -04:00
Dullson
a7e6d3e969 Feature: Ability to select between different online fitting tools while using HTML Export. 2016-04-17 17:32:51 +03:00
blitzmann
708425c67a Toggle fighter abilities in fighter context menu 2016-04-17 02:16:58 -04:00
blitzmann
021de1af80 Get fighter abilities saved into database 2016-04-17 00:37:52 -04:00
blitzmann
b66e98f697 Fix Leviathan effect 2016-04-17 00:10:16 -04:00
blitzmann
28ad32aad5 Fix Character Editor 2016-04-16 23:55:28 -04:00
aacn500
94dc3117bc Fix importing T3 cruisers #556 2016-04-15 22:14:29 +01:00
blitzmann
803ada4b27 Fix siege, bastion, and triage effects. 2016-04-13 20:05:39 -04:00
blitzmann
e7118f637c Merge branch 'charImplants' into singularity
# Conflicts:
#	eos/db/saveddata/fit.py
#	gui/builtinContextMenus/itemStats.py
2016-04-12 20:16:53 -04:00
blitzmann
e11e368c4b Bump dev version 2016-04-12 20:02:30 -04:00
blitzmann
27a9051822 Update 1027729 2016-04-11 22:53:02 -04:00
blitzmann
54caece5b3 Update to 1027624, commit changes to itemDiff, and remove icon fetching from prep_data (need to use old dump info for now) (as well as other misc stuff) 2016-04-10 23:46:37 -04:00
blitzmann
b1fade5d3b Update bastion, siege, triage effects; add networked sensor array effect 2016-04-10 12:55:43 -04:00
blitzmann
8ed485df0e Group renames 2016-04-06 00:22:19 -04:00
blitzmann
9c33947a45 Update effect headers 2016-04-06 00:12:44 -04:00
blitzmann
33dc06055c Fix some more effects 2016-04-06 00:10:51 -04:00
blitzmann
8ff4a99cf3 Add missing Force Aux effects 2016-04-05 22:57:44 -04:00
blitzmann
d38abec819 Add some missing drone module effects 2016-04-05 22:47:20 -04:00
blitzmann
0ba48aa230 Fix energy effects 2016-04-05 22:27:41 -04:00
blitzmann
acf47ad7a6 Add missing Titan effects 2016-04-05 22:05:02 -04:00
blitzmann
c948c62cac Add missing Dreadnaught effects 2016-04-05 21:55:10 -04:00
blitzmann
eee4dbf66c Add missing Supercarrier effects 2016-04-05 21:46:57 -04:00
blitzmann
653b995774 Update eve.db and add missing carrier effects 2016-04-05 21:36:47 -04:00
blitzmann
a78151c5aa Add skill effects for Fighters 2016-04-04 23:52:09 -04:00
blitzmann
3177713447 Add preliminary (database/gui) fighter support. No effects / calculations. 2016-04-04 23:32:03 -04:00
blitzmann
0769df1e55 Update eve.db 2016-04-04 22:18:02 -04:00
blitzmann
0cfa7cb28f Ensure we get all ship group and ship type restrictions 2016-04-03 16:51:01 -04:00
blitzmann
1e621ee133 Fix issue when module is loaded with invalid item causing crash due to no item being available (incorrect logic) 2016-04-03 02:04:52 -04:00
blitzmann
a203799bd2 Merge branch 'master' into singularity 2016-03-30 18:48:17 -04:00
blitzmann
8fc9724204 Switch over to HTTPS protocol for jQuery CDN (#549). Also fix an issue that caused page to not load in Chrome 2016-03-30 00:25:11 -04:00
blitzmann
0d41cb96ab Merge branch 'refactor-entityEditor' into charImplants 2016-03-30 00:04:44 -04:00
blitzmann
39b2f87194 Add in logic that required an entity for implant sets and target resists (not needed for character or damage profiles as we have read-only defaults) 2016-03-30 00:03:48 -04:00
blitzmann
1161037092 Migrate implant set editor to new entity editor 2016-03-29 21:51:39 -04:00
blitzmann
a3d9d5cca8 Migrate character editor to use new entity editor. 2016-03-29 21:19:20 -04:00
Ryan Holmes
4b67411ca6 Merge pull request #550 from MarkNBroadhead/master
Update README
2016-03-29 15:24:22 -04:00
Mark N Broadhead
126b807dc7 Add links and make punctuation and stylistic changes
I am making changes here to help the README be consistent in its styling
and gramatically correct. Specifically distro vs distribution and places
where there are no links where they would be useful.

* Add link to GitHub Issues
* Add link to EVE pyfa forum thread
* Rename Installing to Installation
* Change distros to distributions
* Add apostrophe to "projects" where it is posessive
2016-03-29 12:09:22 -06:00
Mark N Broadhead
ca81d2d602 Reword Installing section
* Reword text and include link to latest builds page
* Remove link to Arch repo
2016-03-29 12:04:48 -06:00
Mark N Broadhead
015c195c9f Move Package list closer to installation section and add link
It makes sense for the Linux Distro-specific Packages section to
immediately follow the text about 3rd party repos in the Installing
section

* Move Linux Distro-specific Packages section
* Add link to issue #484 for FreeBSD installation
2016-03-29 11:52:55 -06:00
Mark N Broadhead
5fd170d480 Rename requirements to dependencies 2016-03-29 11:46:08 -06:00
Mark N Broadhead
4b167ba9de Add gitter chat link in contact information section 2016-03-29 11:45:08 -06:00
Mark N Broadhead
38ac41bccb Remove contact info for Kadeshs per blitzmann
Kadeshs is no longer with the projects per a conversation with blitzmann
on 29/3/2016 in gitter. He has requested I remove the contact info.
2016-03-29 11:18:52 -06:00
blitzmann
3315d27d45 Applied entity editor to resist editor.
Fixed issue with checking for same name in validator.
Center dialogs on parents to make it look nicer
2016-03-27 22:12:59 -04:00
blitzmann
c3dcdb0686 Entity = characters, damage profiles... anything with the generic drop down list of entities along with new/rename/etc buttons. This commit starts refactoring how we handle this, hopefully simplifying the process to a series of dialogs rather than trying to manage multiple control in the window. 2016-03-27 21:48:19 -04:00
blitzmann
ca91f6bd92 Remove debugging print 2016-03-22 23:21:39 -04:00
blitzmann
65483309ab Clear character implants during recalculation 2016-03-22 23:17:05 -04:00
blitzmann
71d33f3429 Fit implant effects (now applies to whichever implant source is selected) 2016-03-22 23:16:31 -04:00
blitzmann
9b1c543eb7 Support multi-select 2016-03-21 23:56:00 -04:00
blitzmann
24bb0ff39a Fix issue in which implant editor did not spawn if no implant sets 2016-03-21 23:49:01 -04:00
blitzmann
3ae312db37 Import / export implants sets 2016-03-21 23:43:45 -04:00
blitzmann
94f73241ea Implement implant set application in character implants. 2016-03-20 23:45:42 -04:00
blitzmann
d4632b9059 Add context menu to apply implant set to fit 2016-03-20 22:28:18 -04:00
blitzmann
dd15d52130 Merge pull request #541 from aacn500/missing-charge-skills
Fix "Change charge skills" showing module skills #535
2016-03-20 19:55:16 -04:00
blitzmann
145f252ca6 Add icon for implant set editor 2016-03-20 19:49:53 -04:00
blitzmann
731b54a1f7 Continued work on implant set editor 2016-03-20 18:58:13 -04:00
aacn500
f8d7b68289 Fix "Change charge skills" showing module skills 2016-03-20 22:56:27 +00:00
blitzmann
80e47d5157 Add some functionality to implantSet service, and get editor working correctly with implant editor view 2016-03-20 12:49:29 -04:00
blitzmann
c1653c5f2e Abstract the implant editor to work with different sources 2016-03-20 12:26:37 -04:00
blitzmann
36ad31ab25 Get some initial scaffolding up for implant sets sourced from the resist code. 2016-03-20 02:04:55 -04:00
blitzmann
6f1872fb94 Disable implants for read-only characters 2016-03-19 22:10:09 -04:00
blitzmann
ff56e70b81 Opps, dunno how this happened 2016-03-19 22:09:31 -04:00
blitzmann
201263237f Add migration to update fits tablet for implant source 2016-03-19 21:20:20 -04:00
blitzmann
1ddd37f381 Enable implant searching. 2016-03-19 20:55:29 -04:00
blitzmann
f9d2a78c5e Fix up styling for character implants and fitting window implant view 2016-03-19 19:30:42 -04:00
blitzmann
443c917c6b Get context menus working for character implants 2016-03-19 18:23:34 -04:00
blitzmann
7c787cd13b Recalc fit when changing implant source 2016-03-19 15:42:49 -04:00
blitzmann
dc8aff6b6c Merge branch 'master' into charImplants 2016-03-19 15:33:35 -04:00
blitzmann
397040549f Merge branch 'aacn500-validate-import' 2016-03-18 23:52:11 -04:00
blitzmann
0b858d6e94 Clean up call to checkStates 2016-03-18 23:51:55 -04:00
blitzmann
6c8efcda12 Fix traceback when ship is missing launcher / turret attribute (#539) 2016-03-18 23:31:19 -04:00
blitzmann
3fa0aa9242 Bump dev 2016-03-18 23:30:40 -04:00
aacn500
18775286c0 only check states when first loading a fit from db 2016-03-17 11:56:00 +00:00
aacn500
57433efe80 Check that modules fit on imported fits #512 #522 2016-03-16 20:12:26 +00:00
blitzmann
c42748a5dd Fix #537 - cap battery causing remote cap transfers to apply incorrect values.
Bump to stable 1.20.1
2016-03-15 22:46:51 -04:00
blitzmann
b5cf835959 Add a toggle between fit-specific implants and character implants. This avoids a lot of the problems of how to mix these two sources of implants. Character implants cannot change stage. 2016-03-13 14:48:43 -04:00
blitzmann
48b45b5f51 Merge branch 'master' into charImplants
# Conflicts:
#	gui/characterEditor.py
2016-03-12 23:20:26 -05:00
cwozniak
7d658c3f3d Fixed ewar on damage graphs, and added a quick formula for module falloff and applied it to Target Painters and Heavy Grapplers. 2016-03-11 16:15:08 -05:00
blitzmann
91980c9f2c Bump release 2016-03-11 00:20:26 -05:00
blitzmann
db1c80c7e3 Update effect headers 2016-03-11 00:18:33 -05:00
blitzmann
e53bd70c2c Merge pull request #497 from SpeedProg/master
Added commandline arguments to specify window title and path for savefiles
2016-03-10 23:58:56 -05:00
blitzmann
fe64e2e24c Fix module states when loading from database with an incorrect state (see #529) 2016-03-10 23:55:12 -05:00
blitzmann
a020ca9a71 Fix tracking / guidance disrupters 2016-03-10 23:43:24 -05:00
blitzmann
7a9fde822c Add some missing icons to the database and image store 2016-03-10 23:28:56 -05:00
blitzmann
152af02336 Fix effects involving XL missiles 2016-03-10 20:37:09 -05:00
blitzmann
be7d3a921a Update database to TQ 1017528 2016-03-10 20:17:26 -05:00
blitzmann
78acb205d3 Merge branch 'singularity' 2016-03-10 20:16:57 -05:00
blitzmann
627dac692c Modify applied cap drain based on ship's cap resistance 2016-03-08 18:23:35 -05:00
blitzmann
68a6a828d8 Revert "Disable setting new database version and bump pre-release"
This reverts commit d36bf41ecf.
2016-03-08 16:55:03 -05:00
blitzmann
e8604788df Replace locale formating with regular string formatting due to issues with setting locale. 2016-03-06 11:48:01 -05:00
blitzmann
d36bf41ecf Disable setting new database version and bump pre-release 2016-03-05 22:25:35 -05:00
blitzmann
821d9ea330 Add the renamed items to the conversion sheet 2016-03-05 21:54:32 -05:00
blitzmann
65eb0fac3d Fix syntax errors 2016-03-05 21:51:11 -05:00
blitzmann
e9a0c5456e Fix group matching: Capital charges 2016-03-05 21:48:12 -05:00
blitzmann
e2d33beb34 Fix group matching: Remote Sensor Dampener -> Sensor Dampener 2016-03-05 21:44:02 -05:00
blitzmann
b44c8461d4 Fix group matching: ECM Burst -> Burst Jammer 2016-03-05 21:41:01 -05:00
blitzmann
38cc13ff2c Update to 1015913 2016-03-05 21:37:12 -05:00
blitzmann
53a46dcec6 Fix bug causing fitting view to crash if ammo does not have icon 2016-03-05 21:32:02 -05:00
blitzmann
c01e506eb1 Add some debug info to item stats (effect and attribute IDs) 2016-03-05 15:42:31 -05:00
blitzmann
ad61795e80 Add conversions, TODO: Confirm with some testing! 2016-03-05 15:41:39 -05:00
blitzmann
bd802ab926 Fix typing issue with cargo stat 2016-03-05 01:08:53 -05:00
blitzmann
a25a1c0415 Reintroduce thousands separators for certain stats, tweak precision of cargo stat and displays 2016-02-28 18:14:27 -05:00
blitzmann
969952cccc Add support for user-defined server timeout setting (#492) 2016-02-14 18:51:18 -05:00
blitzmann
d85f8c0744 bump dev 2016-02-14 18:10:13 -05:00
Constantin Wenger
cf60bbc904 Merge remote-tracking branch 'upstream/master'
updated from upstream
2016-02-11 06:53:01 +01:00
blitzmann
9c67e7dd93 Fix database for icons (using old data), bump for release 2016-02-10 20:07:56 -05:00
blitzmann
df81a146d2 Bump dev 2016-02-10 15:08:42 -05:00
blitzmann
9bfb697f1e Bump version 2016-02-10 13:22:39 -05:00
blitzmann
2e227cdbd5 Update to TQ 1006189 2016-02-10 11:49:58 -05:00
blitzmann
fb7c227a10 Add a few market conversions and change cap drone group name (Feb '16 release) 2016-02-10 01:24:21 -05:00
blitzmann
e3742c0420 Fix double calculations on projected fits that double as boosters (#496) 2016-02-10 00:04:19 -05:00
blitzmann
373ccbcee5 Fix runtime for all ganglink module effects 2016-02-07 23:46:20 -05:00
blitzmann
785060f12b Merge branch 'test' 2016-02-06 16:07:44 -05:00
blitzmann
4e509bbaee Fix character editor crash on Windows by disallowing resizing. (#441) 2016-02-06 16:04:29 -05:00
Constantin Wenger
02d4ac81dd renamed parameter savepath to customSavePath for better distinguishability to savePath 2016-02-05 13:10:18 +01:00
blitzmann
7e305aab67 Revert "Tentative fix for character editor issues."
This reverts commit 253ebdc4e1.
2016-01-31 10:52:00 -05:00
blitzmann
55eed0d029 Revert "Fix Character Editor Dialog for osx"
This reverts commit 9fc31d6a55.
2016-01-31 10:51:45 -05:00
blitzmann
c7d5f2533a Merge pull request #514 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2016-01-29 14:49:08 -05:00
The Gitter Badger
a6cfbcb331 Add Gitter badge 2016-01-29 19:41:11 +00:00
blitzmann
45074952fd Merge pull request #504 from resinneublem/export-charges-optional
Make exporting charges a preference
2016-01-26 15:34:23 -05:00
blitzmann
a73d9abc60 Fix stacking for leadership, skirmish, and Information skill effects 2016-01-26 05:12:46 -05:00
blitzmann
9fc31d6a55 Fix Character Editor Dialog for osx 2016-01-25 22:47:27 -05:00
blitzmann
9cb99a1170 Update README.md 2016-01-25 21:36:50 -05:00
blitzmann
f3f1d022ef Updated to new repo location and forum thread 2016-01-25 21:14:45 -05:00
blitzmann
253ebdc4e1 Tentative fix for character editor issues. 2016-01-25 21:10:20 -05:00
blitzmann
5d45f1d3f3 Update README.md 2016-01-25 20:37:35 -05:00
blitzmann
e253af9763 Added links to distro-specific packages 2016-01-25 20:37:17 -05:00
blitzmann
a355a82f8a Merge pull request #503 from resinneublem/osx-preferences-shortcut
Use idiomatic osx preferences shortcut
2016-01-16 23:31:05 -05:00
Resin Neublem
ceb7eb15c3 Make exporting charges a preference
Some users don't want to export equiped charges because it might
conflict with their cargo hold (don't need 2x of the same type of script)

They just be equipping the items to see the different stats
2016-01-16 13:45:13 -05:00
Resin Neublem
115b154f0b Use idiomatic osx preferences shortcut
OSX uses "Command-," for application preferences
2016-01-16 13:09:13 -05:00
blitzmann
2d1344b785 Fix issue with accidental whitespace in CREST user-defined settings 2016-01-13 19:41:58 -05:00
blitzmann
bdf793072c Fix for t2 cloaks on prospect 2016-01-12 17:38:00 -05:00
blitzmann
2f879d39f3 Bump dev 2016-01-12 17:34:53 -05:00
Constantin Wenger
f0775af439 added command line option to specify the savepath 2016-01-12 21:28:15 +01:00
Constantin Wenger
96048b5133 added command line option to set the window title 2016-01-12 21:28:15 +01:00
blitzmann
36ab224853 Update to 996005 and bump stable 2016-01-12 00:28:19 -05:00
blitzmann
52d19b8de4 Remove debug prints 2016-01-09 14:48:13 -05:00
blitzmann
7be5ec844f Update README.md 2016-01-09 14:13:20 -05:00
blitzmann
3d26a31ee2 Add option to disable gauge animations (primarily for osx 10.11 users, see #438) 2016-01-09 12:36:55 -05:00
blitzmann
343d605a84 Fitting file import improvements:
- Blank files don't cause crash
- If error happens during processing, notify user
2016-01-03 21:45:19 -05:00
blitzmann
ef1228eb32 Ensure that utf-8 is tested when importing fits 2016-01-03 13:24:05 -05:00
blitzmann
ad738f7e7c Fix exporting fit to XML when name is unicode 2016-01-03 00:06:53 -05:00
blitzmann
4a66fa0138 Revert "Fix Command Destroyer MWD sig radius issue"
This reverts commit 331338e7b9.
2015-12-30 23:17:42 -05:00
blitzmann
331338e7b9 Fix Command Destroyer MWD sig radius issue 2015-12-30 23:02:27 -05:00
blitzmann
8e28925336 Add civilian weapons 2015-12-20 21:10:18 -05:00
blitzmann
df0e829dbe Merge pull request #478 from Neugeniko/master
Handle Crest Import and Export of Drone Bay and Cargo Bay contents.
2015-12-20 18:35:36 -05:00
Neugeniko
0c278b668c Handle Crest Import and Export of Drone Bay and Cargo Bay contents. 2015-12-16 12:56:28 +11:00
blitzmann
6e7ba714a8 Bump Dev, and fix import errors (#474) 2015-12-13 22:26:36 -05:00
blitzmann
d8e2e3ace1 Fix triage effects on weapon disrupters, update DB, and bump release 2015-12-10 20:18:02 -05:00
blitzmann
69c3dd188e Merge pull request #472 from wendazhou/FixNeutNosDisruptor
Fixed display of neut and nos amount, and guidance disruptors
2015-12-10 19:50:58 -05:00
Wenda Zhou
57da36f1cf Fixed category names for neut, nos and tracking disruptor.
With the implementation of falloff for energy neutralizer
and nosferatus, their names has changed so had to update
for correct display.

Also added some display for the new guidance disruptors
(i.e. missile disruptors). This also fixes the category
change for weapon disruptor (both are now called weapon
disruptor).
2015-12-09 22:50:30 -05:00
blitzmann
753ba00ac0 Update icons and EVE data 2015-12-09 21:56:22 -05:00
blitzmann
290f7d116f Fix some RR shield effects, and bump dev because I forgot 2015-12-09 21:09:50 -05:00
blitzmann
81fa88a36d Remove previously mentioned old item 2015-12-09 20:55:34 -05:00
blitzmann
0dd98330aa Fix issue with old item in market service causing error due to being non-existent. 2015-12-09 20:54:29 -05:00
blitzmann
ae55a2c1d2 Fix Nestor RR falloff effect 2015-12-08 12:21:21 -05:00
blitzmann
43ae593568 Bump to Stable 2015-12-07 20:12:19 -05:00
blitzmann
81963a6a7d Update effect files 2015-12-07 20:10:44 -05:00
blitzmann
fbf67c134b Merge remote-tracking branch 'origin/singularity' 2015-12-07 19:39:45 -05:00
blitzmann
a0cfe05eb5 Update to 988883, fix market conversion and add the converted modules, and improve on rename/conversion helper script 2015-12-07 19:38:54 -05:00
blitzmann
ba6e8d7ad1 Add renamed items 2015-12-06 14:28:35 -05:00
blitzmann
cbd2ed603f Possible fix for character editor crash 2015-12-06 11:16:54 -05:00
blitzmann
a2f1623b00 Fix icon script (no longer use icon prefix) and update icons 2015-12-06 10:22:25 -05:00
blitzmann
87ebcf0818 Update renders 2015-12-06 01:42:12 -05:00
blitzmann
f329c9956e Fix for icon conversion 2015-12-06 01:30:21 -05:00
blitzmann
2ac62ece06 Remove erroneous command causing a break in ship booster menu 2015-12-05 22:53:51 -05:00
blitzmann
f9db5eb201 Update to 988638 2015-12-05 22:35:03 -05:00
blitzmann
0a10f2d72a If running under OSX and wx3, override wx.ID_COPY and wx.ID_PASTE. See GH Issue #456 2015-12-04 01:06:35 -05:00
blitzmann
4325ccab8a Different fix for #397 and fix #458 2015-12-03 22:04:59 -05:00
blitzmann
04c6fad531 Change user agent of CREST calls 2015-12-03 20:50:01 -05:00
blitzmann
ca92285ff3 Fix some Weapon Disruption effects 2015-12-03 20:40:23 -05:00
blitzmann
96eee3a173 Fix Nos/Neut effects 2015-12-03 20:21:57 -05:00
blitzmann
a74c3c9b3d Fix #461 2015-12-02 20:38:45 -05:00
blitzmann
b4373cb0c5 Fix #451 2015-11-29 17:56:39 -05:00
blitzmann
9029c04ce6 Merge branch 'master' into singularity 2015-11-27 22:45:28 -05:00
blitzmann
c7c0c49218 Fix #434 2015-11-27 20:12:02 -05:00
blitzmann
191dd1c71b Add new mining frigate effects 2015-11-27 16:15:16 -05:00
blitzmann
3b64373393 Add more missing effects 2015-11-27 15:58:53 -05:00
blitzmann
0f6c67e852 Add missing effect for Oneiros 2015-11-27 15:03:41 -05:00
blitzmann
209297769f Missed an effect 2015-11-27 01:20:08 -05:00
blitzmann
2d4e3a6ddf Rename Logi skill to Logistic Cruiser 2015-11-27 01:18:32 -05:00
blitzmann
350f4c9f89 Add new effects. This commit uses a new helper script that automatically writes the effect file for the more straightforward effects. 2015-11-27 01:14:59 -05:00
blitzmann
9c9a6b69fe Revert "Add new nos/neut effect files, and change module/drone files to account for new attributes. This does not add the database"
This reverts commit 7dbe6dbe2d.
2015-11-27 00:07:24 -05:00
blitzmann
2b9d85a4bc Update setup-osx.py 2015-11-26 19:10:06 -05:00
blitzmann
f053e45671 Create setup-osx.py 2015-11-26 19:09:23 -05:00
blitzmann
4d701f561e fix booster menu causing crashes (#424) 2015-11-26 18:56:20 -05:00
blitzmann
3cb6d03487 Fix issue with OSX passing an unknown argument 2015-11-25 19:23:59 -05:00
blitzmann
7dbe6dbe2d Add new nos/neut effect files, and change module/drone files to account for new attributes. This does not add the database 2015-11-22 23:03:46 -05:00
blitzmann
81f122467a Fix #432 2015-11-20 01:29:46 -05:00
blitzmann
20759d205c Merge pull request #429 from Neugeniko/master
Added detection of Unicode BOM (Byte Order Mark) ...
2015-11-15 17:27:51 -05:00
blitzmann
b37aea40a7 fix exception when setting a unicode fit as booster (should hopefully fix all timer-related unicode errors) 2015-11-15 17:18:44 -05:00
blitzmann
f95e864119 Fix mindlink effects 2015-11-15 17:18:33 -05:00
blitzmann
7a9de8cd99 Bump dev version 2015-11-15 17:18:25 -05:00
Neugeniko
dde8b1f802 Added detection of Unicode BOM (Byte Order Mark) to determine the encoding used in imported files. 2015-11-14 01:00:32 +11:00
blitzmann
ca34d7cced Differentiate between character implants and fits 2015-11-10 02:06:44 -05:00
blitzmann
938e2a871d Merge branch 'master' into charImplants
Conflicts:
	gui/characterEditor.py
2015-11-08 21:19:04 -05:00
blitzmann
89b756d760 Bump release 2015-11-08 20:23:12 -05:00
blitzmann
3b1edd3283 Add error handling to CREST functions when no connection can be made. 2015-11-08 20:07:30 -05:00
blitzmann
5369b17ebf Update 977931 2015-11-08 19:55:34 -05:00
blitzmann
2fadaa890b fix save character as on os x 2015-11-08 13:52:53 -05:00
blitzmann
31bdb75c51 Added confirmation dialog when deleting character 2015-11-08 12:49:00 -05:00
blitzmann
0124f63d9a Fix amount change dialog for os x 2015-11-08 12:44:32 -05:00
blitzmann
95dba166eb Remove some debugging prints 2015-11-08 12:37:31 -05:00
blitzmann
83adadd71f Convert pubsub to wx events 2015-11-08 12:33:56 -05:00
blitzmann
4baf65c0c7 Merge pull request #414 from andrewd18/master
Add "requests" to README.md
2015-11-07 10:16:44 -05:00
Andrew Dorney
72cdd3e104 Add "requests" to README.md
CREST support requires the requests module which may not be included by default in all users' distributions.
2015-11-07 06:57:34 -06:00
blitzmann
febc2eee09 Add some conditionals to disable Attribute Editor for wxPython 2.8 2015-11-06 20:23:09 -05:00
blitzmann
b302a0a6e5 Weak ciphers aren't needed to CREST it seems (probably was at one point) 2015-11-06 20:06:08 -05:00
blitzmann
1f6a14ee36 Fallback to wx2.8 if 3.0 is not found 2015-11-06 16:04:20 -05:00
blitzmann
99a15af26e Merge pull request #408 from fj/patch-1
Fix typo in README.md
2015-11-06 14:40:43 -05:00
John Feminella
dff7a4d6ac Fix typo in README.md
"liscense" ⇒ "license"
2015-11-06 11:32:28 -05:00
blitzmann
3c8e6a61f2 Fix #406 2015-11-05 20:30:11 -05:00
blitzmann
fb997ab16d bump stable 1.16.1 2015-11-03 22:44:52 -05:00
blitzmann
8fe5f43875 fix some stuff 2015-11-03 22:44:01 -05:00
blitzmann
c8cfee3511 More mac fixes 2015-11-03 22:12:35 -05:00
blitzmann
bf0b89f3b5 Old mac client shouldn't even know about CREST / override. Disable all instances of them for this build. 2015-11-03 21:25:52 -05:00
blitzmann
1d295c04e3 Fix for missing attributes 2015-11-03 20:43:49 -05:00
blitzmann
11ebde87c9 Change attr override window from ctrl+a to ctrl+b 2015-11-03 19:38:03 -05:00
blitzmann
88c4de9820 reintroduce mac-wx3. Split platform build are likely needed right now 2015-11-03 19:28:08 -05:00
blitzmann
09e0a0576c MainFrame pointer was accidentally deleted from characterEditor.py, causing issues. 2015-11-03 19:21:45 -05:00
blitzmann
fc84c5dc94 Whoops 2015-11-03 13:24:49 -05:00
blitzmann
687ebbc41b Bump Stable 2015-11-03 06:21:29 -05:00
blitzmann
0abe953a70 Update dist script to replace mac skel 2015-11-02 21:34:55 -05:00
blitzmann
2a8f3e4855 Merge branch 'singularity' 2015-11-02 21:28:26 -05:00
blitzmann
8cd36f3cbf Add item renames 2015-11-02 21:06:54 -05:00
blitzmann
5577e1976b Update to SISI w/ effects 2015-11-02 20:55:23 -05:00
blitzmann
4b27becb5f Merge branch 'overrides' into singularity
Conflicts:
	eos/db/__init__.py
	eos/db/saveddata/__init__.py
	eos/db/saveddata/queries.py
	gui/mainFrame.py
	gui/mainMenuBar.py
2015-11-02 19:01:12 -05:00
blitzmann
3c055b78d3 Fix clearing of all overrides 2015-11-02 18:55:21 -05:00
blitzmann
eb5ce91cb2 Fix gitignore 2015-11-02 18:47:06 -05:00
blitzmann
ef36dc5ba3 Import/export/clear overrides, add missing files due to bad gitignore entry 2015-11-02 18:45:56 -05:00
blitzmann
d9c710c5a1 Minor improvements 2015-11-01 21:36:04 -05:00
blitzmann
c436e0e669 Create a proper menu item toggle for overrides 2015-11-01 21:19:49 -05:00
blitzmann
e80917e3d1 Things are saved now via GUI 2015-11-01 20:52:22 -05:00
blitzmann
0d0ec42daf Initial GUI commit. Still need to actually handle the attribute change 2015-11-01 19:49:22 -05:00
blitzmann
0e4cca6138 Load overrides from database 2015-11-01 15:00:09 -05:00
blitzmann
b701acb275 Overrides work properly now. Currently toggled on/off by opening character editor, this will be taken over by a menu option 2015-11-01 13:02:29 -05:00
blitzmann
4eb61051c6 Add overrides to the modifiedAttributeDict. Still need to figure out how to switch between the original and the override 2015-11-01 12:04:02 -05:00
blitzmann
56aba37758 Fix PoC so that it actually works, and add a working test case for Web II (changing speedfactor to -80%) 2015-11-01 09:43:34 -05:00
blitzmann
f432b08149 Proof of concept. Need to save overrides in user database and create GUI for it. May be difficult to collect and apply considering the Item container is attached to the eve db and not the user. 2015-10-31 16:53:20 -04:00
blitzmann
3e0b2fd09c Add debug info 2015-10-31 16:52:10 -04:00
blitzmann
c7b8d94e4f Merge branch 'crest_fitting' into singularity 2015-10-31 15:02:24 -04:00
blitzmann
31a9b03436 Merge pull request #390 from OISumeko/weaponStagger
Added option for disabling capacitor simulation staggering for certain modules
2015-10-31 14:55:22 -04:00
blitzmann
f33f558006 Fix prep_data.py 2015-10-31 14:27:43 -04:00
blitzmann
bb4fe63a7c Add CREST preference icon (basic EVE icon), and fix menus when changing modes and whatnot 2015-10-31 14:10:41 -04:00
blitzmann
ccb9e085b2 Setting to change server for CREST, and some other improvements. 2015-10-31 13:20:13 -04:00
Cameron Grout
702d249bad Updated turret detection as advised 2015-10-31 16:15:35 +13:00
Cameron Grout
cc2835a341 Turrets of the same type now do not stagger
Playing with the cap simulator, I noticed that turrets of the same type
stack and have staggering applied when running through the cap
simulator. This is not realistic behaviour as most (all?) pilots will
have grouped their turrets in-game, meaning they will all activate
simultaneously rather than activating individually, offset from
each other.

This change introduces a 'disable stagger' field to the drain tuple that
is passed through to the cap simulator, allowing us to disable
staggering on certain modules. This will enable us to add GUI options in the
future to allow users to choose whether to stagger certain modules (eg,
cap boosters, neuts) or have them all fire simultaneously. Currently
this defaults to False (existing behavior) for all modules except for
turrets, which will now behave more like in-game turrets for cap
simulation purposes.
2015-10-31 15:30:20 +13:00
blitzmann
d73c53cb10 Merge pull request #389 from OISumeko/issue300
Fix for issue #300
2015-10-30 21:26:39 -04:00
OISumeko
73409a3324 Fix for issue 300
Modified capsim so that for non-capstable fits, the capacitor time will
indicate the time at which the first module failed to activate due to
insufficient capacitor rather than the time of the last successful
activation.
2015-10-31 14:14:44 +13:00
blitzmann
24f770aa7b Use + instead of space (fixes an Iceweasel browser issue) 2015-10-30 21:09:06 -04:00
blitzmann
649b99d7bd Another possible fix for server issues. 2015-10-30 21:07:56 -04:00
blitzmann
a8b50032c4 Merge pull request #388 from OISumeko/master
Fix for 387
2015-10-30 12:41:40 -04:00
Cameron Grout
d1d276ae68 Fix for 387
Modified capsim to deal with reload/clipSize logic before grouping
modules for staggering. This prevents loaded AARs from being sent
through as seperate cap drain elements to other repairers of the same
size.
2015-10-30 16:18:33 +13:00
blitzmann
6eafbb0a25 Possible fix for server issues. Instead of using a timer, use the socket timeout, and ensure that we stop server before spawning a new one. 2015-10-28 21:25:01 -04:00
blitzmann
aedd7ce2de Add support to delete fit from EVE 2015-10-26 21:27:54 -04:00
blitzmann
b0511ed856 Delete crest chars when changing client settings 2015-10-26 23:54:42 -04:00
blitzmann
d60b288e0e Merge pull request #381 from OISumeko/master
Fix for issue 347
2015-10-26 19:32:05 -04:00
blitzmann
f7d5287087 Merge pull request #385 from minlexx/patch-1
Check that python-dateutil is installed at startup
2015-10-26 19:31:20 -04:00
blitzmann
7032baa7ef Add some logic to disable from CREST menu items if character is not logged in 2015-10-25 22:02:15 -04:00
blitzmann
b52cbef26f Clean up some imports, get rid of CharacterInfo window. 2015-10-25 21:49:24 -04:00
blitzmann
34f699b96a Use cached_until value for GUI countdown 2015-10-25 21:44:24 -04:00
blitzmann
5b341dfc06 pycrest now injects cached until value into the results 2015-10-25 21:44:04 -04:00
blitzmann
cb0003b942 Use deepcopy instead of copy. Fixes issue with using same session object across characters 2015-10-25 20:17:42 -04:00
blitzmann
6ee6186280 Make a post thing for pycrest. Still having authentication errors occasionally. 2015-10-25 19:51:58 -04:00
blitzmann
781abeea53 Implement a character cache, as the database-layer cache is seemingly not working. =/ 2015-10-25 19:41:12 -04:00
blitzmann
6496164d95 Merge branch 'crest_fitting' of https://github.com/DarkFenX/Pyfa into crest_fitting 2015-10-25 18:14:46 -04:00
blitzmann
1ce2921eb7 Put current character info in titlebar, and disable getting image. 2015-10-25 18:14:12 -04:00
blitzmann
6eb6925606 Move html 2015-10-25 17:55:39 -04:00
blitzmann
9d7a3605dc Use timers properly 2015-10-25 17:52:53 -04:00
blitzmann
056e961ccc use webrowser module to open URIs (had some difficulty with LaunchDefaultBrowser on OS X) 2015-10-25 14:46:24 -04:00
blitzmann
8f08f8efb8 Make sure httpd server stops after a certain time frame. 2015-10-25 00:09:33 -04:00
blitzmann
167eb60fe3 Added logic to find CA certs for SSL connections (for frozen apps) and added some logging 2015-10-24 23:32:15 -04:00
blitzmann
c04b7e0552 Revert "Add tomorrow to repo rather than dependency" - going to including it in skel rebuild
This reverts commit ff87d5e456.
2015-10-24 22:51:46 -04:00
blitzmann
ff87d5e456 Add tomorrow to repo rather than dependency 2015-10-24 22:39:43 -04:00
blitzmann
c81774a3aa Move pycrest to service (might move it to utils later, dunno) 2015-10-24 22:28:31 -04:00
blitzmann
a5920a9c9c Added missing files (and fix why they were missing) 2015-10-24 16:46:45 -04:00
blitzmann
c103e563a9 remove old import 2015-10-24 16:23:54 -04:00
blitzmann
08382db011 Add character management window, ability to add and delete crest characters, and fix issue with not having default client ID available. 2015-10-23 21:26:38 -04:00
blitzmann
9929510e53 More work on CREST stuff. Now implicit character can GET and POST fits. 2015-10-23 19:14:43 -04:00
blitzmann
f6cddcc86d Add to repo missing preferences panel 2015-10-23 19:12:05 -04:00
blitzmann
953a70327a Fix (hack at) pycrest to fix caching issue when getting another character. 2015-10-23 01:21:51 -04:00
blitzmann
6e04c64ffb Changed login box to show currently logged in character with timer, and we now fetch the character image. 2015-10-23 00:52:03 -04:00
blitzmann
e0f99ee133 Start refinement of CREST utilities:
* Add preference page which gives option of implicit grant or user client details
* Improve CREST service
* Changes in pycrest which make things a little easier
2015-10-21 23:10:06 -04:00
Alexey Min
6ed81e9bae Check that python-dateutil is installed at startup
Check that python-dateutil is installed at startup in pyfa.py, same way as for wxPython and SQLAlchemy (except for version check).
2015-10-20 11:01:00 +05:00
blitzmann
69a4e42ab0 Forgot the server 2015-10-19 21:34:47 -04:00
blitzmann
8151debfe1 Can now login to SSO from pyfa, which completes basic integration. This is very crude, will be refined. 2015-10-19 20:09:39 -04:00
blitzmann
972df6cad3 Add support for importing CREST fittings from clipboard and through EVE Fittings browser 2015-10-18 23:38:21 -04:00
blitzmann
b1729095a0 Export fitting to EVE, fix json bugs, and include forgotten CREST service. 2015-10-18 17:13:19 -04:00
blitzmann
23dbb59f3f Couple fixes 2015-10-18 01:46:41 -04:00
blitzmann
9269c54434 Implement exporting in CREST format 2015-10-18 01:33:39 -04:00
blitzmann
c4246c0d50 Added CREST service and first pass of fitting resource browsing. I want to completely rework this eventually, but right now just focused on getting a rough draft going. 2015-10-18 00:21:01 -04:00
blitzmann
d013a41079 Added CREST client data (for SISI), and rudimentary database support. Valid data has to be manually entered at this time, but the loading of the crest character works and uses pycrest correctly 2015-10-17 21:47:55 -04:00
blitzmann
94995685e9 Added pycrest with a few fixes. 2015-10-17 21:41:24 -04:00
blitzmann
11c3859270 Added small server script to be used as CREST callback. This can listen for and print the authorization code. 2015-10-16 15:39:40 -04:00
blitzmann
1415de9573 Merge pull request #382 from Will-W/master
Add a simple usage note to projected view
2015-10-13 20:19:40 -04:00
Will Wykeham
73de795082 Fix click on dummy item 2015-10-13 16:13:35 +01:00
Will Wykeham
bb9760f79c Add a usage hint to the Projected tab 2015-10-13 16:01:13 +01:00
Will Wykeham
53b8ca3940 Fix some indentation inconsistency 2015-10-13 15:59:06 +01:00
Will Wykeham
8a9107c798 Fix a double handle of the delete event
On GTK, the handler will get called twice if you call skip(),
and a ValueError exception is thrown on cmdline
We're handling the event so skip not necessary.
2015-10-13 15:56:58 +01:00
OISumeko
52f06bbd43 Fix for issue 347 2015-10-14 01:06:19 +13:00
blitzmann
5246432420 Fix triage effects 2015-10-12 19:30:09 -04:00
blitzmann
8ccdbcc51d Fixed generating .exe on Linux. 2015-10-11 21:49:28 -04:00
blitzmann
81c2895c9e Fix dist script 2015-10-12 00:00:10 -04:00
blitzmann
cbb31c1217 Update dist.py 2015-10-11 19:15:40 -04:00
blitzmann
6c80d15f1d Close update dialog, don't destroy (OSX bug fixes) 2015-10-09 17:43:23 -04:00
blitzmann
4baa6e9e9f Switch over wx.BusyInfo from custom wait dialog 2015-10-09 13:04:06 -07:00
blitzmann
2e998bd5a4 Merge branch 'master' into osx_fixes 2015-10-09 12:20:07 -07:00
blitzmann
a33ec89e87 Fix issue that caused fits that were supposed to open in the background to calculate. Unfortunately this fix breaks the tab snapshot, will have to figure that out later 2015-10-09 18:32:03 -04:00
blitzmann
ba9232e514 Fix preferences dialog 2015-10-09 09:10:37 -07:00
blitzmann
f090cafa5c OS X distributive was pointing to the wrong path for the pyfa root, due to the executable being in a different place than the actual root. This changes the logic to use sys.executable as a fallback when __file__ doesn't exist (for example in the windows distributive) 2015-10-08 15:23:51 -04:00
blitzmann
a67b46bb9a Fix some mining effects 2015-10-05 20:37:41 -04:00
blitzmann
f17fb82ce7 Fix issue with ship bonuses not applying when fit is projected (#374) 2015-10-05 18:10:39 -04:00
blitzmann
3f6c484c99 Fix paths that point to eve.db 2015-10-05 12:33:07 -04:00
blitzmann
11cf4b356c Correct GUI problem with character editor 2015-10-05 03:26:41 -04:00
blitzmann
231cdb8399 Fix minor default settings, fix dist script for wx3 merge 2015-10-04 22:07:23 -04:00
blitzmann
30f077027b Update README.md 2015-10-04 21:37:02 -04:00
blitzmann
8a2c4671bf Update README.md 2015-10-04 21:34:53 -04:00
blitzmann
35f56b9c32 Rename gpl.txt to LICENSE 2015-10-04 21:34:36 -04:00
blitzmann
ae3bd9d9d4 Fix additions toggle to fully collapse 2015-10-04 18:58:55 -04:00
blitzmann
9465aceddb Add splitter between fitting and additions 2015-10-04 18:28:15 -04:00
blitzmann
8e353b08ae Fix some weirdness with come columns 2015-10-04 17:16:48 -04:00
blitzmann
a5f1370eec Fit system effects not applying to projected fits. 2015-10-04 13:17:13 -04:00
blitzmann
b454ac003b Present error message if HTML Export path does not exist 2015-10-04 15:36:56 -04:00
blitzmann
17d353e09b Fix crash with GUI HTML export, and clean up dialogs. 2015-10-04 15:24:53 -04:00
blitzmann
365cacac66 Fix #371 2015-10-02 11:16:41 -04:00
blitzmann
30fef3039c Merge branch 'wx3' 2015-10-01 21:16:06 -04:00
blitzmann
6f161b495f Bump dev version 2015-10-01 21:15:53 -04:00
blitzmann
582e54e758 Fix a few things in inno script 2015-09-29 22:48:50 -04:00
blitzmann
072fac4259 Merge branch 'master' into wx3 2015-09-29 21:35:44 -04:00
DarkPhoenix
4e890e1e1d Update database to tq version and bump version in config 2015-09-29 22:28:49 +03:00
DarkPhoenix
473b70944f Merge branch 'singularity' 2015-09-29 22:25:36 +03:00
blitzmann
37b158439d Fix #359 2015-09-28 20:32:55 -04:00
blitzmann
2617143330 Fix #363 2015-09-27 18:16:54 -04:00
blitzmann
a3b108382e Move eve.db to root 2015-09-27 09:45:44 -04:00
blitzmann
e07c162453 Reduce confusion with number of cycles vs charges 2015-09-26 19:17:22 -04:00
blitzmann
0f8992432b Merge branch 'master' into wx3
Conflicts:
	gui/characterEditor.py
2015-09-26 18:53:28 -04:00
blitzmann
dc55dbdf36 Polish some events 2015-09-25 14:48:05 -04:00
blitzmann
d0ec17feba Some syntax 2015-09-25 14:13:33 -04:00
blitzmann
5b5fdd97d6 Enable and fix market tree for character implant view 2015-09-25 13:59:37 -04:00
blitzmann
c751544560 Do not show level change menu for All 5/0 in char editor 2015-09-25 12:56:40 -04:00
blitzmann
1d51e86c1c Added individual skill save to context menu 2015-09-25 12:16:11 -04:00
blitzmann
05b9d1e607 Fixed some bugs, added character action buttons on editor 2015-09-25 12:13:17 -04:00
blitzmann
2a88e3114b Skill color goes back to normal when saving/reverting skill. 2015-09-25 11:15:08 -04:00
blitzmann
a0f9fb6ad6 Enable/disable edit menu options, and add color to character editor to show which skills are edited 2015-09-24 22:11:31 -04:00
blitzmann
b844bdf986 Add save character as dialog 2015-09-24 20:46:07 -04:00
blitzmann
61614553a2 Fix bug with char copy, and added char revert and save as (unfinished) 2015-09-24 19:03:30 -04:00
blitzmann
ae870f9535 Merge branch 'newTempChar' 2015-09-24 17:16:14 -04:00
blitzmann
30a8437515 Fix returning unicode with __repr__ and __str__. Fixes #356 2015-09-24 14:15:54 -04:00
blitzmann
8647fa245f Fix Jump Drive Economizer. It does not project, and is only applies bonus when online. 2015-09-24 13:09:43 -04:00
blitzmann
23bb763c51 Fix system effects to respect their state 2015-09-24 13:09:25 -04:00
blitzmann
c158cb076f Fix dist script for icons 2015-09-24 12:43:20 -04:00
blitzmann
b1ebf8562a Incorporate icon zipfile making into dist script 2015-09-24 12:27:29 -04:00
blitzmann
e9d02ce4c8 Change to use BitmapLoader class 2015-09-24 12:21:50 -04:00
blitzmann
ec6914d4aa Bitmap Loader is now a proper class, and can be used to load images from zipfile 2015-09-24 12:18:33 -04:00
blitzmann
474f270b26 Change to new icon locations 2015-09-24 12:17:17 -04:00
blitzmann
fb7574e476 Remove extra location stuff from bitmap loader 2015-09-24 11:45:24 -04:00
blitzmann
760b5f3d74 Change in icon layout in preparation for better icon loading. 2015-09-24 11:44:20 -04:00
DarkPhoenix
51c481206c Bump version to make preview build 2015-09-24 01:15:56 +03:00
DarkPhoenix
7b6b922c57 Update database to 965413 and implement BC changes 2015-09-24 01:08:20 +03:00
blitzmann
a08bb2494b Fix system effect states 2015-09-22 21:45:32 -04:00
blitzmann
4affc24ec7 update setup.py 2015-09-20 20:47:16 -04:00
blitzmann
d7cb0d536f Polish the Inno script to delete left overs and only uninstall if version is before a certain milestone. 2015-09-19 23:14:53 -04:00
blitzmann
bf9a4b4919 Run uninstall before installing. Removes old files. Still need version checker and deleting pyc/pyo files 2015-09-18 19:48:06 -04:00
blitzmann
3ea4439b8d Allow changing all 5 and 0 from editor 2015-09-18 11:59:52 -04:00
blitzmann
bd53785667 Allow all 5 and 0 to change skills from affecting skill menu 2015-09-14 20:35:36 -04:00
blitzmann
f2b4400834 Do auto-save when editing in character editor. 2015-09-14 20:30:12 -04:00
blitzmann
b8d01d5ecb Fix a few things 2015-09-13 16:59:59 -04:00
blitzmann
9ae5cfbab2 Revert "Fix API stuff. This should theoretically work, but it's untested."
This reverts commit 1402ceec63.
2015-09-13 16:57:22 -04:00
blitzmann
045031e8ae Revert "Fix character rename, delete, and copy."
This reverts commit c72f049ccd.

Conflicts:
	service/character.py
2015-09-13 16:55:32 -04:00
blitzmann
2c7bfd14b6 Revert "Separate characters from Fit relationship..."
This reverts commit 3521b3887d.

Conflicts:
	eos/db/saveddata/queries.py
2015-09-13 16:53:42 -04:00
blitzmann
1584586fd2 Try a different approach to temp skill levels 2015-09-13 16:51:36 -04:00
blitzmann
1402ceec63 Fix API stuff. This should theoretically work, but it's untested. 2015-09-12 13:15:59 -04:00
blitzmann
4663270067 Since we now have a list of skills by default on our character, remove the iterSkills iterator which helped fetch skills that were not previously loaded 2015-09-12 11:06:21 -04:00
blitzmann
0b9cdaa944 Change the way skills are loaded. We now load all skills when character is created, instead of just creating character and loading skills on demand. This fixes a bug in which new characters were not saving their skills to the database. 2015-09-12 10:59:44 -04:00
blitzmann
89c011d37e Minor modifications. 2015-09-12 10:30:51 -04:00
blitzmann
c72f049ccd Fix character rename, delete, and copy. 2015-09-09 23:12:59 -04:00
blitzmann
ca34217f3b Added character saving.
Deleting characters is broken for now due to using wrong session, but I believe creating character works. Further tests needed
2015-09-09 20:33:15 -04:00
blitzmann
3521b3887d Separate characters from Fit relationship and create new character session. At this point, changes to characters do not persist. Efforts must still be made to focus on creating a character save function as well as ensure characters that are dirty are loaded correctly for fresh fits. 2015-09-09 19:08:38 -04:00
blitzmann
492776c5a8 Fix Scram effect to turn off MWDs. Fixes #70 2015-09-06 11:06:52 -04:00
blitzmann
51a8076d30 Comment cleanup 2015-09-01 23:29:47 -04:00
blitzmann
decf7ff028 Fix #351 2015-09-01 23:23:52 -04:00
DarkPhoenix
31b1c94c0f Add AT13 prize ships 2015-09-01 01:26:30 +03:00
DarkPhoenix
a9fc457510 Bump dev version 2015-09-01 00:09:10 +03:00
blitzmann
7c3c8182a7 Fix initial database creation 2015-08-28 22:03:54 -04:00
blitzmann
b162927f79 Merge branch 'master' into wx3 2015-08-27 22:05:38 -04:00
blitzmann
6dbed1403a Bump stable 2015-08-27 21:50:13 -04:00
blitzmann
aa5eb7ac92 Update DB, force Imp and Fiend as not published again (will publish these when they are live) 2015-08-27 21:49:06 -04:00
blitzmann
e0fbcc91f1 Update effect headers 2015-08-25 17:47:15 -04:00
blitzmann
b2dce223b0 Add AT13 prizes 2015-08-25 17:42:34 -04:00
blitzmann
4b7b22025c Add new drifter incursion effect 2015-08-25 17:39:57 -04:00
blitzmann
8e37dab37e Disallow assistance with active Estonis link 2015-08-25 17:37:17 -04:00
blitzmann
6e95f69565 Support speedLimit introduced with Entosis Link 2015-08-25 17:26:25 -04:00
blitzmann
31331b1e34 Update to 957210 - Galatea 1.0 2015-08-25 17:25:12 -04:00
blitzmann
05b3777ad2 Add build directory to ignore file. 2015-08-25 16:06:38 -04:00
blitzmann
cda8dd4c8b Windows skel has an issue with this, so if there is an issue, use default path to cache file. 2015-08-21 19:04:42 -04:00
blitzmann
e7542fec44 move debug setting, remove debug print 2015-08-21 18:23:46 -04:00
blitzmann
e7fcdd86ac Well, adding this caused severe issues. >_> 2015-08-21 18:02:06 -04:00
blitzmann
d909e8adc4 Fix config file, clean up pyfa.py 2015-08-21 16:48:07 -04:00
blitzmann
def20311a8 New migration import mechanics, borrowed from market conversion imports, because we can't os.listdir from a zipfile 2015-08-21 15:10:00 -04:00
blitzmann
503907e2d8 Fix setup so that we can execute it from dist script and not have it complain 2015-08-21 15:08:51 -04:00
blitzmann
88dc1edfb4 Work on dist script 2015-08-21 15:08:23 -04:00
blitzmann
cbedf03026 Another fix to prep_data. I'll get this right one day 2015-08-21 12:08:57 -04:00
blitzmann
a69589dd23 Merge pull request #346 from Will-W/master
Context menu to swap modules for different variation
2015-08-18 13:08:15 -04:00
Will Wykeham
2904ab6afa Non-windows platform fix for variations menu 2015-08-18 15:59:02 +01:00
Will Wykeham
c763595cc4 Remove debug print statement 2015-08-17 15:41:58 +01:00
Will Wykeham
8fe97180ed Sort higher metalevel items properly in variations menu 2015-08-16 21:56:39 +01:00
Will Wykeham
6a4b2ffe69 Make variations menu handle multiple selections
Ensure the variations menu only shows when you've got
a matching set of items selected.
2015-08-16 21:45:20 +01:00
Will Wykeham
7f100353e2 Make variations menu actually swap out module
Functional, but not handling multiple selections well
2015-08-16 18:30:27 +01:00
Will Wykeham
97ac0804c5 Add Submenu of variations of module type.
Non functional so far.
2015-08-15 19:35:31 +01:00
blitzmann
48f96a7a32 Merge branch 'master' into wx3
Conflicts:
	config.py
	staticdata/icons/icon01_08.png
	staticdata/icons/icon02_11.png
	staticdata/icons/icon105_46.png
	staticdata/icons/icon105_47.png
	staticdata/icons/icon105_48.png
	staticdata/icons/icon105_49.png
	staticdata/icons/icon108_5.png
	staticdata/icons/icon113_64_1.png
	staticdata/icons/icon113_64_2.png
	staticdata/icons/icon113_64_3.png
	staticdata/icons/icon34_16.png
	staticdata/icons/iconMarketIcon_16px_Amarr.png
	staticdata/icons/iconMarketIcon_16px_Caldari.png
	staticdata/icons/iconMarketIcon_16px_Gallente.png
	staticdata/icons/iconMarketIcon_16px_Minmatar.png
2015-08-15 10:50:58 -04:00
DarkPhoenix
598512a904 Fix stacking penalties on active tank effects 2015-08-13 02:21:24 +03:00
DarkPhoenix
121a81ce70 Remove few debugging prints 2015-08-11 15:59:38 +03:00
blitzmann
a2e031cf27 Fix prep_data script so that it actually works 2015-08-09 23:20:00 -04:00
DarkPhoenix
f18ba6160a Do 2 blank lines between cargo contents and the rest of the fit, and when exported with the implants - do cargo items after the implants 2015-08-08 13:36:16 +03:00
blitzmann
c2ca5dffe8 Fix incorrect bitmap rendering of OSX-wx3. MacSetTheme was removed, but it's still required for 2.8 otherwise we get an off-color background 2015-08-04 23:48:31 -04:00
blitzmann
ab7bbcb6ef Remove matplotlib's font cache. Fixes #234 2015-08-04 22:18:28 -04:00
blitzmann
e5e7311748 Revert "Fix preferenceDialog list view width" and actually fix it. OS X untested
This reverts commit 9ba3ca3f5f.
2015-07-26 19:34:42 -04:00
blitzmann
9ba3ca3f5f Fix preferenceDialog list view width 2015-07-26 19:19:53 -04:00
blitzmann
cc59612fa4 Debug logging when flag is set 2015-07-23 16:58:55 -04:00
Ryan Holmes
01db1efdf7 Merge pull request #336 from blitzmann/regSkills
Register skills when applying ship bonuses
2015-07-23 15:58:07 -04:00
blitzmann
e74e2615ad Merge remote-tracking branch 'origin/projections' 2015-07-23 15:46:32 -04:00
blitzmann
2f246d0897 Add context menu to affected by list 2015-07-23 15:32:27 -04:00
DarkPhoenix
505b0ce38f Clear info dicts in-place instead of replacing them with new ones
Sometimes it can cause fuckups, so who knows how PIL works with them...
2015-07-23 20:34:02 +03:00
DarkPhoenix
8c19a956e0 Strip ICC color profile data
Fixes #337
2015-07-23 20:32:40 +03:00
blitzmann
9de3600d7f Fix self-boosting 2015-07-23 01:38:51 -04:00
blitzmann
5a4f526b2b Fix fit copying 2015-07-22 14:27:44 -04:00
blitzmann
cd0b0eada0 Fix graphing 2015-07-22 13:12:57 -04:00
blitzmann
17733d5951 Added missing tactical mode calculations... whoops 2015-07-22 13:02:08 -04:00
blitzmann
0a1f324053 Fix Advanced Spaceship Command skill and resists for Occator 2015-07-21 12:27:46 -04:00
blitzmann
e12b3f3054 Merge tag 'v1.13.2' into wx3
Conflicts:
	config.py
	A lot of icons
2015-07-20 13:21:00 -04:00
blitzmann
b32f76cfde Show affecting skills for charges as well 2015-07-19 16:39:07 -04:00
blitzmann
182104a010 Fix #109 2015-07-19 16:20:42 -04:00
blitzmann
90c883da67 Fix some syntax errors. 2015-07-19 15:51:03 -04:00
blitzmann
ac08b1b264 Add check for current skill level 2015-07-19 15:16:29 -04:00
blitzmann
f17d015ebe Fix having multiple skills in skill list (happens when multiple attributes are modified) 2015-07-19 15:02:50 -04:00
blitzmann
d496637614 Add ship skill bonuses to modified modules. Modify effect files for new skill parameter. Enable affecting skill menu. 2015-07-19 14:19:24 -04:00
blitzmann
4596c526a2 Fix #335 - properly represent charge modifiers 2015-07-18 23:39:16 -04:00
blitzmann
9941b6c74b Make default view module again 2015-07-18 15:23:10 -04:00
blitzmann
b06ce24d4a Fix attribute view items (two of the same item would merge into one, even if they had different modifiers. now simply list them individually) 2015-07-18 15:20:15 -04:00
blitzmann
2f8c201ab3 Add attribute view 2015-07-18 14:45:26 -04:00
blitzmann
d184820728 Fix toggle attribute names. Previous way assumed no other trees apart from first child and siblings. Not true now with projected fit trees. Instead of attempting to walk the tree, we simply store the items in a list that we later iterate over. Much easier 2015-07-17 18:28:31 -04:00
blitzmann
40aeb1ed4a Move active fir to init, fixes bug when refreshing with another active fit 2015-07-17 16:33:07 -04:00
blitzmann
71b258a8f5 Merge fit attributes with ship 2015-07-17 16:32:42 -04:00
blitzmann
cd7579a4bf Fix #332 - offline rigs calculated in calibration stats 2015-07-17 00:01:31 -04:00
blitzmann
d6199a58c2 Separate projected fits from list of affectors. Also, show when affected module is projected. Still need to clean up affector tree stuff 2015-07-16 23:59:37 -04:00
blitzmann
3ad5aaac89 Fix #331 - gang boosts not applied to self projection 2015-07-15 16:52:09 -04:00
blitzmann
3bed268d81 Fix use case for downgrading and adding a row with NULL 2015-07-14 19:13:56 -04:00
blitzmann
9a1b0f07c0 Added documentation on why projections don't respect the __calculated flag which gang boosts do 2015-07-14 16:32:10 -04:00
blitzmann
f591ecba10 Fix use case where gang boosts were not being applied when projections were added/removed. 2015-07-14 16:15:52 -04:00
blitzmann
c571fdc5e6 Fit fit alterations with self projections 2015-07-13 19:29:23 -04:00
DarkPhoenix
6f944fc7db Stacking penalize missile flight time rigs 2015-07-12 02:12:59 +03:00
blitzmann
63fce4be17 Handle self projections by creating a copy of the fit. Due to the way effects are calculated, we would have double effects implemented if not for the copy 2015-07-11 16:28:09 -04:00
blitzmann
86ee5292d8 Fix fit copying and deleting fits not being reflected in other fits. 2015-07-11 12:43:47 -04:00
blitzmann
0060f58e3d Support evemon character imports. 2015-07-11 10:17:02 -04:00
blitzmann
23b458534f Remove unneeded collection class for projected fits 2015-07-10 23:22:58 -04:00
blitzmann
2256efacb0 Do migration stuff for projected fits 2015-07-10 16:40:00 -04:00
blitzmann
28a5318e3b Merge branch 'master' into toggleProjectionFit
Conflicts:
	config.py
2015-07-10 16:09:00 -04:00
blitzmann
609ee13cd6 Redirect stderr and stdout to logger when we are frozen. Need to test this. 2015-07-10 15:58:45 -04:00
blitzmann
4216904736 Remove function to remove projected fits correctly. This is now handled by proper DB relationships 2015-07-10 15:46:42 -04:00
blitzmann
496e9b56b5 Handle use case of invalid fit's mucking things up 2015-07-10 15:46:15 -04:00
blitzmann
b8f73a7c94 bump dev 2015-07-10 12:58:03 -04:00
blitzmann
b4604f8207 Bump Stable... maybe it will be this time 2015-07-10 12:17:14 -04:00
blitzmann
68dddf2810 Fix for init projected fit. Took a long time to figure out what was happening. 2015-07-10 11:58:15 -04:00
blitzmann
4c17f38b1a Fix for #324 - do not reset itemID automatically upon removal due to way modules are swapped. 2015-07-09 18:36:11 -04:00
blitzmann
221a3fde14 Being extra cautious 2015-07-09 18:18:36 -04:00
blitzmann
c17e03d8d0 Fixes critical design issue when it comes to projected fits. Disabled some of the more advanced functionality (projection amount and active) to cope to development. Crash still happens occasionally when adding projected fit for unknown reasons - not 100% reproducable yet 2015-07-09 17:53:41 -04:00
blitzmann
af9f64db5f Move the chain into the runtime loop, otherwise projections won't work for some odd reason. 2015-07-09 14:48:15 -04:00
blitzmann
1f82465a65 Return None for price column on ship modes, fixes #322 2015-07-09 12:13:13 -04:00
blitzmann
d885bd4636 Bump dev and Fix #321 - oversight in tactical mode selection 2015-07-09 11:48:11 -04:00
blitzmann
c17bce55bb Lots of stuff
- Added logging and replaced Timer class with more useful one
- Move projected fit loop out of runtimes
- Eliminate recursions from Fit.clear()
- Clean up overall fit calc logic
2015-07-09 10:43:39 -04:00
blitzmann
4137a7cda9 Bump stable 2015-07-08 11:20:18 -04:00
blitzmann
c92911b79a Work around for lack of flag_modified() support 2015-07-08 10:54:26 -04:00
DarkPhoenix
adc9fb6d00 Don't call function multiple times after first unconditional call 2015-07-08 17:45:25 +03:00
Ryan Holmes
5baf70694a Merge pull request #318 from poettler-ric/fix-logging
Fix logging
2015-07-08 10:14:46 -04:00
Richard Poettler
f08dc97576 logging crashes if the directory doesn't exist 2015-07-08 10:47:25 +02:00
Richard Poettler
35094ae1ce moved dublicate code into one method 2015-07-08 10:45:37 +02:00
DarkPhoenix
5ac31920ee Fix #317
Crop images to square form before making thumbnail, not square images cause issues on Windows
2015-07-08 11:39:01 +03:00
DarkPhoenix
e63c3541c4 Bump for next development release 2015-07-08 00:09:34 +03:00
DarkPhoenix
4976516d4d Bump for a stable version 2015-07-07 23:36:03 +03:00
Ryan Holmes
e042a21d32 Merge pull request #315 from lunedis/resistmultiplier
Showing Resist Multiplier in Tooltip
2015-07-07 14:42:50 -04:00
Kalu
8a22907940 newline in resist multiplier tooltip and explanation 2015-07-07 20:38:27 +02:00
Kalu
a97847e644 show rr factor in tooltip 2015-07-07 20:38:16 +02:00
blitzmann
23309a5da6 Remove unneeded code that created a bitmap for checkboxes 2015-07-07 13:49:40 -04:00
blitzmann
06e4a7e80f Support changing amount of projected fits 2015-07-07 13:49:39 -04:00
blitzmann
b95a10d284 Add active column. Looping the fit to apply it x amount of times doesn't seem to work. Probably because it's been flagged calculated and returns early 2015-07-07 13:49:38 -04:00
blitzmann
2bca3ddcc8 GUI support (also made regular checkboxes pretty for drones/implant/etc) 2015-07-07 13:49:37 -04:00
blitzmann
9ef182aa99 First working prototype of toggleable projected fits. Creates a new association object that stores projection-specific information. GUI hasn't been touched (need to show state), and there are a lot of variables that I need to rename. 2015-07-07 13:49:35 -04:00
blitzmann
5e56107582 Revert changes to minimum / default sizes of splitter windows 2015-07-07 13:28:02 -04:00
DarkPhoenix
972c08e7e4 Remove AT13 prizes from ship list for now 2015-07-07 16:10:29 +03:00
DarkPhoenix
091832af21 Fix bug in script and add missing icons 2015-07-07 16:09:13 +03:00
DarkPhoenix
16d1891e16 Add script which updates renders and update them using aegis release export 2015-07-07 16:05:44 +03:00
DarkPhoenix
40ee68e2cf Update module/attribute icons 2015-07-07 15:11:55 +03:00
DarkPhoenix
bfe3b4a26d Add new entosis offline mass penalty 2015-07-07 15:10:37 +03:00
DarkPhoenix
9aa1332b15 Update database to 912410 2015-07-07 15:07:39 +03:00
DarkPhoenix
0521d242eb Make sure bitmap loader searches for proper file (w/o EVE embedfs-specific path and extension) 2015-07-06 11:31:02 +03:00
DarkPhoenix
2b3f3773e5 Merge branch 'master' into singularity 2015-07-06 01:39:50 +03:00
DarkPhoenix
4041407878 Also make sure to process icons for categories and attributes 2015-07-06 01:38:51 +03:00
blitzmann
1b5e0467fc Save browser sizes 2015-07-05 13:59:18 -04:00
DarkPhoenix
a7c346f78e Add script which is supposed to update icons 2015-07-05 20:59:15 +03:00
blitzmann
3cc51aaf89 Change logging location to ~/.pyfa and set default level to WARN 2015-07-05 13:15:26 -04:00
Ryan Holmes
a339ae1c55 Merge pull request #312 from blitzmann/dbCorruption
Fixes for database rot
2015-07-05 13:08:11 -04:00
blitzmann
3773d1c28e Improvements to fit initializations and logging 2015-07-05 12:57:04 -04:00
blitzmann
41b8db346f Fix broken drone drag 2015-07-05 01:16:53 -04:00
blitzmann
7959593c6c Improve object initialization and add support for logging the errors. 2015-07-05 00:31:52 -04:00
blitzmann
aaa60cbc14 Fix instance where some items were being re-added due to lack of return. Also, implement some basic logging. 2015-07-05 00:28:55 -04:00
DarkPhoenix
8ae5a96047 Merge branch 'master' into singularity 2015-07-04 12:45:15 +03:00
blitzmann
8c90b3132b Use lunedis's method and apply it to additions pane, cleans up code 2015-07-04 01:38:11 -04:00
blitzmann
1326e21f6b Fix IndexError when selecting module index that doesn't exist. Also, tweaked setting the selItem variable. 2015-07-04 01:27:57 -04:00
blitzmann
bfdc2161e0 Add shortcut cues as toggle in prefs 2015-07-04 00:52:44 -04:00
blitzmann
9ab79af70c Show shortcut values in market list 2015-07-04 00:44:19 -04:00
Ryan Holmes
f0de2000bf Merge pull request #313 from lunedis/quickfit
Quickly fitting modules using ALT+1-9
2015-07-04 00:34:43 -04:00
blitzmann
5991d19b3e Allow Subsystems as modules. 2015-07-04 00:32:28 -04:00
Kalu
51fed996f1 refactor quickfit shortcuts with list 2015-07-03 23:43:04 +02:00
Kalu
f6bbc6c410 Implemented using Alt+1-5 for quickly fitting modules, see issue #183 2015-07-03 23:42:54 +02:00
blitzmann
3de6b63325 Fix oversight when creating a new database 2015-07-03 14:18:11 -04:00
blitzmann
dd48815f30 Offline rigs, closes #100 2015-07-03 14:05:57 -04:00
DarkPhoenix
5608676dc8 Merge branch 'master' into singularity 2015-07-03 12:37:08 +03:00
DarkPhoenix
86ab1f7444 Ignore python pyc files and rely on index within file rather than just on amount of files 2015-07-03 12:36:17 +03:00
DarkPhoenix
8f51642f70 Merge branch 'master' into singularity 2015-07-03 12:13:53 +03:00
blitzmann
de71123a48 Merge branch 'pricing' 2015-07-03 02:38:23 -04:00
blitzmann
874cf4ef0a Use old price information if update fails. Add "(!)" to show that price is out of date 2015-07-03 02:37:52 -04:00
blitzmann
87e5929cb1 DB migration is triggered by number of upgrade files found, rather than number in config.py. This allows us to remove the db version variable in config.py and not worry about it. 2015-07-02 19:35:53 -04:00
blitzmann
84b1e0ac41 Migrate boosters table to new schema that drops the UNIQUE constraint (causes issues and is unneeded) 2015-07-02 19:34:02 -04:00
blitzmann
539360d5f6 Remove old debug print 2015-07-02 15:04:07 -04:00
blitzmann
ca08f8d8da Handle fits with invalid ships by removing and deleting them when loaded. 2015-07-02 15:03:56 -04:00
blitzmann
e1ce672569 Move flag_modified to HandledList.remove() so that it takes care of all our use cases. Give fits an itemID like everything else so that projected fits can be removed correctly by this logic. No reason for them to be special snowflakes. 2015-07-02 11:22:26 -04:00
blitzmann
717080b58c Handle invalid implants and boosters. Uses a different method to ensure implant and booster slot is not duplicated. Still need to modify existing databases to remove Booster table constraint. Reverts a previous commit: "Gracefully handle invalid boosters in database (both itemIDs that don't exist as well as non-booster items). Implants need a little more work" (aaa5a6ae18) 2015-07-02 00:48:32 -04:00
blitzmann
51696c509f Merged Cargo and Drone collection class (essentially the same). Utilized SQLAlchemy's flag_modified() to force SA to update DB (in this case, remove the entry) 2015-07-01 20:54:40 -04:00
blitzmann
4a5ae9f6f1 Handle invalid cargo. Noticed that cargo nor drones are removed from the database with these methods. Not sure why - projected drones and modules are correctly removed in similar ways 2015-07-01 15:21:27 -04:00
blitzmann
fa9f324f78 Handle invalid drones 2015-07-01 14:55:05 -04:00
blitzmann
bcc77f11cd Handle invalid projected drones 2015-07-01 14:50:08 -04:00
blitzmann
f737f292e3 Refine appending projected modules. Ensure that module can actually be projected, and also ensure that we only have 1 system effect running at a time. Invalid modules are removed at earliest opportunity as we are later accessing attributes that may not be there for corrupted data. 2015-07-01 13:34:19 -04:00
blitzmann
1c18a5207c System Effects are wrapped in Module class, even though they are not modules. Account for this. 2015-07-01 13:32:31 -04:00
blitzmann
fa2b1e3821 Handle invalid modules. This streamlines the module init code from both program and database sources. When loading from the database, we ensure that the module item is actually an item. If not, we set a flag to delete it (which is picked up by the collection class)(can't use exceptions as there's no place to catch them) 2015-07-01 02:20:56 -04:00
DarkPhoenix
6184753822 Merge branch 'master' into singularity 2015-06-30 21:16:15 +03:00
DarkPhoenix
91a9c860ea Merge branch 'singularity' of github.com:DarkFenX/Pyfa into singularity 2015-06-30 21:15:10 +03:00
DarkPhoenix
0730ac369f Update data to 910808 2015-06-30 21:14:22 +03:00
blitzmann
aaa5a6ae18 Gracefully handle invalid boosters in database (both itemIDs that don't exist as well as non-booster items). Implants need a little more work 2015-06-30 13:51:49 -04:00
blitzmann
5372f31be8 Revert "Revert "Merge branch 'master' into wx3"". So many reverts.
This reverts commit cca7f1112a.
2015-06-27 21:53:59 -04:00
blitzmann
6d01877d78 Merge branch 'master' into wx3
Conflicts:
	pyfa.py
2015-06-27 19:33:12 -04:00
blitzmann
646f3afd27 Fixed oversights 2015-06-27 19:32:21 -04:00
blitzmann
030f22b66f Merge branch 'debugGtk' into wx3 2015-06-27 18:25:31 -04:00
blitzmann
98815f2b85 Fix #307 by moving menu code to spawn event 2015-06-27 18:18:43 -04:00
blitzmann
a4fe3fe142 Fix crash in character editor 2015-06-27 15:56:34 -04:00
blitzmann
5b0857e169 Ensure that resources gauge is not drawn with a width of 0 to make GTK happy 2015-06-27 15:35:22 -04:00
blitzmann
975a414c5f Ensure that SetSize() does not take values less than -1 2015-06-27 14:39:35 -04:00
Ryan Holmes
95eb5a6117 Update README.md
Added note for Linux users and wxPython 2.8
2015-06-25 21:45:06 -04:00
blitzmann
8a7e69b902 Fix progress dialog stuff. Closes #281 2015-06-25 16:43:39 -04:00
blitzmann
dc035469ed Fix background color for certain panels under Linux 2015-06-25 16:09:56 -04:00
DarkPhoenix
ec4a00cdfc Merge branch 'master' into singularity 2015-06-25 12:12:33 +03:00
blitzmann
21937c02ff Made it look nicer 2015-06-24 19:53:55 -04:00
DarkPhoenix
edfd446e46 Update to 908326 2015-06-25 00:33:37 +03:00
blitzmann
7ec78b941e Add help text for why api is disabled, per #269. I may or may not make it look nicer later 2015-06-24 15:10:37 -04:00
blitzmann
95bf1039c0 Fix #291 - Triage not properly implemented on projected fit 2015-06-24 14:36:31 -04:00
blitzmann
e6def6f5f9 Fix #299 - fit not recalculated after module states change upon module append 2015-06-24 00:40:13 -04:00
DarkPhoenix
de0b03630a Bump version 2015-06-23 00:17:41 +03:00
DarkPhoenix
90a2a79d5b Add hecate effects, update database to 906843 2015-06-23 00:00:09 +03:00
DarkPhoenix
21efd6d06a CCP added faction 200mm plates back to the game 2015-06-22 22:22:35 +03:00
DarkPhoenix
ea288a6133 Update conversion scripts to use new scheme 2015-06-21 16:50:07 +03:00
blitzmann
da16f6cee7 Fix closing of progress dialogs 2015-06-20 15:00:02 -04:00
blitzmann
f285395e0f Fix black bitmap when dragging fit, closes #303 2015-06-17 19:43:48 -04:00
blitzmann
b54e3aeaf9 See #303 2015-06-16 15:28:23 -04:00
blitzmann
23baaa7dba Merge branch 'master' of https://github.com/DarkFenX/Pyfa 2015-06-16 13:14:28 -04:00
blitzmann
8008c986d3 Fix #302 - Projected fit applying Tactical Destroyer mode effects on projectee 2015-06-16 13:14:16 -04:00
DarkPhoenix
b9efc919ea Add missing RHML rof effect 2015-06-16 16:53:21 +03:00
blitzmann
6cc6fd9468 Instead of icon, use unicode refresh. Minor issues with image and GUI flickering 2015-06-06 22:42:42 -05:00
blitzmann
53c9169043 Simplified price pane. Will show pricing update label and will only clear it when prices are done. Removed all timer code as it makes it overly complicated and I suspect half of it didn't work as intended anyway 2015-06-05 15:39:10 -05:00
blitzmann
eb2f4991ee Fix search in wx3 (and remove some needless crap... seriously, why was all that there?) 2015-06-04 22:48:46 -05:00
blitzmann
16017a3c31 Remove middle click to open new page, fixing wx3 deprecation warning (didn't seem to work anyway) 2015-06-04 21:01:49 -05:00
blitzmann
98d9adef8a Fix for libpng hating our color profiles 2015-06-04 17:27:11 -05:00
blitzmann
9e96aac04d Fix situation in which module prices are fetched individually (which the price column). Instead, have them wait in a queue that is processed when the entire fit is called and calculated (with the price pane). Also adds a little refresh icon to know that prices are updating and it's not just blank (might change) 2015-06-04 14:10:27 -05:00
DarkPhoenix
3395f8ebe6 Bump for next development release 2015-06-02 23:43:16 +03:00
blitzmann
e7264108dd Fix #287 2015-05-05 23:23:38 -04:00
blitzmann
2bcbb03c10 Fix #286 and another minor bug related to colors 2015-05-05 22:56:40 -04:00
DarkPhoenix
9cf20942f1 Change validator requirement for owner ID
This fixes bug related to sqlalch 1.0
2015-05-01 20:15:08 +03:00
DarkPhoenix
dbb98e981a Merge branch 'wx3' of github.com:DarkFenX/Pyfa into wx3 2015-05-01 19:03:04 +03:00
DarkPhoenix
3ae39b2e7c Remove unused import 2015-05-01 19:02:13 +03:00
DarkPhoenix
7b43b516c9 Add effect i should've added for mosaic release 2015-05-01 18:50:11 +03:00
DarkPhoenix
12d6a2c5de Bundle runtime libs with windows executable 2015-05-01 16:37:13 +03:00
DarkPhoenix
26bba49193 Work around bug in wxpython
Button is specified as property in wx docs, but it returns bound method instead of actually being a property
2015-05-01 16:00:26 +03:00
DarkPhoenix
4e69a2656c Add some options for Mac binary generation
Can't test it atm, but whatever
2015-05-01 15:37:09 +03:00
DarkPhoenix
68d504c79d Force writing errors/output to file in case of frozen distributive 2015-05-01 15:08:14 +03:00
DarkPhoenix
2180b1ac3b Add folder with assets used for distributives 2015-05-01 14:50:09 +03:00
DarkPhoenix
32712a8798 Fetch app version from config file 2015-05-01 14:20:01 +03:00
DarkPhoenix
73c7ad55b6 Add comment which shows how to use script 2015-05-01 14:00:31 +03:00
DarkPhoenix
a34c5ace5c Change setup file to make sure msi installer can be built 2015-05-01 13:54:40 +03:00
DarkPhoenix
fd77661f41 Tune setup file a bit more 2015-05-01 04:02:10 +03:00
DarkPhoenix
ad07cf25d8 Settle on just Tkinter in excludes 2015-05-01 03:23:57 +03:00
DarkPhoenix
4daf1b1ba3 Merge branch 'wx3' of github.com:DarkFenX/Pyfa into wx3 2015-05-01 01:28:18 +03:00
DarkPhoenix
4b189ab146 Remove obsolete readme 2015-05-01 01:27:54 +03:00
DarkPhoenix
64a69e3910 Remove tcl/tk from distributive 2015-05-01 01:27:07 +03:00
DarkPhoenix
9482404ca7 Remove setting locale
Who knows what it may cause, i'm not an wx expert, but wx3 bundled with xc_freeze keeps bitching about it...
2015-05-01 00:04:35 +03:00
DarkPhoenix
124d4fab9b Change the way we fetch conversions from package to make it compatible with frozen and packed builds 2015-04-30 23:59:56 +03:00
DarkPhoenix
722406f636 Change the way we detect root
This is needed for executable freeze to work correctly
2015-04-30 23:08:42 +03:00
DarkPhoenix
6d4957b148 Add setup.py for building binary distributives with wx3 2015-04-30 22:24:27 +03:00
4177 changed files with 37960 additions and 14860 deletions

26
.codecov.yml Normal file
View File

@@ -0,0 +1,26 @@
codecov:
notify:
require_ci_to_pass: yes
coverage:
precision: 2
round: down
range: "70...100"
status:
project: yes
patch: yes
changes: no
parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no
comment:
layout: "header, diff"
behavior: default
require_changes: no

40
.gitattributes vendored Normal file
View File

@@ -0,0 +1,40 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
# *.c text
# *.h text
# Declare files that will always have CRLF line endings on checkout.
# Source files
# ============
*.pxd text eol=crlf
*.py text eol=crlf
*.py3 text eol=crlf
*.pyw text eol=crlf
*.pyx text eol=crlf
# Denote all files that are truly binary and should not be modified.
# Binary files
# ============
*.db binary
*.p binary
*.pkl binary
*.pyc binary
*.pyd binary
*.pyo binary
# Note: .db, .p, and .pkl files are associated
# with the python modules ``pickle``, ``dbm.*``,
# ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
# (among others).
# Denote all files that are truly binary and should not be modified.
# Image files
# ============
*.png binary
*.jpg binary
*.icns binary
*.ico binary

116
.gitignore vendored
View File

@@ -4,19 +4,117 @@
#Kwrite/Gedit/Other crapapps making backups
*~
#Eclipse
.project
.pydevproject
.settings
#Patch files
*.patch
#Personal
saveddata/
#PyCharm
.idea/
/saveddata/
#Pyfa file
pyfaFits.html
#Temporary files
*.py__jb_tmp__
# Based on https://github.com/github/gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
Pyfa.egg-info/
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# IPython Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# dotenv
.env
# virtualenv
.venv/
venv/
ENV/
# Spyder project settings
.spyderproject
# Rope project settings
.ropeproject
# Eclipse project settings
.project
.pydevproject
.settings
# Pycharm project settings
.idea
eos.iml

25
.travis.yml Normal file
View File

@@ -0,0 +1,25 @@
language: python
python:
- '2.7'
env:
- TOXENV=pep8
addons:
apt:
packages:
# for wxPython:
- python-wxgtk2.8
- python-wxtools
- wx2.8-doc
- wx2.8-examples
- wx2.8-headers
- wx2.8-i18n
before_install:
- pip install -U tox
install:
- pip install -r requirements.txt
- pip install -r requirements_test.txt
script:
- tox
- py.test --cov=./
after_success:
- bash <(curl -s https://codecov.io/bash)

View File

View File

@@ -1,15 +1,67 @@
# Pyfa
# pyfa
Pyfa is a cross-platform desktop fitting application for EVE online that can be used natively on any platform where python and wxwidgets are available.
[![Join us on Slack!](https://pyfainvite.azurewebsites.net/badge.svg)](https://pyfainvite.azurewebsites.net/)
It provides many advanced features such as graphs and full calculations of any possible combination of modules, fits, etc.
![pyfa](https://cloud.githubusercontent.com/assets/3904767/10271512/af385ef2-6ade-11e5-8f67-52b8b1e4c797.PNG)
Please see the [FAQ](https://github.com/DarkFenX/Pyfa/wiki/FAQ) for answers to common questions / concerns
## What is it?
#### Links
* [Development repository: http://github.com/DarkFenX/Pyfa](http://github.com/DarkFenX/Pyfa)
* [XMPP conference:
pyfa@conference.jabber.org](pyfa@conference.jabber.org)
pyfa, short for **py**thon **f**itting **a**ssistant, allows you to create, experiment with, and save ship fittings without being in game. Open source and written in Python, it is available on any platform where Python 2.x and wxWidgets are available, including Windows, Mac OS X, and Linux.
## Latest Version and Changelogs
The latest version along with release notes can always be found on the project's [Releases](https://github.com/DarkFenX/Pyfa/releases) page. pyfa will notify you if you are running an outdated version.
## Installation
Windows and OS X users are supplied self-contained builds of pyfa on the [latest releases](https://github.com/pyfa-org/Pyfa/releases/latest) page. An `.exe` installer is also available for Windows builds. Linux users can run pyfa using their distribution's Python interpreter. There is no official self-contained package for Linux, however, there are a number of third-party packages available through distribution-specific repositories.
#### OS X
There are two different distributives for OS X: `-mac` and `-mac-deprecated`.
* `-mac`: based on wxPython 3.0.2.0 and has updated libraries. This is the recommended build.
* `-mac-deprecated`: utilizes older binaries running on wxPython 2.8; because of this, some features are not available (currently CREST support and Attribute Overrides). Additionally, as development happens primarily on wxPython 3.0, a few GUI bugs may pop up as `-mac-deprecated` is not actively tested. However, due to some general issues with wxPython 3.0, especially on some newer OS X versions, `-mac-deprecated` is still offered for those that need it.
There is also a [Homebrew](http://brew.sh) option for installing pyfa on OS X. Please note this is maintained by a third-party and is not tested by pyfa developers. Simply fire up in terminal:
```
$ brew install Caskroom/cask/pyfa
```
### Linux Distro-specific Packages
The following is a list of pyfa packages available for certain distributions. Please note that these packages are maintained by third-parties and are not evaluated by the pyfa developers.
* Debian/Ubuntu/derivitives: https://github.com/AdamMajer/Pyfa/releases
* Arch: https://aur.archlinux.org/packages/pyfa/
* openSUSE: https://build.opensuse.org/package/show/home:rmk2/pyfa
* FreeBSD: http://www.freshports.org/games/pyfa/ (see [#484](https://github.com/pyfa-org/Pyfa/issues/484) for instructions)
### Dependencies
If you wish to help with development or simply need to run pyfa through a Python interpreter, the following software is required:
* Python 2.7
* `wxPython` 2.8/3.0
* `sqlalchemy` >= 1.0.5
* `dateutil`
* `matplotlib` (for some Linux distributions you may need to install separate wxPython bindings such as `python-matplotlib-wx`)
* `requests`
## Bug Reporting
The preferred method of reporting bugs is through the project's [GitHub Issues interface](https://github.com/pyfa-org/Pyfa/issues). Alternatively, posting a report in the [pyfa thread](http://forums.eveonline.com/default.aspx?g=posts&t=247609) on the official EVE Online forums is acceptable. Guidelines for bug reporting can be found on [this wiki page](https://github.com/DarkFenX/Pyfa/wiki/Bug-Reporting).
## License
pyfa is licensed under the GNU GPL v3.0, see LICENSE
## Resources
* Development repository: [https://github.com/pyfa-org/Pyfa](https://github.com/pyfa-org/Pyfa)
* XMPP conference: [pyfa@conference.jabber.org](pyfa@conference.jabber.org)
* [EVE forum thread](http://forums.eveonline.com/default.aspx?g=posts&t=247609)
* [EVE University guide using pyfa](http://wiki.eveuniversity.org/Guide_to_using_PYFA)
* [EVE Online website](http://www.eveonline.com/)
## Contacts:
* Sable Blitzmann
* GitHub: @blitzmann
* [TweetFleet Slack](https://www.fuzzwork.co.uk/tweetfleet-slack-invites/): @blitzmann
* [Gitter chat](https://gitter.im/pyfa-org/Pyfa): @ blitzmann
* Email: sable.blitzmann@gmail.com
## CCP Copyright Notice
EVE Online, the EVE logo, EVE and all associated logos and designs are the intellectual property of CCP hf. All artwork, screenshots, characters, vehicles, storylines, world facts or other recognizable features of the intellectual property relating to these trademarks are likewise the intellectual property of CCP hf. EVE Online and the EVE logo are the registered trademarks of CCP hf. All rights are reserved worldwide. All other trademarks are the property of their respective owners. CCP hf. has granted permission to pyfa to use EVE Online and all associated logos and designs for promotional and information purposes on its website but does not endorse, and is not in any way affiliated with, pyfa. CCP is in no way responsible for the content on or functioning of this program, nor can it be liable for any damage arising from the use of this program.

155
config.py
View File

@@ -1,6 +1,11 @@
import os
import sys
# TODO: move all logging back to pyfa.py main loop
# We moved it here just to avoid rebuilding windows skeleton for now (any change to pyfa.py needs it)
import logging
import logging.handlers
# Load variable overrides specific to distribution type
try:
import configforced
@@ -13,83 +18,155 @@ debug = False
saveInRoot = False
# Version data
version = "1.12.0"
tag = "Stable"
expansionName = "Carnyx"
expansionVersion = "1.0"
version = "1.26.1"
tag = "git"
expansionName = "YC118.10"
expansionVersion = "1.2"
evemonMinVersion = "4081"
# Database version (int ONLY)
# Increment every time we need to flag for user database upgrade/modification
dbversion = 7
pyfaPath = None
savePath = None
staticPath = None
saveDB = None
gameDB = None
# TODO: move back to pyfa.py main loop
# We moved it here just to avoid rebuilding windows skeleton for now (any change to pyfa.py needs it)
import logging
logging.basicConfig()
def defPaths():
class StreamToLogger(object):
"""
Fake file-like stream object that redirects writes to a logger instance.
From: http://www.electricmonk.nl/log/2011/08/14/redirect-stdout-and-stderr-to-a-logger-in-python/
"""
def __init__(self, logger, log_level=logging.INFO):
self.logger = logger
self.log_level = log_level
self.linebuf = ''
def write(self, buf):
for line in buf.rstrip().splitlines():
self.logger.log(self.log_level, line.rstrip())
def isFrozen():
if hasattr(sys, 'frozen'):
return True
else:
return False
def __createDirs(path):
if not os.path.exists(path):
os.makedirs(path)
def defPaths(customSavePath):
global debug
global pyfaPath
global savePath
global staticPath
global saveDB
global gameDB
global saveInRoot
if debug:
logLevel = logging.DEBUG
else:
logLevel = logging.WARN
# The main pyfa directory which contains run.py
# Python 2.X uses ANSI by default, so we need to convert the character encoding
pyfaPath = getattr(configforced, "pyfaPath", pyfaPath)
if pyfaPath is None:
pyfaPath = unicode(os.path.dirname(os.path.realpath(os.path.abspath(
sys.modules['__main__'].__file__))), sys.getfilesystemencoding())
pyfaPath = getPyfaPath()
# Where we store the saved fits etc, default is the current users home directory
if saveInRoot is True:
savePath = getattr(configforced, "savePath", None)
if savePath is None:
savePath = os.path.join(pyfaPath, "saveddata")
savePath = getPyfaPath("saveddata")
else:
savePath = getattr(configforced, "savePath", None)
if savePath is None:
savePath = unicode(os.path.expanduser(os.path.join("~", ".pyfa")),
sys.getfilesystemencoding())
if customSavePath is None: # customSavePath is not overriden
savePath = os.path.expanduser(os.path.join("~", ".pyfa"))
else:
savePath = customSavePath
# Redirect stderr to file if we're requested to do so
stderrToFile = getattr(configforced, "stderrToFile", None)
if stderrToFile is True:
if not os.path.exists(savePath):
os.mkdir(savePath)
sys.stderr = open(os.path.join(savePath, "error_log.txt"), "w")
__createDirs(savePath)
# Same for stdout
stdoutToFile = getattr(configforced, "stdoutToFile", None)
if stdoutToFile is True:
if not os.path.exists(savePath):
os.mkdir(savePath)
sys.stdout = open(os.path.join(savePath, "output_log.txt"), "w")
if isFrozen():
certName = "cacert.pem"
os.environ["REQUESTS_CA_BUNDLE"] = getPyfaPath(certName).encode('utf8')
os.environ["SSL_CERT_FILE"] = getPyfaPath(certName).encode('utf8')
# Static EVE Data from the staticdata repository, should be in the staticdata
# directory in our pyfa directory
staticPath = os.path.join(pyfaPath, "staticdata")
loggingFormat = '%(asctime)s %(name)-24s %(levelname)-8s %(message)s'
logging.basicConfig(format=loggingFormat, level=logLevel)
handler = logging.handlers.RotatingFileHandler(getSavePath("log.txt"), maxBytes=1000000, backupCount=3)
formatter = logging.Formatter(loggingFormat)
handler.setFormatter(formatter)
logging.getLogger('').addHandler(handler)
logging.info("Starting pyfa")
if hasattr(sys, 'frozen'):
stdout_logger = logging.getLogger('STDOUT')
sl = StreamToLogger(stdout_logger, logging.INFO)
sys.stdout = sl
# This interferes with cx_Freeze's own handling of exceptions. Find a way to fix this.
# stderr_logger = logging.getLogger('STDERR')
# sl = StreamToLogger(stderr_logger, logging.ERROR)
# sys.stderr = sl
# The database where we store all the fits etc
saveDB = os.path.join(savePath, "saveddata.db")
saveDB = getSavePath("saveddata.db")
# The database where the static EVE data from the datadump is kept.
# This is not the standard sqlite datadump but a modified version created by eos
# maintenance script
gameDB = os.path.join(staticPath, "eve.db")
gameDB = getPyfaPath("eve.db")
## DON'T MODIFY ANYTHING BELOW ##
# DON'T MODIFY ANYTHING BELOW!
import eos.config
#Caching modifiers, disable all gamedata caching, its unneeded.
# Caching modifiers, disable all gamedata caching, its unneeded.
eos.config.gamedataCache = False
# saveddata db location modifier, shouldn't ever need to touch this
eos.config.saveddata_connectionstring = "sqlite:///" + saveDB + "?check_same_thread=False"
eos.config.gamedata_connectionstring = "sqlite:///" + gameDB + "?check_same_thread=False"
def getPyfaPath(Append=None):
base = getattr(sys.modules['__main__'], "__file__", sys.executable) if isFrozen() else sys.argv[0]
root = os.path.dirname(os.path.realpath(os.path.abspath(base)))
if Append:
path = parsePath(root, Append)
else:
path = parsePath(root)
return path
def getSavePath(Append=None):
root = savePath
if Append:
path = parsePath(root, Append)
else:
path = parsePath(root)
return path
def parsePath(root, Append=None):
if Append:
path = os.path.join(root, Append)
else:
path = root
if type(path) == str: # leave unicode ones alone
try:
path = path.decode('utf8')
except UnicodeDecodeError:
path = path.decode('windows-1252')
return path

BIN
dist_assets/mac/pyfa.icns Normal file

Binary file not shown.

BIN
dist_assets/win/pyfa.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

@@ -1,6 +1,7 @@
version = "0.2.3"
tag = "git"
def test():
import tests.runTests
import unittest

View File

@@ -1,12 +1,12 @@
import heapq
from math import sqrt, exp
import time
from math import sqrt, exp
DAY = 24 * 60 * 60 * 1000
def lcm(a,b):
n = a*b
def lcm(a, b):
n = a * b
while b:
a, b = b, a % b
return n / a
@@ -40,45 +40,38 @@ class CapSimulator(object):
# relevant decimal digits of capacitor for LCM period optimization
self.stability_precision = 1
def scale_activation(self, duration, capNeed):
for res in self.scale_resolutions:
mod = duration % res
if mod:
if mod > res/2.0:
mod = res-mod
if mod > res / 2.0:
mod = res - mod
else:
mod = -mod
if abs(mod) <= duration/100.0:
if abs(mod) <= duration / 100.0:
# only adjust if the adjustment is less than 1%
duration += mod
capNeed += float(mod)/duration * capNeed
capNeed += float(mod) / duration * capNeed
break
return duration, capNeed
def init(self, modules):
"""prepare modules. a list of (duration, capNeed, clipSize) tuples is
"""prepare modules. a list of (duration, capNeed, clipSize, disableStagger) tuples is
expected, with clipSize 0 if the module has infinite ammo.
"""
mods = {}
for module in modules:
if module in mods:
mods[module] += 1
else:
mods[module] = 1
self.modules = mods
self.modules = modules
def reset(self):
"""Reset the simulator state"""
self.state = []
mods = {}
period = 1
disable_period = False
for (duration, capNeed, clipSize), amount in self.modules.iteritems():
# Loop over modules, clearing clipSize if applicable, and group modules based on attributes
for (duration, capNeed, clipSize, disableStagger) in self.modules:
if self.scale:
duration, capNeed = self.scale_activation(duration, capNeed)
@@ -87,14 +80,22 @@ class CapSimulator(object):
if not self.reload and capNeed > 0:
clipSize = 0
if self.stagger:
# Group modules based on their properties
if (duration, capNeed, clipSize, disableStagger) in mods:
mods[(duration, capNeed, clipSize, disableStagger)] += 1
else:
mods[(duration, capNeed, clipSize, disableStagger)] = 1
# Loop over grouped modules, configure staggering and push to the simulation state
for (duration, capNeed, clipSize, disableStagger), amount in mods.iteritems():
if self.stagger and not disableStagger:
if clipSize == 0:
duration = int(duration/amount)
duration = int(duration / amount)
else:
stagger_amount = (duration*clipSize+10000)/(amount*clipSize)
stagger_amount = (duration * clipSize + 10000) / (amount * clipSize)
for i in range(1, amount):
heapq.heappush(self.state,
[i*stagger_amount, duration,
[i * stagger_amount, duration,
capNeed, 0, clipSize])
else:
capNeed *= amount
@@ -107,13 +108,11 @@ class CapSimulator(object):
heapq.heappush(self.state, [0, duration, capNeed, 0, clipSize])
if disable_period:
self.period = self.t_max
else:
self.period = period
def run(self):
"""Run the simulation"""
@@ -133,13 +132,13 @@ class CapSimulator(object):
capCapacity = self.capacitorCapacity
tau = self.capacitorRecharge / 5.0
cap_wrap = capCapacity # cap value at last period
cap_lowest = capCapacity # lowest cap value encountered
cap_lowest_pre = capCapacity # lowest cap value before activations
cap = capCapacity # current cap value
t_wrap = self.period # point in time of next period
cap_wrap = capCapacity # cap value at last period
cap_lowest = capCapacity # lowest cap value encountered
cap_lowest_pre = capCapacity # lowest cap value before activations
cap = capCapacity # current cap value
t_wrap = self.period # point in time of next period
t_now = t_last = 0
t_last = 0
t_max = self.t_max
while 1:
@@ -148,7 +147,7 @@ class CapSimulator(object):
if t_now >= t_max:
break
cap = ((1.0+(sqrt(cap/capCapacity)-1.0)*exp((t_last-t_now)/tau))**2)*capCapacity
cap = ((1.0 + (sqrt(cap / capCapacity) - 1.0) * exp((t_last - t_now) / tau)) ** 2) * capCapacity
if t_now != t_last:
if cap < cap_lowest_pre:
@@ -167,20 +166,20 @@ class CapSimulator(object):
iterations += 1
t_last = t_now
if cap < cap_lowest:
if cap < 0.0:
break
cap_lowest = cap
t_last = t_now
# queue the next activation of this module
t_now += duration
shot += 1
if clipSize:
if shot % clipSize == 0:
shot = 0
t_now += 10000 # include reload time
t_now += 10000 # include reload time
activation[0] = t_now
activation[3] = shot
@@ -193,19 +192,17 @@ class CapSimulator(object):
# calculate EVE's stability value
try:
avgDrain = reduce(float.__add__, map(lambda x: x[2]/x[1], self.state), 0.0)
self.cap_stable_eve = 0.25 * (1.0 + sqrt(-(2.0 * avgDrain * tau - capCapacity)/capCapacity)) ** 2
avgDrain = reduce(float.__add__, map(lambda x: x[2] / x[1], self.state), 0.0)
self.cap_stable_eve = 0.25 * (1.0 + sqrt(-(2.0 * avgDrain * tau - capCapacity) / capCapacity)) ** 2
except ValueError:
self.cap_stable_eve = 0.0
if cap > 0.0:
# capacitor low/high water marks
self.cap_stable_low = cap_lowest
self.cap_stable_high = cap_lowest_pre
else:
self.cap_stable_low =\
self.cap_stable_high = 0.0
self.cap_stable_low = \
self.cap_stable_high = 0.0
self.runtime = time.time()-start
self.runtime = time.time() - start

View File

@@ -1,11 +1,15 @@
from os.path import realpath, join, dirname, abspath
import sys
from os.path import realpath, join, dirname, abspath
debug = False
gamedataCache = True
saveddataCache = True
gamedata_connectionstring = 'sqlite:///' + unicode(realpath(join(dirname(abspath(__file__)), "..", "staticdata", "eve.db")), sys.getfilesystemencoding())
saveddata_connectionstring = 'sqlite:///:memory:'
gamedata_version = ""
gamedata_connectionstring = 'sqlite:///' + unicode(realpath(join(dirname(abspath(__file__)), "..", "eve.db")),
sys.getfilesystemencoding())
saveddata_connectionstring = 'sqlite:///' + unicode(
realpath(join(dirname(abspath(__file__)), "..", "saveddata", "saveddata.db")), sys.getfilesystemencoding())
#Autodetect path, only change if the autodetection bugs out.
# Autodetect path, only change if the autodetection bugs out.
path = dirname(unicode(__file__, sys.getfilesystemencoding()))

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
import threading
@@ -24,17 +24,20 @@ from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import pool
from eos import config
import migration
from eos import config
class ReadOnlyException(Exception):
pass
gamedata_connectionstring = config.gamedata_connectionstring
if callable(gamedata_connectionstring):
gamedata_engine = create_engine("sqlite://", creator=gamedata_connectionstring, echo = config.debug)
gamedata_engine = create_engine("sqlite://", creator=gamedata_connectionstring, echo=config.debug)
else:
gamedata_engine = create_engine(gamedata_connectionstring, echo = config.debug)
gamedata_engine = create_engine(gamedata_connectionstring, echo=config.debug)
gamedata_meta = MetaData()
gamedata_meta.bind = gamedata_engine
@@ -44,8 +47,8 @@ gamedata_session = sessionmaker(bind=gamedata_engine, autoflush=False, expire_on
# game db because we haven't reached gamedata_meta.create_all()
try:
config.gamedata_version = gamedata_session.execute(
"SELECT `field_value` FROM `metadata` WHERE `field_name` LIKE 'client_build'"
).fetchone()[0]
"SELECT `field_value` FROM `metadata` WHERE `field_name` LIKE 'client_build'"
).fetchone()[0]
except:
config.gamedata_version = None
@@ -63,25 +66,19 @@ if saveddata_connectionstring is not None:
# Lock controlling any changes introduced to session
sd_lock = threading.Lock()
#Import all the definitions for all our database stuff
# Import all the definitions for all our database stuff
from eos.db.gamedata import *
from eos.db.saveddata import *
#Import queries
from eos.db.gamedata.queries import getItem, searchItems, getVariations, getItemsByCategory, directAttributeRequest, \
getMarketGroup, getGroup, getCategory, getAttributeInfo, getMetaData, getMetaGroup
from eos.db.saveddata.queries import getUser, getCharacter, getFit, getFitsWithShip, countFitsWithShip, searchFits, \
getCharacterList, getPrice, getDamagePatternList, getDamagePattern, \
getFitList, getFleetList, getFleet, save, remove, commit, add, \
getCharactersForUser, getMiscData, getSquadsIDsWithFitID, getWing, \
getSquad, getBoosterFits, getProjectedFits, getTargetResistsList, getTargetResists,\
clearPrices, countAllFits
# Import queries
from eos.db.gamedata.queries import *
from eos.db.saveddata.queries import *
#If using in memory saveddata, you'll want to reflect it so the data structure is good.
# If using in memory saveddata, you'll want to reflect it so the data structure is good.
if config.saveddata_connectionstring == "sqlite:///:memory:":
saveddata_meta.create_all()
def rollback():
with sd_lock:
saveddata_session.rollback()

View File

@@ -1,2 +1,2 @@
__all__ = ["attribute", "category", "effect", "group", "metaData",
"icon", "item", "marketGroup", "metaGroup", "unit"]
"icon", "item", "marketGroup", "metaGroup", "unit", "alphaClones"]

View File

@@ -0,0 +1,46 @@
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
#
# eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
# ===============================================================================
from sqlalchemy import Column, String, Integer, Table, ForeignKey
from sqlalchemy.orm import relation, mapper, synonym
from eos.db import gamedata_meta
from eos.types import AlphaClone, AlphaCloneSkill
alphaclones_table = Table("alphaClones", gamedata_meta,
Column("alphaCloneID", Integer, primary_key=True),
Column("alphaCloneName", String),
)
alphacloneskskills_table = Table("alphaCloneSkills", gamedata_meta,
Column("alphaCloneID", Integer, ForeignKey("alphaClones.alphaCloneID"), primary_key=True),
Column("typeID", Integer, primary_key=True),
Column("level", Integer),
)
mapper(AlphaClone, alphaclones_table,
properties={
"ID": synonym("alphaCloneID"),
"skills": relation(
AlphaCloneSkill,
cascade="all,delete-orphan",
backref="clone")
})
mapper(AlphaCloneSkill, alphacloneskskills_table)

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,20 +15,22 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Table, Column, Integer, Float, Unicode, ForeignKey, String, Boolean
from sqlalchemy.orm import relation, mapper, synonym, deferred
from sqlalchemy.ext.associationproxy import association_proxy
from eos.types import Attribute, Icon, AttributeInfo, Unit
from sqlalchemy.orm import relation, mapper, synonym, deferred
from eos.db import gamedata_meta
from eos.types import Attribute, Icon, AttributeInfo, Unit
typeattributes_table = Table("dgmtypeattribs", gamedata_meta,
Column("value", Float),
Column("typeID", Integer, ForeignKey("invtypes.typeID"), primary_key=True, index=True),
Column("attributeID", ForeignKey("dgmattribs.attributeID"), primary_key=True))
Column("value", Float),
Column("typeID", Integer, ForeignKey("invtypes.typeID"), primary_key=True, index=True),
Column("attributeID", ForeignKey("dgmattribs.attributeID"), primary_key=True))
attributes_table = Table("dgmattribs", gamedata_meta,
Column("attributeID", Integer, primary_key = True),
Column("attributeID", Integer, primary_key=True),
Column("attributeName", String),
Column("defaultValue", Float),
Column("maxAttributeID", Integer, ForeignKey("dgmattribs.attributeID")),
@@ -40,14 +42,14 @@ attributes_table = Table("dgmattribs", gamedata_meta,
Column("unitID", Integer, ForeignKey("dgmunits.unitID")))
mapper(Attribute, typeattributes_table,
properties = {"info": relation(AttributeInfo, lazy=False)})
properties={"info": relation(AttributeInfo, lazy=False)})
mapper(AttributeInfo, attributes_table,
properties = {"icon" : relation(Icon),
"unit": relation(Unit),
"ID": synonym("attributeID"),
"name": synonym("attributeName"),
"description" : deferred(attributes_table.c.description)})
properties={"icon": relation(Icon),
"unit": relation(Unit),
"ID": synonym("attributeID"),
"name": synonym("attributeName"),
"description": deferred(attributes_table.c.description)})
Attribute.ID = association_proxy("info", "attributeID")
Attribute.name = association_proxy("info", "attributeName")

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Column, String, Integer, ForeignKey, Boolean, Table
from sqlalchemy.orm import relation, mapper, synonym, deferred
@@ -24,14 +24,14 @@ from eos.db import gamedata_meta
from eos.types import Category, Icon
categories_table = Table("invcategories", gamedata_meta,
Column("categoryID", Integer, primary_key = True),
Column("categoryID", Integer, primary_key=True),
Column("categoryName", String),
Column("description", String),
Column("published", Boolean),
Column("iconID", Integer, ForeignKey("icons.iconID")))
mapper(Category, categories_table,
properties = {"icon" : relation(Icon),
"ID" : synonym("categoryID"),
"name" : synonym("categoryName"),
"description" : deferred(categories_table.c.description)})
properties={"icon": relation(Icon),
"ID": synonym("categoryID"),
"name": synonym("categoryName"),
"description": deferred(categories_table.c.description)})

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,35 +15,35 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Column, String, Integer, Boolean, Table, ForeignKey
from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.orm import mapper, synonym, relation, deferred
from eos.types import Effect, EffectInfo
from eos.db import gamedata_meta
from eos.types import Effect, EffectInfo
typeeffects_table = Table("dgmtypeeffects", gamedata_meta,
Column("typeID", Integer, ForeignKey("invtypes.typeID"), primary_key=True, index=True),
Column("effectID", Integer, ForeignKey("dgmeffects.effectID"), primary_key=True))
effects_table = Table("dgmeffects", gamedata_meta,
Column("effectID", Integer, primary_key = True),
Column("effectID", Integer, primary_key=True),
Column("effectName", String),
Column("description", String),
Column("published", Boolean),
Column("isAssistance", Boolean),
Column("isOffensive", Boolean))
mapper(EffectInfo, effects_table,
properties = {"ID" : synonym("effectID"),
"name" : synonym("effectName"),
"description" : deferred(effects_table.c.description)})
properties={"ID": synonym("effectID"),
"name": synonym("effectName"),
"description": deferred(effects_table.c.description)})
mapper(Effect, typeeffects_table,
properties = {"ID": synonym("effectID"),
"info": relation(EffectInfo, lazy=False)})
properties={"ID": synonym("effectID"),
"info": relation(EffectInfo, lazy=False)})
Effect.name = association_proxy("info", "name")
Effect.description = association_proxy("info", "description")

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Column, String, Integer, Boolean, ForeignKey, Table
from sqlalchemy.orm import relation, mapper, synonym, deferred
@@ -24,7 +24,7 @@ from eos.db import gamedata_meta
from eos.types import Group, Icon, Category
groups_table = Table("invgroups", gamedata_meta,
Column("groupID", Integer, primary_key = True),
Column("groupID", Integer, primary_key=True),
Column("groupName", String),
Column("description", String),
Column("published", Boolean),
@@ -32,8 +32,8 @@ groups_table = Table("invgroups", gamedata_meta,
Column("iconID", Integer, ForeignKey("icons.iconID")))
mapper(Group, groups_table,
properties = {"category" : relation(Category, backref = "groups"),
"icon" : relation(Icon),
"ID" : synonym("groupID"),
"name" : synonym("groupName"),
"description" : deferred(groups_table.c.description)})
properties={"category": relation(Category, backref="groups"),
"icon": relation(Icon),
"ID": synonym("groupID"),
"name": synonym("groupName"),
"description": deferred(groups_table.c.description)})

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Column, String, Integer, Table
from sqlalchemy.orm import mapper, synonym, deferred
@@ -24,10 +24,10 @@ from eos.db import gamedata_meta
from eos.types import Icon
icons_table = Table("icons", gamedata_meta,
Column("iconID", Integer, primary_key = True),
Column("iconID", Integer, primary_key=True),
Column("description", String),
Column("iconFile", String))
mapper(Icon, icons_table,
properties = {"ID" : synonym("iconID"),
"description" : deferred(icons_table.c.description)})
properties={"ID": synonym("iconID"),
"description": deferred(icons_table.c.description)})

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,18 +15,18 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Column, String, Integer, Boolean, ForeignKey, Table, Float
from sqlalchemy.orm import relation, mapper, synonym, deferred
from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.orm import relation, mapper, synonym, deferred
from sqlalchemy.orm.collections import attribute_mapped_collection
from eos.db import gamedata_meta
from eos.types import Icon, Attribute, Item, Effect, MetaType, Group, Traits
items_table = Table("invtypes", gamedata_meta,
Column("typeID", Integer, primary_key = True),
Column("typeID", Integer, primary_key=True),
Column("typeName", String, index=True),
Column("description", String),
Column("raceID", Integer),
@@ -39,23 +39,23 @@ items_table = Table("invtypes", gamedata_meta,
Column("iconID", Integer, ForeignKey("icons.iconID")),
Column("groupID", Integer, ForeignKey("invgroups.groupID"), index=True))
from .metaGroup import metatypes_table
from .traits import traits_table
from .metaGroup import metatypes_table # noqa
from .traits import traits_table # noqa
mapper(Item, items_table,
properties = {"group" : relation(Group, backref = "items"),
"icon" : relation(Icon),
"_Item__attributes" : relation(Attribute, collection_class = attribute_mapped_collection('name')),
"effects" : relation(Effect, collection_class = attribute_mapped_collection('name')),
"metaGroup" : relation(MetaType,
primaryjoin = metatypes_table.c.typeID == items_table.c.typeID,
uselist = False),
"ID" : synonym("typeID"),
"name" : synonym("typeName"),
"description" : deferred(items_table.c.description),
"traits" : relation(Traits,
primaryjoin = traits_table.c.typeID == items_table.c.typeID,
uselist = False)
})
properties={"group": relation(Group, backref="items"),
"icon": relation(Icon),
"_Item__attributes": relation(Attribute, collection_class=attribute_mapped_collection('name')),
"effects": relation(Effect, collection_class=attribute_mapped_collection('name')),
"metaGroup": relation(MetaType,
primaryjoin=metatypes_table.c.typeID == items_table.c.typeID,
uselist=False),
"ID": synonym("typeID"),
"name": synonym("typeName"),
"description": deferred(items_table.c.description),
"traits": relation(Traits,
primaryjoin=traits_table.c.typeID == items_table.c.typeID,
uselist=False)
})
Item.category = association_proxy("group", "category")

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Column, String, Integer, Boolean, ForeignKey, Table
from sqlalchemy.orm import relation, mapper, synonym, deferred
@@ -24,17 +24,19 @@ from eos.db import gamedata_meta
from eos.types import Item, MarketGroup, Icon
marketgroups_table = Table("invmarketgroups", gamedata_meta,
Column("marketGroupID", Integer, primary_key = True),
Column("marketGroupID", Integer, primary_key=True),
Column("marketGroupName", String),
Column("description", String),
Column("hasTypes", Boolean),
Column("parentGroupID", Integer, ForeignKey("invmarketgroups.marketGroupID", initially="DEFERRED", deferrable=True)),
Column("parentGroupID", Integer,
ForeignKey("invmarketgroups.marketGroupID", initially="DEFERRED", deferrable=True)),
Column("iconID", Integer, ForeignKey("icons.iconID")))
mapper(MarketGroup, marketgroups_table,
properties = {"items" : relation(Item, backref = "marketGroup"),
"parent" : relation(MarketGroup, backref = "children", remote_side = [marketgroups_table.c.marketGroupID]),
"icon" : relation(Icon),
"ID" : synonym("marketGroupID"),
"name" : synonym("marketGroupName"),
"description" : deferred(marketgroups_table.c.description)})
properties={"items": relation(Item, backref="marketGroup"),
"parent": relation(MarketGroup, backref="children",
remote_side=[marketgroups_table.c.marketGroupID]),
"icon": relation(Icon),
"ID": synonym("marketGroupID"),
"name": synonym("marketGroupName"),
"description": deferred(marketgroups_table.c.description)})

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,15 +15,16 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Column, Table, String
from sqlalchemy.orm import mapper
from eos.types import MetaData
from eos.db import gamedata_meta
from eos.types import MetaData
metadata_table = Table("metadata", gamedata_meta,
Column("field_name", String, primary_key=True),
Column("field_value", String))
Column("field_name", String, primary_key=True),
Column("field_value", String))
mapper(MetaData, metadata_table)

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,33 +15,33 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Table, Column, Integer, ForeignKey, String
from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.orm import relation, mapper, synonym
from eos.db import gamedata_meta
from eos.db.gamedata.item import items_table
from eos.types import MetaGroup, Item, MetaType
from sqlalchemy.ext.associationproxy import association_proxy
metagroups_table = Table("invmetagroups", gamedata_meta,
Column("metaGroupID", Integer, primary_key = True),
Column("metaGroupID", Integer, primary_key=True),
Column("metaGroupName", String))
metatypes_table = Table("invmetatypes", gamedata_meta,
Column("typeID", Integer, ForeignKey("invtypes.typeID"), primary_key = True),
Column("typeID", Integer, ForeignKey("invtypes.typeID"), primary_key=True),
Column("parentTypeID", Integer, ForeignKey("invtypes.typeID")),
Column("metaGroupID", Integer, ForeignKey("invmetagroups.metaGroupID")))
mapper(MetaGroup, metagroups_table,
properties = {"ID" : synonym("metaGroupID"),
"name" : synonym("metaGroupName")})
properties={"ID": synonym("metaGroupID"),
"name": synonym("metaGroupName")})
mapper(MetaType, metatypes_table,
properties = {"ID" : synonym("metaGroupID"),
"parent" : relation(Item, primaryjoin = metatypes_table.c.parentTypeID == items_table.c.typeID),
"items" : relation(Item, primaryjoin = metatypes_table.c.typeID == items_table.c.typeID),
"info": relation(MetaGroup, lazy=False)})
properties={"ID": synonym("metaGroupID"),
"parent": relation(Item, primaryjoin=metatypes_table.c.parentTypeID == items_table.c.typeID),
"items": relation(Item, primaryjoin=metatypes_table.c.typeID == items_table.c.typeID),
"info": relation(MetaGroup, lazy=False)})
MetaType.name = association_proxy("info", "name")

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,21 +15,26 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy.orm import join, exc
from sqlalchemy.sql import and_, or_, select
import eos.config
# TODO: Unsure which item the code below needs :(
# from eos.gamedata import Item
from eos.gamedata import Attribute
from eos.db import gamedata_session
from eos.db.gamedata.metaGroup import metatypes_table, items_table
from sqlalchemy.sql import and_, or_, select, func
from sqlalchemy.orm import join, exc
from eos.types import Item, Category, Group, MarketGroup, AttributeInfo, MetaData, MetaGroup
from eos.db.util import processEager, processWhere
import eos.config
from eos.types import Item, Category, Group, MarketGroup, AttributeInfo, MetaData, MetaGroup, AlphaClone
configVal = getattr(eos.config, "gamedataCache", None)
if configVal is True:
def cachedQuery(amount, *keywords):
def deco(function):
cache = {}
def checkAndReturn(*args, **kwargs):
useCache = kwargs.pop("useCache", True)
cacheKey = []
@@ -45,6 +50,7 @@ if configVal is True:
return handler
return checkAndReturn
return deco
elif callable(configVal):
@@ -56,8 +62,10 @@ else:
return function(*args, **kwargs)
return checkAndReturn
return deco
def sqlizeString(line):
# Escape backslashes first, as they will be as escape symbol in queries
# Then escape percent and underscore signs
@@ -65,7 +73,10 @@ def sqlizeString(line):
line = line.replace("\\", "\\\\").replace("%", "\\%").replace("_", "\\_").replace("*", "%")
return line
itemNameMap = {}
@cachedQuery(1, "lookfor")
def getItem(lookfor, eager=None):
if isinstance(lookfor, int):
@@ -88,7 +99,28 @@ def getItem(lookfor, eager=None):
raise TypeError("Need integer or string as argument")
return item
@cachedQuery(1, "lookfor")
def getAlphaClone(lookfor, eager=None):
if isinstance(lookfor, int):
if eager is None:
item = gamedata_session.query(AlphaClone).get(lookfor)
else:
item = gamedata_session.query(AlphaClone).options(*processEager(eager)).filter(AlphaClone.ID == lookfor).first()
else:
raise TypeError("Need integer as argument")
return item
def getAlphaCloneList(eager=None):
eager = processEager(eager)
clones = gamedata_session.query(AlphaClone).options(*eager).all()
return clones
groupNameMap = {}
@cachedQuery(1, "lookfor")
def getGroup(lookfor, eager=None):
if isinstance(lookfor, int):
@@ -111,63 +143,78 @@ def getGroup(lookfor, eager=None):
raise TypeError("Need integer or string as argument")
return group
categoryNameMap = {}
@cachedQuery(1, "lookfor")
def getCategory(lookfor, eager=None):
if isinstance(lookfor, int):
if eager is None:
category = gamedata_session.query(Category).get(lookfor)
else:
category = gamedata_session.query(Category).options(*processEager(eager)).filter(Category.ID == lookfor).first()
category = gamedata_session.query(Category).options(*processEager(eager)).filter(
Category.ID == lookfor).first()
elif isinstance(lookfor, basestring):
if lookfor in categoryNameMap:
id = categoryNameMap[lookfor]
if eager is None:
category = gamedata_session.query(Category).get(id)
else:
category = gamedata_session.query(Category).options(*processEager(eager)).filter(Category.ID == id).first()
category = gamedata_session.query(Category).options(*processEager(eager)).filter(
Category.ID == id).first()
else:
# Category names are unique, so we can use first() instead of one()
category = gamedata_session.query(Category).options(*processEager(eager)).filter(Category.name == lookfor).first()
category = gamedata_session.query(Category).options(*processEager(eager)).filter(
Category.name == lookfor).first()
categoryNameMap[lookfor] = category.ID
else:
raise TypeError("Need integer or string as argument")
return category
metaGroupNameMap = {}
@cachedQuery(1, "lookfor")
def getMetaGroup(lookfor, eager=None):
if isinstance(lookfor, int):
if eager is None:
metaGroup = gamedata_session.query(MetaGroup).get(lookfor)
else:
metaGroup = gamedata_session.query(MetaGroup).options(*processEager(eager)).filter(MetaGroup.ID == lookfor).first()
metaGroup = gamedata_session.query(MetaGroup).options(*processEager(eager)).filter(
MetaGroup.ID == lookfor).first()
elif isinstance(lookfor, basestring):
if lookfor in metaGroupNameMap:
id = metaGroupNameMap[lookfor]
if eager is None:
metaGroup = gamedata_session.query(MetaGroup).get(id)
else:
metaGroup = gamedata_session.query(MetaGroup).options(*processEager(eager)).filter(MetaGroup.ID == id).first()
metaGroup = gamedata_session.query(MetaGroup).options(*processEager(eager)).filter(
MetaGroup.ID == id).first()
else:
# MetaGroup names are unique, so we can use first() instead of one()
metaGroup = gamedata_session.query(MetaGroup).options(*processEager(eager)).filter(MetaGroup.name == lookfor).first()
metaGroup = gamedata_session.query(MetaGroup).options(*processEager(eager)).filter(
MetaGroup.name == lookfor).first()
metaGroupNameMap[lookfor] = metaGroup.ID
else:
raise TypeError("Need integer or string as argument")
return metaGroup
@cachedQuery(1, "lookfor")
def getMarketGroup(lookfor, eager=None):
if isinstance(lookfor, int):
if eager is None:
marketGroup = gamedata_session.query(MarketGroup).get(lookfor)
else:
marketGroup = gamedata_session.query(MarketGroup).options(*processEager(eager)).filter(MarketGroup.ID == lookfor).first()
marketGroup = gamedata_session.query(MarketGroup).options(*processEager(eager)).filter(
MarketGroup.ID == lookfor).first()
else:
raise TypeError("Need integer as argument")
return marketGroup
@cachedQuery(2, "where", "filter")
def getItemsByCategory(filter, where=None, eager=None):
if isinstance(filter, int):
@@ -178,7 +225,9 @@ def getItemsByCategory(filter, where=None, eager=None):
raise TypeError("Need integer or string as argument")
filter = processWhere(filter, where)
return gamedata_session.query(Item).options(*processEager(eager)).join(Item.group, Group.category).filter(filter).all()
return gamedata_session.query(Item).options(*processEager(eager)).join(Item.group, Group.category).filter(
filter).all()
@cachedQuery(3, "where", "nameLike", "join")
def searchItems(nameLike, where=None, join=None, eager=None):
@@ -194,10 +243,14 @@ def searchItems(nameLike, where=None, join=None, eager=None):
items = gamedata_session.query(Item).options(*processEager(eager)).join(*join)
for token in nameLike.split(' '):
token_safe = u"%{0}%".format(sqlizeString(token))
items = items.filter(processWhere(Item.name.like(token_safe, escape="\\"), where))
if where is not None:
items = items.filter(and_(Item.name.like(token_safe, escape="\\"), where))
else:
items = items.filter(Item.name.like(token_safe, escape="\\"))
items = items.limit(100).all()
return items
@cachedQuery(2, "where", "itemids")
def getVariations(itemids, where=None, eager=None):
for itemid in itemids:
@@ -210,9 +263,11 @@ def getVariations(itemids, where=None, eager=None):
itemfilter = or_(*(metatypes_table.c.parentTypeID == itemid for itemid in itemids))
filter = processWhere(itemfilter, where)
joinon = items_table.c.typeID == metatypes_table.c.typeID
vars = gamedata_session.query(Item).options(*processEager(eager)).join((metatypes_table, joinon)).filter(filter).all()
vars = gamedata_session.query(Item).options(*processEager(eager)).join((metatypes_table, joinon)).filter(
filter).all()
return vars
@cachedQuery(1, "attr")
def getAttributeInfo(attr, eager=None):
if isinstance(attr, basestring):
@@ -227,6 +282,7 @@ def getAttributeInfo(attr, eager=None):
result = None
return result
@cachedQuery(1, "field")
def getMetaData(field):
if isinstance(field, basestring):
@@ -235,6 +291,7 @@ def getMetaData(field):
raise TypeError("Need string as argument")
return data
@cachedQuery(2, "itemIDs", "attributeID")
def directAttributeRequest(itemIDs, attrIDs):
for itemID in itemIDs:
@@ -244,9 +301,9 @@ def directAttributeRequest(itemIDs, attrIDs):
if not isinstance(itemID, int):
raise TypeError("All itemIDs must be integer")
q = select((eos.types.Item.typeID, eos.types.Attribute.attributeID, eos.types.Attribute.value),
and_(eos.types.Attribute.attributeID.in_(attrIDs), eos.types.Item.typeID.in_(itemIDs)),
from_obj=[join(eos.types.Attribute, eos.types.Item)])
q = select((Item.typeID, Attribute.attributeID, Attribute.value),
and_(Attribute.attributeID.in_(attrIDs), Item.typeID.in_(itemIDs)),
from_obj=[join(Attribute, Item)])
result = gamedata_session.execute(q).fetchall()
return result

View File

@@ -1,11 +1,11 @@
from sqlalchemy import Column, Table, Integer, String, ForeignKey
from sqlalchemy.orm import mapper
from eos.types import Traits
from eos.db import gamedata_meta
from eos.types import Traits
traits_table = Table("invtraits", gamedata_meta,
Column("typeID", Integer, ForeignKey("invtypes.typeID"), primary_key=True),
Column("traitText", String))
mapper(Traits, traits_table);
mapper(Traits, traits_table)

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Column, Table, Integer, String
from sqlalchemy.orm import mapper, synonym
@@ -24,10 +24,10 @@ from eos.db import gamedata_meta
from eos.types import Unit
groups_table = Table("dgmunits", gamedata_meta,
Column("unitID", Integer, primary_key = True),
Column("unitID", Integer, primary_key=True),
Column("unitName", String),
Column("displayName", String))
mapper(Unit, groups_table,
properties = {"ID" : synonym("unitID"),
"name" : synonym("unitName")})
properties={"ID": synonym("unitID"),
"name": synonym("unitName")})

View File

@@ -1,32 +1,44 @@
import config
import logging
import shutil
import time
import config
import migrations
logger = logging.getLogger(__name__)
def getVersion(db):
cursor = db.execute('PRAGMA user_version')
return cursor.fetchone()[0]
def update(saveddata_engine):
currversion = getVersion(saveddata_engine)
if currversion == config.dbversion:
def getAppVersion():
return migrations.appVersion
def update(saveddata_engine):
dbVersion = getVersion(saveddata_engine)
appVersion = getAppVersion()
if dbVersion == appVersion:
return
if currversion < config.dbversion:
if dbVersion < appVersion:
# Automatically backup database
toFile = "%s/saveddata_migration_%d-%d_%s.db"%(
toFile = "%s/saveddata_migration_%d-%d_%s.db" % (
config.savePath,
currversion,
config.dbversion,
dbVersion,
appVersion,
time.strftime("%Y%m%d_%H%M%S"))
shutil.copyfile(config.saveDB, toFile)
for version in xrange(currversion, config.dbversion):
module = __import__('eos.db.migrations.upgrade%d'%(version+1), fromlist=True)
upgrade = getattr(module, "upgrade", False)
if upgrade:
upgrade(saveddata_engine)
for version in xrange(dbVersion, appVersion):
func = migrations.updates[version + 1]
if func:
logger.info("Applying database update: %d", version + 1)
func(saveddata_engine)
# when all is said and done, set version to current
saveddata_engine.execute('PRAGMA user_version = %d'%config.dbversion)
saveddata_engine.execute("PRAGMA user_version = {}".format(appVersion))

View File

@@ -7,3 +7,24 @@ define an upgrade() function with the logic. Please note that there must be as
many upgrade files as there are database versions (version 5 would include
upgrade files 1-5)
"""
import pkgutil
import re
updates = {}
appVersion = 0
prefix = __name__ + "."
for importer, modname, ispkg in pkgutil.iter_modules(__path__, prefix):
# loop through python files, extracting update number and function, and
# adding it to a list
modname_tail = modname.rsplit('.', 1)[-1]
module = __import__(modname, fromlist=True)
m = re.match("^upgrade(?P<index>\d+)$", modname_tail)
if not m:
continue
index = int(m.group("index"))
appVersion = max(appVersion, index)
upgrade = getattr(module, "upgrade", False)
if upgrade:
updates[index] = upgrade

View File

@@ -45,7 +45,7 @@ CONVERSIONS = {
8746, # Quantum Co-Processor
8745, # Photonic CPU Enhancer
15425, # Naiyon's Modified Co-Processor (never existed but convert
# anyway as some fits may include it)
# anyway as some fits may include it)
],
8748: [ # Upgraded Co-Processor
8747, # Nanomechanical CPU Enhancer I
@@ -70,7 +70,7 @@ CONVERSIONS = {
16543, # Micro 'Vigor' Core Augmentation
],
8089: [ # Compact Light Missile Launcher
8093, # Prototype 'Arbalest' Light Missile Launcher
8093, # Prototype 'Arbalest' Light Missile Launcher
],
8091: [ # Ample Light Missile Launcher
7993, # Experimental TE-2100 Light Missile Launcher
@@ -82,6 +82,7 @@ CONVERSIONS = {
]
}
def upgrade(saveddata_engine):
# Update fits schema to include target resists attribute
try:
@@ -92,6 +93,7 @@ def upgrade(saveddata_engine):
# Convert modules
for replacement_item, list in CONVERSIONS.iteritems():
for retired_item in list:
saveddata_engine.execute('UPDATE "modules" SET "itemID" = ? WHERE "itemID" = ?', (replacement_item, retired_item))
saveddata_engine.execute('UPDATE "cargo" SET "itemID" = ? WHERE "itemID" = ?', (replacement_item, retired_item))
saveddata_engine.execute('UPDATE "modules" SET "itemID" = ? WHERE "itemID" = ?',
(replacement_item, retired_item))
saveddata_engine.execute('UPDATE "cargo" SET "itemID" = ? WHERE "itemID" = ?',
(replacement_item, retired_item))

View File

@@ -0,0 +1,17 @@
"""
Migration 10
- Adds active attribute to projected fits
"""
import sqlalchemy
def upgrade(saveddata_engine):
# Update projectedFits schema to include active attribute
try:
saveddata_engine.execute("SELECT active FROM projectedFits LIMIT 1")
except sqlalchemy.exc.DatabaseError:
saveddata_engine.execute("ALTER TABLE projectedFits ADD COLUMN active BOOLEAN")
saveddata_engine.execute("UPDATE projectedFits SET active = 1")
saveddata_engine.execute("UPDATE projectedFits SET amount = 1")

View File

@@ -0,0 +1,116 @@
"""
Migration 11
- Converts modules based on December Release 2015 Tiericide
Some modules have been unpublished (and unpublished module attributes are removed
from database), which causes pyfa to crash. We therefore replace these
modules with their new replacements
"""
CONVERSIONS = {
16467: ( # Medium Gremlin Compact Energy Neutralizer
16471, # Medium Unstable Power Fluctuator I
),
22947: ( # 'Beatnik' Small Remote Armor Repairer
23414, # 'Brotherhood' Small Remote Armor Repairer
),
8295: ( # Type-D Restrained Shield Flux Coil
8293, # Beta Reactor Control: Shield Flux I
),
16499: ( # Heavy Knave Scoped Energy Nosferatu
16501, # E500 Prototype Energy Vampire
),
16477: ( # Heavy Infectious Scoped Energy Neutralizer
16473, # Heavy Rudimentary Energy Destabilizer I
),
16475: ( # Heavy Gremlin Compact Energy Neutralizer
16479, # Heavy Unstable Power Fluctuator I
),
16447: ( # Medium Solace Scoped Remote Armor Repairer
16445, # Medium 'Arup' Remote Armor Repairer
),
508: ( # 'Basic' Shield Flux Coil
8325, # Alpha Reactor Shield Flux
8329, # Marked Generator Refitting: Shield Flux
8323, # Partial Power Plant Manager: Shield Flux
8327, # Type-E Power Core Modification: Shield Flux
),
1419: ( # 'Basic' Shield Power Relay
8341, # Alpha Reactor Shield Power Relay
8345, # Marked Generator Refitting: Shield Power Relay
8339, # Partial Power Plant Manager: Shield Power Relay
8343, # Type-E Power Core Modification: Shield Power Relay
),
16439: ( # Small Solace Scoped Remote Armor Repairer
16437, # Small 'Arup' Remote Armor Repairer
),
16505: ( # Medium Ghoul Compact Energy Nosferatu
16511, # Medium Diminishing Power System Drain I
),
8297: ( # Mark I Compact Shield Flux Coil
8291, # Local Power Plant Manager: Reaction Shield Flux I
),
16455: ( # Large Solace Scoped Remote Armor Repairer
16453, # Large 'Arup' Remote Armor Repairer
),
6485: ( # M51 Benefactor Compact Shield Recharger
6491, # Passive Barrier Compensator I
6489, # 'Benefactor' Ward Reconstructor
6487, # Supplemental Screen Generator I
),
5137: ( # Small Knave Scoped Energy Nosferatu
5135, # E5 Prototype Energy Vampire
),
8579: ( # Medium Murky Compact Remote Shield Booster
8581, # Medium 'Atonement' Remote Shield Booster
),
8531: ( # Small Murky Compact Remote Shield Booster
8533, # Small 'Atonement' Remote Shield Booster
),
16497: ( # Heavy Ghoul Compact Energy Nosferatu
16503, # Heavy Diminishing Power System Drain I
),
4477: ( # Small Gremlin Compact Energy Neutralizer
4475, # Small Unstable Power Fluctuator I
),
8337: ( # Mark I Compact Shield Power Relay
8331, # Local Power Plant Manager: Reaction Shield Power Relay I
),
23416: ( # 'Peace' Large Remote Armor Repairer
22951, # 'Pacifier' Large Remote Armor Repairer
),
5141: ( # Small Ghoul Compact Energy Nosferatu
5139, # Small Diminishing Power System Drain I
),
4471: ( # Small Infectious Scoped Energy Neutralizer
4473, # Small Rudimentary Energy Destabilizer I
),
16469: ( # Medium Infectious Scoped Energy Neutralizer
16465, # Medium Rudimentary Energy Destabilizer I
),
8335: ( # Type-D Restrained Shield Power Relay
8333, # Beta Reactor Control: Shield Power Relay I
),
405: ( # 'Micro' Remote Shield Booster
8631, # Micro Asymmetric Remote Shield Booster
8627, # Micro Murky Remote Shield Booster
8629, # Micro 'Atonement' Remote Shield Booster
8633, # Micro S95a Remote Shield Booster
),
8635: ( # Large Murky Compact Remote Shield Booster
8637, # Large 'Atonement' Remote Shield Booster
),
16507: ( # Medium Knave Scoped Energy Nosferatu
16509, # E50 Prototype Energy Vampire
),
}
def upgrade(saveddata_engine):
# Convert modules
for replacement_item, list in CONVERSIONS.iteritems():
for retired_item in list:
saveddata_engine.execute('UPDATE "modules" SET "itemID" = ? WHERE "itemID" = ?',
(replacement_item, retired_item))
saveddata_engine.execute('UPDATE "cargo" SET "itemID" = ? WHERE "itemID" = ?',
(replacement_item, retired_item))

View File

@@ -0,0 +1,340 @@
"""
Migration 12
- Converts modules based on March 2016 Module Tiericide
Some modules have been unpublished (and unpublished module attributes are removed
from database), which causes pyfa to crash. We therefore replace these
modules with their new replacements
"""
CONVERSIONS = {
16457: ( # Crosslink Compact Ballistic Control System
16459, # Muon Coil Bolt Array I
16461, # Multiphasic Bolt Array I
16463, # 'Pandemonium' Ballistic Enhancement
),
5281: ( # Coadjunct Scoped Remote Sensor Booster
7218, # Piercing ECCM Emitter I
),
5365: ( # Cetus Scoped Burst Jammer
5359, # 1Z-3 Subversive ECM Eruption
),
1973: ( # Sensor Booster I
1947, # ECCM - Radar I
2002, # ECCM - Ladar I
2003, # ECCM - Magnetometric I
2004, # ECCM - Gravimetric I
2005, # ECCM - Omni I
),
1951: ( # 'Basic' Tracking Enhancer
6322, # Beta-Nought Tracking Mode
6323, # Azimuth Descalloping Tracking Enhancer
6324, # F-AQ Delay-Line Scan Tracking Subroutines
6321, # Beam Parallax Tracking Program
),
521: ( # 'Basic' Damage Control
5829, # GLFF Containment Field
5831, # Interior Force Field Array
5835, # F84 Local Damage System
5833, # Systematic Damage Control
),
22925: ( # 'Bootleg' Remote Sensor Booster
22939, # 'Boss' Remote Sensor Booster
22941, # 'Entrepreneur' Remote Sensor Booster
),
5443: ( # Faint Epsilon Scoped Warp Scrambler
5441, # Fleeting Progressive Warp Scrambler I
),
1963: ( # Remote Sensor Booster I
1959, # ECCM Projector I
),
6325: ( # Fourier Compact Tracking Enhancer
6326, # Sigma-Nought Tracking Mode I
6327, # Auto-Gain Control Tracking Enhancer I
6328, # F-aQ Phase Code Tracking Subroutines
),
21486: ( # 'Kindred' Gyrostabilizer
21488, # Monophonic Stabilization Actuator I
),
19927: ( # Hypnos Scoped Magnetometric ECM
9518, # Initiated Ion Field ECM I
),
10188: ( # 'Basic' Magnetic Field Stabilizer
11111, # Insulated Stabilizer Array
11109, # Linear Flux Stabilizer
11115, # Gauss Field Balancer
11113, # Magnetic Vortex Stabilizer
),
22919: ( # 'Monopoly' Magnetic Field Stabilizer
22917, # 'Capitalist' Magnetic Field Stabilizer I
),
5839: ( # IFFA Compact Damage Control
5841, # Emergency Damage Control I
5843, # F85 Peripheral Damage System I
5837, # Pseudoelectron Containment Field I
),
522: ( # 'Micro' Cap Battery
4747, # Micro Ld-Acid Capacitor Battery I
4751, # Micro Ohm Capacitor Reserve I
4745, # Micro F-4a Ld-Sulfate Capacitor Charge Unit
4749, # Micro Peroxide Capacitor Power Cell
3480, # Micro Capacitor Battery II
),
518: ( # 'Basic' Gyrostabilizer
5915, # Lateral Gyrostabilizer
5919, # F-M2 Weapon Inertial Suspensor
5913, # Hydraulic Stabilization Actuator
5917, # Stabilized Weapon Mounts
),
19931: ( # Compulsive Scoped Multispectral ECM
19933, # 'Hypnos' Multispectral ECM I
),
5403: ( # Faint Scoped Warp Disruptor
5401, # Fleeting Warp Disruptor I
),
23902: ( # 'Trebuchet' Heat Sink I
23900, # 'Mangonel' Heat Sink I
),
1893: ( # 'Basic' Heat Sink
5845, # Heat Exhaust System
5856, # C3S Convection Thermal Radiator
5855, # 'Boreas' Coolant System
5854, # Stamped Heat Sink
),
6160: ( # F-90 Compact Sensor Booster
20214, # Extra Radar ECCM Scanning Array I
20220, # Extra Ladar ECCM Scanning Array I
20226, # Extra Gravimetric ECCM Scanning Array I
20232, # Extra Magnetometric ECCM Scanning Array I
7948, # Gravimetric Positional ECCM Sensor System I
7964, # Radar Positional ECCM Sensor System I
7965, # Omni Positional ECCM Sensor System I
7966, # Ladar Positional ECCM Sensor System I
7970, # Magnetometric Positional ECCM Sensor System I
20218, # Conjunctive Radar ECCM Scanning Array I
20224, # Conjunctive Ladar ECCM Scanning Array I
20230, # Conjunctive Gravimetric ECCM Scanning Array I
20236, # Conjunctive Magnetometric ECCM Scanning Array I
6157, # Supplemental Scanning CPU I
),
23418: ( # 'Radical' Damage Control
22893, # 'Gonzo' Damage Control I
),
19952: ( # Umbra Scoped Radar ECM
9520, # 'Penumbra' White Noise ECM
),
1952: ( # Sensor Booster II
2258, # ECCM - Omni II
2259, # ECCM - Gravimetric II
2260, # ECCM - Ladar II
2261, # ECCM - Magnetometric II
2262, # ECCM - Radar II
),
5282: ( # Linked Enduring Sensor Booster
7219, # Scattering ECCM Projector I
),
1986: ( # Signal Amplifier I
2579, # Gravimetric Backup Array I
2583, # Ladar Backup Array I
2587, # Magnetometric Backup Array I
2591, # Multi Sensor Backup Array I
4013, # RADAR Backup Array I
),
4871: ( # Large Compact Pb-Acid Cap Battery
4875, # Large Ohm Capacitor Reserve I
4869, # Large F-4a Ld-Sulfate Capacitor Charge Unit
4873, # Large Peroxide Capacitor Power Cell
),
1964: ( # Remote Sensor Booster II
1960, # ECCM Projector II
),
5933: ( # Counterbalanced Compact Gyrostabilizer
5931, # Cross-Lateral Gyrostabilizer I
5935, # F-M3 Munition Inertial Suspensor
5929, # Pneumatic Stabilization Actuator I
),
4025: ( # X5 Enduring Stasis Webifier
4029, # 'Langour' Drive Disruptor I
),
4027: ( # Fleeting Compact Stasis Webifier
4031, # Patterned Stasis Web I
),
22937: ( # 'Enterprise' Remote Tracking Computer
22935, # 'Tycoon' Remote Tracking Computer
),
22929: ( # 'Marketeer' Tracking Computer
22927, # 'Economist' Tracking Computer I
),
1987: ( # Signal Amplifier II
2580, # Gravimetric Backup Array II
2584, # Ladar Backup Array II
2588, # Magnetometric Backup Array II
2592, # Multi Sensor Backup Array II
4014, # RADAR Backup Array II
),
19939: ( # Enfeebling Scoped Ladar ECM
9522, # Faint Phase Inversion ECM I
),
5340: ( # P-S Compact Remote Tracking Computer
5341, # 'Prayer' Remote Tracking Computer
),
19814: ( # Phased Scoped Target Painter
19808, # Partial Weapon Navigation
),
1949: ( # 'Basic' Signal Amplifier
1946, # Basic RADAR Backup Array
1982, # Basic Ladar Backup Array
1983, # Basic Gravimetric Backup Array
1984, # Basic Magnetometric Backup Array
1985, # Basic Multi Sensor Backup Array
6193, # Emergency Magnetometric Scanners
6194, # Emergency Multi-Frequency Scanners
6202, # Emergency RADAR Scanners
6216, # Emergency Ladar Scanners
6217, # Emergency Gravimetric Scanners
6225, # Sealed RADAR Backup Cluster
6238, # Sealed Magnetometric Backup Cluster
6239, # Sealed Multi-Frequency Backup Cluster
6241, # Sealed Ladar Backup Cluster
6242, # Sealed Gravimetric Backup Cluster
6257, # Surplus RADAR Reserve Array
6258, # F-42 Reiterative RADAR Backup Sensors
6283, # Surplus Magnetometric Reserve Array
6284, # F-42 Reiterative Magnetometric Backup Sensors
6285, # Surplus Multi-Frequency Reserve Array
6286, # F-42 Reiterative Multi-Frequency Backup Sensors
6289, # Surplus Ladar Reserve Array
6290, # F-42 Reiterative Ladar Backup Sensors
6291, # Surplus Gravimetric Reserve Array
6292, # F-42 Reiterative Gravimetric Backup Sensors
6309, # Amplitude Signal Enhancer
6310, # 'Acolyth' Signal Booster
6311, # Type-E Discriminative Signal Augmentation
6312, # F-90 Positional Signal Amplifier
),
21527: ( # 'Firewall' Signal Amplifier
21521, # Gravimetric Firewall
21523, # Ladar Firewall
21525, # Magnetometric Firewall
21527, # Multi Sensor Firewall
21529, # RADAR Firewall
),
23416: ( # 'Peace' Large Remote Armor Repairer
None, # 'Pacifier' Large Remote Armor Repairer
),
6176: ( # F-12 Enduring Tracking Computer
6174, # Monopulse Tracking Mechanism I
),
6159: ( # Alumel-Wired Enduring Sensor Booster
7917, # Alumel Radar ECCM Sensor Array I
7918, # Alumel Ladar ECCM Sensor Array I
7922, # Alumel Gravimetric ECCM Sensor Array I
7926, # Alumel Omni ECCM Sensor Array I
7937, # Alumel Magnetometric ECCM Sensor Array I
7867, # Supplemental Ladar ECCM Scanning Array I
7869, # Supplemental Gravimetric ECCM Scanning Array I
7870, # Supplemental Omni ECCM Scanning Array I
7887, # Supplemental Radar ECCM Scanning Array I
7889, # Supplemental Magnetometric ECCM Scanning Array I
20216, # Incremental Radar ECCM Scanning Array I
20222, # Incremental Ladar ECCM Scanning Array I
20228, # Incremental Gravimetric ECCM Scanning Array I
20234, # Incremental Magnetometric ECCM Scanning Array I
7892, # Prototype ECCM Radar Sensor Cluster
7893, # Prototype ECCM Ladar Sensor Cluster
7895, # Prototype ECCM Gravimetric Sensor Cluster
7896, # Prototype ECCM Omni Sensor Cluster
7914, # Prototype ECCM Magnetometric Sensor Cluster
6158, # Prototype Sensor Booster
),
5849: ( # Extruded Compact Heat Sink
5846, # Thermal Exhaust System I
5858, # C4S Coiled Circuit Thermal Radiator
5857, # 'Skadi' Coolant System I
),
22895: ( # 'Shady' Sensor Booster
22897, # 'Forger' ECCM - Magnetometric I
),
11105: ( # Vortex Compact Magnetic Field Stabilizer
11103, # Insulated Stabilizer Array I
11101, # Linear Flux Stabilizer I
11107, # Gauss Field Balancer I
),
22945: ( # 'Executive' Remote Sensor Dampener
22943, # 'Broker' Remote Sensor Dampener I
),
6173: ( # Optical Compact Tracking Computer
6175, # 'Orion' Tracking CPU I
),
5279: ( # F-23 Compact Remote Sensor Booster
7217, # Spot Pulsing ECCM I
7220, # Phased Muon ECCM Caster I
5280, # Connected Remote Sensor Booster
),
4787: ( # Small Compact Pb-Acid Cap Battery
4791, # Small Ohm Capacitor Reserve I
4785, # Small F-4a Ld-Sulfate Capacitor Charge Unit
4789, # Small Peroxide Capacitor Power Cell
),
19946: ( # BZ-5 Scoped Gravimetric ECM
9519, # FZ-3 Subversive Spatial Destabilizer ECM
),
6073: ( # Medium Compact Pb-Acid Cap Battery
6097, # Medium Ohm Capacitor Reserve I
6111, # Medium F-4a Ld-Sulfate Capacitor Charge Unit
6083, # Medium Peroxide Capacitor Power Cell
),
21484: ( # 'Full Duplex' Ballistic Control System
21482, # Ballistic 'Purge' Targeting System I
),
6296: ( # F-89 Compact Signal Amplifier
6218, # Protected Gravimetric Backup Cluster I
6222, # Protected Ladar Backup Cluster I
6226, # Protected Magnetometric Backup Cluster I
6230, # Protected Multi-Frequency Backup Cluster I
6234, # Protected RADAR Backup Cluster I
6195, # Reserve Gravimetric Scanners
6199, # Reserve Ladar Scanners
6203, # Reserve Magnetometric Scanners
6207, # Reserve Multi-Frequency Scanners
6212, # Reserve RADAR Scanners
20238, # Secure Gravimetric Backup Cluster I
20244, # Secure Ladar Backup Cluster I
20250, # Secure Magnetometric Backup Cluster I
20260, # Secure Radar Backup Cluster I
6244, # F-43 Repetitive Gravimetric Backup Sensors
6252, # F-43 Repetitive Ladar Backup Sensors
6260, # F-43 Repetitive Magnetometric Backup Sensors
6268, # F-43 Repetitive Multi-Frequency Backup Sensors
6276, # F-43 Repetitive RADAR Backup Sensors
20240, # Shielded Gravimetric Backup Cluster I
20246, # Shielded Ladar Backup Cluster I
20252, # Shielded Magnetometric Backup Cluster I
20262, # Shielded Radar Backup Cluster I
6243, # Surrogate Gravimetric Reserve Array I
6251, # Surrogate Ladar Reserve Array I
6259, # Surrogate Magnetometric Reserve Array I
6267, # Surrogate Multi-Frequency Reserve Array I
6275, # Surrogate RADAR Reserve Array I
20242, # Warded Gravimetric Backup Cluster I
20248, # Warded Ladar Backup Cluster I
20254, # Warded Magnetometric Backup Cluster I
20264, # Warded Radar Backup Cluster I
6294, # 'Mendicant' Signal Booster I
6293, # Wavelength Signal Enhancer I
6295, # Type-D Attenuation Signal Augmentation
),
5302: ( # Phased Muon Scoped Sensor Dampener
5300, # Indirect Scanning Dampening Unit I
),
}
def upgrade(saveddata_engine):
# Convert modules
for replacement_item, list in CONVERSIONS.iteritems():
for retired_item in list:
saveddata_engine.execute('UPDATE "modules" SET "itemID" = ? WHERE "itemID" = ?',
(replacement_item, retired_item))
saveddata_engine.execute('UPDATE "cargo" SET "itemID" = ? WHERE "itemID" = ?',
(replacement_item, retired_item))

View File

@@ -0,0 +1,16 @@
"""
Migration 13
- Alters fits table to introduce implant location attribute
"""
import sqlalchemy
def upgrade(saveddata_engine):
# Update fits schema to include implant location attribute
try:
saveddata_engine.execute("SELECT implantLocation FROM fits LIMIT 1")
except sqlalchemy.exc.DatabaseError:
saveddata_engine.execute("ALTER TABLE fits ADD COLUMN implantLocation INTEGER;")
saveddata_engine.execute("UPDATE fits SET implantLocation = 0")

View File

@@ -0,0 +1,21 @@
"""
Migration 14
- This should take care of issue #586.
"""
import sqlalchemy
def upgrade(saveddata_engine):
if saveddata_engine.execute(
"SELECT name FROM sqlite_master WHERE type='table' AND name='fighters'").scalar() == 'fighters':
# Fighters table exists
try:
saveddata_engine.execute("SELECT active FROM fighters LIMIT 1")
except sqlalchemy.exc.DatabaseError:
# if we don't have the active column, we are on an old pre-release version. Drop the tables and move on
# (they will be recreated)
saveddata_engine.execute("DROP TABLE fighters")
saveddata_engine.execute("DROP TABLE fightersAbilities")

View File

@@ -0,0 +1,21 @@
"""
Migration 15
- Delete projected modules on citadels
"""
import sqlalchemy
def upgrade(saveddata_engine):
sql = """
DELETE FROM modules WHERE ID IN
(
SELECT m.ID FROM modules AS m
JOIN fits AS f ON m.fitID = f.ID
WHERE f.shipID IN ("35832", "35833", "35834", "40340")
AND m.projected = 1
)
"""
saveddata_engine.execute(sql)

View File

@@ -0,0 +1,15 @@
"""
Migration 16
- Alters fits table to introduce notes attribute
"""
import sqlalchemy
def upgrade(saveddata_engine):
# Update fits schema to include notes attribute
try:
saveddata_engine.execute("SELECT notes FROM fits LIMIT 1")
except sqlalchemy.exc.DatabaseError:
saveddata_engine.execute("ALTER TABLE fits ADD COLUMN notes VARCHAR;")

View File

@@ -0,0 +1,40 @@
"""
Migration 17
- Moves all fleet boosters to the new schema
"""
import sqlalchemy
def upgrade(saveddata_engine):
from eos.db import saveddata_session
from eos.db.saveddata.fit import commandFits_table
sql = """
SELECT sm.memberID as boostedFit, s.leaderID AS squadBoost, w.leaderID AS wingBoost, g.leaderID AS gangBoost
FROM squadmembers sm
JOIN squads s ON s.ID = sm.squadID
JOIN wings w on w.ID = s.wingID
JOIN gangs g on g.ID = w.gangID
"""
results = saveddata_session.execute(sql)
inserts = []
for row in results:
boosted = row["boostedFit"]
types = ("squad", "wing", "gang")
for x in types:
value = row["{}Boost".format(x)]
if value is None:
continue
inserts.append({"boosterID": value, "boostedID": boosted, "active": 1})
try:
saveddata_session.execute(commandFits_table.insert(),
{"boosterID": value, "boostedID": boosted, "active": 1})
except Exception:
pass
saveddata_session.commit()

View File

@@ -0,0 +1,68 @@
"""
Migration 8
- Converts modules from old Warfare Links to Command Modules
"""
CONVERSIONS = {
42526: ( # Armor Command Burst I
20069, # Armored Warfare Link - Damage Control I
20409, # Armored Warfare Link - Passive Defense I
22227, # Armored Warfare Link - Rapid Repair I
),
43552: ( # Armor Command Burst II
4264, # Armored Warfare Link - Damage Control II
4266, # Armored Warfare Link - Passive Defense II
4266, # Armored Warfare Link - Rapid Repair II
),
42527: ( # Information Command Burst I
11052, # Information Warfare Link - Sensor Integrity I
20405, # Information Warfare Link - Recon Operation I
20406, # Information Warfare Link - Electronic Superiority I
),
43554: ( # Information Command Burst II
4268, # Information Warfare Link - Electronic Superiority II
4270, # Information Warfare Link - Recon Operation II
4272, # Information Warfare Link - Sensor Integrity II
),
42529: ( # Shield Command Burst I
20124, # Siege Warfare Link - Active Shielding I
20514, # Siege Warfare Link - Shield Harmonizing I
22228, # Siege Warfare Link - Shield Efficiency I
),
43555: ( # Shield Command Burst II
4280, # Siege Warfare Link - Active Shielding II
4282, # Siege Warfare Link - Shield Efficiency II
4284 # Siege Warfare Link - Shield Harmonizing II
),
42530: ( # Skirmish Command Burst I
11017, # Skirmish Warfare Link - Interdiction Maneuvers I
20070, # Skirmish Warfare Link - Evasive Maneuvers I
20408, # Skirmish Warfare Link - Rapid Deployment I
),
43556: ( # Skirmish Command Burst II
4286, # Skirmish Warfare Link - Evasive Maneuvers II
4288, # Skirmish Warfare Link - Interdiction Maneuvers II
4290 # Skirmish Warfare Link - Rapid Deployment II
),
42528: ( # Mining Foreman Burst I
22553, # Mining Foreman Link - Harvester Capacitor Efficiency I
22555, # Mining Foreman Link - Mining Laser Field Enhancement I
22557, # Mining Foreman Link - Laser Optimization I
),
43551: ( # Mining Foreman Burst II
4274, # Mining Foreman Link - Harvester Capacitor Efficiency II
4276, # Mining Foreman Link - Laser Optimization II
4278 # Mining Foreman Link - Mining Laser Field Enhancement II
),
}
def upgrade(saveddata_engine):
# Convert modules
for replacement_item, list in CONVERSIONS.iteritems():
for retired_item in list:
saveddata_engine.execute('UPDATE "modules" SET "itemID" = ? WHERE "itemID" = ?',
(replacement_item, retired_item))
saveddata_engine.execute('UPDATE "cargo" SET "itemID" = ? WHERE "itemID" = ?',
(replacement_item, retired_item))

View File

@@ -0,0 +1,20 @@
"""
Migration 19
- Deletes broken references to fits from the commandFits table (see GH issue #844)
"""
import sqlalchemy
def upgrade(saveddata_engine):
from eos.db import saveddata_session
sql = """
DELETE FROM commandFits
WHERE boosterID NOT IN (select ID from fits)
OR boostedID NOT IN (select ID from fits)
"""
saveddata_session.execute(sql)
saveddata_session.commit()

View File

@@ -6,6 +6,7 @@ Migration 2
import sqlalchemy
def upgrade(saveddata_engine):
# Update characters schema to include default chars
try:

View File

@@ -0,0 +1,15 @@
"""
Migration 20
- Adds support for alpha clones to the characters table
"""
import sqlalchemy
def upgrade(saveddata_engine):
# Update characters schema to include alphaCloneID
try:
saveddata_engine.execute("SELECT alphaCloneID FROM characters LIMIT 1")
except sqlalchemy.exc.DatabaseError:
saveddata_engine.execute("ALTER TABLE characters ADD COLUMN alphaCloneID INTEGER;")

View File

@@ -6,6 +6,7 @@ Migration 3
import sqlalchemy
def upgrade(saveddata_engine):
try:
saveddata_engine.execute("SELECT modeID FROM fits LIMIT 1")

View File

@@ -10,7 +10,6 @@ Migration 4
and output of itemDiff.py
"""
CONVERSIONS = {
506: ( # 'Basic' Capacitor Power Relay
8205, # Alpha Reactor Control: Capacitor Power Relay
@@ -131,11 +130,12 @@ CONVERSIONS = {
),
}
def upgrade(saveddata_engine):
def upgrade(saveddata_engine):
# Convert modules
for replacement_item, list in CONVERSIONS.iteritems():
for retired_item in list:
saveddata_engine.execute('UPDATE "modules" SET "itemID" = ? WHERE "itemID" = ?', (replacement_item, retired_item))
saveddata_engine.execute('UPDATE "cargo" SET "itemID" = ? WHERE "itemID" = ?', (replacement_item, retired_item))
saveddata_engine.execute('UPDATE "modules" SET "itemID" = ? WHERE "itemID" = ?',
(replacement_item, retired_item))
saveddata_engine.execute('UPDATE "cargo" SET "itemID" = ? WHERE "itemID" = ?',
(replacement_item, retired_item))

View File

@@ -4,5 +4,6 @@ Migration 5
Simply deletes damage profiles with a blank name. See GH issue #256
"""
def upgrade(saveddata_engine):
saveddata_engine.execute('DELETE FROM damagePatterns WHERE name LIKE ?', ("",))

View File

@@ -4,6 +4,8 @@ Migration 6
Overwrites damage profile 0 to reset bad uniform values (bad values set with bug)
"""
def upgrade(saveddata_engine):
saveddata_engine.execute('DELETE FROM damagePatterns WHERE name LIKE ? OR ID LIKE ?', ("Uniform", "1"))
saveddata_engine.execute('INSERT INTO damagePatterns VALUES (?, ?, ?, ?, ?, ?, ?)', (1, "Uniform", 25, 25, 25, 25, None))
saveddata_engine.execute('INSERT INTO damagePatterns VALUES (?, ?, ?, ?, ?, ?, ?)',
(1, "Uniform", 25, 25, 25, 25, None))

View File

@@ -8,17 +8,16 @@ Migration 7
Pyfa.
"""
CONVERSIONS = {
640: ( # Scorpion
4005, # Scorpion Ishukone Watch
)
}
def upgrade(saveddata_engine):
def upgrade(saveddata_engine):
# Convert ships
for replacement_item, list in CONVERSIONS.iteritems():
for retired_item in list:
saveddata_engine.execute('UPDATE "fits" SET "shipID" = ? WHERE "shipID" = ?', (replacement_item, retired_item))
saveddata_engine.execute('UPDATE "fits" SET "shipID" = ? WHERE "shipID" = ?',
(replacement_item, retired_item))

View File

@@ -1,16 +1,12 @@
"""
Migration 4
Migration 8
- Converts modules based on Proteus Module Tiericide
- Converts modules based on Carnyx Module Tiericide
Some modules have been unpublished (and unpublished module attributes are removed
from database), which causes pyfa to crash. We therefore replace these
modules with their new replacements
Based on http://community.eveonline.com/news/patch-notes/patch-notes-for-proteus/
and output of itemDiff.py
"""
CONVERSIONS = {
8529: ( # Large F-S9 Regolith Compact Shield Extender
8409, # Large Subordinate Screen Stabilizer I
@@ -74,15 +70,16 @@ CONVERSIONS = {
11321, # 800mm Reinforced Nanofiber Plates I
),
11317: ( # 800mm Rolled Tungsten Compact Plates
11315, # 800mm Reinforced Titanium Plates I
11315, # 800mm Reinforced Titanium Plates I
),
}
def upgrade(saveddata_engine):
def upgrade(saveddata_engine):
# Convert modules
for replacement_item, list in CONVERSIONS.iteritems():
for retired_item in list:
saveddata_engine.execute('UPDATE "modules" SET "itemID" = ? WHERE "itemID" = ?', (replacement_item, retired_item))
saveddata_engine.execute('UPDATE "cargo" SET "itemID" = ? WHERE "itemID" = ?', (replacement_item, retired_item))
saveddata_engine.execute('UPDATE "modules" SET "itemID" = ? WHERE "itemID" = ?',
(replacement_item, retired_item))
saveddata_engine.execute('UPDATE "cargo" SET "itemID" = ? WHERE "itemID" = ?',
(replacement_item, retired_item))

View File

@@ -0,0 +1,25 @@
"""
Migration 9
Effectively drops UNIQUE constraint from boosters table. SQLite does not support
this, so we have to copy the table to the updated schema and then rename it
"""
tmpTable = """
CREATE TABLE boostersTemp (
'ID' INTEGER NOT NULL,
'itemID' INTEGER,
'fitID' INTEGER NOT NULL,
'active' BOOLEAN,
PRIMARY KEY(ID),
FOREIGN KEY('fitID') REFERENCES fits ('ID')
)
"""
def upgrade(saveddata_engine):
saveddata_engine.execute(tmpTable)
saveddata_engine.execute(
"INSERT INTO boostersTemp (ID, itemID, fitID, active) SELECT ID, itemID, fitID, active FROM boosters")
saveddata_engine.execute("DROP TABLE boosters")
saveddata_engine.execute("ALTER TABLE boostersTemp RENAME TO boosters")

View File

@@ -1,3 +1,18 @@
__all__ = ["character", "fit", "module", "user", "skill", "price",
"booster", "drone", "implant", "fleet", "damagePattern",
"miscData", "targetResists"]
__all__ = [
"character",
"fit",
"module",
"user",
"skill",
"price",
"booster",
"drone",
"implant",
"damagePattern",
"miscData",
"targetResists",
"override",
"crest",
"implantSet",
"loadDefaultDatabaseValues"
]

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,25 +15,27 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Table, Column, ForeignKey, Integer, UniqueConstraint, Boolean
from sqlalchemy.orm import mapper, relation
from sqlalchemy import Table, Column, ForeignKey, Integer, Boolean
from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.orm import mapper, relation
from eos.db import saveddata_meta
from eos.types import Booster
boosters_table = Table("boosters", saveddata_meta,
Column("ID", Integer, primary_key = True),
Column("ID", Integer, primary_key=True),
Column("itemID", Integer),
Column("fitID", Integer, ForeignKey("fits.ID"), nullable = False),
Column("fitID", Integer, ForeignKey("fits.ID"), nullable=False),
Column("active", Boolean),
UniqueConstraint("itemID", "fitID"))
)
# Legacy booster side effect code, should disable but a mapper relies on it.
activeSideEffects_table = Table("boostersActiveSideEffects", saveddata_meta,
Column("boosterID", ForeignKey("boosters.ID"), primary_key = True),
Column("effectID", Integer, primary_key = True))
Column("boosterID", ForeignKey("boosters.ID"), primary_key=True),
Column("effectID", Integer, primary_key=True))
class ActiveSideEffectsDummy(object):
def __init__(self, effectID):
@@ -42,6 +44,6 @@ class ActiveSideEffectsDummy(object):
mapper(ActiveSideEffectsDummy, activeSideEffects_table)
mapper(Booster, boosters_table,
properties = {"_Booster__activeSideEffectDummies" : relation(ActiveSideEffectsDummy)})
properties={"_Booster__activeSideEffectDummies": relation(ActiveSideEffectsDummy)})
Booster._Booster__activeSideEffectIDs = association_proxy("_Booster__activeSideEffectDummies", "effectID")

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,18 +15,18 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Table, Column, Integer, ForeignKey, Boolean
from sqlalchemy import Table, Column, Integer, ForeignKey
from sqlalchemy.orm import mapper
from eos.db import saveddata_meta
from eos.types import Cargo
cargo_table = Table("cargo", saveddata_meta,
Column("ID", Integer, primary_key=True),
Column("fitID", Integer, ForeignKey("fits.ID"), nullable = False, index = True),
Column("itemID", Integer, nullable = False),
Column("amount", Integer, nullable = False))
Column("ID", Integer, primary_key=True),
Column("fitID", Integer, ForeignKey("fits.ID"), nullable=False, index=True),
Column("itemID", Integer, nullable=False),
Column("amount", Integer, nullable=False))
mapper(Cargo, cargo_table)
mapper(Cargo, cargo_table)

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,30 +15,46 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Table, Column, Integer, ForeignKey, String
from sqlalchemy.orm import relation, mapper
from eos.db import saveddata_meta
from eos.db.saveddata.implant import charImplants_table
from eos.types import Character, User, Skill, Implant
from eos.effectHandlerHelpers import HandledImplantBoosterList
from eos.types import Character, User, Skill, Implant
characters_table = Table("characters", saveddata_meta,
Column("ID", Integer, primary_key = True),
Column("name", String, nullable = False),
Column("ID", Integer, primary_key=True),
Column("name", String, nullable=False),
Column("apiID", Integer),
Column("apiKey", String),
Column("defaultChar", Integer),
Column("chars", String, nullable = True),
Column("chars", String, nullable=True),
Column("defaultLevel", Integer, nullable=True),
Column("ownerID", ForeignKey("users.ID"), nullable = True))
Column("alphaCloneID", Integer, nullable=True),
Column("ownerID", ForeignKey("users.ID"), nullable=True))
mapper(Character, characters_table,
properties = {"_Character__owner" : relation(User, backref = "characters"),
"_Character__skills" : relation(Skill, backref="character", cascade = "all,delete-orphan"),
"_Character__implants" : relation(Implant, collection_class = HandledImplantBoosterList, cascade='all,delete-orphan', single_parent=True,
primaryjoin = charImplants_table.c.charID == characters_table.c.ID,
secondaryjoin = charImplants_table.c.implantID == Implant.ID,
secondary = charImplants_table),})
properties={
"_Character__alphaCloneID": characters_table.c.alphaCloneID,
"savedName": characters_table.c.name,
"_Character__owner": relation(
User,
backref="characters"),
"_Character__skills": relation(
Skill,
backref="character",
cascade="all,delete-orphan"),
"_Character__implants": relation(
Implant,
collection_class=HandledImplantBoosterList,
cascade='all,delete-orphan',
backref='character',
single_parent=True,
primaryjoin=charImplants_table.c.charID == characters_table.c.ID,
secondaryjoin=charImplants_table.c.implantID == Implant.ID,
secondary=charImplants_table),
}
)

31
eos/db/saveddata/crest.py Normal file
View File

@@ -0,0 +1,31 @@
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
#
# eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
# ===============================================================================
from sqlalchemy import Table, Column, Integer, String
from sqlalchemy.orm import mapper
from eos.db import saveddata_meta
from eos.types import CrestChar
crest_table = Table("crest", saveddata_meta,
Column("ID", Integer, primary_key=True),
Column("name", String, nullable=False, unique=True),
Column("refresh_token", String, nullable=False))
mapper(CrestChar, crest_table)

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Table, Column, Integer, ForeignKey, String
from sqlalchemy.orm import mapper
@@ -24,7 +24,7 @@ from eos.db import saveddata_meta
from eos.types import DamagePattern
damagePatterns_table = Table("damagePatterns", saveddata_meta,
Column("ID", Integer, primary_key = True),
Column("ID", Integer, primary_key=True),
Column("name", String),
Column("emAmount", Integer),
Column("thermalAmount", Integer),

View File

@@ -0,0 +1,162 @@
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of pyfa.
#
# pyfa is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pyfa is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
# ===============================================================================
import sqlalchemy
import logging
logger = logging.getLogger(__name__)
class DatabaseCleanup:
def __init__(self):
pass
@staticmethod
def ExecuteSQLQuery(saveddata_engine, query):
try:
results = saveddata_engine.execute(query)
return results
except sqlalchemy.exc.DatabaseError:
logger.error("Failed to connect to database or error executing query:\n%s",query)
return None
@staticmethod
def OrphanedCharacterSkills(saveddata_engine):
# Find orphaned character skills.
# This solves an issue where the character doesn't exist, but skills for that character do.
# See issue #917
logger.debug("Running database cleanup for character skills.")
query = "SELECT COUNT(*) AS num FROM characterSkills WHERE characterID NOT IN (SELECT ID from characters)"
results = DatabaseCleanup.ExecuteSQLQuery(saveddata_engine, query)
if results is None:
return
row = results.first()
if row and row['num']:
query = "DELETE FROM characterSkills WHERE characterID NOT IN (SELECT ID from characters)"
delete = DatabaseCleanup.ExecuteSQLQuery(saveddata_engine, query)
logger.error("Database corruption found. Cleaning up %d records.", delete.rowcount)
@staticmethod
def OrphanedFitDamagePatterns(saveddata_engine):
# Find orphaned damage patterns.
# This solves an issue where the damage pattern doesn't exist, but fits reference the pattern.
# See issue #777
logger.debug("Running database cleanup for orphaned damage patterns attached to fits.")
query = "SELECT COUNT(*) AS num FROM fits WHERE damagePatternID NOT IN (SELECT ID FROM damagePatterns) OR damagePatternID IS NULL"
results = DatabaseCleanup.ExecuteSQLQuery(saveddata_engine, query)
if results is None:
return
row = results.first()
if row and row['num']:
# Get Uniform damage pattern ID
uniform_query = "SELECT ID FROM damagePatterns WHERE name = 'Uniform'"
uniform_results = DatabaseCleanup.ExecuteSQLQuery(saveddata_engine, uniform_query)
if uniform_results is None:
return
rows = uniform_results.fetchall()
if len(rows) == 0:
logger.error("Missing uniform damage pattern.")
elif len(rows) > 1:
logger.error("More than one uniform damage pattern found.")
else:
uniform_damage_pattern_id = rows[0]['ID']
update_query = "UPDATE 'fits' SET 'damagePatternID' = " + str(uniform_damage_pattern_id) + \
" WHERE damagePatternID NOT IN (SELECT ID FROM damagePatterns) OR damagePatternID IS NULL"
update_results = DatabaseCleanup.ExecuteSQLQuery(saveddata_engine, update_query)
logger.error("Database corruption found. Cleaning up %d records.", update_results.rowcount)
@staticmethod
def OrphanedFitCharacterIDs(saveddata_engine):
# Find orphaned character IDs. This solves an issue where the character doesn't exist, but fits reference the pattern.
logger.debug("Running database cleanup for orphaned characters attached to fits.")
query = "SELECT COUNT(*) AS num FROM fits WHERE characterID NOT IN (SELECT ID FROM characters) OR characterID IS NULL"
results = DatabaseCleanup.ExecuteSQLQuery(saveddata_engine, query)
if results is None:
return
row = results.first()
if row and row['num']:
# Get All 5 character ID
all5_query = "SELECT ID FROM characters WHERE name = 'All 5'"
all5_results = DatabaseCleanup.ExecuteSQLQuery(saveddata_engine, all5_query)
if all5_results is None:
return
rows = all5_results.fetchall()
if len(rows) == 0:
logger.error("Missing 'All 5' character.")
elif len(rows) > 1:
logger.error("More than one 'All 5' character found.")
else:
all5_id = rows[0]['ID']
update_query = "UPDATE 'fits' SET 'characterID' = " + str(all5_id) + \
" WHERE characterID not in (select ID from characters) OR characterID IS NULL"
update_results = DatabaseCleanup.ExecuteSQLQuery(saveddata_engine, update_query)
logger.error("Database corruption found. Cleaning up %d records.", update_results.rowcount)
@staticmethod
def NullDamagePatternNames(saveddata_engine):
# Find damage patterns that are missing the name.
# This solves an issue where the damage pattern ends up with a name that is null.
# See issue #949
logger.debug("Running database cleanup for missing damage pattern names.")
query = "SELECT COUNT(*) AS num FROM damagePatterns WHERE name IS NULL OR name = ''"
results = DatabaseCleanup.ExecuteSQLQuery(saveddata_engine, query)
if results is None:
return
row = results.first()
if row and row['num']:
query = "DELETE FROM damagePatterns WHERE name IS NULL OR name = ''"
delete = DatabaseCleanup.ExecuteSQLQuery(saveddata_engine, query)
logger.error("Database corruption found. Cleaning up %d records.", delete.rowcount)
@staticmethod
def NullTargetResistNames(saveddata_engine):
# Find target resists that are missing the name.
# This solves an issue where the target resist ends up with a name that is null.
# See issue #949
logger.debug("Running database cleanup for missing target resist names.")
query = "SELECT COUNT(*) AS num FROM targetResists WHERE name IS NULL OR name = ''"
results = DatabaseCleanup.ExecuteSQLQuery(saveddata_engine, query)
if results is None:
return
row = results.first()
if row and row['num']:
query = "DELETE FROM targetResists WHERE name IS NULL OR name = ''"
delete = DatabaseCleanup.ExecuteSQLQuery(saveddata_engine, query)
logger.error("Database corruption found. Cleaning up %d records.", delete.rowcount)

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,19 +15,20 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Table, Column, Integer, ForeignKey, Boolean
from sqlalchemy.orm import mapper
from eos.db import saveddata_meta
from eos.types import Drone
drones_table = Table("drones", saveddata_meta,
Column("groupID", Integer, primary_key=True),
Column("fitID", Integer, ForeignKey("fits.ID"), nullable = False, index = True),
Column("itemID", Integer, nullable = False),
Column("amount", Integer, nullable = False),
Column("amountActive", Integer, nullable = False),
Column("projected", Boolean, default = False))
Column("fitID", Integer, ForeignKey("fits.ID"), nullable=False, index=True),
Column("itemID", Integer, nullable=False),
Column("amount", Integer, nullable=False),
Column("amountActive", Integer, nullable=False),
Column("projected", Boolean, default=False))
mapper(Drone, drones_table)

View File

@@ -0,0 +1,50 @@
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
#
# eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
# ===============================================================================
from sqlalchemy import Table, Column, Integer, ForeignKey, Boolean
from sqlalchemy.orm import mapper, relation
from eos.db import saveddata_meta
from eos.types import Fighter, Fit
from eos.types import FighterAbility
fighters_table = Table("fighters", saveddata_meta,
Column("groupID", Integer, primary_key=True),
Column("fitID", Integer, ForeignKey("fits.ID"), nullable=False, index=True),
Column("itemID", Integer, nullable=False),
Column("active", Boolean, nullable=True),
Column("amount", Integer, nullable=False),
Column("projected", Boolean, default=False))
fighter_abilities_table = Table("fightersAbilities", saveddata_meta,
Column("groupID", Integer, ForeignKey("fighters.groupID"), primary_key=True,
index=True),
Column("effectID", Integer, nullable=False, primary_key=True),
Column("active", Boolean, default=False))
mapper(Fighter, fighters_table,
properties={
"owner": relation(Fit),
"_Fighter__abilities": relation(
FighterAbility,
backref="fighter",
cascade='all, delete, delete-orphan'),
})
mapper(FighterAbility, fighter_abilities_table)

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,63 +15,216 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Table, Column, Integer, ForeignKey, String, Boolean
from sqlalchemy.orm import relation, mapper
from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.orm.collections import attribute_mapped_collection
from sqlalchemy.sql import and_
from sqlalchemy.orm import relation, reconstructor, mapper, relationship
from sqlalchemy import ForeignKey, Column, Integer, String, Table, Boolean
from eos.db import saveddata_meta
from eos.db.saveddata.module import modules_table
from eos.db.saveddata.drone import drones_table
from eos.db import saveddata_session
from eos.db.saveddata.cargo import cargo_table
from eos.db.saveddata.drone import drones_table
from eos.db.saveddata.fighter import fighters_table
from eos.db.saveddata.implant import fitImplants_table
from eos.types import Fit, Module, User, Booster, Drone, Cargo, Implant, Character, DamagePattern, TargetResists
from eos.effectHandlerHelpers import HandledModuleList, HandledDroneList, \
HandledImplantBoosterList, HandledProjectedModList, HandledProjectedDroneList, \
HandledProjectedFitList, HandledCargoList
from eos.db.saveddata.module import modules_table
from eos.effectHandlerHelpers import HandledModuleList, HandledImplantBoosterList, HandledProjectedModList, \
HandledDroneCargoList, HandledProjectedDroneList
from eos.types import Fit as es_Fit, Module, User, Booster, Drone, Fighter, Cargo, Implant, Character, DamagePattern, \
TargetResists, ImplantLocation
fits_table = Table("fits", saveddata_meta,
Column("ID", Integer, primary_key = True),
Column("ownerID", ForeignKey("users.ID"), nullable = True, index = True),
Column("shipID", Integer, nullable = False, index = True),
Column("name", String, nullable = False),
Column("timestamp", Integer, nullable = False),
Column("characterID", ForeignKey("characters.ID"), nullable = True),
Column("damagePatternID", ForeignKey("damagePatterns.ID"), nullable=True),
Column("booster", Boolean, nullable = False, index = True, default = 0),
Column("targetResistsID", ForeignKey("targetResists.ID"), nullable=True),
Column("modeID", Integer, nullable=True),
)
Column("ID", Integer, primary_key=True),
Column("ownerID", ForeignKey("users.ID"), nullable=True, index=True),
Column("shipID", Integer, nullable=False, index=True),
Column("name", String, nullable=False),
Column("timestamp", Integer, nullable=False),
Column("characterID", ForeignKey("characters.ID"), nullable=True),
Column("damagePatternID", ForeignKey("damagePatterns.ID"), nullable=True),
Column("booster", Boolean, nullable=False, index=True, default=0),
Column("targetResistsID", ForeignKey("targetResists.ID"), nullable=True),
Column("modeID", Integer, nullable=True),
Column("implantLocation", Integer, nullable=False, default=ImplantLocation.FIT),
Column("notes", String, nullable=True),
)
projectedFits_table = Table("projectedFits", saveddata_meta,
Column("sourceID", ForeignKey("fits.ID"), primary_key = True),
Column("victimID", ForeignKey("fits.ID"), primary_key = True),
Column("amount", Integer))
mapper(Fit, fits_table,
properties = {"_Fit__modules" : relation(Module, collection_class = HandledModuleList,
primaryjoin = and_(modules_table.c.fitID == fits_table.c.ID, modules_table.c.projected == False),
order_by = modules_table.c.position, cascade='all, delete, delete-orphan'),
"_Fit__projectedModules" : relation(Module, collection_class = HandledProjectedModList, cascade='all, delete, delete-orphan', single_parent=True,
primaryjoin = and_(modules_table.c.fitID == fits_table.c.ID, modules_table.c.projected == True)),
"owner" : relation(User, backref = "fits"),
"_Fit__boosters" : relation(Booster, collection_class = HandledImplantBoosterList, cascade='all, delete, delete-orphan', single_parent=True),
"_Fit__drones" : relation(Drone, collection_class = HandledDroneList, cascade='all, delete, delete-orphan', single_parent=True,
primaryjoin = and_(drones_table.c.fitID == fits_table.c.ID, drones_table.c.projected == False)),
"_Fit__cargo" : relation(Cargo, collection_class = HandledCargoList, cascade='all, delete, delete-orphan', single_parent=True,
primaryjoin = and_(cargo_table.c.fitID == fits_table.c.ID)),
"_Fit__projectedDrones" : relation(Drone, collection_class = HandledProjectedDroneList, cascade='all, delete, delete-orphan', single_parent=True,
primaryjoin = and_(drones_table.c.fitID == fits_table.c.ID, drones_table.c.projected == True)),
"_Fit__implants" : relation(Implant, collection_class = HandledImplantBoosterList, cascade='all, delete, delete-orphan', single_parent=True,
primaryjoin = fitImplants_table.c.fitID == fits_table.c.ID,
secondaryjoin = fitImplants_table.c.implantID == Implant.ID,
secondary = fitImplants_table),
"_Fit__character" : relation(Character, backref = "fits"),
"_Fit__damagePattern" : relation(DamagePattern),
"_Fit__targetResists" : relation(TargetResists),
"_Fit__projectedFits" : relation(Fit,
primaryjoin = projectedFits_table.c.victimID == fits_table.c.ID,
secondaryjoin = fits_table.c.ID == projectedFits_table.c.sourceID,
secondary = projectedFits_table,
collection_class = HandledProjectedFitList)
})
Column("sourceID", ForeignKey("fits.ID"), primary_key=True),
Column("victimID", ForeignKey("fits.ID"), primary_key=True),
Column("amount", Integer, nullable=False, default=1),
Column("active", Boolean, nullable=False, default=1),
)
commandFits_table = Table("commandFits", saveddata_meta,
Column("boosterID", ForeignKey("fits.ID"), primary_key=True),
Column("boostedID", ForeignKey("fits.ID"), primary_key=True),
Column("active", Boolean, nullable=False, default=1)
)
class ProjectedFit(object):
def __init__(self, sourceID, source_fit, amount=1, active=True):
self.sourceID = sourceID
self.source_fit = source_fit
self.active = active
self.__amount = amount
@reconstructor
def init(self):
if self.source_fit.isInvalid:
# Very rare for this to happen, but be prepared for it
saveddata_session.delete(self.source_fit)
saveddata_session.flush()
saveddata_session.refresh(self.victim_fit)
# We have a series of setters and getters here just in case someone
# downgrades and screws up the table with NULL values
@property
def amount(self):
return self.__amount or 1
@amount.setter
def amount(self, amount):
self.__amount = amount
def __repr__(self):
return "ProjectedFit(sourceID={}, victimID={}, amount={}, active={}) at {}".format(
self.sourceID, self.victimID, self.amount, self.active, hex(id(self))
)
class CommandFit(object):
def __init__(self, boosterID, booster_fit, active=True):
self.boosterID = boosterID
self.booster_fit = booster_fit
self.active = active
@reconstructor
def init(self):
if self.booster_fit.isInvalid:
# Very rare for this to happen, but be prepared for it
saveddata_session.delete(self.booster_fit)
saveddata_session.flush()
saveddata_session.refresh(self.boosted_fit)
def __repr__(self):
return "CommandFit(boosterID={}, boostedID={}, active={}) at {}".format(
self.boosterID, self.boostedID, self.active, hex(id(self))
)
es_Fit._Fit__projectedFits = association_proxy(
"victimOf", # look at the victimOf association...
"source_fit", # .. and return the source fits
creator=lambda sourceID, source_fit: ProjectedFit(sourceID, source_fit)
)
es_Fit._Fit__commandFits = association_proxy(
"boostedOf", # look at the boostedOf association...
"booster_fit", # .. and return the booster fit
creator=lambda boosterID, booster_fit: CommandFit(boosterID, booster_fit)
)
mapper(es_Fit, fits_table,
properties={
"_Fit__modules": relation(
Module,
collection_class=HandledModuleList,
primaryjoin=and_(modules_table.c.fitID == fits_table.c.ID, modules_table.c.projected == False), # noqa
order_by=modules_table.c.position,
cascade='all, delete, delete-orphan'),
"_Fit__projectedModules": relation(
Module,
collection_class=HandledProjectedModList,
cascade='all, delete, delete-orphan',
single_parent=True,
primaryjoin=and_(modules_table.c.fitID == fits_table.c.ID, modules_table.c.projected == True)), # noqa
"owner": relation(
User,
backref="fits"),
"itemID": fits_table.c.shipID,
"shipID": fits_table.c.shipID,
"_Fit__boosters": relation(
Booster,
collection_class=HandledImplantBoosterList,
cascade='all, delete, delete-orphan',
single_parent=True),
"_Fit__drones": relation(
Drone,
collection_class=HandledDroneCargoList,
cascade='all, delete, delete-orphan',
single_parent=True,
primaryjoin=and_(drones_table.c.fitID == fits_table.c.ID, drones_table.c.projected == False)), # noqa
"_Fit__fighters": relation(
Fighter,
collection_class=HandledDroneCargoList,
cascade='all, delete, delete-orphan',
single_parent=True,
primaryjoin=and_(fighters_table.c.fitID == fits_table.c.ID, fighters_table.c.projected == False)), # noqa
"_Fit__cargo": relation(
Cargo,
collection_class=HandledDroneCargoList,
cascade='all, delete, delete-orphan',
single_parent=True,
primaryjoin=and_(cargo_table.c.fitID == fits_table.c.ID)),
"_Fit__projectedDrones": relation(
Drone,
collection_class=HandledProjectedDroneList,
cascade='all, delete, delete-orphan',
single_parent=True,
primaryjoin=and_(drones_table.c.fitID == fits_table.c.ID, drones_table.c.projected == True)), # noqa
"_Fit__projectedFighters": relation(
Fighter,
collection_class=HandledProjectedDroneList,
cascade='all, delete, delete-orphan',
single_parent=True,
primaryjoin=and_(fighters_table.c.fitID == fits_table.c.ID, fighters_table.c.projected == True)), # noqa
"_Fit__implants": relation(
Implant,
collection_class=HandledImplantBoosterList,
cascade='all, delete, delete-orphan',
backref='fit',
single_parent=True,
primaryjoin=fitImplants_table.c.fitID == fits_table.c.ID,
secondaryjoin=fitImplants_table.c.implantID == Implant.ID,
secondary=fitImplants_table),
"_Fit__character": relation(
Character,
backref="fits"),
"_Fit__damagePattern": relation(DamagePattern),
"_Fit__targetResists": relation(TargetResists),
"projectedOnto": relationship(
ProjectedFit,
primaryjoin=projectedFits_table.c.sourceID == fits_table.c.ID,
backref='source_fit',
collection_class=attribute_mapped_collection('victimID'),
cascade='all, delete, delete-orphan'),
"victimOf": relationship(
ProjectedFit,
primaryjoin=fits_table.c.ID == projectedFits_table.c.victimID,
backref='victim_fit',
collection_class=attribute_mapped_collection('sourceID'),
cascade='all, delete, delete-orphan'),
"boostedOnto": relationship(
CommandFit,
primaryjoin=commandFits_table.c.boosterID == fits_table.c.ID,
backref='booster_fit',
collection_class=attribute_mapped_collection('boostedID'),
cascade='all, delete, delete-orphan'),
"boostedOf": relationship(
CommandFit,
primaryjoin=fits_table.c.ID == commandFits_table.c.boostedID,
backref='boosted_fit',
collection_class=attribute_mapped_collection('boosterID'),
cascade='all, delete, delete-orphan'),
}
)
mapper(ProjectedFit, projectedFits_table,
properties={
"_ProjectedFit__amount": projectedFits_table.c.amount,
}
)
mapper(CommandFit, commandFits_table)

View File

@@ -1,66 +0,0 @@
#===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
#
# eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
from sqlalchemy import Table, Column, Integer, ForeignKey, String
from sqlalchemy.orm import mapper, relation
from eos.db import saveddata_meta
from eos.types import Fleet, Wing, Squad, Fit
from eos.db.saveddata.fit import fits_table
gangs_table = Table("gangs", saveddata_meta,
Column("ID", Integer, primary_key = True),
Column("leaderID", ForeignKey("fits.ID")),
Column("boosterID", ForeignKey("fits.ID")),
Column("name", String))
wings_table = Table("wings", saveddata_meta,
Column("ID", Integer, primary_key = True),
Column("gangID", ForeignKey("gangs.ID")),
Column("boosterID", ForeignKey("fits.ID")),
Column("leaderID", ForeignKey("fits.ID")))
squads_table = Table("squads", saveddata_meta,
Column("ID", Integer, primary_key = True),
Column("wingID", ForeignKey("wings.ID")),
Column("leaderID", ForeignKey("fits.ID")),
Column("boosterID", ForeignKey("fits.ID")))
squadmembers_table = Table("squadmembers", saveddata_meta,
Column("squadID", ForeignKey("squads.ID"), primary_key = True),
Column("memberID", ForeignKey("fits.ID"), primary_key = True))
mapper(Fleet, gangs_table,
properties = {"wings" : relation(Wing, backref="gang"),
"leader" : relation(Fit, primaryjoin = gangs_table.c.leaderID == fits_table.c.ID),
"booster": relation(Fit, primaryjoin = gangs_table.c.boosterID == fits_table.c.ID)})
mapper(Wing, wings_table,
properties = {"squads" : relation(Squad, backref="wing"),
"leader" : relation(Fit, primaryjoin = wings_table.c.leaderID == fits_table.c.ID),
"booster": relation(Fit, primaryjoin = wings_table.c.boosterID == fits_table.c.ID)})
mapper(Squad, squads_table,
properties = {"leader" : relation(Fit, primaryjoin = squads_table.c.leaderID == fits_table.c.ID),
"booster" : relation(Fit, primaryjoin = squads_table.c.boosterID == fits_table.c.ID),
"members" : relation(Fit,
primaryjoin = squads_table.c.ID == squadmembers_table.c.squadID,
secondaryjoin = squadmembers_table.c.memberID == fits_table.c.ID,
secondary = squadmembers_table)})

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Table, Column, Integer, ForeignKey, Boolean
from sqlalchemy.orm import mapper
@@ -24,16 +24,20 @@ from eos.db import saveddata_meta
from eos.types import Implant
implants_table = Table("implants", saveddata_meta,
Column("ID", Integer, primary_key = True),
Column("itemID", Integer),
Column("active", Boolean))
Column("ID", Integer, primary_key=True),
Column("itemID", Integer),
Column("active", Boolean))
fitImplants_table = Table("fitImplants", saveddata_meta,
Column("fitID", ForeignKey("fits.ID"), index = True),
Column("implantID", ForeignKey("implants.ID"), primary_key = True))
Column("fitID", ForeignKey("fits.ID"), index=True),
Column("implantID", ForeignKey("implants.ID"), primary_key=True))
charImplants_table = Table("charImplants", saveddata_meta,
Column("charID", ForeignKey("characters.ID"), index = True),
Column("implantID", ForeignKey("implants.ID"), primary_key = True))
Column("charID", ForeignKey("characters.ID"), index=True),
Column("implantID", ForeignKey("implants.ID"), primary_key=True))
implantsSetMap_table = Table("implantSetMap", saveddata_meta,
Column("setID", ForeignKey("implantSets.ID"), index=True),
Column("implantID", ForeignKey("implants.ID"), primary_key=True))
mapper(Implant, implants_table)

View File

@@ -0,0 +1,45 @@
# ===============================================================================
# Copyright (C) 2016 Ryan Holmes
#
# This file is part of eos.
#
# eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
# ===============================================================================
from sqlalchemy import Table, Column, Integer, String
from sqlalchemy.orm import relation, mapper
from eos.db import saveddata_meta
from eos.db.saveddata.implant import implantsSetMap_table
from eos.effectHandlerHelpers import HandledImplantBoosterList
from eos.types import Implant, ImplantSet
implant_set_table = Table("implantSets", saveddata_meta,
Column("ID", Integer, primary_key=True),
Column("name", String, nullable=False),
)
mapper(ImplantSet, implant_set_table,
properties={
"_ImplantSet__implants": relation(
Implant,
collection_class=HandledImplantBoosterList,
cascade='all, delete, delete-orphan',
backref='set',
single_parent=True,
primaryjoin=implantsSetMap_table.c.setID == implant_set_table.c.ID,
secondaryjoin=implantsSetMap_table.c.implantID == Implant.ID,
secondary=implantsSetMap_table),
}
)

View File

@@ -0,0 +1,198 @@
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of pyfa.
#
# pyfa is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pyfa is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
# ===============================================================================
import eos.db
from eos.saveddata.damagePattern import DamagePattern as es_DamagePattern
from eos.saveddata.targetResists import TargetResists as es_TargetResists
class ImportError(Exception):
pass
class DefaultDatabaseValues():
def __init__(self):
pass
instance = None
@classmethod
def importDamageProfileDefaults(cls):
damageProfileList = [["Uniform", "25", "25", "25", "25"], ["[Generic]EM", "100", "0", "0", "0"],
["[Generic]Thermal", "0", "100", "0", "0"], ["[Generic]Kinetic", "0", "0", "100", "0"],
["[Generic]Explosive", "0", "0", "0", "100"],
["[NPC][Asteroid] Blood Raiders", "5067", "4214", "0", "0"],
["[Bombs]Concussion Bomb", "0", "0", "6400", "0"],
["[Bombs]Electron Bomb", "6400", "0", "0", "0"],
["[Bombs]Scorch Bomb", "0", "6400", "0", "0"],
["[Bombs]Shrapnel Bomb", "0", "0", "0", "6400"],
["[Frequency Crystals][T2] Gleam", "56", "56", "0", "0"],
["[Frequency Crystals][T2] Aurora", "40", "24", "0", "0"],
["[Frequency Crystals][T2] Scorch", "72", "16", "0", "0"],
["[Frequency Crystals][T2] Conflagration", "61.6", "61.6", "0", "0"],
["[Frequency Crystals]Gamma", "61.6", "35.2", "0", "0"],
["[Frequency Crystals]Infrared", "44", "17.6", "0", "0"],
["[Frequency Crystals]Microwave", "35.2", "17.6", "0", "0"],
["[Frequency Crystals]Multifrequency", "61.6", "44", "0", "0"],
["[Frequency Crystals]Radio", "44", "0", "0", "0"],
["[Frequency Crystals]Standard", "44", "26.4", "0", "0"],
["[Frequency Crystals]Ultraviolet", "52.8", "26.4", "0", "0"],
["[Frequency Crystals]Xray", "52.8", "35.2", "0", "0"],
["[Hybrid Charges][T2] Void", "0", "61.6", "61.6", "0"],
["[Hybrid Charges][T2] Null", "0", "48", "40", "0"],
["[Hybrid Charges][T2] Javelin", "0", "64", "48", "0"],
["[Hybrid Charges][T2] Spike", "0", "32", "32", "0"],
["[Hybrid Charges]Antimatter", "0", "48", "67.2", "0"],
["[Hybrid Charges]Iridium", "0", "28.8", "38.4", "0"],
["[Hybrid Charges]Iron", "0", "19.2", "28.8", "0"],
["[Hybrid Charges]Lead", "0", "28.8", "48", "0"],
["[Hybrid Charges]Plutonium", "0", "48", "57.6", "0"],
["[Hybrid Charges]Thorium", "0", "38.4", "48", "0"],
["[Hybrid Charges]Tungsten", "0", "19.2", "38.4", "0"],
["[Hybrid Charges]Uranium", "0", "38.4", "57.6", "0"],
["[Missiles]Mjolnir", "100", "0", "0", "0"], ["[Missiles]Inferno", "0", "100", "0", "0"],
["[Missiles]Scourge", "0", "0", "100", "0"], ["[Missiles]Nova", "0", "0", "0", "100"],
["[Missiles][Structure) Standup Missile", "100", "100", "100", "100"],
["[Projectile Ammo][T2] Tremor", "0", "0", "24", "40"],
["[Projectile Ammo][T2] Quake", "0", "0", "40", "72"],
["[Projectile Ammo][T2] Hail", "0", "0", "26.4", "96.8"],
["[Projectile Ammo][T2] Barrage", "0", "0", "40", "48"],
["[Projectile Ammo]Carbonized Lead", "0", "0", "35.2", "8.8"],
["[Projectile Ammo]Depleted Uranium", "0", "26.4", "17.6", "26.4"],
["[Projectile Ammo]EMP", "79.2", "0", "8.8", "17.6"],
["[Projectile Ammo]Fusion", "0", "0", "17.6", "88"],
["[Projectile Ammo]Nuclear", "0", "0", "8.8", "35.2"],
["[Projectile Ammo]Phased Plasma", "0", "88", "17.6", "0"],
["[Projectile Ammo]Proton", "26.4", "0", "17.6", "0"],
["[Projectile Ammo]Titanium Sabot", "0", "0", "52.8", "176"],
["[NPC][Burner] Cruor (Blood Raiders)", "90", "90", "0", "0"],
["[NPC][Burner] Dramiel (Angel)", "55", "0", "20", "96"],
["[NPC][Burner] Daredevil (Serpentis)", "0", "110", "154", "0"],
["[NPC][Burner] Succubus (Sanshas Nation)", "135", "30", "0", "0"],
["[NPC][Burner] Worm (Guristas)", "0", "0", "228", "0"],
["[NPC][Burner] Enyo", "0", "147", "147", "0"],
["[NPC][Burner] Hawk", "0", "0", "247", "0"],
["[NPC][Burner] Jaguar", "36", "0", "50", "182"],
["[NPC][Burner] Vengeance", "232", "0", "0", "0"],
["[NPC][Burner] Ashimmu (Blood Raiders)", "260", "100", "0", "0"],
["[NPC][Burner] Talos", "0", "413", "413", "0"],
["[NPC][Burner] Sentinel", "0", "75", "0", "90"],
["[NPC][Asteroid] Angel Cartel", "1838", "562", "2215", "3838"],
["[NPC][Deadspace] Angel Cartel", "369", "533", "1395", "3302"],
["[NPC][Deadspace] Blood Raiders", "6040", "5052", "10", "15"],
["[NPC][Asteroid] Guristas", "0", "1828", "7413", "0"],
["[NPC][Deadspace] Guristas", "0", "1531", "9680", "0"],
["[NPC][Asteroid] Rogue Drone", "394", "666", "1090", "1687"],
["[NPC][Deadspace] Rogue Drone", "276", "1071", "1069", "871"],
["[NPC][Asteroid] Sanshas Nation", "5586", "4112", "0", "0"],
["[NPC][Deadspace] Sanshas Nation", "3009", "2237", "0", "0"],
["[NPC][Asteroid] Serpentis", "0", "5373", "4813", "0"],
["[NPC][Deadspace] Serpentis", "0", "3110", "1929", "0"],
["[NPC][Mission] Amarr Empire", "4464", "3546", "97", "0"],
["[NPC][Mission] Caldari State", "0", "2139", "4867", "0"],
["[NPC][Mission] CONCORD", "336", "134", "212", "412"],
["[NPC][Mission] Gallente Federation", "9", "3712", "2758", "0"],
["[NPC][Mission] Khanid", "612", "483", "43", "6"],
["[NPC][Mission] Minmatar Republic", "1024", "388", "1655", "4285"],
["[NPC][Mission] Mordus Legion", "25", "262", "625", "0"],
["[NPC][Mission] Thukker", "0", "52", "10", "79"],
["[NPC][Other] Sleepers", "1472", "1472", "1384", "1384"],
["[NPC][Other] Sansha Incursion", "1682", "1347", "3678", "3678"]]
for damageProfileRow in damageProfileList:
name, em, therm, kin, exp = damageProfileRow
damageProfile = eos.db.getDamagePattern(name)
if damageProfile is None:
damageProfile = es_DamagePattern(em, therm, kin, exp)
damageProfile.name = name
eos.db.save(damageProfile)
@classmethod
def importResistProfileDefaults(cls):
targetResistProfileList = [["Uniform (25%)", "0.25", "0.25", "0.25", "0.25"],
["Uniform (50%)", "0.50", "0.50", "0.50", "0.50"],
["Uniform (75%)", "0.75", "0.75", "0.75", "0.75"],
["Uniform (90%)", "0.90", "0.90", "0.90", "0.90"],
["[T1 Resist]Shield", "0.0", "0.20", "0.40", "0.50"],
["[T1 Resist]Armor", "0.50", "0.45", "0.25", "0.10"],
["[T1 Resist]Hull", "0.33", "0.33", "0.33", "0.33"],
["[T1 Resist]Shield (+T2 DCU)", "0.125", "0.30", "0.475", "0.562"],
["[T1 Resist]Armor (+T2 DCU)", "0.575", "0.532", "0.363", "0.235"],
["[T1 Resist]Hull (+T2 DCU)", "0.598", "0.598", "0.598", "0.598"],
["[T2 Resist]Amarr (Shield)", "0.0", "0.20", "0.70", "0.875"],
["[T2 Resist]Amarr (Armor)", "0.50", "0.35", "0.625", "0.80"],
["[T2 Resist]Caldari (Shield)", "0.20", "0.84", "0.76", "0.60"],
["[T2 Resist]Caldari (Armor)", "0.50", "0.8625", "0.625", "0.10"],
["[T2 Resist]Gallente (Shield)", "0.0", "0.60", "0.85", "0.50"],
["[T2 Resist]Gallente (Armor)", "0.50", "0.675", "0.8375", "0.10"],
["[T2 Resist]Minmatar (Shield)", "0.75", "0.60", "0.40", "0.50"],
["[T2 Resist]Minmatar (Armor)", "0.90", "0.675", "0.25", "0.10"],
["[NPC][Asteroid] Angel Cartel", "0.54", "0.42", "0.37", "0.32"],
["[NPC][Asteroid] Blood Raiders", "0.34", "0.39", "0.45", "0.52"],
["[NPC][Asteroid] Guristas", "0.55", "0.35", "0.3", "0.48"],
["[NPC][Asteroid] Rogue Drones", "0.35", "0.38", "0.44", "0.49"],
["[NPC][Asteroid] Sanshas Nation", "0.35", "0.4", "0.47", "0.53"],
["[NPC][Asteroid] Serpentis", "0.49", "0.38", "0.29", "0.51"],
["[NPC][Deadspace] Angel Cartel", "0.59", "0.48", "0.4", "0.32"],
["[NPC][Deadspace] Blood Raiders", "0.31", "0.39", "0.47", "0.56"],
["[NPC][Deadspace] Guristas", "0.57", "0.39", "0.31", "0.5"],
["[NPC][Deadspace] Rogue Drones", "0.42", "0.42", "0.47", "0.49"],
["[NPC][Deadspace] Sanshas Nation", "0.31", "0.39", "0.47", "0.56"],
["[NPC][Deadspace] Serpentis", "0.49", "0.38", "0.29", "0.56"],
["[NPC][Mission] Amarr Empire", "0.34", "0.38", "0.42", "0.46"],
["[NPC][Mission] Caldari State", "0.51", "0.38", "0.3", "0.51"],
["[NPC][Mission] CONCORD", "0.47", "0.46", "0.47", "0.47"],
["[NPC][Mission] Gallente Federation", "0.51", "0.38", "0.31", "0.52"],
["[NPC][Mission] Khanid", "0.51", "0.42", "0.36", "0.4"],
["[NPC][Mission] Minmatar Republic", "0.51", "0.46", "0.41", "0.35"],
["[NPC][Mission] Mordus Legion", "0.32", "0.48", "0.4", "0.62"],
["[NPC][Other] Sleeper", "0.61", "0.61", "0.61", "0.61"],
["[NPC][Other] Sansha Incursion", "0.65", "0.63", "0.64", "0.65"],
["[NPC][Burner] Cruor (Blood Raiders)", "0.8", "0.73", "0.69", "0.67"],
["[NPC][Burner] Dramiel (Angel)", "0.35", "0.48", "0.61", "0.68"],
["[NPC][Burner] Daredevil (Serpentis)", "0.69", "0.59", "0.59", "0.43"],
["[NPC][Burner] Succubus (Sanshas Nation)", "0.35", "0.48", "0.61", "0.68"],
["[NPC][Burner] Worm (Guristas)", "0.48", "0.58", "0.69", "0.74"],
["[NPC][Burner] Enyo", "0.58", "0.72", "0.86", "0.24"],
["[NPC][Burner] Hawk", "0.3", "0.86", "0.79", "0.65"],
["[NPC][Burner] Jaguar", "0.78", "0.65", "0.48", "0.56"],
["[NPC][Burner] Vengeance", "0.66", "0.56", "0.75", "0.86"],
["[NPC][Burner] Ashimmu (Blood Raiders)", "0.8", "0.76", "0.68", "0.7"],
["[NPC][Burner] Talos", "0.68", "0.59", "0.59", "0.43"],
["[NPC][Burner] Sentinel", "0.58", "0.45", "0.52", "0.66"]]
for targetResistProfileRow in targetResistProfileList:
name, em, therm, kin, exp = targetResistProfileRow
resistsProfile = eos.db.eos.db.getTargetResists(name)
if resistsProfile is None:
resistsProfile = es_TargetResists(em, therm, kin, exp)
resistsProfile.name = name
eos.db.save(resistsProfile)
@classmethod
def importRequiredDefaults(cls):
damageProfileList = [["Uniform", "25", "25", "25", "25"]]
for damageProfileRow in damageProfileList:
name, em, therm, kin, exp = damageProfileRow
damageProfile = eos.db.getDamagePattern(name)
if damageProfile is None:
damageProfile = es_DamagePattern(em, therm, kin, exp)
damageProfile.name = name
eos.db.save(damageProfile)

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2011 Anton Vorobyov
#
# This file is part of eos.
@@ -15,15 +15,16 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Column, Table, String
from sqlalchemy.orm import mapper
from eos.types import MiscData
from eos.db import saveddata_meta
from eos.types import MiscData
miscdata_table = Table("miscdata", saveddata_meta,
Column("fieldName", String, primary_key=True),
Column("fieldValue", String))
Column("fieldName", String, primary_key=True),
Column("fieldValue", String))
mapper(MiscData, miscdata_table)

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Table, Column, Integer, ForeignKey, CheckConstraint, Boolean
from sqlalchemy.orm import relation, mapper
@@ -24,16 +24,15 @@ from eos.db import saveddata_meta
from eos.types import Module, Fit
modules_table = Table("modules", saveddata_meta,
Column("ID", Integer, primary_key = True),
Column("fitID", Integer, ForeignKey("fits.ID"), nullable = False, index = True),
Column("itemID", Integer, nullable = True),
Column("dummySlot", Integer, nullable = True, default = None),
Column("ID", Integer, primary_key=True),
Column("fitID", Integer, ForeignKey("fits.ID"), nullable=False, index=True),
Column("itemID", Integer, nullable=True),
Column("dummySlot", Integer, nullable=True, default=None),
Column("chargeID", Integer),
Column("state", Integer, CheckConstraint("state >= -1"), CheckConstraint("state <= 2")),
Column("projected", Boolean, default = False, nullable = False),
Column("projected", Boolean, default=False, nullable=False),
Column("position", Integer),
CheckConstraint('("dummySlot" = NULL OR "itemID" = NULL) AND "dummySlot" != "itemID"'))
mapper(Module, modules_table,
properties = {"owner" : relation(Fit)})
properties={"owner": relation(Fit)})

View File

@@ -0,0 +1,31 @@
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
#
# eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
# ===============================================================================
from sqlalchemy import Table, Column, Integer, Float
from sqlalchemy.orm import mapper
from eos.db import saveddata_meta
from eos.types import Override
overrides_table = Table("overrides", saveddata_meta,
Column("itemID", Integer, primary_key=True, index=True),
Column("attrID", Integer, primary_key=True, index=True),
Column("value", Float, nullable=False))
mapper(Override, overrides_table)

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,17 +15,18 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Table, Column, Float, Integer
from sqlalchemy.orm import mapper
from eos.db import saveddata_meta
from eos.types import Price
prices_table = Table("prices", saveddata_meta,
Column("typeID", Integer, primary_key=True),
Column("price", Float),
Column("time", Integer, nullable = False),
Column("time", Integer, nullable=False),
Column("failed", Integer))
mapper(Price, prices_table)

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,12 +15,16 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy.sql import and_
from eos.db import saveddata_session, sd_lock
from eos.db.saveddata.fit import projectedFits_table
from eos.db.util import processEager, processWhere
from eos.db import saveddata_session, sd_lock
from eos.types import User, Character, Fit, Price, DamagePattern, Fleet, MiscData, Wing, Squad, TargetResists
from eos.db.saveddata.fleet import squadmembers_table
from eos.types import *
from eos.db.saveddata.fit import projectedFits_table
from sqlalchemy.sql import and_
import eos.config
@@ -28,13 +32,17 @@ import eos.config
configVal = getattr(eos.config, "saveddataCache", None)
if configVal is True:
import weakref
itemCache = {}
queryCache = {}
def cachedQuery(type, amount, *keywords):
itemCache[type] = localItemCache = weakref.WeakValueDictionary()
queryCache[type] = typeQueryCache = {}
def deco(function):
localQueryCache = typeQueryCache[function] = {}
def setCache(cacheKey, args, kwargs):
items = function(*args, **kwargs)
IDs = set()
@@ -43,7 +51,7 @@ if configVal is True:
for item in stuff:
ID = getattr(item, "ID", None)
if ID is None:
#Some uncachable data, don't cache this query
# Some uncachable data, don't cache this query
del localQueryCache[cacheKey]
break
localItemCache[ID] = item
@@ -69,7 +77,7 @@ if configVal is True:
for ID in IDs:
data = localItemCache.get(ID)
if data is None:
#Fuck, some of our stuff isn't cached it seems.
# Fuck, some of our stuff isn't cached it seems.
items = setCache(cacheKey, args, kwargs)
break
items.append(data)
@@ -81,11 +89,13 @@ if configVal is True:
break
return items
return checkAndReturn
return deco
def removeCachedEntry(type, ID):
if not type in queryCache:
if type not in queryCache:
return
functionCache = queryCache[type]
for _, localCache in functionCache.iteritems():
@@ -110,11 +120,13 @@ else:
return function(*args, **kwargs)
return checkAndReturn
return deco
def removeCachedEntry(*args, **kwargs):
return
def sqlizeString(line):
# Escape backslashes first, as they will be as escape symbol in queries
# Then escape percent and underscore signs
@@ -122,6 +134,7 @@ def sqlizeString(line):
line = line.replace("\\", "\\\\").replace("%", "\\%").replace("_", "\\_").replace("*", "%")
return line
@cachedQuery(User, 1, "lookfor")
def getUser(lookfor, eager=None):
if isinstance(lookfor, int):
@@ -140,6 +153,7 @@ def getUser(lookfor, eager=None):
raise TypeError("Need integer or string as argument")
return user
@cachedQuery(Character, 1, "lookfor")
def getCharacter(lookfor, eager=None):
if isinstance(lookfor, int):
@@ -153,17 +167,20 @@ def getCharacter(lookfor, eager=None):
elif isinstance(lookfor, basestring):
eager = processEager(eager)
with sd_lock:
character = saveddata_session.query(Character).options(*eager).filter(Character.name == lookfor).first()
character = saveddata_session.query(Character).options(*eager).filter(
Character.savedName == lookfor).first()
else:
raise TypeError("Need integer or string as argument")
return character
def getCharacterList(eager=None):
eager = processEager(eager)
with sd_lock:
characters = saveddata_session.query(Character).options(*eager).all()
return characters
def getCharactersForUser(lookfor, eager=None):
if isinstance(lookfor, int):
eager = processEager(eager)
@@ -173,6 +190,7 @@ def getCharactersForUser(lookfor, eager=None):
raise TypeError("Need integer as argument")
return characters
@cachedQuery(Fit, 1, "lookfor")
def getFit(lookfor, eager=None):
if isinstance(lookfor, int):
@@ -182,52 +200,17 @@ def getFit(lookfor, eager=None):
else:
eager = processEager(eager)
with sd_lock:
fit = saveddata_session.query(Fit).options(*eager).filter(Fit.ID == fitID).first()
fit = saveddata_session.query(Fit).options(*eager).filter(Fit.ID == lookfor).first()
else:
raise TypeError("Need integer as argument")
if fit and fit.isInvalid:
with sd_lock:
removeInvalid([fit])
return None
return fit
@cachedQuery(Fleet, 1, "fleetID")
def getFleet(fleetID, eager=None):
if isinstance(fleetID, int):
if eager is None:
with sd_lock:
fleet = saveddata_session.query(Fleet).get(fleetID)
else:
eager = processEager(eager)
with sd_lock:
fleet = saveddata_session.query(Fleet).options(*eager).filter(Fleet.ID == fleetID).first()
else:
raise TypeError("Need integer as argument")
return fleet
@cachedQuery(Wing, 1, "wingID")
def getWing(wingID, eager=None):
if isinstance(wingID, int):
if eager is None:
with sd_lock:
wing = saveddata_session.query(Wing).get(wingID)
else:
eager = processEager(eager)
with sd_lock:
wing = saveddata_session.query(Wing).options(*eager).filter(Wing.ID == wingID).first()
else:
raise TypeError("Need integer as argument")
return wing
@cachedQuery(Squad, 1, "squadID")
def getSquad(squadID, eager=None):
if isinstance(squadID, int):
if eager is None:
with sd_lock:
squad = saveddata_session.query(Squad).get(squadID)
else:
eager = processEager(eager)
with sd_lock:
squad = saveddata_session.query(Squad).options(*eager).filter(Fleet.ID == squadID).first()
else:
raise TypeError("Need integer as argument")
return squad
def getFitsWithShip(shipID, ownerID=None, where=None, eager=None):
"""
@@ -244,11 +227,13 @@ def getFitsWithShip(shipID, ownerID=None, where=None, eager=None):
filter = processWhere(filter, where)
eager = processEager(eager)
with sd_lock:
fits = saveddata_session.query(Fit).options(*eager).filter(filter).all()
fits = removeInvalid(saveddata_session.query(Fit).options(*eager).filter(filter).all())
else:
raise TypeError("ShipID must be integer")
return fits
def getBoosterFits(ownerID=None, where=None, eager=None):
"""
Get all the fits that are flagged as a boosting ship
@@ -264,45 +249,52 @@ def getBoosterFits(ownerID=None, where=None, eager=None):
filter = processWhere(filter, where)
eager = processEager(eager)
with sd_lock:
fits = saveddata_session.query(Fit).options(*eager).filter(filter).all()
fits = removeInvalid(saveddata_session.query(Fit).options(*eager).filter(filter).all())
return fits
def countAllFits():
with sd_lock:
count = saveddata_session.query(Fit).count()
return count
def countFitsWithShip(shipID, ownerID=None, where=None, eager=None):
def countFitsWithShip(lookfor, ownerID=None, where=None, eager=None):
"""
Get all the fits using a certain ship.
If no user is passed, do this for all users.
"""
if isinstance(shipID, int):
if ownerID is not None and not isinstance(ownerID, int):
raise TypeError("OwnerID must be integer")
filter = Fit.shipID == shipID
if ownerID is not None:
filter = and_(filter, Fit.ownerID == ownerID)
if ownerID is not None and not isinstance(ownerID, int):
raise TypeError("OwnerID must be integer")
filter = processWhere(filter, where)
eager = processEager(eager)
with sd_lock:
count = saveddata_session.query(Fit).options(*eager).filter(filter).count()
if isinstance(lookfor, int):
filter = Fit.shipID == lookfor
elif isinstance(lookfor, list):
if len(lookfor) == 0:
return 0
filter = Fit.shipID.in_(lookfor)
else:
raise TypeError("ShipID must be integer")
raise TypeError("You must supply either an integer or ShipID must be integer")
if ownerID is not None:
filter = and_(filter, Fit.ownerID == ownerID)
filter = processWhere(filter, where)
eager = processEager(eager)
with sd_lock:
count = saveddata_session.query(Fit).options(*eager).filter(filter).count()
return count
def getFitList(eager=None):
eager = processEager(eager)
with sd_lock:
fits = saveddata_session.query(Fit).options(*eager).all()
fits = removeInvalid(saveddata_session.query(Fit).options(*eager).all())
return fits
def getFleetList(eager=None):
eager = processEager(eager)
with sd_lock:
fleets = saveddata_session.query(Fleet).options(*eager).all()
return fleets
@cachedQuery(Price, 1, "typeID")
def getPrice(typeID):
@@ -313,12 +305,14 @@ def getPrice(typeID):
raise TypeError("Need integer as argument")
return price
def clearPrices():
with sd_lock:
deleted_rows = saveddata_session.query(Price).delete()
commit()
return deleted_rows
def getMiscData(field):
if isinstance(field, basestring):
with sd_lock:
@@ -327,18 +321,28 @@ def getMiscData(field):
raise TypeError("Need string as argument")
return data
def getDamagePatternList(eager=None):
eager = processEager(eager)
with sd_lock:
patterns = saveddata_session.query(DamagePattern).options(*eager).all()
return patterns
def getTargetResistsList(eager=None):
eager = processEager(eager)
with sd_lock:
patterns = saveddata_session.query(TargetResists).options(*eager).all()
return patterns
def getImplantSetList(eager=None):
eager = processEager(eager)
with sd_lock:
sets = saveddata_session.query(ImplantSet).options(*eager).all()
return sets
@cachedQuery(DamagePattern, 1, "lookfor")
def getDamagePattern(lookfor, eager=None):
if isinstance(lookfor, int):
@@ -348,15 +352,18 @@ def getDamagePattern(lookfor, eager=None):
else:
eager = processEager(eager)
with sd_lock:
pattern = saveddata_session.query(DamagePattern).options(*eager).filter(DamagePattern.ID == lookfor).first()
pattern = saveddata_session.query(DamagePattern).options(*eager).filter(
DamagePattern.ID == lookfor).first()
elif isinstance(lookfor, basestring):
eager = processEager(eager)
with sd_lock:
pattern = saveddata_session.query(DamagePattern).options(*eager).filter(DamagePattern.name == lookfor).first()
pattern = saveddata_session.query(DamagePattern).options(*eager).filter(
DamagePattern.name == lookfor).first()
else:
raise TypeError("Need integer or string as argument")
return pattern
@cachedQuery(TargetResists, 1, "lookfor")
def getTargetResists(lookfor, eager=None):
if isinstance(lookfor, int):
@@ -366,36 +373,52 @@ def getTargetResists(lookfor, eager=None):
else:
eager = processEager(eager)
with sd_lock:
pattern = saveddata_session.query(TargetResists).options(*eager).filter(TargetResists.ID == lookfor).first()
pattern = saveddata_session.query(TargetResists).options(*eager).filter(
TargetResists.ID == lookfor).first()
elif isinstance(lookfor, basestring):
eager = processEager(eager)
with sd_lock:
pattern = saveddata_session.query(TargetResists).options(*eager).filter(TargetResists.name == lookfor).first()
pattern = saveddata_session.query(TargetResists).options(*eager).filter(
TargetResists.name == lookfor).first()
else:
raise TypeError("Need integer or string as argument")
return pattern
@cachedQuery(ImplantSet, 1, "lookfor")
def getImplantSet(lookfor, eager=None):
if isinstance(lookfor, int):
if eager is None:
with sd_lock:
pattern = saveddata_session.query(ImplantSet).get(lookfor)
else:
eager = processEager(eager)
with sd_lock:
pattern = saveddata_session.query(ImplantSet).options(*eager).filter(
TargetResists.ID == lookfor).first()
elif isinstance(lookfor, basestring):
eager = processEager(eager)
with sd_lock:
pattern = saveddata_session.query(ImplantSet).options(*eager).filter(TargetResists.name == lookfor).first()
else:
raise TypeError("Improper argument")
return pattern
def searchFits(nameLike, where=None, eager=None):
if not isinstance(nameLike, basestring):
raise TypeError("Need string as argument")
# Prepare our string for request
nameLike = u"%{0}%".format(sqlizeString(nameLike))
#Add any extra components to the search to our where clause
# Add any extra components to the search to our where clause
filter = processWhere(Fit.name.like(nameLike, escape="\\"), where)
eager = processEager(eager)
with sd_lock:
fits = saveddata_session.query(Fit).options(*eager).filter(filter).all()
fits = removeInvalid(saveddata_session.query(Fit).options(*eager).filter(filter).all())
return fits
def getSquadsIDsWithFitID(fitID):
if isinstance(fitID, int):
with sd_lock:
squads = saveddata_session.query(squadmembers_table.c.squadID).filter(squadmembers_table.c.memberID == fitID).all()
squads = tuple(entry[0] for entry in squads)
return squads
else:
raise TypeError("Need integer as argument")
def getProjectedFits(fitID):
if isinstance(fitID, int):
@@ -406,14 +429,72 @@ def getProjectedFits(fitID):
else:
raise TypeError("Need integer as argument")
def getCrestCharacters(eager=None):
eager = processEager(eager)
with sd_lock:
characters = saveddata_session.query(CrestChar).options(*eager).all()
return characters
@cachedQuery(CrestChar, 1, "lookfor")
def getCrestCharacter(lookfor, eager=None):
if isinstance(lookfor, int):
if eager is None:
with sd_lock:
character = saveddata_session.query(CrestChar).get(lookfor)
else:
eager = processEager(eager)
with sd_lock:
character = saveddata_session.query(CrestChar).options(*eager).filter(CrestChar.ID == lookfor).first()
elif isinstance(lookfor, basestring):
eager = processEager(eager)
with sd_lock:
character = saveddata_session.query(CrestChar).options(*eager).filter(CrestChar.name == lookfor).first()
else:
raise TypeError("Need integer or string as argument")
return character
def getOverrides(itemID, eager=None):
if isinstance(itemID, int):
return saveddata_session.query(Override).filter(Override.itemID == itemID).all()
else:
raise TypeError("Need integer as argument")
def clearOverrides():
with sd_lock:
deleted_rows = saveddata_session.query(Override).delete()
commit()
return deleted_rows
def getAllOverrides(eager=None):
return saveddata_session.query(Override).all()
def removeInvalid(fits):
invalids = [f for f in fits if f.isInvalid]
if invalids:
map(fits.remove, invalids)
map(saveddata_session.delete, invalids)
saveddata_session.commit()
return fits
def add(stuff):
with sd_lock:
saveddata_session.add(stuff)
def save(stuff):
add(stuff)
commit()
def remove(stuff):
removeCachedEntry(type(stuff), stuff.ID)
with sd_lock:

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Table, Column, Integer, ForeignKey
from sqlalchemy.orm import mapper
@@ -24,8 +24,8 @@ from eos.db import saveddata_meta
from eos.types import Skill
skills_table = Table("characterSkills", saveddata_meta,
Column("characterID", ForeignKey("characters.ID"), primary_key = True, index = True),
Column("itemID", Integer, primary_key = True),
Column("_Skill__level", Integer, nullable = True))
Column("characterID", ForeignKey("characters.ID"), primary_key=True, index=True),
Column("itemID", Integer, primary_key=True),
Column("_Skill__level", Integer, nullable=True))
mapper(Skill, skills_table)

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2014 Ryan Holmes
#
# This file is part of eos.
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Table, Column, Integer, Float, ForeignKey, String
from sqlalchemy.orm import mapper
@@ -24,12 +24,12 @@ from eos.db import saveddata_meta
from eos.types import TargetResists
targetResists_table = Table("targetResists", saveddata_meta,
Column("ID", Integer, primary_key = True),
Column("name", String),
Column("emAmount", Float),
Column("thermalAmount", Float),
Column("kineticAmount", Float),
Column("explosiveAmount", Float),
Column("ownerID", ForeignKey("users.ID"), nullable=True))
Column("ID", Integer, primary_key=True),
Column("name", String),
Column("emAmount", Float),
Column("thermalAmount", Float),
Column("kineticAmount", Float),
Column("explosiveAmount", Float),
Column("ownerID", ForeignKey("users.ID"), nullable=True))
mapper(TargetResists, targetResists_table)

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy import Table, Column, Integer, String, Boolean
from sqlalchemy.orm import mapper
@@ -24,9 +24,9 @@ from eos.db import saveddata_meta
from eos.types import User
users_table = Table("users", saveddata_meta,
Column("ID", Integer, primary_key = True),
Column("username", String, nullable = False, unique = True),
Column("password", String, nullable = False),
Column("admin", Boolean, nullable = False))
Column("ID", Integer, primary_key=True),
Column("username", String, nullable=False, unique=True),
Column("password", String, nullable=False),
Column("admin", Boolean, nullable=False))
mapper(User, users_table)

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
from sqlalchemy.orm import eagerload
from sqlalchemy.sql import and_
@@ -31,8 +31,9 @@ replace = {"attributes": "_Item__attributes",
"damagePattern": "_Fit__damagePattern",
"projectedFits": "_Fit__projectedFits"}
def processEager(eager):
if eager == None:
if eager is None:
return tuple()
else:
l = []
@@ -44,6 +45,7 @@ def processEager(eager):
return l
def _replacements(eagerString):
splitEager = eagerString.split(".")
for i in xrange(len(splitEager)):
@@ -54,6 +56,7 @@ def _replacements(eagerString):
return ".".join(splitEager)
def processWhere(clause, where):
if where is not None:
if not hasattr(where, "__iter__"):

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
@@ -15,10 +15,15 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================
# from sqlalchemy.orm.attributes import flag_modified
import logging
import eos.db
import eos.types
logger = logging.getLogger(__name__)
class HandledList(list):
def filteredItemPreAssign(self, filter, *args, **kwargs):
@@ -101,6 +106,15 @@ class HandledList(list):
except AttributeError:
pass
def remove(self, thing):
# We must flag it as modified, otherwise it not be removed from the database
# @todo: flag_modified isn't in os x skel. need to rebuild to include
# flag_modified(thing, "itemID")
if thing.isInvalid: # see GH issue #324
thing.itemID = 0
list.remove(self, thing)
class HandledModuleList(HandledList):
def append(self, mod):
emptyPosition = float("Inf")
@@ -115,10 +129,19 @@ class HandledModuleList(HandledList):
del self[emptyPosition]
mod.position = emptyPosition
HandledList.insert(self, emptyPosition, mod)
if mod.isInvalid:
self.remove(mod)
return
mod.position = len(self)
HandledList.append(self, mod)
if mod.isInvalid:
self.remove(mod)
return
# fix for #529, where a module may be in incorrect state after CCP changes mechanics of module
if not mod.isValidState(mod.state):
mod.state = eos.types.State.ONLINE
def insert(self, index, mod):
mod.position = index
@@ -143,139 +166,88 @@ class HandledModuleList(HandledList):
dummy.position = index
self[index] = dummy
def toModule(self, index, mod):
mod.position = index
self[index] = mod
def freeSlot(self, slot):
for i in range(len(self) -1, -1, -1):
for i in range(len(self)):
mod = self[i]
if mod.getModifiedItemAttr("subSystemSlot") == slot:
del self[i]
self.toDummy(i)
break
class HandledDroneList(HandledList):
class HandledDroneCargoList(HandledList):
def find(self, item):
for d in self:
if d.item == item:
yield d
for o in self:
if o.item == item:
yield o
def findFirst(self, item):
for d in self.find(item):
return d
for o in self.find(item):
return o
def append(self, drone):
list.append(self, drone)
def append(self, thing):
HandledList.append(self, thing)
def remove(self, drone):
HandledList.remove(self, drone)
if thing.isInvalid:
self.remove(thing)
def appendItem(self, item, amount = 1):
if amount < 1: ValueError("Amount of drones to add should be >= 1")
d = self.findFirst(item)
if d is None:
d = eos.types.Drone(item)
self.append(d)
d.amount += amount
return d
def removeItem(self, item, amount):
if amount < 1: ValueError("Amount of drones to remove should be >= 1")
d = self.findFirst(item)
if d is None: return
d.amount -= amount
if d.amount <= 0:
self.remove(d)
return None
return d
class HandledCargoList(HandledList):
# shameless copy of HandledDroneList
# I have no idea what this does, but I needed it
# @todo: investigate this
def find(self, item):
for d in self:
if d.item == item:
yield d
def findFirst(self, item):
for d in self.find(item):
return d
def append(self, cargo):
list.append(self, cargo)
def remove(self, cargo):
HandledList.remove(self, cargo)
def appendItem(self, item, qty = 1):
if qty < 1: ValueError("Amount of cargo to add should be >= 1")
d = self.findFirst(item)
if d is None:
d = eos.types.Cargo(item)
self.append(d)
d.qty += qty
return d
def removeItem(self, item, qty):
if qty < 1: ValueError("Amount of cargo to remove should be >= 1")
d = self.findFirst(item)
if d is None: return
d.qty -= qty
if d.qty <= 0:
self.remove(d)
return None
return d
class HandledImplantBoosterList(HandledList):
def __init__(self):
self.__slotCache = {}
def append(self, thing):
if thing.isInvalid:
HandledList.append(self, thing)
self.remove(thing)
return
def append(self, implant):
if self.__slotCache.has_key(implant.slot):
raise ValueError("Implant/Booster slot already in use, remove the old one first or set replace = True")
self.__slotCache[implant.slot] = implant
HandledList.append(self, implant)
# if needed, remove booster that was occupying slot
oldObj = next((m for m in self if m.slot == thing.slot), None)
if oldObj:
logging.info("Slot %d occupied with %s, replacing with %s", thing.slot, oldObj.item.name, thing.item.name)
oldObj.itemID = 0 # hack to remove from DB. See GH issue #324
self.remove(oldObj)
def remove(self, implant):
HandledList.remove(self, implant)
del self.__slotCache[implant.slot]
# While we deleted this implant, in edge case seems like not all references
# to it are removed and object still lives in session; forcibly remove it,
# or otherwise when adding the same booster twice booster's table (typeID, fitID)
# constraint will report database integrity error
# TODO: make a proper fix, probably by adjusting fit-boosters sqlalchemy relationships
eos.db.remove(implant)
HandledList.append(self, thing)
def freeSlot(self, slot):
if hasattr(slot, "slot"):
slot = slot.slot
try:
implant = self.__slotCache[slot]
except KeyError:
return False
try:
self.remove(implant)
except ValueError:
return False
return True
class HandledProjectedModList(HandledList):
def append(self, proj):
if proj.isInvalid:
# we must include it before we remove it. doing it this way ensures
# rows and relationships in database are removed as well
HandledList.append(self, proj)
self.remove(proj)
return
proj.projected = True
isSystemEffect = proj.item.group.name == "Effect Beacon"
if isSystemEffect:
# remove other system effects - only 1 per fit plz
oldEffect = next((m for m in self if m.item.group.name == "Effect Beacon"), None)
if oldEffect:
logging.info("System effect occupied with %s, replacing with %s", oldEffect.item.name, proj.item.name)
self.remove(oldEffect)
HandledList.append(self, proj)
# Remove non-projectable modules
if not proj.item.isType("projected") and not isSystemEffect:
self.remove(proj)
class HandledProjectedDroneList(HandledDroneCargoList):
def append(self, proj):
proj.projected = True
HandledList.append(self, proj)
class HandledProjectedDroneList(HandledDroneList):
def append(self, proj):
proj.projected = True
list.append(self, proj)
# Remove invalid or non-projectable drones
if proj.isInvalid or not proj.item.isType("projected"):
self.remove(proj)
class HandledProjectedFitList(HandledList):
def append(self, proj):
proj.projected = True
list.append(self, proj)
class HandledItem(object):
def preAssignItemAttr(self, *args, **kwargs):
@@ -293,6 +265,7 @@ class HandledItem(object):
def forceItemAttr(self, *args, **kwargs):
self.itemModifiedAttributes.force(*args, **kwargs)
class HandledCharge(object):
def preAssignChargeAttr(self, *args, **kwargs):
self.chargeModifiedAttributes.preAssign(*args, **kwargs)

View File

@@ -1,4 +1,4 @@
#===============================================================================
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
# 2010 Anton Vorobyov
#
@@ -16,4 +16,4 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with eos. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# ===============================================================================

View File

@@ -3,6 +3,8 @@
# Used by:
# Modules named like: Dynamic Fuel Valve (8 of 8)
type = "passive"
def handler(fit, container, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Propulsion Module",
"capacitorNeed", container.getModifiedItemAttr("capNeedBonus"))

View File

@@ -4,6 +4,8 @@
# Implant: Zor's Custom Navigation Hyper-Link
# Skill: Acceleration Control
type = "passive"
def handler(fit, container, context):
level = container.level if "skill" in context else 1
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Propulsion Module",

View File

@@ -3,6 +3,8 @@
# Used by:
# Implants named like: Eifyr and Co. 'Rogue' Acceleration Control AC (6 of 6)
type = "passive"
def handler(fit, implant, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Propulsion Module",
"speedFactor", implant.getModifiedItemAttr("speedFBonus"))

View File

@@ -5,6 +5,8 @@
# Implant: Poteque 'Prospector' Archaeology AC-905
# Implant: Poteque 'Prospector' Environmental Analysis EY-1005
type = "passive"
def handler(fit, container, context):
fit.modules.filteredItemIncrease(lambda module: module.item.requiresSkill("Archaeology"),
"accessDifficultyBonus",

View File

@@ -5,7 +5,9 @@
# Implant: Poteque 'Prospector' Environmental Analysis EY-1005
# Implant: Poteque 'Prospector' Hacking HC-905
type = "passive"
def handler(fit, container, context):
fit.modules.filteredItemIncrease(lambda c: c.item.requiresSkill("Hacking"),
"accessDifficultyBonus",
container.getModifiedItemAttr("accessDifficultyBonusModifier"), position="post")
"accessDifficultyBonus",
container.getModifiedItemAttr("accessDifficultyBonusModifier"), position="post")

View File

@@ -2,9 +2,120 @@
#
# Used by:
# Module: Reactive Armor Hardener
import logging
logger = logging.getLogger(__name__)
runTime = "late"
type = "active"
def handler(fit, module, context):
for type in ("kinetic", "thermal", "explosive", "em"):
attr = "armor%sDamageResonance" % type.capitalize()
fit.ship.multiplyItemAttr(attr, module.getModifiedItemAttr(attr),
stackingPenalties=True, penaltyGroup="preMul")
damagePattern = fit.damagePattern
# Skip if there is no damage pattern. Example: projected ships or fleet boosters
if damagePattern:
# logger.debug("Damage Pattern: %f/%f/%f/%f", damagePattern.emAmount, damagePattern.thermalAmount, damagePattern.kineticAmount, damagePattern.explosiveAmount)
# logger.debug("Original Armor Resists: %f/%f/%f/%f", fit.ship.getModifiedItemAttr('armorEmDamageResonance'), fit.ship.getModifiedItemAttr('armorThermalDamageResonance'), fit.ship.getModifiedItemAttr('armorKineticDamageResonance'), fit.ship.getModifiedItemAttr('armorExplosiveDamageResonance'))
# Populate a tuple with the damage profile modified by current armor resists.
baseDamageTaken = (
damagePattern.emAmount * fit.ship.getModifiedItemAttr('armorEmDamageResonance'),
damagePattern.thermalAmount * fit.ship.getModifiedItemAttr('armorThermalDamageResonance'),
damagePattern.kineticAmount * fit.ship.getModifiedItemAttr('armorKineticDamageResonance'),
damagePattern.explosiveAmount * fit.ship.getModifiedItemAttr('armorExplosiveDamageResonance'),
)
# logger.debug("Damage Adjusted for Armor Resists: %f/%f/%f/%f", baseDamageTaken[0], baseDamageTaken[1], baseDamageTaken[2], baseDamageTaken[3])
resistanceShiftAmount = module.getModifiedItemAttr(
'resistanceShiftAmount') / 100 # The attribute is in percent and we want a fraction
RAHResistance = [
module.getModifiedItemAttr('armorEmDamageResonance'),
module.getModifiedItemAttr('armorThermalDamageResonance'),
module.getModifiedItemAttr('armorKineticDamageResonance'),
module.getModifiedItemAttr('armorExplosiveDamageResonance'),
]
# Simulate RAH cycles until the RAH either stops changing or enters a loop.
# The number of iterations is limited to prevent an infinite loop if something goes wrong.
cycleList = []
loopStart = -20
for num in range(50):
# logger.debug("Starting cycle %d.", num)
# The strange order is to emulate the ingame sorting when different types have taken the same amount of damage.
# This doesn't take into account stacking penalties. In a few cases fitting a Damage Control causes an inaccurate result.
damagePattern_tuples = [
(0, baseDamageTaken[0] * RAHResistance[0], RAHResistance[0]),
(3, baseDamageTaken[3] * RAHResistance[3], RAHResistance[3]),
(2, baseDamageTaken[2] * RAHResistance[2], RAHResistance[2]),
(1, baseDamageTaken[1] * RAHResistance[1], RAHResistance[1]),
]
# logger.debug("Damage taken this cycle: %f/%f/%f/%f", damagePattern_tuples[0][1], damagePattern_tuples[3][1], damagePattern_tuples[2][1], damagePattern_tuples[1][1])
# Sort the tuple to drop the highest damage value to the bottom
sortedDamagePattern_tuples = sorted(damagePattern_tuples, key=lambda damagePattern: damagePattern[1])
if sortedDamagePattern_tuples[2][1] == 0:
# One damage type: the top damage type takes from the other three
# Since the resistances not taking damage will end up going to the type taking damage we just do the whole thing at once.
change0 = 1 - sortedDamagePattern_tuples[0][2]
change1 = 1 - sortedDamagePattern_tuples[1][2]
change2 = 1 - sortedDamagePattern_tuples[2][2]
change3 = -(change0 + change1 + change2)
elif sortedDamagePattern_tuples[1][1] == 0:
# Two damage types: the top two damage types take from the other two
# Since the resistances not taking damage will end up going equally to the types taking damage we just do the whole thing at once.
change0 = 1 - sortedDamagePattern_tuples[0][2]
change1 = 1 - sortedDamagePattern_tuples[1][2]
change2 = -(change0 + change1) / 2
change3 = -(change0 + change1) / 2
else:
# Three or four damage types: the top two damage types take from the other two
change0 = min(resistanceShiftAmount, 1 - sortedDamagePattern_tuples[0][2])
change1 = min(resistanceShiftAmount, 1 - sortedDamagePattern_tuples[1][2])
change2 = -(change0 + change1) / 2
change3 = -(change0 + change1) / 2
RAHResistance[sortedDamagePattern_tuples[0][0]] = sortedDamagePattern_tuples[0][2] + change0
RAHResistance[sortedDamagePattern_tuples[1][0]] = sortedDamagePattern_tuples[1][2] + change1
RAHResistance[sortedDamagePattern_tuples[2][0]] = sortedDamagePattern_tuples[2][2] + change2
RAHResistance[sortedDamagePattern_tuples[3][0]] = sortedDamagePattern_tuples[3][2] + change3
# logger.debug("Resistances shifted to %f/%f/%f/%f", RAHResistance[0], RAHResistance[1], RAHResistance[2], RAHResistance[3])
# See if the current RAH profile has been encountered before, indicating a loop.
for i, val in enumerate(cycleList):
tolerance = 1e-06
if abs(RAHResistance[0] - val[0]) <= tolerance and \
abs(RAHResistance[1] - val[1]) <= tolerance and \
abs(RAHResistance[2] - val[2]) <= tolerance and \
abs(RAHResistance[3] - val[3]) <= tolerance:
loopStart = i
# logger.debug("Loop found: %d-%d", loopStart, num)
break
if loopStart >= 0:
break
cycleList.append(list(RAHResistance))
if loopStart < 0:
logger.error("Reactive Armor Hardener failed to find equilibrium. Damage profile after armor: %f/%f/%f/%f",
baseDamageTaken[0], baseDamageTaken[1], baseDamageTaken[2], baseDamageTaken[3])
# Average the profiles in the RAH loop, or the last 20 if it didn't find a loop.
loopCycles = cycleList[loopStart:]
numCycles = len(loopCycles)
average = [0, 0, 0, 0]
for cycle in loopCycles:
for i in range(4):
average[i] += cycle[i]
for i in range(4):
average[i] = round(average[i] / numCycles, 3)
# Set the new resistances
# logger.debug("Setting new resist profile: %f/%f/%f/%f", average[0], average[1], average[2],average[3])
for i, attr in enumerate((
'armorEmDamageResonance', 'armorThermalDamageResonance', 'armorKineticDamageResonance',
'armorExplosiveDamageResonance')):
module.increaseItemAttr(attr, average[i] - module.getModifiedItemAttr(attr))
fit.ship.multiplyItemAttr(attr, average[i], stackingPenalties=True, penaltyGroup="preMul")

View File

@@ -2,7 +2,9 @@
#
# Used by:
# Modules from group: Missile Launcher Bomb (2 of 2)
# Modules from group: Shield Extender (25 of 25)
# Modules from group: Shield Extender (33 of 33)
type = "passive"
def handler(fit, module, context):
fit.ship.increaseItemAttr("signatureRadius", module.getModifiedItemAttr("signatureRadiusAdd"))
fit.ship.increaseItemAttr("signatureRadius", module.getModifiedItemAttr("signatureRadiusAdd"))

View File

@@ -1,8 +0,0 @@
# advancedDroneInterfacingMaxGroupDCUSkillLevel
#
# Used by:
# Skill: Advanced Drone Interfacing
type = "passive"
def handler(fit, skill, context):
fit.modules.filteredItemIncrease(lambda mod: mod.item.group.name == "Drone Control Unit",
"maxGroupActive", skill.level)

View File

@@ -5,7 +5,9 @@
# Implant: Zor's Custom Navigation Link
# Skill: Afterburner
type = "passive"
def handler(fit, container, context):
level = container.level if "skill" in context else 1
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Afterburner"),
"duration", container.getModifiedItemAttr("durationBonus") * level)
"duration", container.getModifiedItemAttr("durationBonus") * level)

View File

@@ -5,7 +5,9 @@
# Modules from group: Nanofiber Internal Structure (7 of 7)
# Modules from group: Reinforced Bulkhead (8 of 8)
type = "passive"
def handler(fit, module, context):
fit.ship.boostItemAttr("agility",
module.getModifiedItemAttr("agilityMultiplier"),
stackingPenalties = True)
stackingPenalties=True)

View File

@@ -3,5 +3,7 @@
# Used by:
# Modules named like: Polycarbon Engine Housing (8 of 8)
type = "passive"
def handler(fit, module, context):
fit.ship.boostItemAttr("agility", module.getModifiedItemAttr("agilityMultiplier"), stackingPenalties = True)
fit.ship.boostItemAttr("agility", module.getModifiedItemAttr("agilityMultiplier"), stackingPenalties=True)

View File

@@ -1,12 +1,14 @@
# ammoFallofMultiplier
#
# Used by:
# Charges from group: Advanced Artillery Ammo (6 of 6)
# Charges from group: Advanced Autocannon Ammo (6 of 6)
# Charges from group: Advanced Beam Laser Crystal (6 of 6)
# Charges from group: Advanced Blaster Charge (6 of 6)
# Charges from group: Advanced Pulse Laser Crystal (6 of 6)
# Charges from group: Advanced Railgun Charge (6 of 6)
# Charges from group: Advanced Artillery Ammo (8 of 8)
# Charges from group: Advanced Autocannon Ammo (8 of 8)
# Charges from group: Advanced Beam Laser Crystal (8 of 8)
# Charges from group: Advanced Blaster Charge (8 of 8)
# Charges from group: Advanced Pulse Laser Crystal (8 of 8)
# Charges from group: Advanced Railgun Charge (8 of 8)
type = "passive"
def handler(fit, module, context):
module.multiplyItemAttr("falloff", module.getModifiedChargeAttr("fallofMultiplier") or 1)

View File

@@ -1,8 +1,12 @@
# ammoInfluenceCapNeed
#
# Used by:
# Items from category: Charge (458 of 829)
# Items from category: Charge (465 of 899)
# Charges from group: Frequency Crystal (185 of 185)
# Charges from group: Hybrid Charge (209 of 209)
type = "passive"
def handler(fit, module, context):
# Dirty hack to work around cap charges setting cap booster
# injection amount to zero

View File

@@ -1,7 +1,9 @@
# ammoInfluenceRange
#
# Used by:
# Items from category: Charge (559 of 829)
# Items from category: Charge (571 of 899)
type = "passive"
def handler(fit, module, context):
module.multiplyItemAttr("maxRange", module.getModifiedChargeAttr("weaponRangeMultiplier"))
module.multiplyItemAttr("maxRange", module.getModifiedChargeAttr("weaponRangeMultiplier"))

View File

@@ -1,9 +1,11 @@
# ammoSpeedMultiplier
#
# Used by:
# Charges from group: Festival Charges (8 of 8)
# Charges from group: Festival Charges (9 of 9)
# Charges from group: Interdiction Probe (2 of 2)
# Charges from group: Survey Probe (3 of 3)
type = "passive"
def handler(fit, module, context):
module.multiplyItemAttr("speed", module.getModifiedChargeAttr("speedMultiplier") or 1)

View File

@@ -1,13 +1,15 @@
# ammoTrackingMultiplier
#
# Used by:
# Charges from group: Advanced Artillery Ammo (6 of 6)
# Charges from group: Advanced Autocannon Ammo (6 of 6)
# Charges from group: Advanced Beam Laser Crystal (6 of 6)
# Charges from group: Advanced Blaster Charge (6 of 6)
# Charges from group: Advanced Pulse Laser Crystal (6 of 6)
# Charges from group: Advanced Railgun Charge (6 of 6)
# Charges from group: Advanced Artillery Ammo (8 of 8)
# Charges from group: Advanced Autocannon Ammo (8 of 8)
# Charges from group: Advanced Beam Laser Crystal (8 of 8)
# Charges from group: Advanced Blaster Charge (8 of 8)
# Charges from group: Advanced Pulse Laser Crystal (8 of 8)
# Charges from group: Advanced Railgun Charge (8 of 8)
# Charges from group: Projectile Ammo (129 of 129)
type = "passive"
def handler(fit, module, context):
module.multiplyItemAttr("trackingSpeed", module.getModifiedChargeAttr("trackingSpeedMultiplier"))
module.multiplyItemAttr("trackingSpeed", module.getModifiedChargeAttr("trackingSpeedMultiplier"))

View File

@@ -4,8 +4,11 @@
# Implants named like: grade Halo (18 of 18)
runTime = "early"
type = "passive"
def handler(fit, implant, context):
fit.implants.filteredItemMultiply(
lambda implant: "signatureRadiusBonus" in implant.itemModifiedAttributes and "implantSetAngel" in implant.itemModifiedAttributes,
fit.appliedImplants.filteredItemMultiply(
lambda implant: "signatureRadiusBonus" in implant.itemModifiedAttributes and
"implantSetAngel" in implant.itemModifiedAttributes,
"signatureRadiusBonus",
implant.getModifiedItemAttr("implantSetAngel"))
implant.getModifiedItemAttr("implantSetAngel"))

View File

@@ -3,5 +3,7 @@
# Used by:
# Modules from group: Warp Core Stabilizer (8 of 8)
type = "passive"
def handler(fit, module, context):
fit.ship.increaseItemAttr("warmScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength"))
fit.ship.increaseItemAttr("warmScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength"))

View File

@@ -6,6 +6,8 @@
# Implant: Poteque 'Prospector' Environmental Analysis EY-1005
# Skill: Archaeology
type = "passive"
def handler(fit, container, context):
level = container.level if "skill" in context else 1
fit.modules.filteredItemIncrease(lambda mod: mod.item.requiresSkill("Archaeology"),

View File

@@ -2,7 +2,11 @@
#
# Used by:
# Implants named like: Exile Booster (4 of 4)
# Implant: Antipharmakon Kosybo
type = "passive"
def handler(fit, booster, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Systems") or mod.item.requiresSkill("Capital Repair Systems"),
"armorDamageAmount", booster.getModifiedItemAttr("armorDamageAmountBonus"))
fit.modules.filteredItemBoost(
lambda mod: mod.item.requiresSkill("Repair Systems") or mod.item.requiresSkill("Capital Repair Systems"),
"armorDamageAmount", booster.getModifiedItemAttr("armorDamageAmountBonus"))

View File

@@ -3,7 +3,9 @@
# Used by:
# Modules named like: Auxiliary Nano Pump (8 of 8)
type = "passive"
def handler(fit, implant, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Repair Systems"),
"armorDamageAmount", implant.getModifiedItemAttr("repairBonus"),
stackingPenalties = True)
stackingPenalties=True)

View File

@@ -0,0 +1,11 @@
# armoredCommandDurationBonus
#
# Used by:
# Skill: Armored Command
type = "passive"
def handler(fit, src, context):
lvl = src.level
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Armored Command"), "buffDuration",
src.getModifiedItemAttr("durationBonus") * lvl)

View File

@@ -0,0 +1,20 @@
# armoredCommandMindlink
#
# Used by:
# Implant: Armored Command Mindlink
# Implant: Federation Navy Command Mindlink
# Implant: Imperial Navy Command Mindlink
type = "passive"
def handler(fit, src, context):
fit.modules.filteredChargeBoost(lambda mod: mod.item.requiresSkill("Armored Command"), "warfareBuff2Multiplier",
src.getModifiedItemAttr("mindlinkBonus"))
fit.modules.filteredChargeBoost(lambda mod: mod.item.requiresSkill("Armored Command"), "warfareBuff1Multiplier",
src.getModifiedItemAttr("mindlinkBonus"))
fit.modules.filteredChargeBoost(lambda mod: mod.item.requiresSkill("Armored Command"), "warfareBuff4Multiplier",
src.getModifiedItemAttr("mindlinkBonus"))
fit.modules.filteredChargeBoost(lambda mod: mod.item.requiresSkill("Armored Command"), "warfareBuff3Multiplier",
src.getModifiedItemAttr("mindlinkBonus"))
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Armored Command"), "buffDuration",
src.getModifiedItemAttr("mindlinkBonus"))

View File

@@ -0,0 +1,17 @@
# armoredCommandStrengthBonus
#
# Used by:
# Skill: Armored Command Specialist
type = "passive"
def handler(fit, src, context):
lvl = src.level
fit.modules.filteredChargeBoost(lambda mod: mod.item.requiresSkill("Armored Command"), "warfareBuff1Multiplier",
src.getModifiedItemAttr("commandStrengthBonus") * lvl)
fit.modules.filteredChargeBoost(lambda mod: mod.item.requiresSkill("Armored Command"), "warfareBuff2Multiplier",
src.getModifiedItemAttr("commandStrengthBonus") * lvl)
fit.modules.filteredChargeBoost(lambda mod: mod.item.requiresSkill("Armored Command"), "warfareBuff4Multiplier",
src.getModifiedItemAttr("commandStrengthBonus") * lvl)
fit.modules.filteredChargeBoost(lambda mod: mod.item.requiresSkill("Armored Command"), "warfareBuff3Multiplier",
src.getModifiedItemAttr("commandStrengthBonus") * lvl)

View File

@@ -1,9 +0,0 @@
# armoredSquadronCommand
#
# Used by:
# Skill: Armored Warfare Specialist
runTime = "early"
type = "passive"
def handler(fit, skill, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Armored Warfare Specialist"),
"commandBonus", skill.getModifiedItemAttr("squadronCommandBonus") * skill.level)

View File

@@ -1,10 +0,0 @@
# armoredWarfareMindlink
#
# Used by:
# Implant: Armored Warfare Mindlink
# Implant: Federation Navy Warfare Mindlink
# Implant: Imperial Navy Warfare Mindlink
type = "passive"
def handler(fit, implant, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Armored Warfare Specialist"),
"commandBonus", implant.getModifiedItemAttr("mindlinkBonus"))

Some files were not shown because too many files have changed in this diff Show More