Compare commits
525 Commits
preview_po
...
v1.19.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9bfb697f1e | ||
|
|
2e227cdbd5 | ||
|
|
fb7c227a10 | ||
|
|
e3742c0420 | ||
|
|
373ccbcee5 | ||
|
|
785060f12b | ||
|
|
4e509bbaee | ||
|
|
7e305aab67 | ||
|
|
55eed0d029 | ||
|
|
c7d5f2533a | ||
|
|
a6cfbcb331 | ||
|
|
45074952fd | ||
|
|
a73d9abc60 | ||
|
|
9fc31d6a55 | ||
|
|
9cb99a1170 | ||
|
|
f3f1d022ef | ||
|
|
253ebdc4e1 | ||
|
|
5d45f1d3f3 | ||
|
|
e253af9763 | ||
|
|
a355a82f8a | ||
|
|
ceb7eb15c3 | ||
|
|
115b154f0b | ||
|
|
2d1344b785 | ||
|
|
bdf793072c | ||
|
|
2f879d39f3 | ||
|
|
36ab224853 | ||
|
|
52d19b8de4 | ||
|
|
7be5ec844f | ||
|
|
3d26a31ee2 | ||
|
|
343d605a84 | ||
|
|
ef1228eb32 | ||
|
|
ad738f7e7c | ||
|
|
4a66fa0138 | ||
|
|
331338e7b9 | ||
|
|
8e28925336 | ||
|
|
df0e829dbe | ||
|
|
0c278b668c | ||
|
|
6e7ba714a8 | ||
|
|
d8e2e3ace1 | ||
|
|
69c3dd188e | ||
|
|
57da36f1cf | ||
|
|
753ba00ac0 | ||
|
|
290f7d116f | ||
|
|
81fa88a36d | ||
|
|
0dd98330aa | ||
|
|
ae55a2c1d2 | ||
|
|
43ae593568 | ||
|
|
81963a6a7d | ||
|
|
fbf67c134b | ||
|
|
a0cfe05eb5 | ||
|
|
ba6e8d7ad1 | ||
|
|
cbd2ed603f | ||
|
|
a2f1623b00 | ||
|
|
87ebcf0818 | ||
|
|
f329c9956e | ||
|
|
2ac62ece06 | ||
|
|
f9db5eb201 | ||
|
|
0a10f2d72a | ||
|
|
4325ccab8a | ||
|
|
04c6fad531 | ||
|
|
ca92285ff3 | ||
|
|
96eee3a173 | ||
|
|
a74c3c9b3d | ||
|
|
b4373cb0c5 | ||
|
|
9029c04ce6 | ||
|
|
c7c0c49218 | ||
|
|
191dd1c71b | ||
|
|
3b64373393 | ||
|
|
0f6c67e852 | ||
|
|
209297769f | ||
|
|
2d4e3a6ddf | ||
|
|
350f4c9f89 | ||
|
|
9c9a6b69fe | ||
|
|
2b9d85a4bc | ||
|
|
f053e45671 | ||
|
|
4d701f561e | ||
|
|
3cb6d03487 | ||
|
|
7dbe6dbe2d | ||
|
|
81f122467a | ||
|
|
20759d205c | ||
|
|
b37aea40a7 | ||
|
|
f95e864119 | ||
|
|
7a9de8cd99 | ||
|
|
dde8b1f802 | ||
|
|
89b756d760 | ||
|
|
3b1edd3283 | ||
|
|
5369b17ebf | ||
|
|
2fadaa890b | ||
|
|
31bdb75c51 | ||
|
|
0124f63d9a | ||
|
|
95dba166eb | ||
|
|
83adadd71f | ||
|
|
4baf65c0c7 | ||
|
|
72cdd3e104 | ||
|
|
febc2eee09 | ||
|
|
b302a0a6e5 | ||
|
|
1f6a14ee36 | ||
|
|
99a15af26e | ||
|
|
dff7a4d6ac | ||
|
|
3c8e6a61f2 | ||
|
|
fb997ab16d | ||
|
|
8fe5f43875 | ||
|
|
c8cfee3511 | ||
|
|
bf0b89f3b5 | ||
|
|
1d295c04e3 | ||
|
|
11ebde87c9 | ||
|
|
88c4de9820 | ||
|
|
09e0a0576c | ||
|
|
fc84c5dc94 | ||
|
|
687ebbc41b | ||
|
|
0abe953a70 | ||
|
|
2a8f3e4855 | ||
|
|
8cd36f3cbf | ||
|
|
5577e1976b | ||
|
|
4b27becb5f | ||
|
|
3c055b78d3 | ||
|
|
eb5ce91cb2 | ||
|
|
ef36dc5ba3 | ||
|
|
d9c710c5a1 | ||
|
|
c436e0e669 | ||
|
|
e80917e3d1 | ||
|
|
0d0ec42daf | ||
|
|
0e4cca6138 | ||
|
|
b701acb275 | ||
|
|
4eb61051c6 | ||
|
|
56aba37758 | ||
|
|
f432b08149 | ||
|
|
3e0b2fd09c | ||
|
|
c7b8d94e4f | ||
|
|
31a9b03436 | ||
|
|
f33f558006 | ||
|
|
bb4fe63a7c | ||
|
|
ccb9e085b2 | ||
|
|
702d249bad | ||
|
|
cc2835a341 | ||
|
|
d73c53cb10 | ||
|
|
73409a3324 | ||
|
|
24f770aa7b | ||
|
|
649b99d7bd | ||
|
|
a8b50032c4 | ||
|
|
d1d276ae68 | ||
|
|
6eafbb0a25 | ||
|
|
aedd7ce2de | ||
|
|
b0511ed856 | ||
|
|
d60b288e0e | ||
|
|
f7d5287087 | ||
|
|
7032baa7ef | ||
|
|
b52cbef26f | ||
|
|
34f699b96a | ||
|
|
5b341dfc06 | ||
|
|
cb0003b942 | ||
|
|
6ee6186280 | ||
|
|
781abeea53 | ||
|
|
6496164d95 | ||
|
|
1ce2921eb7 | ||
|
|
6eb6925606 | ||
|
|
9d7a3605dc | ||
|
|
056e961ccc | ||
|
|
8f08f8efb8 | ||
|
|
167eb60fe3 | ||
|
|
c04b7e0552 | ||
|
|
ff87d5e456 | ||
|
|
c81774a3aa | ||
|
|
a5920a9c9c | ||
|
|
c103e563a9 | ||
|
|
08382db011 | ||
|
|
9929510e53 | ||
|
|
f6cddcc86d | ||
|
|
953a70327a | ||
|
|
6e04c64ffb | ||
|
|
e0f99ee133 | ||
|
|
6ed81e9bae | ||
|
|
69a4e42ab0 | ||
|
|
8151debfe1 | ||
|
|
972df6cad3 | ||
|
|
b1729095a0 | ||
|
|
23dbb59f3f | ||
|
|
9269c54434 | ||
|
|
c4246c0d50 | ||
|
|
d013a41079 | ||
|
|
94995685e9 | ||
|
|
11c3859270 | ||
|
|
1415de9573 | ||
|
|
73de795082 | ||
|
|
bb9760f79c | ||
|
|
53b8ca3940 | ||
|
|
8a9107c798 | ||
|
|
52f06bbd43 | ||
|
|
5246432420 | ||
|
|
8ccdbcc51d | ||
|
|
81c2895c9e | ||
|
|
cbb31c1217 | ||
|
|
6c80d15f1d | ||
|
|
4baa6e9e9f | ||
|
|
2e998bd5a4 | ||
|
|
a33ec89e87 | ||
|
|
ba9232e514 | ||
|
|
f090cafa5c | ||
|
|
a67b46bb9a | ||
|
|
f17fb82ce7 | ||
|
|
3f6c484c99 | ||
|
|
11cf4b356c | ||
|
|
231cdb8399 | ||
|
|
30f077027b | ||
|
|
8a2c4671bf | ||
|
|
35f56b9c32 | ||
|
|
ae3bd9d9d4 | ||
|
|
9465aceddb | ||
|
|
8e353b08ae | ||
|
|
a5f1370eec | ||
|
|
b454ac003b | ||
|
|
17d353e09b | ||
|
|
365cacac66 | ||
|
|
30fef3039c | ||
|
|
6f161b495f | ||
|
|
582e54e758 | ||
|
|
072fac4259 | ||
|
|
4e890e1e1d | ||
|
|
473b70944f | ||
|
|
37b158439d | ||
|
|
2617143330 | ||
|
|
a3b108382e | ||
|
|
e07c162453 | ||
|
|
0f8992432b | ||
|
|
c751544560 | ||
|
|
1d51e86c1c | ||
|
|
05b9d1e607 | ||
|
|
2a88e3114b | ||
|
|
a0f9fb6ad6 | ||
|
|
b844bdf986 | ||
|
|
61614553a2 | ||
|
|
ae870f9535 | ||
|
|
30a8437515 | ||
|
|
8647fa245f | ||
|
|
23bb763c51 | ||
|
|
c158cb076f | ||
|
|
b1ebf8562a | ||
|
|
e9d02ce4c8 | ||
|
|
ec6914d4aa | ||
|
|
474f270b26 | ||
|
|
fb7574e476 | ||
|
|
760b5f3d74 | ||
|
|
51c481206c | ||
|
|
7b6b922c57 | ||
|
|
a08bb2494b | ||
|
|
4affc24ec7 | ||
|
|
d7cb0d536f | ||
|
|
bf9a4b4919 | ||
|
|
3ea4439b8d | ||
|
|
bd53785667 | ||
|
|
f2b4400834 | ||
|
|
b8d01d5ecb | ||
|
|
9ae5cfbab2 | ||
|
|
045031e8ae | ||
|
|
2c7bfd14b6 | ||
|
|
1584586fd2 | ||
|
|
1402ceec63 | ||
|
|
4663270067 | ||
|
|
0b9cdaa944 | ||
|
|
89c011d37e | ||
|
|
c72f049ccd | ||
|
|
ca34217f3b | ||
|
|
3521b3887d | ||
|
|
492776c5a8 | ||
|
|
51a8076d30 | ||
|
|
decf7ff028 | ||
|
|
31b1c94c0f | ||
|
|
a9fc457510 | ||
|
|
7c3c8182a7 | ||
|
|
b162927f79 | ||
|
|
6dbed1403a | ||
|
|
aa5eb7ac92 | ||
|
|
e0fbcc91f1 | ||
|
|
b2dce223b0 | ||
|
|
4b7b22025c | ||
|
|
8e37dab37e | ||
|
|
6e95f69565 | ||
|
|
31331b1e34 | ||
|
|
05b3777ad2 | ||
|
|
cda8dd4c8b | ||
|
|
e7542fec44 | ||
|
|
e7fcdd86ac | ||
|
|
d909e8adc4 | ||
|
|
def20311a8 | ||
|
|
503907e2d8 | ||
|
|
88dc1edfb4 | ||
|
|
cbedf03026 | ||
|
|
a69589dd23 | ||
|
|
2904ab6afa | ||
|
|
c763595cc4 | ||
|
|
8fe97180ed | ||
|
|
6a4b2ffe69 | ||
|
|
7f100353e2 | ||
|
|
97ac0804c5 | ||
|
|
48f96a7a32 | ||
|
|
598512a904 | ||
|
|
121a81ce70 | ||
|
|
a2e031cf27 | ||
|
|
f18ba6160a | ||
|
|
c2ca5dffe8 | ||
|
|
ab7bbcb6ef | ||
|
|
e5e7311748 | ||
|
|
9ba3ca3f5f | ||
|
|
cc59612fa4 | ||
|
|
01db1efdf7 | ||
|
|
e74e2615ad | ||
|
|
2f246d0897 | ||
|
|
505b0ce38f | ||
|
|
8c19a956e0 | ||
|
|
9de3600d7f | ||
|
|
5a4f526b2b | ||
|
|
cd0b0eada0 | ||
|
|
17733d5951 | ||
|
|
0a1f324053 | ||
|
|
e12b3f3054 | ||
|
|
b32f76cfde | ||
|
|
182104a010 | ||
|
|
90c883da67 | ||
|
|
ac08b1b264 | ||
|
|
f17d015ebe | ||
|
|
d496637614 | ||
|
|
4596c526a2 | ||
|
|
9941b6c74b | ||
|
|
b06ce24d4a | ||
|
|
2f8c201ab3 | ||
|
|
d184820728 | ||
|
|
40aeb1ed4a | ||
|
|
71b258a8f5 | ||
|
|
cd7579a4bf | ||
|
|
d6199a58c2 | ||
|
|
3ad5aaac89 | ||
|
|
3bed268d81 | ||
|
|
9a1b0f07c0 | ||
|
|
f591ecba10 | ||
|
|
c571fdc5e6 | ||
|
|
6f944fc7db | ||
|
|
63fce4be17 | ||
|
|
86ee5292d8 | ||
|
|
0060f58e3d | ||
|
|
23b458534f | ||
|
|
2256efacb0 | ||
|
|
28a5318e3b | ||
|
|
609ee13cd6 | ||
|
|
4216904736 | ||
|
|
496e9b56b5 | ||
|
|
b8f73a7c94 | ||
|
|
b4604f8207 | ||
|
|
68dddf2810 | ||
|
|
4c17f38b1a | ||
|
|
221a3fde14 | ||
|
|
c17e03d8d0 | ||
|
|
af9f64db5f | ||
|
|
1f82465a65 | ||
|
|
d885bd4636 | ||
|
|
c17bce55bb | ||
|
|
4137a7cda9 | ||
|
|
c92911b79a | ||
|
|
adc9fb6d00 | ||
|
|
5baf70694a | ||
|
|
f08dc97576 | ||
|
|
35094ae1ce | ||
|
|
5ac31920ee | ||
|
|
e63c3541c4 | ||
|
|
4976516d4d | ||
|
|
e042a21d32 | ||
|
|
8a22907940 | ||
|
|
a97847e644 | ||
|
|
23309a5da6 | ||
|
|
06e4a7e80f | ||
|
|
b95a10d284 | ||
|
|
2bca3ddcc8 | ||
|
|
9ef182aa99 | ||
|
|
5e56107582 | ||
|
|
972c08e7e4 | ||
|
|
091832af21 | ||
|
|
16d1891e16 | ||
|
|
40ee68e2cf | ||
|
|
bfe3b4a26d | ||
|
|
9aa1332b15 | ||
|
|
0521d242eb | ||
|
|
2b3f3773e5 | ||
|
|
4041407878 | ||
|
|
1b5e0467fc | ||
|
|
a7c346f78e | ||
|
|
3cc51aaf89 | ||
|
|
a339ae1c55 | ||
|
|
3773d1c28e | ||
|
|
41b8db346f | ||
|
|
7959593c6c | ||
|
|
aaa60cbc14 | ||
|
|
8ae5a96047 | ||
|
|
8c90b3132b | ||
|
|
1326e21f6b | ||
|
|
bfdc2161e0 | ||
|
|
9ab79af70c | ||
|
|
f0de2000bf | ||
|
|
5991d19b3e | ||
|
|
51fed996f1 | ||
|
|
f6bbc6c410 | ||
|
|
3de6b63325 | ||
|
|
dd48815f30 | ||
|
|
5608676dc8 | ||
|
|
86ab1f7444 | ||
|
|
8f51642f70 | ||
|
|
de71123a48 | ||
|
|
874cf4ef0a | ||
|
|
87e5929cb1 | ||
|
|
84b1e0ac41 | ||
|
|
539360d5f6 | ||
|
|
ca08f8d8da | ||
|
|
e1ce672569 | ||
|
|
717080b58c | ||
|
|
51696c509f | ||
|
|
4a5ae9f6f1 | ||
|
|
fa9f324f78 | ||
|
|
bcc77f11cd | ||
|
|
f737f292e3 | ||
|
|
1c18a5207c | ||
|
|
fa2b1e3821 | ||
|
|
6184753822 | ||
|
|
91a9c860ea | ||
|
|
0730ac369f | ||
|
|
aaa5a6ae18 | ||
|
|
5372f31be8 | ||
|
|
6d01877d78 | ||
|
|
646f3afd27 | ||
|
|
030f22b66f | ||
|
|
98815f2b85 | ||
|
|
a4fe3fe142 | ||
|
|
5b0857e169 | ||
|
|
975a414c5f | ||
|
|
95eb5a6117 | ||
|
|
8a7e69b902 | ||
|
|
dc035469ed | ||
|
|
ec4a00cdfc | ||
|
|
21937c02ff | ||
|
|
edfd446e46 | ||
|
|
7ec78b941e | ||
|
|
95bf1039c0 | ||
|
|
e6def6f5f9 | ||
|
|
de0b03630a | ||
|
|
90a2a79d5b | ||
|
|
21efd6d06a | ||
|
|
ea288a6133 | ||
|
|
da16f6cee7 | ||
|
|
f285395e0f | ||
|
|
b54e3aeaf9 | ||
|
|
23baaa7dba | ||
|
|
8008c986d3 | ||
|
|
b9efc919ea | ||
|
|
6cc6fd9468 | ||
|
|
53c9169043 | ||
|
|
eb2f4991ee | ||
|
|
16017a3c31 | ||
|
|
98d9adef8a | ||
|
|
9e96aac04d | ||
|
|
3395f8ebe6 | ||
|
|
1d45102100 | ||
|
|
1694d74afa | ||
|
|
9c9f1dcefa | ||
|
|
a4ca2e90f9 | ||
|
|
dbfcfd9acf | ||
|
|
8c30ee3fd3 | ||
|
|
ca17d17232 | ||
|
|
b78c0a5845 | ||
|
|
ef6e25bfce | ||
|
|
e81f7eb765 | ||
|
|
26122f6da7 | ||
|
|
e7264108dd | ||
|
|
2bcbb03c10 | ||
|
|
9cf20942f1 | ||
|
|
dbb98e981a | ||
|
|
3ae39b2e7c | ||
|
|
7b43b516c9 | ||
|
|
12d6a2c5de | ||
|
|
26bba49193 | ||
|
|
4e69a2656c | ||
|
|
68d504c79d | ||
|
|
2180b1ac3b | ||
|
|
32712a8798 | ||
|
|
73c7ad55b6 | ||
|
|
a34c5ace5c | ||
|
|
fd77661f41 | ||
|
|
ad07cf25d8 | ||
|
|
4daf1b1ba3 | ||
|
|
4b189ab146 | ||
|
|
64a69e3910 | ||
|
|
9482404ca7 | ||
|
|
124d4fab9b | ||
|
|
722406f636 | ||
|
|
6d4957b148 | ||
|
|
cca7f1112a | ||
|
|
c809a614f9 | ||
|
|
2c366faa66 | ||
|
|
06252d761d | ||
|
|
bb8d5d0d65 | ||
|
|
7606bded40 | ||
|
|
daaf48d02a | ||
|
|
d18cf7b3b0 | ||
|
|
33a0c10650 | ||
|
|
2077655694 | ||
|
|
0dc3cbb7c7 | ||
|
|
a3c19f6f2b | ||
|
|
f97b037011 | ||
|
|
dd3dd799b2 | ||
|
|
ac881ac371 | ||
|
|
d734ccbf0d | ||
|
|
024e0ad4f5 | ||
|
|
545d98883a | ||
|
|
742abc3250 | ||
|
|
294e213ac2 | ||
|
|
557f32ab91 | ||
|
|
e5430cac84 | ||
|
|
39c14b62fd | ||
|
|
cb1de9589e | ||
|
|
370e34cff9 | ||
|
|
e8268633e3 | ||
|
|
3c1bf22e87 | ||
|
|
ff55f2817b | ||
|
|
198ee8d129 | ||
|
|
7db13bd3ba | ||
|
|
5be0d4b70e | ||
|
|
a603a4359a | ||
|
|
b4f4024903 | ||
|
|
df18651b4f |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -13,10 +13,11 @@
|
||||
*.patch
|
||||
|
||||
#Personal
|
||||
saveddata/
|
||||
/saveddata/
|
||||
|
||||
#PyCharm
|
||||
.idea/
|
||||
|
||||
#Pyfa file
|
||||
pyfaFits.html
|
||||
build/
|
||||
|
||||
59
README.md
59
README.md
@@ -1,15 +1,58 @@
|
||||
# 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.
|
||||
[](https://gitter.im/pyfa-org/Pyfa?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
It provides many advanced features such as graphs and full calculations of any possible combination of modules, fits, etc.
|
||||

|
||||
|
||||
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 projects [Releases](https://github.com/DarkFenX/Pyfa/releases) page. pyfa will notify you if you are running an outdated version.
|
||||
|
||||
## Installing
|
||||
Windows and OS X users are supplied self-contained builds of pyfa that can be run without additional software. An `.exe` installer is also available for the Windows builds. There is no self-contained package for Linux users, which are expected to run pyfa through their distributions Python interpreter. However, there are a number of third-party packages available that handle the dependencies and updates for pyfa (for example, [pyfa for Arch Linux](https://aur.archlinux.org/packages/pyfa/)). Please check your distributions repositories.
|
||||
|
||||
### Requirements
|
||||
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` >= 0.6
|
||||
* `dateutil`
|
||||
* `matplotlib` (for some Linux distributions, you may need to install separate wxPython bindings, such as `python-matplotlib-wx`)
|
||||
* `requests`
|
||||
|
||||
### Linux Distro-specific Packages
|
||||
The following is a list of pyfa packages available for certain distros. 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 for instructions)
|
||||
|
||||
## Bug Reporting
|
||||
The preferred method of reporting bugs is through the projects GitHub Issues interface. Alternatively, posting a report in the pyfa thread 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: [http://github.com/DarkFenX/Pyfa](http://github.com/DarkFenX/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:
|
||||
* Kadesh Priestess
|
||||
* GitHub: @DarkFenX
|
||||
* [TweetFleet Slack](https://www.fuzzwork.co.uk/tweetfleet-slack-invites/): @kadesh
|
||||
* Sable Blitzmann
|
||||
* GitHub: @blitzmann
|
||||
* [TweetFleet Slack](https://www.fuzzwork.co.uk/tweetfleet-slack-invites/): @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 Osmium 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, Osmium. CCP is in no way responsible for the content on or functioning of this website, nor can it be liable for any damage arising from the use of this website.
|
||||
|
||||
99
config.py
99
config.py
@@ -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,35 +18,66 @@ debug = False
|
||||
saveInRoot = False
|
||||
|
||||
# Version data
|
||||
version = "1.10.1"
|
||||
tag = "git"
|
||||
expansionName = "Scylla"
|
||||
expansionVersion = "1.0"
|
||||
version = "1.19.0"
|
||||
tag = "Stable"
|
||||
expansionName = "February 2016"
|
||||
expansionVersion = "1.1"
|
||||
evemonMinVersion = "4081"
|
||||
|
||||
# Database version (int ONLY)
|
||||
# Increment every time we need to flag for user database upgrade/modification
|
||||
dbversion = 6
|
||||
|
||||
pyfaPath = None
|
||||
savePath = None
|
||||
staticPath = None
|
||||
saveDB = None
|
||||
gameDB = None
|
||||
|
||||
|
||||
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 getPyfaRoot():
|
||||
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)))
|
||||
root = unicode(root, sys.getfilesystemencoding())
|
||||
return root
|
||||
|
||||
def __createDirs(path):
|
||||
if not os.path.exists(path):
|
||||
os.makedirs(path)
|
||||
|
||||
def defPaths():
|
||||
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 = getPyfaRoot()
|
||||
|
||||
# Where we store the saved fits etc, default is the current users home directory
|
||||
if saveInRoot is True:
|
||||
@@ -54,23 +90,30 @@ def defPaths():
|
||||
savePath = unicode(os.path.expanduser(os.path.join("~", ".pyfa")),
|
||||
sys.getfilesystemencoding())
|
||||
|
||||
# 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():
|
||||
os.environ["REQUESTS_CA_BUNDLE"] = os.path.join(pyfaPath, "cacert.pem")
|
||||
os.environ["SSL_CERT_FILE"] = os.path.join(pyfaPath, "cacert.pem")
|
||||
|
||||
# Static EVE Data from the staticdata repository, should be in the staticdata
|
||||
# directory in our pyfa directory
|
||||
staticPath = os.path.join(pyfaPath, "staticdata")
|
||||
format = '%(asctime)s %(name)-24s %(levelname)-8s %(message)s'
|
||||
logging.basicConfig(format=format, level=logLevel)
|
||||
handler = logging.handlers.RotatingFileHandler(os.path.join(savePath, "log.txt"), maxBytes=1000000, backupCount=3)
|
||||
formatter = logging.Formatter(format)
|
||||
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")
|
||||
@@ -78,7 +121,7 @@ def defPaths():
|
||||
# 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 = os.path.join(pyfaPath, "eve.db")
|
||||
|
||||
## DON'T MODIFY ANYTHING BELOW ##
|
||||
import eos.config
|
||||
|
||||
BIN
dist_assets/mac/pyfa.icns
Normal file
BIN
dist_assets/mac/pyfa.icns
Normal file
Binary file not shown.
BIN
dist_assets/win/pyfa.ico
Normal file
BIN
dist_assets/win/pyfa.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
@@ -59,41 +59,50 @@ class CapSimulator(object):
|
||||
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)
|
||||
|
||||
if self.stagger:
|
||||
duration = int(duration/amount)
|
||||
else:
|
||||
capNeed *= amount
|
||||
|
||||
period = lcm(period, duration)
|
||||
|
||||
# set clipSize to infinite if reloads are disabled unless it's
|
||||
# a cap booster module.
|
||||
if not self.reload and capNeed > 0:
|
||||
clipSize = 0
|
||||
|
||||
# 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)
|
||||
else:
|
||||
stagger_amount = (duration*clipSize+10000)/(amount*clipSize)
|
||||
for i in range(1, amount):
|
||||
heapq.heappush(self.state,
|
||||
[i*stagger_amount, duration,
|
||||
capNeed, 0, clipSize])
|
||||
else:
|
||||
capNeed *= amount
|
||||
|
||||
period = lcm(period, duration)
|
||||
|
||||
# period optimization doesn't work when reloads are active.
|
||||
if clipSize:
|
||||
disable_period = True
|
||||
@@ -160,13 +169,13 @@ 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
|
||||
|
||||
@@ -4,8 +4,8 @@ import sys
|
||||
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_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.
|
||||
path = dirname(unicode(__file__, sys.getfilesystemencoding()))
|
||||
|
||||
@@ -68,14 +68,8 @@ 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
|
||||
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 config.saveddata_connectionstring == "sqlite:///:memory:":
|
||||
|
||||
@@ -1,32 +1,40 @@
|
||||
import config
|
||||
import shutil
|
||||
import time
|
||||
import re
|
||||
import os
|
||||
import migrations
|
||||
|
||||
def getVersion(db):
|
||||
cursor = db.execute('PRAGMA user_version')
|
||||
return cursor.fetchone()[0]
|
||||
|
||||
def update(saveddata_engine):
|
||||
currversion = getVersion(saveddata_engine)
|
||||
def getAppVersion():
|
||||
return migrations.appVersion
|
||||
|
||||
if currversion == config.dbversion:
|
||||
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"%(
|
||||
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:
|
||||
print "applying update",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))
|
||||
|
||||
@@ -7,3 +7,25 @@ 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
|
||||
|
||||
16
eos/db/migrations/upgrade10.py
Normal file
16
eos/db/migrations/upgrade10.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
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")
|
||||
116
eos/db/migrations/upgrade11.py
Normal file
116
eos/db/migrations/upgrade11.py
Normal 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))
|
||||
|
||||
24
eos/db/migrations/upgrade7.py
Normal file
24
eos/db/migrations/upgrade7.py
Normal file
@@ -0,0 +1,24 @@
|
||||
"""
|
||||
Migration 7
|
||||
|
||||
- Converts Scorpion Ishukone Watch to Scorpion
|
||||
|
||||
Mosaic introduced proper skinning system, and Ishukone Scorp
|
||||
was the only ship which was presented as stand-alone ship in
|
||||
Pyfa.
|
||||
"""
|
||||
|
||||
|
||||
CONVERSIONS = {
|
||||
640: ( # Scorpion
|
||||
4005, # Scorpion Ishukone Watch
|
||||
)
|
||||
}
|
||||
|
||||
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))
|
||||
|
||||
85
eos/db/migrations/upgrade8.py
Normal file
85
eos/db/migrations/upgrade8.py
Normal file
@@ -0,0 +1,85 @@
|
||||
"""
|
||||
Migration 8
|
||||
|
||||
- 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
|
||||
"""
|
||||
|
||||
|
||||
CONVERSIONS = {
|
||||
8529: ( # Large F-S9 Regolith Compact Shield Extender
|
||||
8409, # Large Subordinate Screen Stabilizer I
|
||||
),
|
||||
8419: ( # Large Azeotropic Restrained Shield Extender
|
||||
8489, # Large Supplemental Barrier Emitter I
|
||||
),
|
||||
8517: ( # Medium F-S9 Regolith Compact Shield Extender
|
||||
8397, # Medium Subordinate Screen Stabilizer I
|
||||
),
|
||||
8433: ( # Medium Azeotropic Restrained Shield Extender
|
||||
8477, # Medium Supplemental Barrier Emitter I
|
||||
),
|
||||
20627: ( # Small 'Trapper' Shield Extender
|
||||
8437, # Micro Azeotropic Ward Salubrity I
|
||||
8505, # Micro F-S9 Regolith Shield Induction
|
||||
3849, # Micro Shield Extender I
|
||||
3851, # Micro Shield Extender II
|
||||
8387, # Micro Subordinate Screen Stabilizer I
|
||||
8465, # Micro Supplemental Barrier Emitter I
|
||||
),
|
||||
8521: ( # Small F-S9 Regolith Compact Shield Extender
|
||||
8401, # Small Subordinate Screen Stabilizer I
|
||||
),
|
||||
8427: ( # Small Azeotropic Restrained Shield Extender
|
||||
8481, # Small Supplemental Barrier Emitter I
|
||||
),
|
||||
11343: ( # 100mm Crystalline Carbonide Restrained Plates
|
||||
11345, # 100mm Reinforced Nanofiber Plates I
|
||||
),
|
||||
11341: ( # 100mm Rolled Tungsten Compact Plates
|
||||
11339, # 100mm Reinforced Titanium Plates I
|
||||
),
|
||||
11327: ( # 1600mm Crystalline Carbonide Restrained Plates
|
||||
11329, # 1600mm Reinforced Nanofiber Plates I
|
||||
),
|
||||
11325: ( # 1600mm Rolled Tungsten Compact Plates
|
||||
11323, # 1600mm Reinforced Titanium Plates I
|
||||
),
|
||||
11351: ( # 200mm Crystalline Carbonide Restrained Plates
|
||||
11353, # 200mm Reinforced Nanofiber Plates I
|
||||
),
|
||||
11349: ( # 200mm Rolled Tungsten Compact Plates
|
||||
11347, # 200mm Reinforced Titanium Plates I
|
||||
),
|
||||
11311: ( # 400mm Crystalline Carbonide Restrained Plates
|
||||
11313, # 400mm Reinforced Nanofiber Plates I
|
||||
),
|
||||
11309: ( # 400mm Rolled Tungsten Compact Plates
|
||||
11307, # 400mm Reinforced Titanium Plates I
|
||||
),
|
||||
23791: ( # 'Citadella' 100mm Steel Plates
|
||||
11335, # 50mm Reinforced Crystalline Carbonide Plates I
|
||||
11337, # 50mm Reinforced Nanofiber Plates I
|
||||
11333, # 50mm Reinforced Rolled Tungsten Plates I
|
||||
11291, # 50mm Reinforced Steel Plates I
|
||||
20343, # 50mm Reinforced Steel Plates II
|
||||
11331, # 50mm Reinforced Titanium Plates I
|
||||
),
|
||||
11319: ( # 800mm Crystalline Carbonide Restrained Plates
|
||||
11321, # 800mm Reinforced Nanofiber Plates I
|
||||
),
|
||||
11317: ( # 800mm Rolled Tungsten Compact Plates
|
||||
11315, # 800mm Reinforced Titanium Plates 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))
|
||||
|
||||
23
eos/db/migrations/upgrade9.py
Normal file
23
eos/db/migrations/upgrade9.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
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")
|
||||
@@ -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",
|
||||
"fleet",
|
||||
"damagePattern",
|
||||
"miscData",
|
||||
"targetResists",
|
||||
"override",
|
||||
"crest"
|
||||
]
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ boosters_table = Table("boosters", saveddata_meta,
|
||||
Column("itemID", Integer),
|
||||
Column("fitID", Integer, ForeignKey("fits.ID"), nullable = False),
|
||||
Column("active", Boolean),
|
||||
UniqueConstraint("itemID", "fitID"))
|
||||
)
|
||||
|
||||
activeSideEffects_table = Table("boostersActiveSideEffects", saveddata_meta,
|
||||
Column("boosterID", ForeignKey("boosters.ID"), primary_key = True),
|
||||
|
||||
31
eos/db/saveddata/crest.py
Normal file
31
eos/db/saveddata/crest.py
Normal 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, Boolean
|
||||
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)
|
||||
@@ -17,9 +17,11 @@
|
||||
# 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 import *
|
||||
from sqlalchemy.orm import *
|
||||
from sqlalchemy.sql import and_
|
||||
from sqlalchemy.ext.associationproxy import association_proxy
|
||||
from sqlalchemy.orm.collections import attribute_mapped_collection
|
||||
|
||||
from eos.db import saveddata_meta
|
||||
from eos.db.saveddata.module import modules_table
|
||||
@@ -27,9 +29,7 @@ from eos.db.saveddata.drone import drones_table
|
||||
from eos.db.saveddata.cargo import cargo_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.effectHandlerHelpers import *
|
||||
|
||||
fits_table = Table("fits", saveddata_meta,
|
||||
Column("ID", Integer, primary_key = True),
|
||||
@@ -47,31 +47,119 @@ fits_table = Table("fits", saveddata_meta,
|
||||
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))
|
||||
Column("amount", Integer, nullable = False, default = 1),
|
||||
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
|
||||
eos.db.saveddata_session.delete(self.source_fit)
|
||||
eos.db.saveddata_session.flush()
|
||||
eos.db.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))
|
||||
)
|
||||
|
||||
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)
|
||||
)
|
||||
|
||||
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)
|
||||
})
|
||||
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"),
|
||||
"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)),
|
||||
"_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)),
|
||||
"_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'),
|
||||
}
|
||||
)
|
||||
|
||||
mapper(ProjectedFit, projectedFits_table,
|
||||
properties = {
|
||||
"_ProjectedFit__amount": projectedFits_table.c.amount,
|
||||
}
|
||||
)
|
||||
|
||||
31
eos/db/saveddata/override.py
Normal file
31
eos/db/saveddata/override.py
Normal 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)
|
||||
@@ -19,7 +19,8 @@
|
||||
|
||||
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.types import User, Character, Fit, Price, DamagePattern, Fleet, MiscData, Wing, Squad, TargetResists, Override, CrestChar
|
||||
from eos.db.saveddata.fleet import squadmembers_table
|
||||
from eos.db.saveddata.fit import projectedFits_table
|
||||
from sqlalchemy.sql import and_
|
||||
@@ -182,9 +183,15 @@ 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")
|
||||
@@ -244,9 +251,10 @@ 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):
|
||||
@@ -264,7 +272,8 @@ 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():
|
||||
@@ -295,7 +304,8 @@ def countFitsWithShip(shipID, ownerID=None, where=None, eager=None):
|
||||
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):
|
||||
@@ -385,7 +395,8 @@ def searchFits(nameLike, where=None, eager=None):
|
||||
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):
|
||||
@@ -406,6 +417,55 @@ 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)
|
||||
|
||||
@@ -17,8 +17,12 @@
|
||||
# along with eos. If not, see <http://www.gnu.org/licenses/>.
|
||||
#===============================================================================
|
||||
|
||||
#from sqlalchemy.orm.attributes import flag_modified
|
||||
import eos.db
|
||||
import eos.types
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
class HandledList(list):
|
||||
def filteredItemPreAssign(self, filter, *args, **kwargs):
|
||||
@@ -101,6 +105,14 @@ 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 +127,14 @@ 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)
|
||||
|
||||
def insert(self, index, mod):
|
||||
mod.position = index
|
||||
@@ -143,139 +159,82 @@ 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):
|
||||
mod = self[i]
|
||||
if mod.getModifiedItemAttr("subSystemSlot") == slot:
|
||||
del self[i]
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
if thing.isInvalid:
|
||||
self.remove(thing)
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
HandledList.append(self, thing)
|
||||
|
||||
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)
|
||||
|
||||
class HandledProjectedFitList(HandledList):
|
||||
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 HandledItem(object):
|
||||
def preAssignItemAttr(self, *args, **kwargs):
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Missile Launcher Bomb (2 of 2)
|
||||
# Modules from group: Shield Extender (37 of 37)
|
||||
# Modules from group: Shield Extender (25 of 25)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
fit.ship.increaseItemAttr("signatureRadius", module.getModifiedItemAttr("signatureRadiusAdd"))
|
||||
@@ -1,7 +1,7 @@
|
||||
# ammoInfluenceCapNeed
|
||||
#
|
||||
# Used by:
|
||||
# Items from category: Charge (458 of 829)
|
||||
# Items from category: Charge (458 of 833)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
# Dirty hack to work around cap charges setting cap booster
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# ammoInfluenceRange
|
||||
#
|
||||
# Used by:
|
||||
# Items from category: Charge (559 of 829)
|
||||
# Items from category: Charge (559 of 833)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
module.multiplyItemAttr("maxRange", module.getModifiedChargeAttr("weaponRangeMultiplier"))
|
||||
@@ -6,4 +6,4 @@ 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)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# armorHPBonusAdd
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Armor Reinforcer (57 of 57)
|
||||
# Modules from group: Armor Reinforcer (41 of 41)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
fit.ship.increaseItemAttr("armorHP", module.getModifiedItemAttr("armorHPBonusAdd"))
|
||||
@@ -1,7 +1,7 @@
|
||||
# armorReinforcerMassAdd
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Armor Reinforcer (57 of 57)
|
||||
# Modules from group: Armor Reinforcer (41 of 41)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
fit.ship.increaseItemAttr("mass", module.getModifiedItemAttr("massAddition"))
|
||||
11
eos/effects/armorrepairprojectorfalloffbonus.py
Normal file
11
eos/effects/armorrepairprojectorfalloffbonus.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# armorRepairProjectorFalloffBonus
|
||||
#
|
||||
# Used by:
|
||||
# Variations of ship: Navitas (2 of 2)
|
||||
# Ship: Augoror
|
||||
# Ship: Deacon
|
||||
# Ship: Exequror
|
||||
# Ship: Inquisitor
|
||||
type = "passive"
|
||||
def handler(fit, src, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer", "falloffEffectiveness", src.getModifiedItemAttr("falloffBonus"))
|
||||
@@ -1,10 +1,11 @@
|
||||
# armorRepairProjectorMaxRangeBonus
|
||||
#
|
||||
# Used by:
|
||||
# Variations of ship: Navitas (2 of 2)
|
||||
# Ship: Augoror
|
||||
# Ship: Deacon
|
||||
# Ship: Exequror
|
||||
# Ship: Inquisitor
|
||||
# Ship: Navitas
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# armorTankingGang2
|
||||
# armorWarfareArmorHpReplacer
|
||||
#
|
||||
# Used by:
|
||||
# Implant: Armored Warfare Mindlink
|
||||
9
eos/effects/battlecruiserdronespeed.py
Normal file
9
eos/effects/battlecruiserdronespeed.py
Normal file
@@ -0,0 +1,9 @@
|
||||
# battlecruiserDroneSpeed
|
||||
#
|
||||
# Used by:
|
||||
# Ship: Myrmidon
|
||||
# Ship: Prophecy
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Drones"),
|
||||
"maxVelocity", ship.getModifiedItemAttr("roleBonusCBC"))
|
||||
10
eos/effects/battlecruisermetrange.py
Normal file
10
eos/effects/battlecruisermetrange.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# battlecruiserMETRange
|
||||
#
|
||||
# Used by:
|
||||
# Ships named like: Harbinger (2 of 2)
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Medium Energy Turret"),
|
||||
"maxRange", ship.getModifiedItemAttr("roleBonusCBC"))
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Medium Energy Turret"),
|
||||
"falloff", ship.getModifiedItemAttr("roleBonusCBC"))
|
||||
11
eos/effects/battlecruisermhtrange.py
Normal file
11
eos/effects/battlecruisermhtrange.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# battlecruiserMHTRange
|
||||
#
|
||||
# Used by:
|
||||
# Ships named like: Brutix (2 of 2)
|
||||
# Ship: Ferox
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Medium Hybrid Turret"),
|
||||
"maxRange", ship.getModifiedItemAttr("roleBonusCBC"))
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Medium Hybrid Turret"),
|
||||
"falloff", ship.getModifiedItemAttr("roleBonusCBC"))
|
||||
9
eos/effects/battlecruisermissilerange.py
Normal file
9
eos/effects/battlecruisermissilerange.py
Normal file
@@ -0,0 +1,9 @@
|
||||
# battlecruiserMissileRange
|
||||
#
|
||||
# Used by:
|
||||
# Ships named like: Drake (2 of 2)
|
||||
# Ship: Cyclone
|
||||
type = "passive"
|
||||
def handler(fit, skill, context):
|
||||
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"),
|
||||
"maxVelocity", skill.getModifiedItemAttr("roleBonusCBC"))
|
||||
10
eos/effects/battlecruisermptrange.py
Normal file
10
eos/effects/battlecruisermptrange.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# battlecruiserMPTRange
|
||||
#
|
||||
# Used by:
|
||||
# Ships named like: Hurricane (2 of 2)
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Medium Projectile Turret"),
|
||||
"maxRange", ship.getModifiedItemAttr("roleBonusCBC"))
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Medium Projectile Turret"),
|
||||
"falloff", ship.getModifiedItemAttr("roleBonusCBC"))
|
||||
@@ -5,6 +5,5 @@
|
||||
type = "passive"
|
||||
runTime = "early"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Transport Ships").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Cloaking Device",
|
||||
"cpu", ship.getModifiedItemAttr("eliteIndustrialCovertCloakBonus") * level)
|
||||
"cpu", ship.getModifiedItemAttr("eliteIndustrialCovertCloakBonus"), skill="Transport Ships")
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
#
|
||||
# Used by:
|
||||
# Ship: Scorpion
|
||||
# Ship: Scorpion Ishukone Watch
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Caldari Battleship").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "ECM Burst",
|
||||
"ecmBurstRange", ship.getModifiedItemAttr("shipBonusCB3") * level)
|
||||
"ecmBurstRange", ship.getModifiedItemAttr("shipBonusCB3"), skill="Caldari Battleship")
|
||||
|
||||
@@ -6,6 +6,5 @@
|
||||
# Ship: Rook
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Caldari Cruiser").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "ECM",
|
||||
"capacitorNeed", ship.getModifiedItemAttr("shipBonusCC") * level)
|
||||
"capacitorNeed", ship.getModifiedItemAttr("shipBonusCC"), skill="Caldari Cruiser")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# caldariShipEwCapacitorNeedCF2
|
||||
#
|
||||
# Used by:
|
||||
# Variations of ship: Griffin (2 of 2)
|
||||
# Ship: Griffin
|
||||
# Ship: Kitsune
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Caldari Frigate").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "ECM",
|
||||
"capacitorNeed", ship.getModifiedItemAttr("shipBonusCF2") * level)
|
||||
"capacitorNeed", ship.getModifiedItemAttr("shipBonusCF2"), skill="Caldari Frigate")
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
#
|
||||
# Used by:
|
||||
# Ship: Scorpion
|
||||
# Ship: Scorpion Ishukone Watch
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Caldari Battleship").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "ECM",
|
||||
"falloff", ship.getModifiedItemAttr("shipBonusCB3") * level)
|
||||
"falloff", ship.getModifiedItemAttr("shipBonusCB3"), skill="Caldari Battleship")
|
||||
|
||||
@@ -4,6 +4,5 @@
|
||||
# Ship: Blackbird
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Caldari Cruiser").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "ECM",
|
||||
"falloff", ship.getModifiedItemAttr("shipBonusCC2") * level)
|
||||
"falloff", ship.getModifiedItemAttr("shipBonusCC2"), skill="Caldari Cruiser")
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
#
|
||||
# Used by:
|
||||
# Ship: Scorpion
|
||||
# Ship: Scorpion Ishukone Watch
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Caldari Battleship").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "ECM",
|
||||
"maxRange", ship.getModifiedItemAttr("shipBonusCB3") * level)
|
||||
"maxRange", ship.getModifiedItemAttr("shipBonusCB3"), skill="Caldari Battleship")
|
||||
|
||||
@@ -4,6 +4,5 @@
|
||||
# Ship: Blackbird
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Caldari Cruiser").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "ECM",
|
||||
"maxRange", ship.getModifiedItemAttr("shipBonusCC2") * level)
|
||||
"maxRange", ship.getModifiedItemAttr("shipBonusCC2"), skill="Caldari Cruiser")
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
#
|
||||
# Used by:
|
||||
# Ship: Scorpion
|
||||
# Ship: Scorpion Ishukone Watch
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Caldari Battleship").level
|
||||
for sensorType in ("Gravimetric", "Ladar", "Magnetometric", "Radar"):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "ECM",
|
||||
"scan{0}StrengthBonus".format(sensorType),
|
||||
ship.getModifiedItemAttr("shipBonusCB") * level)
|
||||
ship.getModifiedItemAttr("shipBonusCB"), skill="Caldari Battleship")
|
||||
|
||||
@@ -4,10 +4,8 @@
|
||||
# Modules from group: Capacitor Flux Coil (6 of 6)
|
||||
# Modules from group: Capacitor Power Relay (20 of 20)
|
||||
# Modules from group: Power Diagnostic System (23 of 23)
|
||||
# Modules from group: Propulsion Module (107 of 107)
|
||||
# Modules from group: Propulsion Module (114 of 114)
|
||||
# Modules from group: Reactor Control Unit (22 of 22)
|
||||
# Modules from group: Shield Flux Coil (11 of 11)
|
||||
# Modules from group: Shield Power Relay (11 of 11)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
fit.ship.multiplyItemAttr("capacitorCapacity", module.getModifiedItemAttr("capacitorCapacityMultiplier"))
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
# Ship: Archon
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Amarr Carrier").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Remote Armor Repair Systems"),
|
||||
"maxRange", ship.getModifiedItemAttr("carrierAmarrBonus3") * level)
|
||||
"maxRange", ship.getModifiedItemAttr("carrierAmarrBonus3"), skill="Amarr Carrier")
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Capacitor Emission Systems"),
|
||||
"powerTransferRange", ship.getModifiedItemAttr("carrierAmarrBonus3") * level)
|
||||
|
||||
"powerTransferRange", ship.getModifiedItemAttr("carrierAmarrBonus3"), skill="Amarr Carrier")
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# Ship: Archon
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Amarr Carrier").level
|
||||
for resType in ("Em", "Explosive", "Kinetic", "Thermal"):
|
||||
fit.ship.boostItemAttr("armor{0}DamageResonance".format(resType),
|
||||
ship.getModifiedItemAttr("carrierAmarrBonus2") * level)
|
||||
ship.getModifiedItemAttr("carrierAmarrBonus2"), skill="Amarr Carrier")
|
||||
|
||||
8
eos/effects/carrieramarrarmortransferfalloff3.py
Normal file
8
eos/effects/carrieramarrarmortransferfalloff3.py
Normal file
@@ -0,0 +1,8 @@
|
||||
# carrierAmarrArmorTransferFalloff3
|
||||
#
|
||||
# Used by:
|
||||
# Ship: Aeon
|
||||
# Ship: Archon
|
||||
type = "passive"
|
||||
def handler(fit, src, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Remote Armor Repair Systems"), "falloffEffectiveness", src.getModifiedItemAttr("carrierAmarrBonus3"), skill="Amarr Carrier")
|
||||
@@ -5,6 +5,4 @@
|
||||
# Ship: Archon
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Amarr Carrier").level
|
||||
amount = ship.getModifiedItemAttr("carrierAmarrBonus1")
|
||||
fit.extraAttributes.increase("maxActiveDrones", amount * level)
|
||||
fit.extraAttributes.increase("maxActiveDrones", ship.getModifiedItemAttr("carrierAmarrBonus1"), skill="Amarr Carrier")
|
||||
|
||||
@@ -4,6 +4,5 @@
|
||||
# Ship: Revenant
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Amarr Carrier").level
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Fighter Bombers"),
|
||||
"maxVelocity", ship.getModifiedItemAttr("carrierAmarrBonus2") * level)
|
||||
"maxVelocity", ship.getModifiedItemAttr("carrierAmarrBonus2"), skill="Amarr Carrier")
|
||||
|
||||
@@ -4,6 +4,5 @@
|
||||
# Ship: Revenant
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Amarr Carrier").level
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Fighters"),
|
||||
"maxVelocity", ship.getModifiedItemAttr("carrierAmarrBonus2") * level)
|
||||
"maxVelocity", ship.getModifiedItemAttr("carrierAmarrBonus2"), skill="Amarr Carrier")
|
||||
|
||||
@@ -5,6 +5,5 @@
|
||||
# Ship: Revenant
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Amarr Carrier").level
|
||||
fit.modules.filteredItemIncrease(lambda mod: mod.item.group.name == "Gang Coordinator",
|
||||
"maxGroupActive", ship.getModifiedItemAttr("carrierAmarrBonus4") * level)
|
||||
"maxGroupActive", ship.getModifiedItemAttr("carrierAmarrBonus4"), skill="Amarr Carrier")
|
||||
|
||||
@@ -5,6 +5,4 @@
|
||||
# Ship: Wyvern
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Caldari Carrier").level
|
||||
amount = ship.getModifiedItemAttr("carrierCaldariBonus1")
|
||||
fit.extraAttributes.increase("maxActiveDrones", amount * level)
|
||||
fit.extraAttributes.increase("maxActiveDrones", ship.getModifiedItemAttr("carrierCaldariBonus1"), skill="Caldari Carrier")
|
||||
|
||||
@@ -4,6 +4,5 @@
|
||||
# Ship: Revenant
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Caldari Carrier").level
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Fighters") or drone.item.requiresSkill("Fighter Bombers"),
|
||||
"signatureRadius", ship.getModifiedItemAttr("carrierCaldariBonus1") * level)
|
||||
"signatureRadius", ship.getModifiedItemAttr("carrierCaldariBonus1"), skill="Caldari Carrier")
|
||||
|
||||
@@ -4,6 +4,5 @@
|
||||
# Ship: Wyvern
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Caldari Carrier").level
|
||||
fit.modules.filteredItemIncrease(lambda mod: mod.item.group.name == "Gang Coordinator",
|
||||
"maxGroupActive", ship.getModifiedItemAttr("carrierCaldariBonus4") * level)
|
||||
"maxGroupActive", ship.getModifiedItemAttr("carrierCaldariBonus4"), skill="Caldari Carrier")
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
# Ship: Wyvern
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Caldari Carrier").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Shield Emission Systems"),
|
||||
"shieldTransferRange", ship.getModifiedItemAttr("carrierCaldariBonus3") * level)
|
||||
"maxRange", ship.getModifiedItemAttr("carrierCaldariBonus3"), skill="Caldari Carrier")
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Capacitor Emission Systems"),
|
||||
"powerTransferRange", ship.getModifiedItemAttr("carrierCaldariBonus3") * level)
|
||||
"powerTransferRange", ship.getModifiedItemAttr("carrierCaldariBonus3"), skill="Caldari Carrier")
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# Ship: Wyvern
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Caldari Carrier").level
|
||||
for resType in ("Em", "Explosive", "Kinetic", "Thermal"):
|
||||
fit.ship.boostItemAttr("shield{0}DamageResonance".format(resType),
|
||||
ship.getModifiedItemAttr("carrierCaldariBonus2") * level)
|
||||
ship.getModifiedItemAttr("carrierCaldariBonus2"), skill="Caldari Carrier")
|
||||
|
||||
9
eos/effects/carriercaldarishieldtransferfalloff3.py
Normal file
9
eos/effects/carriercaldarishieldtransferfalloff3.py
Normal file
@@ -0,0 +1,9 @@
|
||||
# carrierCaldariShieldTransferFalloff3
|
||||
#
|
||||
# Used by:
|
||||
# Ship: Chimera
|
||||
# Ship: Revenant
|
||||
# Ship: Wyvern
|
||||
type = "passive"
|
||||
def handler(fit, src, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Shield Emission Systems"), "falloffEffectiveness", src.getModifiedItemAttr("carrierCaldariBonus3"), skill="Caldari Carrier")
|
||||
@@ -0,0 +1,8 @@
|
||||
# carrierGallenteArmor&ShieldTransferFalloff3
|
||||
#
|
||||
# Used by:
|
||||
# Ship: Nyx
|
||||
# Ship: Thanatos
|
||||
type = "passive"
|
||||
def handler(fit, src, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Shield Emission Systems") or mod.item.requiresSkill("Capital Remote Armor Repair Systems"), "falloffEffectiveness", src.getModifiedItemAttr("carrierGallenteBonus3"), skill="Gallente Carrier")
|
||||
@@ -5,8 +5,7 @@
|
||||
# Ship: Thanatos
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Gallente Carrier").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Shield Emission Systems"),
|
||||
"shieldTransferRange", ship.getModifiedItemAttr("carrierGallenteBonus3") * level)
|
||||
"maxRange", ship.getModifiedItemAttr("carrierGallenteBonus3"), skill="Gallente Carrier")
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Remote Armor Repair Systems"),
|
||||
"maxRange", ship.getModifiedItemAttr("carrierGallenteBonus3") * level)
|
||||
"maxRange", ship.getModifiedItemAttr("carrierGallenteBonus3"), skill="Gallente Carrier")
|
||||
|
||||
@@ -4,6 +4,5 @@
|
||||
# Ship: Nyx
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Gallente Carrier").level
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Fighter Bombers"),
|
||||
"damageMultiplier", ship.getModifiedItemAttr("carrierGallenteBonus2") * level)
|
||||
"damageMultiplier", ship.getModifiedItemAttr("carrierGallenteBonus2"), skill="Gallente Carrier")
|
||||
|
||||
@@ -5,6 +5,4 @@
|
||||
# Ship: Thanatos
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Gallente Carrier").level
|
||||
amount = ship.getModifiedItemAttr("carrierGallenteBonus1")
|
||||
fit.extraAttributes.increase("maxActiveDrones", amount * level)
|
||||
fit.extraAttributes.increase("maxActiveDrones", ship.getModifiedItemAttr("carrierGallenteBonus1"), skill="Gallente Carrier")
|
||||
|
||||
@@ -5,6 +5,5 @@
|
||||
# Ship: Thanatos
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Gallente Carrier").level
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Fighters"),
|
||||
"damageMultiplier", ship.getModifiedItemAttr("carrierGallenteBonus2") * level)
|
||||
"damageMultiplier", ship.getModifiedItemAttr("carrierGallenteBonus2"), skill="Gallente Carrier")
|
||||
|
||||
@@ -4,6 +4,5 @@
|
||||
# Ship: Nyx
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Gallente Carrier").level
|
||||
fit.modules.filteredItemIncrease(lambda mod: mod.item.group.name == "Gang Coordinator",
|
||||
"maxGroupActive", ship.getModifiedItemAttr("carrierGallenteBonus4") * level)
|
||||
"maxGroupActive", ship.getModifiedItemAttr("carrierGallenteBonus4"), skill="Gallente Carrier")
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
# Ship: Nidhoggur
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Minmatar Carrier").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Shield Booster",
|
||||
"shieldBonus", ship.getModifiedItemAttr("carrierMinmatarBonus2") * level)
|
||||
"shieldBonus", ship.getModifiedItemAttr("carrierMinmatarBonus2"), skill="Minmatar Carrier")
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer",
|
||||
"armorDamageAmount", ship.getModifiedItemAttr("carrierMinmatarBonus2") * level)
|
||||
"armorDamageAmount", ship.getModifiedItemAttr("carrierMinmatarBonus2"), skill="Minmatar Carrier")
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# carrierMinmatarArmor&ShieldTransferFalloff3
|
||||
#
|
||||
# Used by:
|
||||
# Ship: Hel
|
||||
# Ship: Nidhoggur
|
||||
type = "passive"
|
||||
def handler(fit, src, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Shield Emission Systems") or mod.item.requiresSkill("Capital Remote Armor Repair Systems"), "falloffEffectiveness", src.getModifiedItemAttr("carrierMinmatarBonus3"), skill="Minmatar Carrier")
|
||||
@@ -5,8 +5,7 @@
|
||||
# Ship: Nidhoggur
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Minmatar Carrier").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Shield Emission Systems"),
|
||||
"shieldTransferRange", ship.getModifiedItemAttr("carrierMinmatarBonus3") * level)
|
||||
"maxRange", ship.getModifiedItemAttr("carrierMinmatarBonus3"), skill="Minmatar Carrier")
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Remote Armor Repair Systems"),
|
||||
"maxRange", ship.getModifiedItemAttr("carrierMinmatarBonus3") * level)
|
||||
"maxRange", ship.getModifiedItemAttr("carrierMinmatarBonus3"), skill="Minmatar Carrier")
|
||||
|
||||
@@ -5,6 +5,4 @@
|
||||
# Ship: Nidhoggur
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Minmatar Carrier").level
|
||||
amount = ship.getModifiedItemAttr("carrierMinmatarBonus1")
|
||||
fit.extraAttributes.increase("maxActiveDrones", amount * level)
|
||||
fit.extraAttributes.increase("maxActiveDrones", ship.getModifiedItemAttr("carrierMinmatarBonus1"), skill="Minmatar Carrier")
|
||||
|
||||
@@ -4,6 +4,5 @@
|
||||
# Ship: Hel
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Minmatar Carrier").level
|
||||
fit.modules.filteredItemIncrease(lambda mod: mod.item.group.name == "Gang Coordinator",
|
||||
"maxGroupActive", ship.getModifiedItemAttr("carrierMinmatarBonus4") * level)
|
||||
"maxGroupActive", ship.getModifiedItemAttr("carrierMinmatarBonus4"), skill="Minmatar Carrier")
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
gangBonus = "commandBonusECM"
|
||||
gangBoost = "ewarStrECM"
|
||||
type = "active", "gang"
|
||||
runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
for scanType in ("Magnetometric", "Radar", "Ladar", "Gravimetric"):
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
gangBonus = "commandBonusRSD"
|
||||
gangBoost = "ewarStrRSD"
|
||||
type = "active", "gang"
|
||||
runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Sensor Linking"),
|
||||
|
||||
@@ -5,8 +5,18 @@
|
||||
gangBonus = "commandBonusTD"
|
||||
gangBoost = "ewarStrTD"
|
||||
type = "active", "gang"
|
||||
runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
for bonus in ("maxRangeBonus", "falloffBonus", "trackingSpeedBonus"):
|
||||
fit.modules.filteredItemBoost(lambda mod: lambda mod: mod.item.requiresSkill("Weapon Disruption"),
|
||||
for bonus in (
|
||||
"missileVelocityBonus",
|
||||
"explosionDelayBonus",
|
||||
"aoeVelocityBonus",
|
||||
"falloffBonus",
|
||||
"maxRangeBonus",
|
||||
"aoeCloudSizeBonus",
|
||||
"trackingSpeedBonus"
|
||||
):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Weapon Disruption"),
|
||||
bonus, module.getModifiedItemAttr("commandBonusTD"))
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
gangBonus = "commandBonusTP"
|
||||
gangBoost = "ewarStrTP"
|
||||
type = "active", "gang"
|
||||
runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Target Painter",
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Target Painting"),
|
||||
"signatureRadiusBonus", module.getModifiedItemAttr("commandBonusTP"),
|
||||
stackingPenalties = True)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# commandshipMultiRelayEffect
|
||||
#
|
||||
# Used by:
|
||||
# Ships from group: Capital Industrial Ship (2 of 2)
|
||||
# Ships from group: Command Ship (8 of 8)
|
||||
# Ships from group: Industrial Command Ship (2 of 2)
|
||||
# Ship: Orca
|
||||
# Ship: Rorqual
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemIncrease(lambda mod: mod.item.group.name == "Gang Coordinator",
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
# Ships from group: Black Ops (4 of 4)
|
||||
# Ships from group: Blockade Runner (4 of 4)
|
||||
# Ships from group: Covert Ops (5 of 5)
|
||||
# Ships from group: Expedition Frigate (2 of 2)
|
||||
# Ships from group: Force Recon Ship (6 of 6)
|
||||
# Ships from group: Stealth Bomber (4 of 4)
|
||||
# Ships named like: Stratios (2 of 2)
|
||||
# Subsystems named like: Offensive Covert Reconfiguration (4 of 4)
|
||||
# Ship: Astero
|
||||
# Ship: Prospect
|
||||
type = "passive"
|
||||
def handler(fit, container, context):
|
||||
fit.modules.filteredItemForce(lambda mod: mod.item.requiresSkill("Cloaking"),
|
||||
|
||||
@@ -5,6 +5,5 @@
|
||||
type = "passive"
|
||||
runTime = "early"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Covert Ops").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Cloaking Device",
|
||||
"cpu", ship.getModifiedItemAttr("eliteBonusCoverOps1") * level)
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Cloaking"),
|
||||
"cpu", ship.getModifiedItemAttr("eliteBonusCoverOps1"), skill="Covert Ops")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# covertOpsCloakCPUPercentBonusPirateFaction
|
||||
#
|
||||
# Used by:
|
||||
# Ships from group: Expedition Frigate (2 of 2)
|
||||
# Ship: Astero
|
||||
# Ship: Prospect
|
||||
# Ship: Victorieux Luxury Yacht
|
||||
type = "passive"
|
||||
runTime = "early"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# Ships from group: Black Ops (4 of 4)
|
||||
# Ships from group: Stealth Bomber (4 of 4)
|
||||
# Ship: Chremoas
|
||||
# Ship: Endurance
|
||||
# Ship: Etana
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
|
||||
7
eos/effects/crystalminingamountinfo2.py
Normal file
7
eos/effects/crystalminingamountinfo2.py
Normal file
@@ -0,0 +1,7 @@
|
||||
# crystalMiningamountInfo2
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Frequency Mining Laser (3 of 3)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
module.preAssignItemAttr("specialtyMiningAmount", module.getModifiedItemAttr("miningAmount"))
|
||||
@@ -2,7 +2,6 @@
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Rig Drones (64 of 64)
|
||||
# Modules named like: Optimizer (16 of 16)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
fit.ship.boostItemAttr("cpuOutput", module.getModifiedItemAttr("drawback"))
|
||||
@@ -2,6 +2,7 @@
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Rig Shield (72 of 72)
|
||||
# Modules named like: Optimizer (16 of 16)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
fit.ship.boostItemAttr("signatureRadius", module.getModifiedItemAttr("drawback"), stackingPenalties = True)
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# dreadnoughtMD1ProjDmgBonus
|
||||
#
|
||||
# Used by:
|
||||
# Ships named like: Naglfar (2 of 2)
|
||||
# Ship: Naglfar
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Minmatar Dreadnought").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Projectile Turret"),
|
||||
"damageMultiplier", ship.getModifiedItemAttr("dreadnoughtShipBonusM1") * level)
|
||||
"damageMultiplier", ship.getModifiedItemAttr("dreadnoughtShipBonusM1"), skill="Minmatar Dreadnought")
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# dreadnoughtMD3ProjRoFBonus
|
||||
#
|
||||
# Used by:
|
||||
# Ships named like: Naglfar (2 of 2)
|
||||
# Ship: Naglfar
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Minmatar Dreadnought").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Projectile Turret"),
|
||||
"speed", ship.getModifiedItemAttr("dreadnoughtShipBonusM3") * level)
|
||||
"speed", ship.getModifiedItemAttr("dreadnoughtShipBonusM3"), skill="Minmatar Dreadnought")
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# dreadnoughtShipBonusHybridDmgG1
|
||||
#
|
||||
# Used by:
|
||||
# Ships named like: Moros (2 of 2)
|
||||
# Ship: Moros
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Gallente Dreadnought").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Hybrid Turret"),
|
||||
"damageMultiplier", ship.getModifiedItemAttr("dreadnoughtShipBonusG1") * level)
|
||||
"damageMultiplier", ship.getModifiedItemAttr("dreadnoughtShipBonusG1"), skill="Gallente Dreadnought")
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# dreadnoughtShipBonusHybridRoFG2
|
||||
#
|
||||
# Used by:
|
||||
# Ships named like: Moros (2 of 2)
|
||||
# Ship: Moros
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Gallente Dreadnought").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Hybrid Turret"),
|
||||
"speed", ship.getModifiedItemAttr("dreadnoughtShipBonusG2") * level)
|
||||
"speed", ship.getModifiedItemAttr("dreadnoughtShipBonusG2"), skill="Gallente Dreadnought")
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# dreadnoughtShipBonusLaserCapNeedA1
|
||||
#
|
||||
# Used by:
|
||||
# Ships named like: Revelation (2 of 2)
|
||||
# Ship: Revelation
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Amarr Dreadnought").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Energy Turret"),
|
||||
"capacitorNeed", ship.getModifiedItemAttr("dreadnoughtShipBonusA1") * level)
|
||||
"capacitorNeed", ship.getModifiedItemAttr("dreadnoughtShipBonusA1"), skill="Amarr Dreadnought")
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# dreadnoughtShipBonusLaserRofA2
|
||||
#
|
||||
# Used by:
|
||||
# Ships named like: Revelation (2 of 2)
|
||||
# Ship: Revelation
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Amarr Dreadnought").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Energy Turret"),
|
||||
"speed", ship.getModifiedItemAttr("dreadnoughtShipBonusA2") * level)
|
||||
"speed", ship.getModifiedItemAttr("dreadnoughtShipBonusA2"), skill="Amarr Dreadnought")
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
# dreadnoughtShipBonusShieldResistancesC2
|
||||
#
|
||||
# Used by:
|
||||
# Ships named like: Phoenix (2 of 2)
|
||||
# Ship: Phoenix
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Caldari Dreadnought").level
|
||||
for damageType in ("em", "thermal", "explosive", "kinetic"):
|
||||
fit.ship.boostItemAttr("shield{}DamageResonance".format(damageType.capitalize()),
|
||||
ship.getModifiedItemAttr("dreadnoughtShipBonusC2") * level)
|
||||
ship.getModifiedItemAttr("dreadnoughtShipBonusC2"), skill="Caldari Dreadnought")
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# droneArmorDamageBonusEffect
|
||||
#
|
||||
# Used by:
|
||||
# Ships from group: Logistics (5 of 5)
|
||||
# Ship: Exequror
|
||||
# Ship: Guardian
|
||||
# Ship: Oneiros
|
||||
# Ship: Scythe
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# droneDmgBonus
|
||||
#
|
||||
# Used by:
|
||||
# Skills from group: Drones (8 of 21)
|
||||
# Skills from group: Drones (8 of 23)
|
||||
# Skills named like: Drone Specialization (4 of 4)
|
||||
type = "passive"
|
||||
def handler(fit, skill, context):
|
||||
|
||||
9
eos/effects/dronehullrepairbonuseffect.py
Normal file
9
eos/effects/dronehullrepairbonuseffect.py
Normal file
@@ -0,0 +1,9 @@
|
||||
# droneHullRepairBonusEffect
|
||||
#
|
||||
# Used by:
|
||||
# Ships from group: Logistics (5 of 5)
|
||||
# Ship: Exequror
|
||||
# Ship: Scythe
|
||||
type = "passive"
|
||||
def handler(fit, src, context):
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.group.name == "Logistic Drone", "structureDamageAmount", src.getModifiedItemAttr("droneArmorDamageAmountBonus"))
|
||||
@@ -1,7 +1,7 @@
|
||||
# droneShieldBonusBonusEffect
|
||||
#
|
||||
# Used by:
|
||||
# Ships from group: Logistics (3 of 5)
|
||||
# Ships from group: Logistics (5 of 5)
|
||||
# Ship: Exequror
|
||||
# Ship: Scythe
|
||||
type = "passive"
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# eliteBargeBonusIceHarvestingCycleTimeBarge3
|
||||
#
|
||||
# Used by:
|
||||
# Ships from group: Exhumer (4 of 4)
|
||||
# Ships from group: Exhumer (3 of 3)
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Exhumers").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Ice Harvesting"),
|
||||
"duration", ship.getModifiedItemAttr("eliteBonusBarge2") * level)
|
||||
"duration", ship.getModifiedItemAttr("eliteBonusBarge2"), skill="Exhumers")
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# eliteBargeBonusMiningDurationBarge2
|
||||
#
|
||||
# Used by:
|
||||
# Ships from group: Exhumer (4 of 4)
|
||||
# Ships from group: Exhumer (3 of 3)
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Exhumers").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Mining"),
|
||||
"duration", ship.getModifiedItemAttr("eliteBonusBarge2") * level)
|
||||
"duration", ship.getModifiedItemAttr("eliteBonusBarge2"), skill="Exhumers")
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
# eliteBargeShieldResistance1
|
||||
#
|
||||
# Used by:
|
||||
# Ships from group: Exhumer (4 of 4)
|
||||
# Ships from group: Exhumer (3 of 3)
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Exhumers").level
|
||||
for damageType in ("em", "thermal", "explosive", "kinetic"):
|
||||
fit.ship.boostItemAttr("shield{}DamageResonance".format(damageType.capitalize()),
|
||||
ship.getModifiedItemAttr("eliteBonusBarge1") * level)
|
||||
ship.getModifiedItemAttr("eliteBonusBarge1"), skill="Exhumers")
|
||||
|
||||
@@ -4,6 +4,5 @@
|
||||
# Ship: Cambion
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Assault Frigates").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Missile Launcher Light",
|
||||
"speed", ship.getModifiedItemAttr("eliteBonusGunship1") * level)
|
||||
"speed", ship.getModifiedItemAttr("eliteBonusGunship1"), skill="Assault Frigates")
|
||||
|
||||
@@ -4,6 +4,5 @@
|
||||
# Ship: Hawk
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Assault Frigates").level
|
||||
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"),
|
||||
"maxVelocity", ship.getModifiedItemAttr("eliteBonusGunship1") * level)
|
||||
"maxVelocity", ship.getModifiedItemAttr("eliteBonusGunship1"), skill="Assault Frigates")
|
||||
@@ -4,6 +4,5 @@
|
||||
# Ship: Cambion
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
level = fit.character.getSkill("Assault Frigates").level
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Missile Launcher Rocket",
|
||||
"speed", ship.getModifiedItemAttr("eliteBonusGunship1") * level)
|
||||
"speed", ship.getModifiedItemAttr("eliteBonusGunship1"), skill="Assault Frigates")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user