Compare commits
233 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02736ac92d | ||
|
|
2df01c7157 | ||
|
|
01a0745b9b | ||
|
|
c7573ad4c3 | ||
|
|
06f402bb9d | ||
|
|
b9f0812b38 | ||
|
|
cdca8fe236 | ||
|
|
c8175d1191 | ||
|
|
7a7a0f1eff | ||
|
|
5176fe0366 | ||
|
|
b4bd6e7acd | ||
|
|
bd4dbf45af | ||
|
|
d9fc3d436b | ||
|
|
67143cbc0e | ||
|
|
ed3b2eb1bf | ||
|
|
7a5e4291a5 | ||
|
|
d1c6810e1e | ||
|
|
faa9c0a2b9 | ||
|
|
0456973093 | ||
|
|
4a79a4e4d9 | ||
|
|
ac46d33a60 | ||
|
|
0f958bef81 | ||
|
|
b79009517e | ||
|
|
12ccc96f46 | ||
|
|
47828c38d2 | ||
|
|
afdae6a3d6 | ||
|
|
03d1d8f5a4 | ||
|
|
cc4e4c0f13 | ||
|
|
2f6f14fef2 | ||
|
|
fb590ddfdd | ||
|
|
a5e674cdc4 | ||
|
|
e28883dd47 | ||
|
|
b4694dcf03 | ||
|
|
4c05d9a687 | ||
|
|
53da2f9bb2 | ||
|
|
ea106b6064 | ||
|
|
32f671b4f2 | ||
|
|
25e298ff69 | ||
|
|
45006fe043 | ||
|
|
3e1c561752 | ||
|
|
be4b78ee1c | ||
|
|
5a2989cae4 | ||
|
|
15519fd783 | ||
|
|
a357a5b845 | ||
|
|
806b8f135b | ||
|
|
f2b636bd44 | ||
|
|
0d25eca6e5 | ||
|
|
e5dcac43dc | ||
|
|
8629710223 | ||
|
|
111e2cc0de | ||
|
|
8eb0b942c8 | ||
|
|
4c55827aa4 | ||
|
|
0a1be7d966 | ||
|
|
8f3370307a | ||
|
|
dd1545c7e1 | ||
|
|
8ea9bee810 | ||
|
|
6141356754 | ||
|
|
e70ea67fec | ||
|
|
62be4c5bce | ||
|
|
394a9540b0 | ||
|
|
62d22f0e74 | ||
|
|
1cd7b9a250 | ||
|
|
7044534765 | ||
|
|
9c3b50d622 | ||
|
|
fd62c254a4 | ||
|
|
90e54c6334 | ||
|
|
f423c67979 | ||
|
|
4607dd788c | ||
|
|
f9c595473f | ||
|
|
de6c843e1c | ||
|
|
b45924aa52 | ||
|
|
d04ea5b061 | ||
|
|
7406210c4a | ||
|
|
c24986fba3 | ||
|
|
30c1c00b9b | ||
|
|
a089c4cbc2 | ||
|
|
fd700f73e5 | ||
|
|
d71b05095d | ||
|
|
d061a13b58 | ||
|
|
5176cc3b06 | ||
|
|
1e364913cd | ||
|
|
1adc7c77ac | ||
|
|
51fbcce803 | ||
|
|
80dab63119 | ||
|
|
8c769f152b | ||
|
|
3673391f5a | ||
|
|
f96a2e72f7 | ||
|
|
19929ef3ba | ||
|
|
e3a3d287bf | ||
|
|
b2b92b00f3 | ||
|
|
6bd2c19b21 | ||
|
|
eb8e5c5135 | ||
|
|
5a07be40f1 | ||
|
|
13a15a38c5 | ||
|
|
caa10614d9 | ||
|
|
0943b4b097 | ||
|
|
8823baaef4 | ||
|
|
5a5e77414a | ||
|
|
f524591327 | ||
|
|
55ae7c39a4 | ||
|
|
d4e5f8d165 | ||
|
|
b9dad60b61 | ||
|
|
57b9b916ed | ||
|
|
854476db76 | ||
|
|
941c57b4a8 | ||
|
|
fb1c5a760f | ||
|
|
e5367127ea | ||
|
|
ffebd3f311 | ||
|
|
d8fcbd4032 | ||
|
|
583f416373 | ||
|
|
f605b37a1e | ||
|
|
a1d64acff4 | ||
|
|
1fe42f6a79 | ||
|
|
3ce5f69225 | ||
|
|
985107c601 | ||
|
|
d416124081 | ||
|
|
3a62a6c40d | ||
|
|
8f6f55b001 | ||
|
|
6d1ae39bc6 | ||
|
|
850197faa1 | ||
|
|
1aa206bc82 | ||
|
|
5a9cdb67f9 | ||
|
|
c9810cd019 | ||
|
|
8bf75e38ad | ||
|
|
fe9139ae93 | ||
|
|
87a354a314 | ||
|
|
270ac99a1e | ||
|
|
dc5d6a4ef8 | ||
|
|
4cdb36de09 | ||
|
|
7fce1d00d7 | ||
|
|
26c27153f0 | ||
|
|
b5420e9c6a | ||
|
|
cfd82a6ad4 | ||
|
|
7a352b49a0 | ||
|
|
8a4f3b7642 | ||
|
|
a09d4139d5 | ||
|
|
a257ac87f7 | ||
|
|
1669a5434c | ||
|
|
2fc83aa61c | ||
|
|
ed6f00a893 | ||
|
|
b15f9766c1 | ||
|
|
0ad4f07591 | ||
|
|
4704c5a1b0 | ||
|
|
034a9bc3c3 | ||
|
|
e7dc9db75a | ||
|
|
4a2d1b7997 | ||
|
|
a5e2a32fb8 | ||
|
|
43f69bb184 | ||
|
|
71482c2359 | ||
|
|
84a27a60a5 | ||
|
|
87f865ce1f | ||
|
|
12c78b41af | ||
|
|
c3db808b7c | ||
|
|
af9a9c5698 | ||
|
|
a7e6d3e969 | ||
|
|
708425c67a | ||
|
|
021de1af80 | ||
|
|
b66e98f697 | ||
|
|
28ad32aad5 | ||
|
|
94dc3117bc | ||
|
|
803ada4b27 | ||
|
|
e7118f637c | ||
|
|
e11e368c4b | ||
|
|
27a9051822 | ||
|
|
54caece5b3 | ||
|
|
b1fade5d3b | ||
|
|
8ed485df0e | ||
|
|
9c33947a45 | ||
|
|
33dc06055c | ||
|
|
8ff4a99cf3 | ||
|
|
d38abec819 | ||
|
|
0ba48aa230 | ||
|
|
acf47ad7a6 | ||
|
|
c948c62cac | ||
|
|
eee4dbf66c | ||
|
|
653b995774 | ||
|
|
a78151c5aa | ||
|
|
3177713447 | ||
|
|
0769df1e55 | ||
|
|
0cfa7cb28f | ||
|
|
1e621ee133 | ||
|
|
a203799bd2 | ||
|
|
8fc9724204 | ||
|
|
0d41cb96ab | ||
|
|
39b2f87194 | ||
|
|
1161037092 | ||
|
|
a3d9d5cca8 | ||
|
|
4b67411ca6 | ||
|
|
126b807dc7 | ||
|
|
ca81d2d602 | ||
|
|
015c195c9f | ||
|
|
5fd170d480 | ||
|
|
4b167ba9de | ||
|
|
38ac41bccb | ||
|
|
3315d27d45 | ||
|
|
c3dcdb0686 | ||
|
|
ca91f6bd92 | ||
|
|
65483309ab | ||
|
|
71d33f3429 | ||
|
|
9b1c543eb7 | ||
|
|
24bb0ff39a | ||
|
|
3ae312db37 | ||
|
|
94f73241ea | ||
|
|
d4632b9059 | ||
|
|
dd15d52130 | ||
|
|
145f252ca6 | ||
|
|
731b54a1f7 | ||
|
|
f8d7b68289 | ||
|
|
80e47d5157 | ||
|
|
c1653c5f2e | ||
|
|
36ad31ab25 | ||
|
|
6f1872fb94 | ||
|
|
ff56e70b81 | ||
|
|
201263237f | ||
|
|
1ddd37f381 | ||
|
|
f9d2a78c5e | ||
|
|
443c917c6b | ||
|
|
7c787cd13b | ||
|
|
dc8aff6b6c | ||
|
|
397040549f | ||
|
|
0b858d6e94 | ||
|
|
6c8efcda12 | ||
|
|
3fa0aa9242 | ||
|
|
18775286c0 | ||
|
|
57433efe80 | ||
|
|
b5cf835959 | ||
|
|
48b45b5f51 | ||
|
|
7d658c3f3d | ||
|
|
ca34d7cced | ||
|
|
938e2a871d | ||
|
|
dc55dbdf36 | ||
|
|
d0ec17feba | ||
|
|
5b5fdd97d6 |
45
README.md
45
README.md
@@ -9,31 +9,42 @@
|
||||
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.
|
||||
The latest version along with release notes can always be found on the project's [Releases](https://github.com/DarkFenX/Pyfa/releases) page. pyfa will notify you if you are running an outdated version.
|
||||
|
||||
## 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.
|
||||
## Installation
|
||||
Windows and OS X users are supplied self-contained builds of pyfa on the [latest releases](https://github.com/pyfa-org/Pyfa/releases/latest) page. An `.exe` installer is also available for Windows builds. Linux users can run pyfa using their distribution's Python interpreter. There is no official self-contained package for Linux, however, there are a number of third-party packages available through distribution-specific repositories.
|
||||
|
||||
### Requirements
|
||||
#### OS X
|
||||
There are two different distributives for OS X: `-mac` and `-mac-deprecated`.
|
||||
|
||||
* `-mac`: based on wxPython 3.0.2.0 and has updated libraries. This is the recommended build.
|
||||
* `-mac-deprecated`: utilizes older binaries running on wxPython 2.8; because of this, some features are not available (currently CREST support and Attribute Overrides). Additionally, as development happens primarily on wxPython 3.0, a few GUI bugs may pop up as `-mac-deprecated` is not actively tested. However, due to some general issues with wxPython 3.0, especially on some newer OS X versions, `-mac-deprecated` is still offered for those that need it.
|
||||
|
||||
There is also a [Homebrew](http://brew.sh) option for installing pyfa on OS X. Please note this is maintained by a third-party and is not tested by pyfa developers. Simply fire up in terminal:
|
||||
```
|
||||
$ brew cask install pyfa
|
||||
```
|
||||
|
||||
### Linux Distro-specific Packages
|
||||
The following is a list of pyfa packages available for certain distributions. Please note that these packages are maintained by third-parties and are not evaluated by the pyfa developers.
|
||||
|
||||
* Debian/Ubuntu/derivitives: https://github.com/AdamMajer/Pyfa/releases
|
||||
* Arch: https://aur.archlinux.org/packages/pyfa/
|
||||
* openSUSE: https://build.opensuse.org/package/show/home:rmk2/pyfa
|
||||
* FreeBSD: http://www.freshports.org/games/pyfa/ (see [#484](https://github.com/pyfa-org/Pyfa/issues/484) for instructions)
|
||||
|
||||
### Dependencies
|
||||
If you wish to help with development or simply need to run pyfa through a Python interpreter, the following software is required:
|
||||
|
||||
* Python 2.7
|
||||
* `wxPython` 2.8/3.0
|
||||
* `sqlalchemy` >= 0.6
|
||||
* `dateutil`
|
||||
* `matplotlib` (for some Linux distributions, you may need to install separate wxPython bindings, such as `python-matplotlib-wx`)
|
||||
* `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).
|
||||
The preferred method of reporting bugs is through the project's [GitHub Issues interface](https://github.com/pyfa-org/Pyfa/issues). Alternatively, posting a report in the [pyfa thread](http://forums.eveonline.com/default.aspx?g=posts&t=247609) on the official EVE Online forums is acceptable. Guidelines for bug reporting can be found on [this wiki page](https://github.com/DarkFenX/Pyfa/wiki/Bug-Reporting).
|
||||
|
||||
## License
|
||||
pyfa is licensed under the GNU GPL v3.0, see LICENSE
|
||||
@@ -46,13 +57,11 @@ pyfa is licensed under the GNU GPL v3.0, see LICENSE
|
||||
* [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
|
||||
* [Gitter chat](https://gitter.im/pyfa-org/Pyfa): @ blitzmann
|
||||
* Email: sable.blitzmann@gmail.com
|
||||
|
||||
## CCP Copyright Notice
|
||||
EVE Online, the EVE logo, EVE and all associated logos and designs are the intellectual property of CCP hf. All artwork, screenshots, characters, vehicles, storylines, world facts or other recognizable features of the intellectual property relating to these trademarks are likewise the intellectual property of CCP hf. EVE Online and the EVE logo are the registered trademarks of CCP hf. All rights are reserved worldwide. All other trademarks are the property of their respective owners. CCP hf. has granted permission to 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.
|
||||
EVE Online, the EVE logo, EVE and all associated logos and designs are the intellectual property of CCP hf. All artwork, screenshots, characters, vehicles, storylines, world facts or other recognizable features of the intellectual property relating to these trademarks are likewise the intellectual property of CCP hf. EVE Online and the EVE logo are the registered trademarks of CCP hf. All rights are reserved worldwide. All other trademarks are the property of their respective owners. CCP hf. has granted permission to pyfa to use EVE Online and all associated logos and designs for promotional and information purposes on its website but does not endorse, and is not in any way affiliated with, pyfa. CCP is in no way responsible for the content on or functioning of this program, nor can it be liable for any damage arising from the use of this program.
|
||||
|
||||
@@ -18,10 +18,10 @@ debug = False
|
||||
saveInRoot = False
|
||||
|
||||
# Version data
|
||||
version = "1.20.1"
|
||||
version = "1.22.0"
|
||||
tag = "Stable"
|
||||
expansionName = "March 2016"
|
||||
expansionVersion = "1.3"
|
||||
expansionName = "YC 118.6"
|
||||
expansionVersion = "1.0"
|
||||
evemonMinVersion = "4081"
|
||||
|
||||
pyfaPath = None
|
||||
|
||||
@@ -194,7 +194,7 @@ def searchItems(nameLike, where=None, join=None, eager=None):
|
||||
items = gamedata_session.query(Item).options(*processEager(eager)).join(*join)
|
||||
for token in nameLike.split(' '):
|
||||
token_safe = u"%{0}%".format(sqlizeString(token))
|
||||
items = items.filter(processWhere(Item.name.like(token_safe, escape="\\"), where))
|
||||
items = items.filter(and_(Item.name.like(token_safe, escape="\\"), where))
|
||||
items = items.limit(100).all()
|
||||
return items
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@ import time
|
||||
import re
|
||||
import os
|
||||
import migrations
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def getVersion(db):
|
||||
cursor = db.execute('PRAGMA user_version')
|
||||
@@ -30,10 +33,9 @@ def update(saveddata_engine):
|
||||
shutil.copyfile(config.saveDB, toFile)
|
||||
|
||||
for version in xrange(dbVersion, appVersion):
|
||||
|
||||
func = migrations.updates[version+1]
|
||||
if func:
|
||||
print "applying update",version+1
|
||||
logger.info("Applying database update: %d", version+1)
|
||||
func(saveddata_engine)
|
||||
|
||||
# when all is said and done, set version to current
|
||||
|
||||
15
eos/db/migrations/upgrade13.py
Normal file
15
eos/db/migrations/upgrade13.py
Normal file
@@ -0,0 +1,15 @@
|
||||
"""
|
||||
Migration 13
|
||||
|
||||
- Alters fits table to introduce implant location attribute
|
||||
"""
|
||||
|
||||
import sqlalchemy
|
||||
|
||||
def upgrade(saveddata_engine):
|
||||
# Update fits schema to include implant location attribute
|
||||
try:
|
||||
saveddata_engine.execute("SELECT implantLocation FROM fits LIMIT 1")
|
||||
except sqlalchemy.exc.DatabaseError:
|
||||
saveddata_engine.execute("ALTER TABLE fits ADD COLUMN implantLocation INTEGER;")
|
||||
saveddata_engine.execute("UPDATE fits SET implantLocation = 0")
|
||||
19
eos/db/migrations/upgrade14.py
Normal file
19
eos/db/migrations/upgrade14.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""
|
||||
Migration 14
|
||||
|
||||
- This should take care of issue #586.
|
||||
"""
|
||||
|
||||
import sqlalchemy
|
||||
|
||||
def upgrade(saveddata_engine):
|
||||
if saveddata_engine.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='fighters'").scalar() == 'fighters':
|
||||
# Fighters table exists
|
||||
try:
|
||||
saveddata_engine.execute("SELECT active FROM fighters LIMIT 1")
|
||||
except sqlalchemy.exc.DatabaseError:
|
||||
# if we don't have the active column, we are on an old pre-release version. Drop the tables and move on
|
||||
# (they will be recreated)
|
||||
|
||||
saveddata_engine.execute("DROP TABLE fighters")
|
||||
saveddata_engine.execute("DROP TABLE fightersAbilities")
|
||||
@@ -13,6 +13,8 @@ __all__ = [
|
||||
"miscData",
|
||||
"targetResists",
|
||||
"override",
|
||||
"crest"
|
||||
"crest",
|
||||
"implantSet",
|
||||
"loadDefaultDatabaseValues"
|
||||
]
|
||||
|
||||
|
||||
@@ -36,9 +36,23 @@ characters_table = Table("characters", saveddata_meta,
|
||||
Column("ownerID", ForeignKey("users.ID"), nullable = True))
|
||||
|
||||
mapper(Character, characters_table,
|
||||
properties = {"_Character__owner" : relation(User, backref = "characters"),
|
||||
"_Character__skills" : relation(Skill, backref="character", cascade = "all,delete-orphan"),
|
||||
"_Character__implants" : relation(Implant, collection_class = HandledImplantBoosterList, cascade='all,delete-orphan', single_parent=True,
|
||||
primaryjoin = charImplants_table.c.charID == characters_table.c.ID,
|
||||
secondaryjoin = charImplants_table.c.implantID == Implant.ID,
|
||||
secondary = charImplants_table),})
|
||||
properties = {
|
||||
"savedName": characters_table.c.name,
|
||||
"_Character__owner": relation(
|
||||
User,
|
||||
backref = "characters"),
|
||||
"_Character__skills": relation(
|
||||
Skill,
|
||||
backref="character",
|
||||
cascade = "all,delete-orphan"),
|
||||
"_Character__implants": relation(
|
||||
Implant,
|
||||
collection_class = HandledImplantBoosterList,
|
||||
cascade='all,delete-orphan',
|
||||
backref='character',
|
||||
single_parent=True,
|
||||
primaryjoin = charImplants_table.c.charID == characters_table.c.ID,
|
||||
secondaryjoin = charImplants_table.c.implantID == Implant.ID,
|
||||
secondary = charImplants_table),
|
||||
}
|
||||
)
|
||||
|
||||
52
eos/db/saveddata/fighter.py
Normal file
52
eos/db/saveddata/fighter.py
Normal file
@@ -0,0 +1,52 @@
|
||||
#===============================================================================
|
||||
# Copyright (C) 2010 Diego Duclos
|
||||
#
|
||||
# This file is part of eos.
|
||||
#
|
||||
# eos is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# eos is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with eos. If not, see <http://www.gnu.org/licenses/>.
|
||||
#===============================================================================
|
||||
|
||||
from sqlalchemy import Table, Column, Integer, ForeignKey, Boolean
|
||||
from sqlalchemy.orm import mapper
|
||||
from eos.db import saveddata_meta
|
||||
from eos.types import Fighter, Fit
|
||||
from sqlalchemy.orm import *
|
||||
from sqlalchemy.sql import and_
|
||||
from eos.effectHandlerHelpers import *
|
||||
from eos.types import FighterAbility
|
||||
|
||||
|
||||
fighters_table = Table("fighters", saveddata_meta,
|
||||
Column("groupID", Integer, primary_key=True),
|
||||
Column("fitID", Integer, ForeignKey("fits.ID"), nullable = False, index = True),
|
||||
Column("itemID", Integer, nullable = False),
|
||||
Column("active", Boolean, nullable=True),
|
||||
Column("amount", Integer, nullable = False),
|
||||
Column("projected", Boolean, default = False))
|
||||
|
||||
fighter_abilities_table = Table("fightersAbilities", saveddata_meta,
|
||||
Column("groupID", Integer, ForeignKey("fighters.groupID"), primary_key=True, index = True),
|
||||
Column("effectID", Integer, nullable = False, primary_key=True),
|
||||
Column("active", Boolean, default = False))
|
||||
|
||||
mapper(Fighter, fighters_table,
|
||||
properties = {
|
||||
"owner": relation(Fit),
|
||||
"_Fighter__abilities": relation(
|
||||
FighterAbility,
|
||||
backref="fighter",
|
||||
cascade='all, delete, delete-orphan'),
|
||||
})
|
||||
|
||||
mapper(FighterAbility, fighter_abilities_table)
|
||||
@@ -26,9 +26,10 @@ from sqlalchemy.orm.collections import attribute_mapped_collection
|
||||
from eos.db import saveddata_meta
|
||||
from eos.db.saveddata.module import modules_table
|
||||
from eos.db.saveddata.drone import drones_table
|
||||
from eos.db.saveddata.fighter import fighters_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.types import Fit, Module, User, Booster, Drone, Fighter, Cargo, Implant, Character, DamagePattern, TargetResists, ImplantLocation
|
||||
from eos.effectHandlerHelpers import *
|
||||
|
||||
fits_table = Table("fits", saveddata_meta,
|
||||
@@ -42,6 +43,7 @@ fits_table = Table("fits", saveddata_meta,
|
||||
Column("booster", Boolean, nullable = False, index = True, default = 0),
|
||||
Column("targetResistsID", ForeignKey("targetResists.ID"), nullable=True),
|
||||
Column("modeID", Integer, nullable=True),
|
||||
Column("implantLocation", Integer, nullable=False, default=ImplantLocation.FIT),
|
||||
)
|
||||
|
||||
projectedFits_table = Table("projectedFits", saveddata_meta,
|
||||
@@ -117,6 +119,12 @@ mapper(Fit, fits_table,
|
||||
cascade='all, delete, delete-orphan',
|
||||
single_parent=True,
|
||||
primaryjoin=and_(drones_table.c.fitID == fits_table.c.ID, drones_table.c.projected == False)),
|
||||
"_Fit__fighters": relation(
|
||||
Fighter,
|
||||
collection_class=HandledDroneCargoList,
|
||||
cascade='all, delete, delete-orphan',
|
||||
single_parent=True,
|
||||
primaryjoin=and_(fighters_table.c.fitID == fits_table.c.ID, fighters_table.c.projected == False)),
|
||||
"_Fit__cargo": relation(
|
||||
Cargo,
|
||||
collection_class=HandledDroneCargoList,
|
||||
@@ -129,6 +137,12 @@ mapper(Fit, fits_table,
|
||||
cascade='all, delete, delete-orphan',
|
||||
single_parent=True,
|
||||
primaryjoin=and_(drones_table.c.fitID == fits_table.c.ID, drones_table.c.projected == True)),
|
||||
"_Fit__projectedFighters": relation(
|
||||
Fighter,
|
||||
collection_class=HandledProjectedDroneList,
|
||||
cascade='all, delete, delete-orphan',
|
||||
single_parent=True,
|
||||
primaryjoin=and_(fighters_table.c.fitID == fits_table.c.ID, fighters_table.c.projected == True)),
|
||||
"_Fit__implants": relation(
|
||||
Implant,
|
||||
collection_class=HandledImplantBoosterList,
|
||||
|
||||
@@ -36,4 +36,8 @@ charImplants_table = Table("charImplants", saveddata_meta,
|
||||
Column("charID", ForeignKey("characters.ID"), index = True),
|
||||
Column("implantID", ForeignKey("implants.ID"), primary_key = True))
|
||||
|
||||
implantsSetMap_table = Table("implantSetMap", saveddata_meta,
|
||||
Column("setID", ForeignKey("implantSets.ID"), index = True),
|
||||
Column("implantID", ForeignKey("implants.ID"), primary_key = True))
|
||||
|
||||
mapper(Implant, implants_table)
|
||||
|
||||
45
eos/db/saveddata/implantSet.py
Normal file
45
eos/db/saveddata/implantSet.py
Normal file
@@ -0,0 +1,45 @@
|
||||
#===============================================================================
|
||||
# Copyright (C) 2016 Ryan Holmes
|
||||
#
|
||||
# This file is part of eos.
|
||||
#
|
||||
# eos is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# eos is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with eos. If not, see <http://www.gnu.org/licenses/>.
|
||||
#===============================================================================
|
||||
|
||||
from sqlalchemy import Table, Column, Integer, ForeignKey, String
|
||||
from sqlalchemy.orm import relation, mapper
|
||||
|
||||
from eos.db import saveddata_meta
|
||||
from eos.db.saveddata.implant import implantsSetMap_table
|
||||
from eos.types import Implant, ImplantSet
|
||||
from eos.effectHandlerHelpers import HandledImplantBoosterList
|
||||
|
||||
implant_set_table = Table("implantSets", saveddata_meta,
|
||||
Column("ID", Integer, primary_key = True),
|
||||
Column("name", String, nullable = False),
|
||||
)
|
||||
|
||||
mapper(ImplantSet, implant_set_table,
|
||||
properties = {
|
||||
"_ImplantSet__implants": relation(
|
||||
Implant,
|
||||
collection_class = HandledImplantBoosterList,
|
||||
cascade='all, delete, delete-orphan',
|
||||
backref='set',
|
||||
single_parent=True,
|
||||
primaryjoin = implantsSetMap_table.c.setID == implant_set_table.c.ID,
|
||||
secondaryjoin = implantsSetMap_table.c.implantID == Implant.ID,
|
||||
secondary = implantsSetMap_table),
|
||||
}
|
||||
)
|
||||
190
eos/db/saveddata/loadDefaultDatabaseValues.py
Normal file
190
eos/db/saveddata/loadDefaultDatabaseValues.py
Normal file
@@ -0,0 +1,190 @@
|
||||
#===============================================================================
|
||||
# Copyright (C) 2010 Diego Duclos
|
||||
#
|
||||
# This file is part of pyfa.
|
||||
#
|
||||
# pyfa is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# pyfa is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
|
||||
#===============================================================================
|
||||
|
||||
import eos.db
|
||||
import eos.types
|
||||
|
||||
class ImportError(Exception):
|
||||
pass
|
||||
|
||||
class DefaultDatabaseValues():
|
||||
instance = None
|
||||
|
||||
@classmethod
|
||||
def importDamageProfileDefaults(self):
|
||||
damageProfileList = []
|
||||
damageProfileList.append(["Uniform", "25", "25", "25", "25"])
|
||||
damageProfileList.append(["[Generic]EM", "100", "0", "0", "0"])
|
||||
damageProfileList.append(["[Generic]Thermal", "0", "100", "0", "0"])
|
||||
damageProfileList.append(["[Generic]Kinetic", "0", "0", "100", "0"])
|
||||
damageProfileList.append(["[Generic]Explosive", "0", "0", "0", "100"])
|
||||
damageProfileList.append(["[NPC][Asteroid] Blood Raiders", "5067", "4214", "0", "0"])
|
||||
damageProfileList.append(["[Bombs]Concussion Bomb", "0", "0", "6400", "0"])
|
||||
damageProfileList.append(["[Bombs]Electron Bomb", "6400", "0", "0", "0"])
|
||||
damageProfileList.append(["[Bombs]Scorch Bomb", "0", "6400", "0", "0"])
|
||||
damageProfileList.append(["[Bombs]Shrapnel Bomb", "0", "0", "0", "6400"])
|
||||
damageProfileList.append(["[Frequency Crystals][T2] Gleam", "56", "56", "0", "0"])
|
||||
damageProfileList.append(["[Frequency Crystals][T2] Aurora", "40", "24", "0", "0"])
|
||||
damageProfileList.append(["[Frequency Crystals][T2] Scorch", "72", "16", "0", "0"])
|
||||
damageProfileList.append(["[Frequency Crystals][T2] Conflagration", "61.6", "61.6", "0", "0"])
|
||||
damageProfileList.append(["[Frequency Crystals]Gamma", "61.6", "35.2", "0", "0"])
|
||||
damageProfileList.append(["[Frequency Crystals]Infrared", "44", "17.6", "0", "0"])
|
||||
damageProfileList.append(["[Frequency Crystals]Microwave", "35.2", "17.6", "0", "0"])
|
||||
damageProfileList.append(["[Frequency Crystals]Multifrequency", "61.6", "44", "0", "0"])
|
||||
damageProfileList.append(["[Frequency Crystals]Radio", "44", "0", "0", "0"])
|
||||
damageProfileList.append(["[Frequency Crystals]Standard", "44", "26.4", "0", "0"])
|
||||
damageProfileList.append(["[Frequency Crystals]Ultraviolet", "52.8", "26.4", "0", "0"])
|
||||
damageProfileList.append(["[Frequency Crystals]Xray", "52.8", "35.2", "0", "0"])
|
||||
damageProfileList.append(["[Hybrid Charges][T2] Void", "0", "61.6", "61.6", "0"])
|
||||
damageProfileList.append(["[Hybrid Charges][T2] Null", "0", "48", "40", "0"])
|
||||
damageProfileList.append(["[Hybrid Charges][T2] Javelin", "0", "64", "48", "0"])
|
||||
damageProfileList.append(["[Hybrid Charges][T2] Spike", "0", "32", "32", "0"])
|
||||
damageProfileList.append(["[Hybrid Charges]Antimatter", "0", "48", "67.2", "0"])
|
||||
damageProfileList.append(["[Hybrid Charges]Iridium", "0", "28.8", "38.4", "0"])
|
||||
damageProfileList.append(["[Hybrid Charges]Iron", "0", "19.2", "28.8", "0"])
|
||||
damageProfileList.append(["[Hybrid Charges]Lead", "0", "28.8", "48", "0"])
|
||||
damageProfileList.append(["[Hybrid Charges]Plutonium", "0", "48", "57.6", "0"])
|
||||
damageProfileList.append(["[Hybrid Charges]Thorium", "0", "38.4", "48", "0"])
|
||||
damageProfileList.append(["[Hybrid Charges]Tungsten", "0", "19.2", "38.4", "0"])
|
||||
damageProfileList.append(["[Hybrid Charges]Uranium", "0", "38.4", "57.6", "0"])
|
||||
damageProfileList.append(["[Missiles]Mjolnir", "100", "0", "0", "0"])
|
||||
damageProfileList.append(["[Missiles]Inferno", "0", "100", "0", "0"])
|
||||
damageProfileList.append(["[Missiles]Scourge", "0", "0", "100", "0"])
|
||||
damageProfileList.append(["[Missiles]Nova", "0", "0", "0", "100"])
|
||||
damageProfileList.append(["[Missiles][Structure) Standup Missile", "100", "100", "100", "100"])
|
||||
damageProfileList.append(["[Projectile Ammo][T2] Tremor", "0", "0", "24", "40"])
|
||||
damageProfileList.append(["[Projectile Ammo][T2] Quake", "0", "0", "40", "72"])
|
||||
damageProfileList.append(["[Projectile Ammo][T2] Hail", "0", "0", "26.4", "96.8"])
|
||||
damageProfileList.append(["[Projectile Ammo][T2] Barrage", "0", "0", "40", "48"])
|
||||
damageProfileList.append(["[Projectile Ammo]Carbonized Lead", "0", "0", "35.2", "8.8"])
|
||||
damageProfileList.append(["[Projectile Ammo]Depleted Uranium", "0", "26.4", "17.6", "26.4"])
|
||||
damageProfileList.append(["[Projectile Ammo]EMP", "79.2", "0", "8.8", "17.6"])
|
||||
damageProfileList.append(["[Projectile Ammo]Fusion", "0", "0", "17.6", "88"])
|
||||
damageProfileList.append(["[Projectile Ammo]Nuclear", "0", "0", "8.8", "35.2"])
|
||||
damageProfileList.append(["[Projectile Ammo]Phased Plasma", "0", "88", "17.6", "0"])
|
||||
damageProfileList.append(["[Projectile Ammo]Proton", "26.4", "0", "17.6", "0"])
|
||||
damageProfileList.append(["[Projectile Ammo]Titanium Sabot", "0", "0", "52.8", "176"])
|
||||
damageProfileList.append(["[NPC][Burner] Cruor (Blood Raiders)", "90", "90", "0", "0"])
|
||||
damageProfileList.append(["[NPC][Burner] Dramiel (Angel)", "55", "0", "20", "96"])
|
||||
damageProfileList.append(["[NPC][Burner] Daredevil (Serpentis)", "0", "110", "154", "0"])
|
||||
damageProfileList.append(["[NPC][Burner] Succubus (Sanshas Nation)", "135", "30", "0", "0"])
|
||||
damageProfileList.append(["[NPC][Burner] Worm (Guristas)", "0", "0", "228", "0"])
|
||||
damageProfileList.append(["[NPC][Burner] Enyo", "0", "147", "147", "0"])
|
||||
damageProfileList.append(["[NPC][Burner] Hawk", "0", "0", "247", "0"])
|
||||
damageProfileList.append(["[NPC][Burner] Jaguar", "36", "0", "50", "182"])
|
||||
damageProfileList.append(["[NPC][Burner] Vengeance", "232", "0", "0", "0"])
|
||||
damageProfileList.append(["[NPC][Burner] Ashimmu (Blood Raiders)", "260", "100", "0", "0"])
|
||||
damageProfileList.append(["[NPC][Burner] Talos", "0", "413", "413", "0"])
|
||||
damageProfileList.append(["[NPC][Burner] Sentinel", "0", "75", "0", "90"])
|
||||
damageProfileList.append(["[NPC][Asteroid] Angel Cartel", "1838", "562", "2215", "3838"])
|
||||
damageProfileList.append(["[NPC][Deadspace] Angel Cartel", "369", "533", "1395", "3302"])
|
||||
damageProfileList.append(["[NPC][Deadspace] Blood Raiders", "6040", "5052", "10", "15"])
|
||||
damageProfileList.append(["[NPC][Asteroid] Guristas", "0", "1828", "7413", "0"])
|
||||
damageProfileList.append(["[NPC][Deadspace] Guristas", "0", "1531", "9680", "0"])
|
||||
damageProfileList.append(["[NPC][Asteroid] Rogue Drone", "394", "666", "1090", "1687"])
|
||||
damageProfileList.append(["[NPC][Deadspace] Rogue Drone", "276", "1071", "1069", "871"])
|
||||
damageProfileList.append(["[NPC][Asteroid] Sanshas Nation", "5586", "4112", "0", "0"])
|
||||
damageProfileList.append(["[NPC][Deadspace] Sanshas Nation", "3009", "2237", "0", "0"])
|
||||
damageProfileList.append(["[NPC][Asteroid] Serpentis", "0", "5373", "4813", "0"])
|
||||
damageProfileList.append(["[NPC][Deadspace] Serpentis", "0", "3110", "1929", "0"])
|
||||
damageProfileList.append(["[NPC][Mission] Amarr Empire", "4464", "3546", "97", "0"])
|
||||
damageProfileList.append(["[NPC][Mission] Caldari State", "0", "2139", "4867", "0"])
|
||||
damageProfileList.append(["[NPC][Mission] CONCORD", "336", "134", "212", "412"])
|
||||
damageProfileList.append(["[NPC][Mission] Gallente Federation", "9", "3712", "2758", "0"])
|
||||
damageProfileList.append(["[NPC][Mission] Khanid", "612", "483", "43", "6"])
|
||||
damageProfileList.append(["[NPC][Mission] Minmatar Republic", "1024", "388", "1655", "4285"])
|
||||
damageProfileList.append(["[NPC][Mission] Mordus Legion", "25", "262", "625", "0"])
|
||||
damageProfileList.append(["[NPC][Mission] Thukker", "0", "52", "10", "79"])
|
||||
damageProfileList.append(["[NPC][Other] Sleepers", "1472", "1472", "1384", "1384"])
|
||||
damageProfileList.append(["[NPC][Other] Sansha Incursion", "1682", "1347", "3678", "3678"])
|
||||
|
||||
for damageProfileRow in damageProfileList:
|
||||
name, em, therm, kin, exp = damageProfileRow
|
||||
damageProfile = eos.db.getDamagePattern(name)
|
||||
if damageProfile is None:
|
||||
damageProfile = eos.types.DamagePattern(em, therm, kin, exp)
|
||||
damageProfile.name = name
|
||||
eos.db.save(damageProfile)
|
||||
|
||||
@classmethod
|
||||
def importResistProfileDefaults(self):
|
||||
targetResistProfileList = []
|
||||
targetResistProfileList.append(["Uniform (25%)", "0.25", "0.25", "0.25", "0.25"])
|
||||
targetResistProfileList.append(["Uniform (50%)", "0.50", "0.50", "0.50", "0.50"])
|
||||
targetResistProfileList.append(["Uniform (75%)", "0.75", "0.75", "0.75", "0.75"])
|
||||
targetResistProfileList.append(["[T1 Resist]Shield", "0.0", "0.20", "0.40", "0.50"])
|
||||
targetResistProfileList.append(["[T1 Resist]Armor", "0.50", "0.45", "0.25", "0.10"])
|
||||
targetResistProfileList.append(["[T1 Resist]Hull", "0.33", "0.33", "0.33", "0.33"])
|
||||
targetResistProfileList.append(["[T1 Resist]Shield (+T2 DCU)", "0.125", "0.30", "0.475", "0.562"])
|
||||
targetResistProfileList.append(["[T1 Resist]Armor (+T2 DCU)", "0.575", "0.532", "0.363", "0.235"])
|
||||
targetResistProfileList.append(["[T1 Resist]Hull (+T2 DCU)", "0.598", "0.598", "0.598", "0.598"])
|
||||
targetResistProfileList.append(["[NPC][Asteroid] Angel Cartel", "0.54", "0.42", "0.37", "0.32"])
|
||||
targetResistProfileList.append(["[NPC][Asteroid] Blood Raiders", "0.34", "0.39", "0.45", "0.52"])
|
||||
targetResistProfileList.append(["[NPC][Asteroid] Guristas", "0.55", "0.35", "0.3", "0.48"])
|
||||
targetResistProfileList.append(["[NPC][Asteroid] Rogue Drones", "0.35", "0.38", "0.44", "0.49"])
|
||||
targetResistProfileList.append(["[NPC][Asteroid] Sanshas Nation", "0.35", "0.4", "0.47", "0.53"])
|
||||
targetResistProfileList.append(["[NPC][Asteroid] Serpentis", "0.49", "0.38", "0.29", "0.51"])
|
||||
targetResistProfileList.append(["[NPC][Deadspace] Angel Cartel", "0.59", "0.48", "0.4", "0.32"])
|
||||
targetResistProfileList.append(["[NPC][Deadspace] Blood Raiders", "0.31", "0.39", "0.47", "0.56"])
|
||||
targetResistProfileList.append(["[NPC][Deadspace] Guristas", "0.57", "0.39", "0.31", "0.5"])
|
||||
targetResistProfileList.append(["[NPC][Deadspace] Rogue Drones", "0.42", "0.42", "0.47", "0.49"])
|
||||
targetResistProfileList.append(["[NPC][Deadspace] Sanshas Nation", "0.31", "0.39", "0.47", "0.56"])
|
||||
targetResistProfileList.append(["[NPC][Deadspace] Serpentis", "0.49", "0.38", "0.29", "0.56"])
|
||||
targetResistProfileList.append(["[NPC][Mission] Amarr Empire", "0.34", "0.38", "0.42", "0.46"])
|
||||
targetResistProfileList.append(["[NPC][Mission] Caldari State", "0.51", "0.38", "0.3", "0.51"])
|
||||
targetResistProfileList.append(["[NPC][Mission] CONCORD", "0.47", "0.46", "0.47", "0.47"])
|
||||
targetResistProfileList.append(["[NPC][Mission] Gallente Federation", "0.51", "0.38", "0.31", "0.52"])
|
||||
targetResistProfileList.append(["[NPC][Mission] Khanid", "0.51", "0.42", "0.36", "0.4"])
|
||||
targetResistProfileList.append(["[NPC][Mission] Minmatar Republic", "0.51", "0.46", "0.41", "0.35"])
|
||||
targetResistProfileList.append(["[NPC][Mission] Mordus Legion", "0.32", "0.48", "0.4", "0.62"])
|
||||
targetResistProfileList.append(["[NPC][Other] Sleeper", "0.61", "0.61", "0.61", "0.61"])
|
||||
targetResistProfileList.append(["[NPC][Other] Sansha Incursion", "0.65", "0.63", "0.64", "0.65"])
|
||||
targetResistProfileList.append(["[NPC][Burner] Cruor (Blood Raiders)", "0.8", "0.73", "0.69", "0.67"])
|
||||
targetResistProfileList.append(["[NPC][Burner] Dramiel (Angel)", "0.35", "0.48", "0.61", "0.68"])
|
||||
targetResistProfileList.append(["[NPC][Burner] Daredevil (Serpentis)", "0.69", "0.59", "0.59", "0.43"])
|
||||
targetResistProfileList.append(["[NPC][Burner] Succubus (Sanshas Nation)", "0.35", "0.48", "0.61", "0.68"])
|
||||
targetResistProfileList.append(["[NPC][Burner] Worm (Guristas)", "0.48", "0.58", "0.69", "0.74"])
|
||||
targetResistProfileList.append(["[NPC][Burner] Enyo", "0.58", "0.72", "0.86", "0.24"])
|
||||
targetResistProfileList.append(["[NPC][Burner] Hawk", "0.3", "0.86", "0.79", "0.65"])
|
||||
targetResistProfileList.append(["[NPC][Burner] Jaguar", "0.78", "0.65", "0.48", "0.56"])
|
||||
targetResistProfileList.append(["[NPC][Burner] Vengeance", "0.66", "0.56", "0.75", "0.86"])
|
||||
targetResistProfileList.append(["[NPC][Burner] Ashimmu (Blood Raiders)", "0.8", "0.76", "0.68", "0.7"])
|
||||
targetResistProfileList.append(["[NPC][Burner] Talos", "0.68", "0.59", "0.59", "0.43"])
|
||||
targetResistProfileList.append(["[NPC][Burner] Sentinel", "0.58", "0.45", "0.52", "0.66"])
|
||||
|
||||
for targetResistProfileRow in targetResistProfileList:
|
||||
name, em, therm, kin, exp = targetResistProfileRow
|
||||
resistsProfile = eos.db.eos.db.getTargetResists(name)
|
||||
if resistsProfile is None:
|
||||
resistsProfile = eos.types.TargetResists(em, therm, kin, exp)
|
||||
resistsProfile.name = name
|
||||
eos.db.save(resistsProfile)
|
||||
|
||||
@classmethod
|
||||
def importRequiredDefaults(self):
|
||||
damageProfileList = []
|
||||
damageProfileList.append(["Uniform", "25", "25", "25", "25"])
|
||||
|
||||
for damageProfileRow in damageProfileList:
|
||||
name, em, therm, kin, exp = damageProfileRow
|
||||
damageProfile = eos.db.getDamagePattern(name)
|
||||
if damageProfile is None:
|
||||
damageProfile = eos.types.DamagePattern(em, therm, kin, exp)
|
||||
damageProfile.name = name
|
||||
eos.db.save(damageProfile)
|
||||
@@ -20,7 +20,7 @@
|
||||
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, Override, CrestChar
|
||||
from eos.types import *
|
||||
from eos.db.saveddata.fleet import squadmembers_table
|
||||
from eos.db.saveddata.fit import projectedFits_table
|
||||
from sqlalchemy.sql import and_
|
||||
@@ -154,7 +154,7 @@ def getCharacter(lookfor, eager=None):
|
||||
elif isinstance(lookfor, basestring):
|
||||
eager = processEager(eager)
|
||||
with sd_lock:
|
||||
character = saveddata_session.query(Character).options(*eager).filter(Character.name == lookfor).first()
|
||||
character = saveddata_session.query(Character).options(*eager).filter(Character.savedName == lookfor).first()
|
||||
else:
|
||||
raise TypeError("Need integer or string as argument")
|
||||
return character
|
||||
@@ -349,6 +349,12 @@ def getTargetResistsList(eager=None):
|
||||
patterns = saveddata_session.query(TargetResists).options(*eager).all()
|
||||
return patterns
|
||||
|
||||
def getImplantSetList(eager=None):
|
||||
eager = processEager(eager)
|
||||
with sd_lock:
|
||||
sets = saveddata_session.query(ImplantSet).options(*eager).all()
|
||||
return sets
|
||||
|
||||
@cachedQuery(DamagePattern, 1, "lookfor")
|
||||
def getDamagePattern(lookfor, eager=None):
|
||||
if isinstance(lookfor, int):
|
||||
@@ -385,6 +391,24 @@ def getTargetResists(lookfor, eager=None):
|
||||
raise TypeError("Need integer or string as argument")
|
||||
return pattern
|
||||
|
||||
@cachedQuery(ImplantSet, 1, "lookfor")
|
||||
def getImplantSet(lookfor, eager=None):
|
||||
if isinstance(lookfor, int):
|
||||
if eager is None:
|
||||
with sd_lock:
|
||||
pattern = saveddata_session.query(ImplantSet).get(lookfor)
|
||||
else:
|
||||
eager = processEager(eager)
|
||||
with sd_lock:
|
||||
pattern = saveddata_session.query(ImplantSet).options(*eager).filter(TargetResists.ID == lookfor).first()
|
||||
elif isinstance(lookfor, basestring):
|
||||
eager = processEager(eager)
|
||||
with sd_lock:
|
||||
pattern = saveddata_session.query(ImplantSet).options(*eager).filter(TargetResists.name == lookfor).first()
|
||||
else:
|
||||
raise TypeError("Improper argument")
|
||||
return pattern
|
||||
|
||||
def searchFits(nameLike, where=None, eager=None):
|
||||
if not isinstance(nameLike, basestring):
|
||||
raise TypeError("Need string as argument")
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#===============================================================================
|
||||
|
||||
from sqlalchemy.orm import eagerload
|
||||
from sqlalchemy.sql import and_
|
||||
from sqlalchemy.sql import and_, or_
|
||||
|
||||
replace = {"attributes": "_Item__attributes",
|
||||
"modules": "_Fit__modules",
|
||||
|
||||
@@ -131,14 +131,15 @@ class HandledModuleList(HandledList):
|
||||
self.remove(mod)
|
||||
return
|
||||
|
||||
# fix for #529, where a module may be in incorrect state after CCP changes mechanics of module
|
||||
if not mod.isValidState(mod.state):
|
||||
mod.state = eos.types.State.ONLINE
|
||||
|
||||
mod.position = len(self)
|
||||
HandledList.append(self, mod)
|
||||
if mod.isInvalid:
|
||||
self.remove(mod)
|
||||
return
|
||||
|
||||
# fix for #529, where a module may be in incorrect state after CCP changes mechanics of module
|
||||
if not mod.isValidState(mod.state):
|
||||
mod.state = eos.types.State.ONLINE
|
||||
|
||||
def insert(self, index, mod):
|
||||
mod.position = index
|
||||
|
||||
@@ -6,5 +6,13 @@ type = "active"
|
||||
def handler(fit, module, context):
|
||||
for type in ("kinetic", "thermal", "explosive", "em"):
|
||||
attr = "armor%sDamageResonance" % type.capitalize()
|
||||
|
||||
#Adjust RAH to match the current damage pattern
|
||||
damagePattern = fit.damagePattern
|
||||
attrDamagePattern = "%sAmount" % type
|
||||
damagePatternModifier = getattr(damagePattern,attrDamagePattern)/float(sum((damagePattern.emAmount,damagePattern.thermalAmount,damagePattern.kineticAmount,damagePattern.explosiveAmount)))
|
||||
modifiedResistModifier = (1-(((1-module.getModifiedItemAttr(attr))*4)*(damagePatternModifier)))
|
||||
module.forceItemAttr(attr, modifiedResistModifier)
|
||||
|
||||
fit.ship.multiplyItemAttr(attr, module.getModifiedItemAttr(attr),
|
||||
stackingPenalties=True, penaltyGroup="preMul")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Missile Launcher Bomb (2 of 2)
|
||||
# Modules from group: Shield Extender (25 of 25)
|
||||
# Modules from group: Shield Extender (33 of 33)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
fit.ship.increaseItemAttr("signatureRadius", module.getModifiedItemAttr("signatureRadiusAdd"))
|
||||
@@ -4,5 +4,5 @@
|
||||
# Skill: Advanced Drone Interfacing
|
||||
type = "passive"
|
||||
def handler(fit, skill, context):
|
||||
fit.modules.filteredItemIncrease(lambda mod: mod.item.group.name == "Drone Control Unit",
|
||||
fit.modules.filteredItemIncrease(lambda mod: mod.item.group.name == "Fighter Support Unit",
|
||||
"maxGroupActive", skill.level)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# ammoFallofMultiplier
|
||||
#
|
||||
# Used by:
|
||||
# Charges from group: Advanced Artillery Ammo (6 of 6)
|
||||
# Charges from group: Advanced Autocannon Ammo (6 of 6)
|
||||
# Charges from group: Advanced Beam Laser Crystal (6 of 6)
|
||||
# Charges from group: Advanced Blaster Charge (6 of 6)
|
||||
# Charges from group: Advanced Pulse Laser Crystal (6 of 6)
|
||||
# Charges from group: Advanced Railgun Charge (6 of 6)
|
||||
# Charges from group: Advanced Artillery Ammo (8 of 8)
|
||||
# Charges from group: Advanced Autocannon Ammo (8 of 8)
|
||||
# Charges from group: Advanced Beam Laser Crystal (8 of 8)
|
||||
# Charges from group: Advanced Blaster Charge (8 of 8)
|
||||
# Charges from group: Advanced Pulse Laser Crystal (8 of 8)
|
||||
# Charges from group: Advanced Railgun Charge (8 of 8)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
module.multiplyItemAttr("falloff", module.getModifiedChargeAttr("fallofMultiplier") or 1)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# ammoInfluenceCapNeed
|
||||
#
|
||||
# Used by:
|
||||
# Items from category: Charge (458 of 851)
|
||||
# Items from category: Charge (465 of 884)
|
||||
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 851)
|
||||
# Items from category: Charge (571 of 884)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
module.multiplyItemAttr("maxRange", module.getModifiedChargeAttr("weaponRangeMultiplier"))
|
||||
@@ -1,12 +1,12 @@
|
||||
# ammoTrackingMultiplier
|
||||
#
|
||||
# Used by:
|
||||
# Charges from group: Advanced Artillery Ammo (6 of 6)
|
||||
# Charges from group: Advanced Autocannon Ammo (6 of 6)
|
||||
# Charges from group: Advanced Beam Laser Crystal (6 of 6)
|
||||
# Charges from group: Advanced Blaster Charge (6 of 6)
|
||||
# Charges from group: Advanced Pulse Laser Crystal (6 of 6)
|
||||
# Charges from group: Advanced Railgun Charge (6 of 6)
|
||||
# Charges from group: Advanced Artillery Ammo (8 of 8)
|
||||
# Charges from group: Advanced Autocannon Ammo (8 of 8)
|
||||
# Charges from group: Advanced Beam Laser Crystal (8 of 8)
|
||||
# Charges from group: Advanced Blaster Charge (8 of 8)
|
||||
# Charges from group: Advanced Pulse Laser Crystal (8 of 8)
|
||||
# Charges from group: Advanced Railgun Charge (8 of 8)
|
||||
# Charges from group: Projectile Ammo (129 of 129)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
runTime = "early"
|
||||
type = "passive"
|
||||
def handler(fit, implant, context):
|
||||
fit.implants.filteredItemMultiply(
|
||||
fit.appliedImplants.filteredItemMultiply(
|
||||
lambda implant: "signatureRadiusBonus" in implant.itemModifiedAttributes and "implantSetAngel" in implant.itemModifiedAttributes,
|
||||
"signatureRadiusBonus",
|
||||
implant.getModifiedItemAttr("implantSetAngel"))
|
||||
@@ -1,7 +1,7 @@
|
||||
# armorHPBonusAdd
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Armor Reinforcer (41 of 41)
|
||||
# Modules from group: Armor Reinforcer (48 of 48)
|
||||
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 (41 of 41)
|
||||
# Modules from group: Armor Reinforcer (48 of 48)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
fit.ship.increaseItemAttr("mass", module.getModifiedItemAttr("massAddition"))
|
||||
@@ -1,7 +1,7 @@
|
||||
# armorRepair
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Armor Repair Unit (100 of 100)
|
||||
# Modules from group: Armor Repair Unit (105 of 105)
|
||||
runTime = "late"
|
||||
type = "active"
|
||||
def handler(fit, module, context):
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
runTime = "early"
|
||||
type = "passive"
|
||||
def handler(fit, implant, context):
|
||||
fit.implants.filteredItemMultiply(lambda target: target.item.requiresSkill("Cybernetics"),
|
||||
fit.appliedImplants.filteredItemMultiply(lambda target: target.item.requiresSkill("Cybernetics"),
|
||||
"scanGravimetricStrengthPercent", implant.getModifiedItemAttr("implantSetCaldariNavy"))
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
runTime = "early"
|
||||
type = "passive"
|
||||
def handler(fit, implant, context):
|
||||
fit.implants.filteredItemMultiply(lambda target: target.item.requiresSkill("Cybernetics"),
|
||||
fit.appliedImplants.filteredItemMultiply(lambda target: target.item.requiresSkill("Cybernetics"),
|
||||
"scanGravimetricStrengthModifier", implant.getModifiedItemAttr("implantSetLGCaldariNavy"))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# capacitorCapacityBonus
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Capacitor Battery (22 of 22)
|
||||
# Modules from group: Capacitor Battery (27 of 27)
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
fit.ship.increaseItemAttr("capacitorCapacity", ship.getModifiedItemAttr("capacitorBonus"))
|
||||
@@ -4,7 +4,7 @@
|
||||
# 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 (114 of 114)
|
||||
# Modules from group: Propulsion Module (127 of 127)
|
||||
# Modules from group: Reactor Control Unit (22 of 22)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# capitalLauncherSkillCruiseCitadelEmDamage1
|
||||
# capitalLauncherSkillCruiseCitadelEmDamage1
|
||||
#
|
||||
# Used by:
|
||||
# Skill: XL Cruise Missiles
|
||||
|
||||
@@ -8,4 +8,4 @@ def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Remote Armor Repair Systems"),
|
||||
"maxRange", ship.getModifiedItemAttr("carrierAmarrBonus3"), skill="Amarr Carrier")
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Capacitor Emission Systems"),
|
||||
"powerTransferRange", ship.getModifiedItemAttr("carrierAmarrBonus3"), skill="Amarr Carrier")
|
||||
"maxRange", ship.getModifiedItemAttr("carrierAmarrBonus3"), skill="Amarr Carrier")
|
||||
|
||||
@@ -9,4 +9,4 @@ def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Shield Emission Systems"),
|
||||
"maxRange", ship.getModifiedItemAttr("carrierCaldariBonus3"), skill="Caldari Carrier")
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Capacitor Emission Systems"),
|
||||
"powerTransferRange", ship.getModifiedItemAttr("carrierCaldariBonus3"), skill="Caldari Carrier")
|
||||
"maxRange", ship.getModifiedItemAttr("carrierCaldariBonus3"), skill="Caldari Carrier")
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
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,8 +5,6 @@
|
||||
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,6 @@
|
||||
gangBonus = "commandBonusTD"
|
||||
gangBoost = "ewarStrTD"
|
||||
type = "active", "gang"
|
||||
runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
for bonus in (
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
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.requiresSkill("Target Painting"),
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# damageControl
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Damage Control (17 of 17)
|
||||
# Variations of module: Damage Control I (16 of 16)
|
||||
# Module: Civilian Damage Control
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
for layer, attrPrefix in (('shield', 'shield'), ('armor', 'armor'), ('hull', '')):
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# decreaseTargetSpeed
|
||||
#
|
||||
# Used by:
|
||||
# Drones from group: Stasis Webifying Drone (3 of 3)
|
||||
# Not used by any item
|
||||
type = "active", "projected"
|
||||
def handler(fit, module, context):
|
||||
if "projected" not in context:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# drawbackCPUOutput
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Rig Drones (64 of 64)
|
||||
# Modules from group: Rig Drones (58 of 64)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
fit.ship.boostItemAttr("cpuOutput", module.getModifiedItemAttr("drawback"))
|
||||
@@ -1,7 +1,4 @@
|
||||
# droneDamageBonusRequringDrones
|
||||
#
|
||||
# Used by:
|
||||
# Skill: Drone Interfacing
|
||||
# Not used by any item
|
||||
type = "passive"
|
||||
def handler(fit, skill, context):
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Drones"),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# droneDurabilityArmorHPBonus
|
||||
#
|
||||
# Used by:
|
||||
# Modules named like: Drone Durability Enhancer (8 of 8)
|
||||
# Modules named like: Drone Durability Enhancer (6 of 8)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Drones"),
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
# droneDurabilityHPBonus
|
||||
#
|
||||
# Used by:
|
||||
# Modules named like: Drone Durability Enhancer (8 of 8)
|
||||
# Skill: Drone Durability
|
||||
# Modules named like: Drone Durability Enhancer (6 of 8)
|
||||
type = "passive"
|
||||
def handler(fit, container, context):
|
||||
level = container.level if "skill" in context else 1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# droneDurabilityShieldCapBonus
|
||||
#
|
||||
# Used by:
|
||||
# Modules named like: Drone Durability Enhancer (8 of 8)
|
||||
# Modules named like: Drone Durability Enhancer (6 of 8)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Drones"),
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
# droneMaxRangeBonus
|
||||
#
|
||||
# Used by:
|
||||
# Modules named like: Drone Scope Chip (8 of 8)
|
||||
# Skill: Drone Sharpshooting
|
||||
# Modules named like: Drone Scope Chip (6 of 8)
|
||||
type = "passive"
|
||||
def handler(fit, container, context):
|
||||
level = container.level if "skill" in context else 1
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
# droneMaxVelocityBonus
|
||||
#
|
||||
# Used by:
|
||||
# Modules named like: Drone Speed Augmentor (8 of 8)
|
||||
# Skill: Drone Navigation
|
||||
# Modules named like: Drone Speed Augmentor (6 of 8)
|
||||
type = "passive"
|
||||
def handler(fit, container, context):
|
||||
level = container.level if "skill" in context else 1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# eliteBonusCommandDestroyerMJFGspool2
|
||||
#
|
||||
# Used by:
|
||||
# Ships from group: Command Destroyers (4 of 4)
|
||||
# Ships from group: Command Destroyer (4 of 4)
|
||||
type = "passive"
|
||||
def handler(fit, src, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Micro Jump Drive Operation"), "duration", src.getModifiedItemAttr("eliteBonusCommandDestroyer2"), skill="Command Destroyers")
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# eliteBonusCommandDestroyerMWDSigRadius3
|
||||
#
|
||||
# Used by:
|
||||
# Ships from group: Command Destroyers (4 of 4)
|
||||
# Not used by any item
|
||||
type = "passive"
|
||||
def handler(fit, src, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("High Speed Maneuvering"), "signatureRadiusBonus", src.getModifiedItemAttr("eliteBonusCommandDestroyer3"), skill="Command Destroyers")
|
||||
|
||||
@@ -3,6 +3,5 @@
|
||||
# Used by:
|
||||
# Ship: Oneiros
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer",
|
||||
"capacitorNeed", ship.getModifiedItemAttr("eliteBonusLogistics1"), skill="Logistics Cruisers")
|
||||
def handler(fit, src, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "capacitorNeed", src.getModifiedItemAttr("eliteBonusLogistics1"), skill="Logistics Cruisers")
|
||||
|
||||
@@ -3,6 +3,5 @@
|
||||
# Used by:
|
||||
# Ship: Guardian
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer",
|
||||
"capacitorNeed", ship.getModifiedItemAttr("eliteBonusLogistics2"), skill="Logistics Cruisers")
|
||||
def handler(fit, src, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "capacitorNeed", src.getModifiedItemAttr("eliteBonusLogistics2"), skill="Logistics Cruisers")
|
||||
|
||||
@@ -4,6 +4,5 @@
|
||||
# Ship: Basilisk
|
||||
# Ship: Etana
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Shield Booster",
|
||||
"capacitorNeed", ship.getModifiedItemAttr("eliteBonusLogistics1"), skill="Logistics Cruisers")
|
||||
def handler(fit, src, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Emission Systems"), "capacitorNeed", src.getModifiedItemAttr("eliteBonusLogistics1"), skill="Logistics Cruisers")
|
||||
|
||||
@@ -3,6 +3,5 @@
|
||||
# Used by:
|
||||
# Ship: Scimitar
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Shield Booster",
|
||||
"capacitorNeed", ship.getModifiedItemAttr("eliteBonusLogistics2"), skill="Logistics Cruisers")
|
||||
def handler(fit, src, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Emission Systems"), "capacitorNeed", src.getModifiedItemAttr("eliteBonusLogistics2"), skill="Logistics Cruisers")
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
|
||||
"energyDestabilizationAmount", ship.getModifiedItemAttr("eliteBonusReconShip2"), skill="Recon Ships")
|
||||
"energyNeutralizerAmount", ship.getModifiedItemAttr("eliteBonusReconShip2"), skill="Recon Ships")
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
# Skill: EM Shield Compensation
|
||||
type = "passive"
|
||||
def handler(fit, skill, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Amplifier",
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Resistance Amplifier",
|
||||
"emDamageResistanceBonus", skill.getModifiedItemAttr("hardeningBonus") * skill.level)
|
||||
@@ -1,13 +1,10 @@
|
||||
# energyDestabilizationNew
|
||||
#
|
||||
# Used by:
|
||||
# Drones from group: Energy Neutralizer Drone (3 of 3)
|
||||
# Not used by any item
|
||||
from eos.types import State
|
||||
type = "active", "projected"
|
||||
def handler(fit, container, context):
|
||||
if "projected" in context and ((hasattr(container, "state") \
|
||||
and container.state >= State.ACTIVE) or hasattr(container, "amountActive")):
|
||||
multiplier = container.amountActive if hasattr(container, "amountActive") else 1
|
||||
amount = container.getModifiedItemAttr("energyDestabilizationAmount")
|
||||
amount = container.getModifiedItemAttr("energyNeutralizerAmount")
|
||||
time = container.getModifiedItemAttr("duration")
|
||||
fit.addDrain(time, amount * multiplier, 0)
|
||||
|
||||
12
eos/effects/energyneutralizerentity.py
Normal file
12
eos/effects/energyneutralizerentity.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# energyNeutralizerEntity
|
||||
#
|
||||
# Used by:
|
||||
# Drones from group: Energy Neutralizer Drone (3 of 3)
|
||||
from eos.types import State
|
||||
type = "active", "projected"
|
||||
def handler(fit, container, context):
|
||||
if "projected" in context and ((hasattr(container, "state") \
|
||||
and container.state >= State.ACTIVE) or hasattr(container, "amountActive")):
|
||||
amount = container.getModifiedItemAttr("energyNeutralizerAmount")
|
||||
time = container.getModifiedItemAttr("duration")
|
||||
fit.addDrain(time, amount, 0)
|
||||
@@ -1,13 +1,12 @@
|
||||
# energyNeutralizerFalloff
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Energy Neutralizer (45 of 45)
|
||||
# Modules from group: Energy Neutralizer (51 of 51)
|
||||
from eos.types import State
|
||||
type = "active", "projected"
|
||||
def handler(fit, container, context):
|
||||
if "projected" in context and ((hasattr(container, "state") \
|
||||
and container.state >= State.ACTIVE) or hasattr(container, "amountActive")):
|
||||
multiplier = container.amountActive if hasattr(container, "amountActive") else 1
|
||||
amount = container.getModifiedItemAttr("energyDestabilizationAmount")
|
||||
amount = container.getModifiedItemAttr("energyNeutralizerAmount")
|
||||
time = container.getModifiedItemAttr("duration")
|
||||
fit.addDrain(time, amount * multiplier, 0)
|
||||
fit.addDrain(time, amount, 0)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# energyNosferatuFalloff
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Energy Nosferatu (45 of 45)
|
||||
# Modules from group: Energy Nosferatu (51 of 51)
|
||||
type = "active", "projected"
|
||||
runTime = "late"
|
||||
def handler(fit, module, context):
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# energyTransfer
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Remote Capacitor Transmitter (38 of 38)
|
||||
# Not used by any item
|
||||
type = "projected", "active"
|
||||
def handler(fit, module, context):
|
||||
if "projected" in context:
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Capacitor Transmitter",
|
||||
"powerTransferRange", ship.getModifiedItemAttr("maxRangeBonus2"))
|
||||
"maxRange", ship.getModifiedItemAttr("maxRangeBonus2"))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# energyWeaponDamageMultiply
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Heat Sink (18 of 18)
|
||||
# Modules from group: Heat Sink (17 of 17)
|
||||
# Modules named like: QA Multiship Module Players (4 of 4)
|
||||
# Module: QA Damage Module
|
||||
type = "passive"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# energyWeaponSpeedMultiply
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Heat Sink (18 of 18)
|
||||
# Modules from group: Heat Sink (17 of 17)
|
||||
type = "passive"
|
||||
def handler(fit, module, context):
|
||||
fit.modules.filteredItemMultiply(lambda mod: mod.item.group.name == "Energy Weapon",
|
||||
|
||||
7
eos/effects/entityecmfalloff.py
Normal file
7
eos/effects/entityecmfalloff.py
Normal file
@@ -0,0 +1,7 @@
|
||||
type = "projected", "active"
|
||||
def handler(fit, module, context):
|
||||
if "projected" in context:
|
||||
# jam formula: 1 - (1- (jammer str/ship str))^(# of jam mods with same str))
|
||||
strModifier = 1 - module.getModifiedItemAttr("scan{0}StrengthBonus".format(fit.scanType))/fit.scanStrength
|
||||
|
||||
fit.ecmProjectedStr *= strModifier
|
||||
12
eos/effects/entityenergyneutralizerfalloff.py
Normal file
12
eos/effects/entityenergyneutralizerfalloff.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# energyNeutralizerFalloff
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Energy Neutralizer (51 of 51)
|
||||
from eos.types import State
|
||||
type = "active", "projected"
|
||||
def handler(fit, container, context):
|
||||
if "projected" in context and ((hasattr(container, "state") \
|
||||
and container.state >= State.ACTIVE) or hasattr(container, "amountActive")):
|
||||
amount = container.getModifiedItemAttr("energyNeutralizerAmount")
|
||||
time = container.getModifiedItemAttr("energyNeutralizerDuration")
|
||||
fit.addDrain(time, amount, 0)
|
||||
@@ -1,11 +1,8 @@
|
||||
# entosisDurationMultiply
|
||||
#
|
||||
# Used by:
|
||||
# Ships from group: Carrier (4 of 4)
|
||||
# Ships from group: Dreadnought (4 of 4)
|
||||
# Ships from group: Supercarrier (5 of 5)
|
||||
# Ships from group: Titan (4 of 4)
|
||||
# Ship: Rorqual
|
||||
# Items from market group: Ships > Capital Ships (22 of 32)
|
||||
type = "passive"
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Infomorph Psychology"),
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
# Implants named like: grade Centurion (10 of 12)
|
||||
type = "passive"
|
||||
def handler(fit, implant, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote ECM Burst",
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Burst Projectors",
|
||||
"maxRange", implant.getModifiedItemAttr("rangeSkillBonus"))
|
||||
@@ -1,7 +1,4 @@
|
||||
# ewTargetPaint
|
||||
#
|
||||
# Used by:
|
||||
# Drones named like: TP (3 of 3)
|
||||
# Not used by any item
|
||||
type = "projected", "active"
|
||||
def handler(fit, container, context):
|
||||
if "projected" in context:
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
# Skill: Explosive Shield Compensation
|
||||
type = "passive"
|
||||
def handler(fit, skill, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Amplifier",
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Resistance Amplifier",
|
||||
"explosiveDamageResistanceBonus", skill.getModifiedItemAttr("hardeningBonus") * skill.level)
|
||||
@@ -5,5 +5,5 @@
|
||||
type = "passive"
|
||||
runTime = "early"
|
||||
def handler(fit, implant, context):
|
||||
fit.implants.filteredItemMultiply(lambda target: target.item.requiresSkill("Cybernetics"),
|
||||
fit.appliedImplants.filteredItemMultiply(lambda target: target.item.requiresSkill("Cybernetics"),
|
||||
"scanMagnetometricStrengthPercent", implant.getModifiedItemAttr("implantSetFederationNavy"))
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
type = "passive"
|
||||
runTime = "early"
|
||||
def handler(fit, implant, context):
|
||||
fit.implants.filteredItemMultiply(lambda target: target.item.requiresSkill("Cybernetics"),
|
||||
fit.appliedImplants.filteredItemMultiply(lambda target: target.item.requiresSkill("Cybernetics"),
|
||||
"scanMagnetometricStrengthModifier", implant.getModifiedItemAttr("implantSetLGFederationNavy"))
|
||||
|
||||
15
eos/effects/fighterabilityattackm.py
Normal file
15
eos/effects/fighterabilityattackm.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# Not used by any item
|
||||
"""
|
||||
Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the
|
||||
effects, and thus this effect file contains some custom information useful only to fighters.
|
||||
"""
|
||||
# User-friendly name for the ability
|
||||
displayName = "Turret Attack"
|
||||
|
||||
# Attribute prefix that this ability targets
|
||||
prefix = "fighterAbilityAttackMissile"
|
||||
|
||||
type = "active"
|
||||
|
||||
def handler(fit, src, context):
|
||||
pass
|
||||
19
eos/effects/fighterabilityecm.py
Normal file
19
eos/effects/fighterabilityecm.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Not used by any item
|
||||
"""
|
||||
Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the
|
||||
effects, and thus this effect file contains some custom information useful only to fighters.
|
||||
"""
|
||||
from eos.types import State
|
||||
|
||||
# User-friendly name for the ability
|
||||
displayName = "ECM"
|
||||
|
||||
prefix = "fighterAbilityECM"
|
||||
|
||||
type = "projected", "active"
|
||||
def handler(fit, module, context):
|
||||
if "projected" not in context: return
|
||||
# jam formula: 1 - (1- (jammer str/ship str))^(# of jam mods with same str))
|
||||
strModifier = 1 - module.getModifiedItemAttr("{}Strength{}".format(prefix, fit.scanType))/fit.scanStrength
|
||||
|
||||
fit.ecmProjectedStr *= strModifier
|
||||
19
eos/effects/fighterabilityenergyneutralizer.py
Normal file
19
eos/effects/fighterabilityenergyneutralizer.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Not used by any item
|
||||
"""
|
||||
Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the
|
||||
effects, and thus this effect file contains some custom information useful only to fighters.
|
||||
"""
|
||||
from eos.types import State
|
||||
|
||||
# User-friendly name for the ability
|
||||
displayName = "Energy Neutralizer"
|
||||
|
||||
prefix = "fighterAbilityEnergyNeutralizer"
|
||||
|
||||
type = "active", "projected"
|
||||
|
||||
def handler(fit, container, context):
|
||||
if "projected" in context:
|
||||
amount = container.getModifiedItemAttr("{}Amount".format(prefix))
|
||||
time = container.getModifiedItemAttr("{}Duration".format(prefix))
|
||||
fit.addDrain(time, amount, 0)
|
||||
18
eos/effects/fighterabilitylaunchbomb.py
Normal file
18
eos/effects/fighterabilitylaunchbomb.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Not used by any item
|
||||
"""
|
||||
Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the
|
||||
effects, and thus this effect file contains some custom information useful only to fighters.
|
||||
"""
|
||||
# User-friendly name for the ability
|
||||
displayName = "Bomb"
|
||||
|
||||
# Attribute prefix that this ability targets
|
||||
prefix = "fighterAbilityLaunchBomb"
|
||||
|
||||
type = "active"
|
||||
|
||||
# This flag is required for effects that use charges in order to properly calculate reload time
|
||||
hasCharges = True
|
||||
|
||||
def handler(fit, src, context):
|
||||
pass
|
||||
16
eos/effects/fighterabilitymicrowarpdrive.py
Normal file
16
eos/effects/fighterabilitymicrowarpdrive.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Not used by any item
|
||||
"""
|
||||
Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the
|
||||
effects, and thus this effect file contains some custom information useful only to fighters.
|
||||
"""
|
||||
# User-friendly name for the ability
|
||||
displayName = "Microwarpdrive"
|
||||
|
||||
# Is ability applied to the fighter squad as a whole, or per fighter?
|
||||
grouped = True
|
||||
|
||||
type = "active"
|
||||
runTime = "late"
|
||||
def handler(fit, module, context):
|
||||
module.boostItemAttr("maxVelocity", module.getModifiedItemAttr("fighterAbilityMicroWarpDriveSpeedBonus"))
|
||||
module.boostItemAttr("signatureRadius", module.getModifiedItemAttr("fighterAbilityMicroWarpDriveSignatureRadiusBonus"), stackingPenalties = True)
|
||||
18
eos/effects/fighterabilitymissiles.py
Normal file
18
eos/effects/fighterabilitymissiles.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Not used by any item
|
||||
"""
|
||||
Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the
|
||||
effects, and thus this effect file contains some custom information useful only to fighters.
|
||||
"""
|
||||
# User-friendly name for the ability
|
||||
displayName = "Missile Attack"
|
||||
|
||||
# Attribute prefix that this ability targets
|
||||
prefix = "fighterAbilityMissiles"
|
||||
|
||||
type = "active"
|
||||
|
||||
# This flag is required for effects that use charges in order to properly calculate reload time
|
||||
hasCharges = True
|
||||
|
||||
def handler(fit, src, context):
|
||||
pass
|
||||
17
eos/effects/fighterabilitystasiswebifier.py
Normal file
17
eos/effects/fighterabilitystasiswebifier.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Not used by any item
|
||||
"""
|
||||
Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the
|
||||
effects, and thus this effect file contains some custom information useful only to fighters.
|
||||
"""
|
||||
from eos.types import State
|
||||
|
||||
# User-friendly name for the ability
|
||||
displayName = "Stasis Webifier"
|
||||
|
||||
prefix = "fighterAbilityStasisWebifier"
|
||||
|
||||
type = "active", "projected"
|
||||
|
||||
def handler(fit, src, context):
|
||||
if "projected" not in context: return
|
||||
fit.ship.boostItemAttr("maxVelocity", src.getModifiedItemAttr("{}SpeedPenalty".format(prefix)))
|
||||
17
eos/effects/fighterabilitywarpdisruption.py
Normal file
17
eos/effects/fighterabilitywarpdisruption.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Not used by any item
|
||||
"""
|
||||
Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the
|
||||
effects, and thus this effect file contains some custom information useful only to fighters.
|
||||
"""
|
||||
from eos.types import State
|
||||
|
||||
# User-friendly name for the ability
|
||||
displayName = "Warp Disruption"
|
||||
|
||||
prefix = "fighterAbilityWarpDisruption"
|
||||
|
||||
type = "active", "projected"
|
||||
|
||||
def handler(fit, src, context):
|
||||
if "projected" not in context: return
|
||||
fit.ship.increaseItemAttr("warpScrambleStatus", src.getModifiedItemAttr("{}PointStrength".format(prefix)))
|
||||
@@ -1,13 +1,15 @@
|
||||
# fueledArmorRepair
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Fueled Armor Repairer (3 of 3)
|
||||
# Modules from group: Ancillary Armor Repairer (4 of 4)
|
||||
runTime = "late"
|
||||
type = "active"
|
||||
def handler(fit, module, context):
|
||||
if module.charge and module.charge.name == "Nanite Repair Paste":
|
||||
module.multiplyItemAttr("armorDamageAmount", 3)
|
||||
multiplier = 3
|
||||
else:
|
||||
multiplier = 1
|
||||
|
||||
amount = module.getModifiedItemAttr("armorDamageAmount")
|
||||
amount = module.getModifiedItemAttr("armorDamageAmount") * multiplier
|
||||
speed = module.getModifiedItemAttr("duration") / 1000.0
|
||||
fit.extraAttributes.increase("armorRepair", amount / speed)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# fueledShieldBoosting
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Fueled Shield Booster (4 of 4)
|
||||
# Modules from group: Ancillary Shield Booster (5 of 5)
|
||||
runTime = "late"
|
||||
type = "active"
|
||||
def handler(fit, module, context):
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
# Variations of module: Skirmish Warfare Link - Rapid Deployment I (2 of 2)
|
||||
type = "gang", "active"
|
||||
gangBoost = "speedFactor"
|
||||
runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Propulsion Module",
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
# Variations of module: Armored Warfare Link - Passive Defense I (2 of 2)
|
||||
type = "gang", "active"
|
||||
gangBoost = "armorResistance"
|
||||
runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
for damageType in ("Em", "Thermal", "Explosive", "Kinetic"):
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
# Variations of module: Armored Warfare Link - Damage Control I (2 of 2)
|
||||
type = "gang", "active"
|
||||
gangBoost = "armorRepairCapacitorNeed"
|
||||
runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Systems") or mod.item.requiresSkill("Remote Armor Repair Systems"),
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
# Variations of module: Armored Warfare Link - Rapid Repair I (2 of 2)
|
||||
type = "gang", "active"
|
||||
gangBoost = "armorRepairDuration"
|
||||
runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Systems") or mod.item.requiresSkill("Remote Armor Repair Systems"),
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
# Variations of module: Skirmish Warfare Link - Evasive Maneuvers I (2 of 2)
|
||||
type = "gang", "active"
|
||||
gangBoost = "signatureRadius"
|
||||
runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
fit.ship.boostItemAttr("signatureRadius", module.getModifiedItemAttr("commandBonus"),
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
# Variations of module: Information Warfare Link - Recon Operation I (2 of 2)
|
||||
type = "gang", "active"
|
||||
gangBoost = "electronicMaxRange"
|
||||
runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
groups = ("Target Painter", "Weapon Disruptor", "Sensor Dampener", "ECM", "Burst Jammer")
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
# Used by:
|
||||
# Variations of module: Information Warfare Link - Electronic Superiority I (2 of 2)
|
||||
type = "active"
|
||||
|
||||
def handler(fit, module, context):
|
||||
module.multiplyItemAttr("commandBonusTD", module.getModifiedItemAttr("commandBonusHidden"))
|
||||
module.multiplyItemAttr("commandBonusECM", module.getModifiedItemAttr("commandBonusHidden"))
|
||||
module.multiplyItemAttr("commandBonusRSD", module.getModifiedItemAttr("commandBonusHidden"))
|
||||
module.multiplyItemAttr("commandBonusTP", module.getModifiedItemAttr("commandBonusHidden"))
|
||||
module.multiplyItemAttr("commandBonusTP", module.getModifiedItemAttr("commandBonusHidden"))
|
||||
@@ -4,11 +4,9 @@
|
||||
# Variations of module: Skirmish Warfare Link - Interdiction Maneuvers I (2 of 2)
|
||||
type = "gang", "active"
|
||||
gangBoost = "interdictionMaxRange"
|
||||
runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
groups = ("Stasis Web", "Warp Scrambler")
|
||||
groups = ("Stasis Web","Warp Scrambler")
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups,
|
||||
"maxRange", module.getModifiedItemAttr("commandBonus"),
|
||||
stackingPenalties = True)
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
type = "gang", "active"
|
||||
gangBoost = "maxTargetRange"
|
||||
gangBonus = "commandBonus"
|
||||
runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
fit.ship.boostItemAttr("maxTargetRange", module.getModifiedItemAttr("commandBonus"),
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
# Variations of module: Siege Warfare Link - Shield Efficiency I (2 of 2)
|
||||
type = "gang", "active"
|
||||
gangBoost = "shieldRepairCapacitorNeed"
|
||||
runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Operation") or mod.item.requiresSkill("Shield Emission Systems"),
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
# Variations of module: Siege Warfare Link - Active Shielding I (2 of 2)
|
||||
type = "gang", "active"
|
||||
gangBoost = "shieldRepairDuration"
|
||||
runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Operation") or mod.item.requiresSkill("Shield Emission Systems"),
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
# Variations of module: Siege Warfare Link - Shield Harmonizing I (2 of 2)
|
||||
type = "gang", "active"
|
||||
gangBoost = "shieldResistance"
|
||||
runTime = "late"
|
||||
|
||||
def handler(fit, module, context):
|
||||
if "gang" not in context: return
|
||||
for damageType in ("Em", "Explosive", "Thermal", "Kinetic"):
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
type = "passive"
|
||||
runTime = "early"
|
||||
def handler(fit, implant, context):
|
||||
fit.implants.filteredItemMultiply(lambda target: target.item.requiresSkill("Cybernetics"),
|
||||
fit.appliedImplants.filteredItemMultiply(lambda target: target.item.requiresSkill("Cybernetics"),
|
||||
"scanRadarStrengthPercent", implant.getModifiedItemAttr("implantSetImperialNavy"))
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
type = "passive"
|
||||
runTime = "early"
|
||||
def handler(fit, implant, context):
|
||||
fit.implants.filteredItemMultiply(lambda target: target.item.requiresSkill("Cybernetics"),
|
||||
fit.appliedImplants.filteredItemMultiply(lambda target: target.item.requiresSkill("Cybernetics"),
|
||||
"scanRadarStrengthModifier", implant.getModifiedItemAttr("implantSetLGImperialNavy"))
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
runTime = "early"
|
||||
type = "passive"
|
||||
def handler(fit, implant, context):
|
||||
fit.implants.filteredItemMultiply(lambda mod: mod.item.group.name == "Cyberimplant",
|
||||
fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Cyberimplant",
|
||||
"WarpSBonus", implant.getModifiedItemAttr("implantSetWarpSpeed"))
|
||||
|
||||
@@ -7,4 +7,4 @@ runTime = "early"
|
||||
def handler(fit, module, context):
|
||||
fit.extraAttributes["siege"] = True
|
||||
fit.ship.boostItemAttr("maxVelocity", module.getModifiedItemAttr("speedFactor"))
|
||||
fit.ship.multiplyItemAttr("mass", module.getModifiedItemAttr("massMultiplier"))
|
||||
fit.ship.multiplyItemAttr("mass", module.getModifiedItemAttr("siegeMassMultiplier"))
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
# Skill: Kinetic Shield Compensation
|
||||
type = "passive"
|
||||
def handler(fit, skill, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Amplifier",
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Resistance Amplifier",
|
||||
"kineticDamageResistanceBonus",
|
||||
skill.getModifiedItemAttr("hardeningBonus") * skill.level)
|
||||
@@ -1,7 +1,4 @@
|
||||
# marauderModeEffect26
|
||||
#
|
||||
# Used by:
|
||||
# Module: Bastion Module I
|
||||
# Not used by any item
|
||||
type = "active"
|
||||
runTime = "early"
|
||||
def handler(fit, module, context):
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#
|
||||
# Used by:
|
||||
# Modules named like: Drone Mining Augmentor (8 of 8)
|
||||
# Skill: Drone Interfacing
|
||||
# Skill: Mining Drone Operation
|
||||
type = "passive"
|
||||
def handler(fit, container, context):
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user