Compare commits

..

53 Commits

Author SHA1 Message Date
DarkPhoenix
e70ebad3f7 Bump version 2019-10-22 15:37:25 +03:00
DarkPhoenix
4dfe5c3abf Update database and effects to 1589866 2019-10-22 15:36:37 +03:00
Anton Vorobyov
536eb1efa5 Merge pull request #2064 from Gochim/master
Merged some additional info from wiki. Improved on readability
2019-10-17 17:19:10 +03:00
Anton Vorobyov
c4c763089e Merge branch 'master' into master 2019-10-17 17:19:00 +03:00
DarkPhoenix
cdfd4c0d8e Invoke pip the same way as on Windows 2019-10-17 17:01:10 +03:00
DarkPhoenix
f9bb8836e5 Upgrade pip when building mac distribution 2019-10-17 16:59:38 +03:00
Gochim
58b2634c8c Merged info from wiki. Improved on readability 2019-10-17 16:50:40 +03:00
Anton Vorobyov
093ae008ce Merge pull request #2063 from Gochim/master
Re-written in much greater detail instructions how to set up the project
2019-10-17 16:05:31 +03:00
Gochim
5f62fc0cdc Merge remote-tracking branch 'origin/master' 2019-10-16 22:08:33 +03:00
Gochim
e7a4b4ac26 Added section "Setting up the project with PyCharm" 2019-10-16 22:07:10 +03:00
Gochim
66e9944cb5 Added "Setting up the project manually" instructions 2019-10-16 22:07:10 +03:00
DIvanchenko
ad8528c248 Plan for CONTRIBUTING.md. Updated link to CONTRIBUTION.md. 2019-10-16 22:06:19 +03:00
DIvanchenko
07d22cd8e4 Created link to CONTRIBUTION.md. Fixed heading 2019-10-16 22:06:19 +03:00
DarkPhoenix
a6d5922d77 Bump minor version, as database has been updated 2019-10-16 16:33:43 +03:00
Ryan Holmes
958d7bff99 Update .appveyor.yml 2019-10-16 09:27:22 -04:00
Ryan Holmes
7819b80be4 Update .appveyor.yml 2019-10-16 09:25:14 -04:00
Gochim
2ca50a4658 Added section "Setting up the project with PyCharm" 2019-10-15 23:08:21 +03:00
Gochim
09ff4fd128 Added "Setting up the project manually" instructions 2019-10-15 20:17:48 +03:00
DarkPhoenix
3e53863f9e Bump version 2019-10-15 17:09:15 +03:00
DarkPhoenix
63d2289f97 Update database to 1585794 2019-10-15 17:06:42 +03:00
DarkPhoenix
2663ef2e66 Make mutated module import consider old 1mn gravid mutaplasmid name 2019-10-14 18:26:22 +03:00
DIvanchenko
d4bdf47d62 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	README.md
2019-10-10 18:04:24 +03:00
DIvanchenko
660ee7c4bf Plan for CONTRIBUTING.md. Updated link to CONTRIBUTION.md. 2019-10-10 18:03:28 +03:00
DIvanchenko
1db1f3070b Created link to CONTRIBUTION.md. Fixed heading 2019-10-10 10:50:56 +03:00
DIvanchenko
3dba82c497 Created link to CONTRIBUTION.md. Fixed heading 2019-10-10 10:49:54 +03:00
DarkPhoenix
25e7b7a9f7 Fix RMB in graph fit list 2019-10-09 23:09:09 +03:00
DarkPhoenix
9582212ae0 Bump version 2019-10-09 19:38:25 +03:00
DarkPhoenix
7d2b60c327 Fix addition of drones via alt-dclick 2019-10-09 16:24:21 +03:00
DarkPhoenix
0121a0064e Show unknown meta groups as normal, also add standup faction group to faction tab 2019-10-09 14:38:08 +03:00
DarkPhoenix
2aa96fc819 Do not crash when user cancels setting of projection range 2019-10-09 13:30:01 +03:00
DarkPhoenix
8d81db0a3a Change what kind of strength is displayed for probe launchers 2019-10-09 13:13:40 +03:00
DarkPhoenix
e5ba35fde9 Pass effect in all effect handler calls 2019-10-08 23:41:26 +03:00
DarkPhoenix
885cd32cb0 Fix EFS export after adding projection range support 2019-10-08 23:11:58 +03:00
DarkPhoenix
18d8ed6558 Take modifier key info from event where possible 2019-10-08 20:50:14 +03:00
DarkPhoenix
9618ece4b4 Bump version 2019-10-08 19:50:57 +03:00
DarkPhoenix
a80a77a422 Update effects file 2019-10-08 19:50:38 +03:00
DarkPhoenix
3806be3ddd Add capsule renders 2019-10-08 19:46:15 +03:00
DarkPhoenix
3e803fef30 Actually expose capsule to a shuttle group 2019-10-08 19:37:32 +03:00
DarkPhoenix
12956d435a Update database to 1581357 and do necessary schema changes to support changed source data 2019-10-08 19:28:24 +03:00
DarkPhoenix
a3381007f3 Use numbers in default values instead of strings to avoid type errors 2019-10-07 16:58:11 +03:00
DarkPhoenix
1efe4ee5e5 Enable showing capsules in shuttle group 2019-10-05 10:27:08 +03:00
DarkPhoenix
ec21f93d3c Fix background color of panels behind buttons 2019-10-04 01:25:38 +03:00
DarkPhoenix
f384b32ed6 Remove unused file 2019-10-03 14:30:50 +03:00
DarkPhoenix
22d8f34c75 Fix pref panel titles on linux 2019-10-03 14:29:47 +03:00
DarkPhoenix
6128cd8322 Update once again
Cut everything outside of window
2019-10-03 13:34:42 +03:00
DarkPhoenix
386f403430 Update screenshot 2019-10-03 13:32:36 +03:00
DarkPhoenix
5f7d9aea89 Add amount of text in notes to notes tab title 2019-10-03 13:02:08 +03:00
DarkPhoenix
b367c449a9 Few more readme fixes 2019-10-03 09:56:53 +03:00
DarkPhoenix
26b3dff9d4 Update readme 2019-10-03 09:47:43 +03:00
DarkPhoenix
873a62e3f0 Make error dialog window like any other auxiliary window - do not keep it on top 2019-10-02 22:08:37 +03:00
Anton Vorobyov
d967ab375e Merge pull request #2050 from ZeroPointEnergy/feature/images_from_zip
Support loading images from zip
2019-10-02 19:16:50 +03:00
Andreas Zuber
fcf2d6a72c Support loading images from zip
This commit reenables the ability to load the images from a zip file
instead of a directory structure. It is possible to set the location of
this file via configforced.py
2019-10-02 17:01:14 +02:00
DarkPhoenix
843ced15bf Fix ammo damage ratios 2019-10-02 14:45:29 +03:00
76 changed files with 581 additions and 937 deletions

View File

@@ -52,8 +52,8 @@ install:
# pip will build them from source using the MSVC compiler matching the
# target Python version and architecture
- ECHO "Install pip requirements:"
- "pip install -r requirements.txt"
- "pip install PyInstaller"
- "python -m pip install -r requirements.txt"
- "python -m pip install PyInstaller"
before_build:
# directory that will contain the built files

79
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,79 @@
# Contribution
## Requirements
- Python 3.6
- Git CLI installed
- Python, pip and git are all available as command-line commands (add to path if needed)
Virtual environment will be created in *PyfaEnv* folder. Project will be cloned and run from the *PyfaDEV* folder. Separate virtual environment will be created so required libraries won't clutter the main python installation.
> Commands and screens were created on Windows 10. Please, update all the paths according to your OS.
## Setting up the project manually
Clone the repo
```
git clone <repo> PyfaDEV
```
Create virtual environment
```
python -m venv PyfaEnv
```
Activate virtual environment
```
For cmd.exe: PyfaEnv\scripts\activate.bat
For bash: source <venv>/bin/activate
```
> For other OS check [Python documentation](https://docs.python.org/3/library/venv.html)
Install requirements for the project from *requirements.txt*
```
pip install -r PyfaDEV\requirements.txt
```
> For some Linux distributions, you may need to install separate wxPython bindings, such as `python-matplotlib-wx`
Check that libs from *requirements.txt* are installed
```
pip list
```
Test that the project is starting properly
```
python PyfaDEV\pyfa.py
```
## Setting up the project with PyCharm/IntelliJ
Install PyCharm / Other IntelliJ product with Python plugin
After launching select *Check out from Version Control* -> *GIt*
![welcome](https://user-images.githubusercontent.com/54093496/66862580-d8edab00-ef99-11e9-94e2-e93d7043e620.png)
Login to GitHub, paste repo URL and seect the folder to which to clone the project, press *Clone*.
![Clone](https://user-images.githubusercontent.com/54093496/66862748-38e45180-ef9a-11e9-9f68-4903baf47385.png)
After process is complete, open *File* -> *Settings* -> *Project* -> *Project Interpreter*.
![Settings](https://user-images.githubusercontent.com/54093496/66862792-544f5c80-ef9a-11e9-9e0f-f64767f3f1b0.png)
Press on options and add new virtual environment.
![venv](https://user-images.githubusercontent.com/54093496/66862833-67622c80-ef9a-11e9-94fa-47cca0158d29.png)
Open project tree view and double-click on *requirements.txt*. Press *Install requirements*. Install all requirements.
![Reqs](https://user-images.githubusercontent.com/54093496/66862870-7a74fc80-ef9a-11e9-9b18-e64be42c49b8.png)
Create new *Run Configuration*. Set correct *Script path* and *Python interpreter*.
![Run configuraion](https://user-images.githubusercontent.com/54093496/66862970-b4460300-ef9a-11e9-9fb4-20e24759904b.png)
Test that the project is starting properly.

View File

@@ -2,20 +2,19 @@
[![Join us on Slack!](https://pyfainvite.azurewebsites.net/badge.svg)](https://pyfainvite.azurewebsites.net/) [![Build Status](https://travis-ci.org/pyfa-org/Pyfa.svg?branch=master)](https://travis-ci.org/pyfa-org/Pyfa)
![pyfa](https://cloud.githubusercontent.com/assets/3904767/10271512/af385ef2-6ade-11e5-8f67-52b8b1e4c797.PNG)
![pyfa](https://user-images.githubusercontent.com/275209/66119992-864be080-e5e2-11e9-994a-3a4368c9fad7.png)
## What is it?
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.
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 3 and wxWidgets are available, including Windows, Mac OS X, and Linux.
## Latest Version and Changelogs
The latest version along with release notes can always be found on the project's [Releases](https://github.com/DarkFenX/Pyfa/releases) page. pyfa will notify you if you are running an outdated version.
The latest version along with release notes can always be found on the project's [releases](https://github.com/pyfa-org/Pyfa/releases) page. Pyfa will notify you if you are running an outdated version.
## Installation
Windows and OS X users are supplied self-contained builds of pyfa on the [latest releases](https://github.com/pyfa-org/Pyfa/releases/latest) page. An `.exe` installer is also available for Windows builds. Linux users can run pyfa using their distribution's Python interpreter. There is no official self-contained package for Linux, however, there are a number of third-party packages available through distribution-specific repositories.
#### OS X
### OS X
Apart from the official release, there is also a [Homebrew](http://brew.sh) option for installing pyfa on OS X. Please note this is maintained by a third-party and is not tested by pyfa developers. Simply fire up in terminal:
```
$ brew install Caskroom/cask/pyfa
@@ -27,34 +26,31 @@ The following is a list of pyfa packages available for certain distributions. Pl
* Arch: https://aur.archlinux.org/packages/pyfa/
* Gentoo: https://github.com/ZeroPointEnergy/gentoo-pyfa-overlay
### Dependencies
If you wish to help with development or simply need to run pyfa through a Python interpreter, the following software is required:
* Python 3.6
* Requirements as listed in `requirements.txt`
## Contribution
If you wish to help with development or you need to run pyfa through a Python interpreter, check out [the instructions](https://github.com/pyfa-org/Pyfa/blob/master/CONTRIBUTING.md).
## 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).
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](https://forums.eveonline.com/t/27156) on the official EVE Online forums is acceptable. Guidelines for bug reporting can be found on [this wiki page](https://github.com/pyfa-org/Pyfa/wiki/Bug-Reporting).
## License
pyfa is licensed under the GNU GPL v3.0, see LICENSE
Pyfa is licensed under the GNU GPL v3.0, see LICENSE
## Resources
* Development repository: [https://github.com/pyfa-org/Pyfa](https://github.com/pyfa-org/Pyfa)
* [Development repository](https://github.com/pyfa-org/Pyfa)
* [EVE forum thread](https://forums.eveonline.com/t/27156)
* [EVE University guide using pyfa](http://wiki.eveuniversity.org/Guide_to_using_PYFA)
* [EVE University guide using pyfa](https://wiki.eveuniversity.org/PYFA)
* [EVE Online website](http://www.eveonline.com/)
## Contacts:
* Sable Blitzmann
* GitHub: @blitzmann
* [TweetFleet Slack](https://www.fuzzwork.co.uk/tweetfleet-slack-invites/): @blitzmann
* [Gitter chat](https://gitter.im/pyfa-org/Pyfa): @ blitzmann
* Email: sable.blitzmann@gmail.com
* Kadesh / DarkPhoenix
* GitHub: @DarkFenX
* EVE: Kadesh Priestess
* Email: phoenix@mail.ru
* Sable Blitzmann
* GitHub: @blitzmann
* [TweetFleet Slack](https://www.fuzzwork.co.uk/tweetfleet-slack-invites/): @blitzmann
* [Gitter chat](https://gitter.im/pyfa-org/Pyfa): @blitzmann
* Email: sable.blitzmann@gmail.com
## CCP Copyright Notice
EVE Online, the EVE logo, EVE and all associated logos and designs are the intellectual property of CCP hf. All artwork, screenshots, characters, vehicles, storylines, world facts or other recognizable features of the intellectual property relating to these trademarks are likewise the intellectual property of CCP hf. EVE Online and the EVE logo are the registered trademarks of CCP hf. All rights are reserved worldwide. All other trademarks are the property of their respective owners. CCP hf. has granted permission to pyfa to use EVE Online and all associated logos and designs for promotional and information purposes on its website but does not endorse, and is not in any way affiliated with, pyfa. CCP is in no way responsible for the content on or functioning of this program, nor can it be liable for any damage arising from the use of this program.

View File

@@ -33,6 +33,7 @@ pyfaPath = None
savePath = None
saveDB = None
gameDB = None
imgsZIP = None
logPath = None
loggingLevel = None
logging_setup = None
@@ -96,6 +97,7 @@ def defPaths(customSavePath=None):
global savePath
global saveDB
global gameDB
global imgsZIP
global saveInRoot
global logPath
global cipher
@@ -155,6 +157,10 @@ def defPaths(customSavePath=None):
if not gameDB:
gameDB = os.path.join(pyfaPath, "eve.db")
imgsZIP = getattr(configforced, "imgsZIP", imgsZIP)
if not imgsZIP:
imgsZIP = os.path.join(pyfaPath, "imgs.zip")
if debug:
logFile = "pyfa_debug.log"
else:

View File

@@ -25,7 +25,7 @@ from sqlalchemy.orm.collections import attribute_mapped_collection
from eos.db import gamedata_meta
from eos.db.gamedata.dynamicAttributes import dynamicApplicable_table
from eos.db.gamedata.effect import typeeffects_table
from eos.gamedata import Attribute, DynamicItem, Effect, Group, Item, MetaType, Traits
from eos.gamedata import Attribute, DynamicItem, Effect, Group, Item, Traits, MetaGroup
items_table = Table("invtypes", gamedata_meta,
Column("typeID", Integer, primary_key=True),
@@ -41,9 +41,11 @@ items_table = Table("invtypes", gamedata_meta,
Column("iconID", Integer),
Column("graphicID", Integer),
Column("groupID", Integer, ForeignKey("invgroups.groupID"), index=True),
Column("metaLevel", Integer),
Column("metaGroupID", Integer, ForeignKey("invmetagroups.metaGroupID"), index=True),
Column("variationParentTypeID", Integer, ForeignKey("invtypes.typeID"), index=True),
Column("replacements", String))
from .metaGroup import metatypes_table # noqa
from .traits import traits_table # noqa
mapper(Item, items_table,
@@ -51,9 +53,8 @@ mapper(Item, items_table,
"group" : relation(Group, backref=backref("items", cascade="all,delete")),
"_Item__attributes": relation(Attribute, cascade='all, delete, delete-orphan', collection_class=attribute_mapped_collection('name')),
"effects": relation(Effect, secondary=typeeffects_table, collection_class=attribute_mapped_collection('name')),
"metaGroup" : relation(MetaType,
primaryjoin=metatypes_table.c.typeID == items_table.c.typeID,
uselist=False),
"metaGroup" : relation(MetaGroup, backref=backref("items", cascade="all,delete")),
"varParent" : relation(Item, backref=backref("varChildren", cascade="all,delete"), remote_side=items_table.c.typeID),
"ID" : synonym("typeID"),
"name" : synonym("typeName"),
"description" : deferred(items_table.c.description),
@@ -64,7 +65,6 @@ mapper(Item, items_table,
primaryjoin=dynamicApplicable_table.c.applicableTypeID == items_table.c.typeID,
secondaryjoin=dynamicApplicable_table.c.typeID == DynamicItem.typeID,
secondary=dynamicApplicable_table,
backref="applicableItems")
})
backref="applicableItems")})
Item.category = association_proxy("group", "category")

View File

@@ -17,35 +17,17 @@
# along with eos. If not, see <http://www.gnu.org/licenses/>.
# ===============================================================================
from sqlalchemy import Table, Column, Integer, ForeignKey, String
from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.orm import relation, mapper, synonym
from sqlalchemy import Table, Column, Integer, String
from sqlalchemy.orm import mapper, synonym
from eos.db import gamedata_meta
from eos.db.gamedata.item import items_table
from eos.gamedata import Item, MetaGroup, MetaType
from eos.gamedata import MetaGroup
metagroups_table = Table("invmetagroups", gamedata_meta,
Column("metaGroupID", Integer, primary_key=True),
Column("metaGroupName", String))
metatypes_table = Table("invmetatypes", gamedata_meta,
Column("typeID", Integer, ForeignKey("invtypes.typeID"), primary_key=True),
Column("parentTypeID", Integer, ForeignKey("invtypes.typeID")),
Column("metaGroupID", Integer, ForeignKey("invmetagroups.metaGroupID")))
mapper(MetaGroup, metagroups_table,
properties={
"ID" : synonym("metaGroupID"),
"name": synonym("metaGroupName")
})
mapper(MetaType, metatypes_table,
properties={
"ID" : synonym("metaGroupID"),
"parent": relation(Item, primaryjoin=metatypes_table.c.parentTypeID == items_table.c.typeID),
"items" : relation(Item, primaryjoin=metatypes_table.c.typeID == items_table.c.typeID),
"info" : relation(MetaGroup, lazy=False)
})
MetaType.name = association_proxy("info", "name")
"name": synonym("metaGroupName")})

View File

@@ -23,8 +23,8 @@ from sqlalchemy.sql import and_, or_, select
import eos.config
from eos.db import gamedata_session
from eos.db.gamedata.item import items_table
from eos.db.gamedata.group import groups_table
from eos.db.gamedata.metaGroup import items_table, metatypes_table
from eos.db.util import processEager, processWhere
from eos.gamedata import AlphaClone, Attribute, AttributeInfo, Category, DynamicItem, Group, Item, MarketGroup, MetaData, MetaGroup
@@ -259,6 +259,10 @@ def getMetaGroup(lookfor, eager=None):
return metaGroup
def getMetaGroups():
return gamedata_session.query(MetaGroup).all()
@cachedQuery(1, "lookfor")
def getMarketGroup(lookfor, eager=None):
if isinstance(lookfor, int):
@@ -342,11 +346,9 @@ def getVariations(itemids, groupIDs=None, where=None, eager=None):
if len(itemids) == 0:
return []
itemfilter = or_(*(metatypes_table.c.parentTypeID == itemid for itemid in itemids))
itemfilter = or_(*(items_table.c.variationParentTypeID == itemid for itemid in itemids))
filter = processWhere(itemfilter, where)
joinon = items_table.c.typeID == metatypes_table.c.typeID
vars = gamedata_session.query(Item).options(*processEager(eager)).join((metatypes_table, joinon)).filter(
filter).all()
vars = gamedata_session.query(Item).options(*processEager(eager)).filter(filter).all()
if vars:
return vars

View File

@@ -17,6 +17,7 @@
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
# ===============================================================================
import eos.db
from eos.saveddata.damagePattern import DamagePattern as es_DamagePattern
from eos.saveddata.targetProfile import TargetProfile as es_TargetProfile
@@ -34,95 +35,97 @@ class DefaultDatabaseValues:
@classmethod
def importDamageProfileDefaults(cls):
damageProfileList = [["Uniform", "25", "25", "25", "25"], ["[Generic]EM", "100", "0", "0", "0"],
["[Generic]Thermal", "0", "100", "0", "0"], ["[Generic]Kinetic", "0", "0", "100", "0"],
["[Generic]Explosive", "0", "0", "0", "100"],
["[NPC][Asteroid] Blood Raiders", "5067", "4214", "0", "0"],
["[Bombs]Electron Bomb", "6400", "0", "0", "0"],
["[Bombs]Scorch Bomb", "0", "6400", "0", "0"],
["[Bombs]Concussion Bomb", "0", "0", "6400", "0"],
["[Bombs]Shrapnel Bomb", "0", "0", "0", "6400"],
["[Frequency Crystals][T2] Conflagration", "61.6", "61.6", "0", "0"],
["[Frequency Crystals][T2] Scorch", "72", "16", "0", "0"],
["[Frequency Crystals][T2] Gleam", "56", "56", "0", "0"],
["[Frequency Crystals][T2] Aurora", "40", "24", "0", "0"],
["[Frequency Crystals]Multifrequency", "61.6", "44", "0", "0"],
["[Frequency Crystals]Gamma", "61.6", "35.2", "0", "0"],
["[Frequency Crystals]Xray", "52.8", "35.2", "0", "0"],
["[Frequency Crystals]Ultraviolet", "52.8", "26.4", "0", "0"],
["[Frequency Crystals]Standard", "44", "26.4", "0", "0"],
["[Frequency Crystals]Infrared", "44", "17.6", "0", "0"],
["[Frequency Crystals]Microwave", "35.2", "17.6", "0", "0"],
["[Frequency Crystals]Radio", "44", "0", "0", "0"],
["[Hybrid Charges][T2] Void", "0", "61.6", "61.6", "0"],
["[Hybrid Charges][T2] Null", "0", "48", "40", "0"],
["[Hybrid Charges][T2] Javelin", "0", "64", "48", "0"],
["[Hybrid Charges][T2] Spike", "0", "32", "32", "0"],
["[Hybrid Charges]Antimatter", "0", "48", "67.2", "0"],
["[Hybrid Charges]Plutonium", "0", "48", "57.6", "0"],
["[Hybrid Charges]Uranium", "0", "38.4", "57.6", "0"],
["[Hybrid Charges]Thorium", "0", "38.4", "48", "0"],
["[Hybrid Charges]Lead", "0", "28.8", "48", "0"],
["[Hybrid Charges]Iridium", "0", "28.8", "38.4", "0"],
["[Hybrid Charges]Tungsten", "0", "19.2", "38.4", "0"],
["[Hybrid Charges]Iron", "0", "19.2", "28.8", "0"],
["[Missiles]Mjolnir", "100", "0", "0", "0"],
["[Missiles]Inferno", "0", "100", "0", "0"],
["[Missiles]Scourge", "0", "0", "100", "0"],
["[Missiles]Nova", "0", "0", "0", "100"],
["[Missiles][Structure] Standup Missile", "100", "100", "100", "100"],
["[Projectile Ammo][T2] Hail", "0", "0", "26.4", "96.8"],
["[Projectile Ammo][T2] Barrage", "0", "0", "40", "48"],
["[Projectile Ammo][T2] Quake", "0", "0", "40", "72"],
["[Projectile Ammo][T2] Tremor", "0", "0", "24", "40"],
["[Projectile Ammo]EMP", "79.2", "0", "8.8", "17.6"],
["[Projectile Ammo]Phased Plasma", "0", "88", "17.6", "0"],
["[Projectile Ammo]Fusion", "0", "0", "17.6", "88"],
["[Projectile Ammo]Depleted Uranium", "0", "26.4", "17.6", "26.4"],
["[Projectile Ammo]Titanium Sabot", "0", "0", "52.8", "176"],
["[Projectile Ammo]Proton", "26.4", "0", "17.6", "0"],
["[Projectile Ammo]Carbonized Lead", "0", "0", "35.2", "8.8"],
["[Projectile Ammo]Nuclear", "0", "0", "8.8", "35.2"],
damageProfileList = [["Uniform", 25, 25, 25, 25],
["[Generic]EM", 1, 0, 0, 0],
["[Generic]Thermal", 0, 1, 0, 0],
["[Generic]Kinetic", 0, 0, 1, 0],
["[Generic]Explosive", 0, 0, 0, 1],
["[NPC][Asteroid] Blood Raiders", 5067, 4214, 0, 0],
["[Bombs]Electron Bomb", 6400, 0, 0, 0],
["[Bombs]Scorch Bomb", 0, 6400, 0, 0],
["[Bombs]Concussion Bomb", 0, 0, 6400, 0],
["[Bombs]Shrapnel Bomb", 0, 0, 0, 6400],
["[Frequency Crystals][T2] Conflagration", 7.7, 7.7, 0, 0],
["[Frequency Crystals][T2] Scorch", 9, 2, 0, 0],
["[Frequency Crystals][T2] Gleam", 7, 7, 0, 0],
["[Frequency Crystals][T2] Aurora", 5, 3, 0, 0],
["[Frequency Crystals]Multifrequency", 7, 5, 0, 0],
["[Frequency Crystals]Gamma", 7, 4, 0, 0],
["[Frequency Crystals]Xray", 6, 4, 0, 0],
["[Frequency Crystals]Ultraviolet", 6, 3, 0, 0],
["[Frequency Crystals]Standard", 5, 3, 0, 0],
["[Frequency Crystals]Infrared", 5, 2, 0, 0],
["[Frequency Crystals]Microwave", 4, 2, 0, 0],
["[Frequency Crystals]Radio", 5, 0, 0, 0],
["[Hybrid Charges][T2] Void", 0, 7.7, 7.7, 0],
["[Hybrid Charges][T2] Null", 0, 6, 5, 0],
["[Hybrid Charges][T2] Javelin", 0, 8, 6, 0],
["[Hybrid Charges][T2] Spike", 0, 4, 4, 0],
["[Hybrid Charges]Antimatter", 0, 5, 7, 0],
["[Hybrid Charges]Plutonium", 0, 5, 6, 0],
["[Hybrid Charges]Uranium", 0, 4, 6, 0],
["[Hybrid Charges]Thorium", 0, 4, 5, 0],
["[Hybrid Charges]Lead", 0, 3, 5, 0],
["[Hybrid Charges]Iridium", 0, 3, 4, 0],
["[Hybrid Charges]Tungsten", 0, 2, 4, 0],
["[Hybrid Charges]Iron", 0, 2, 3, 0],
["[Missiles]Mjolnir", 1, 0, 0, 0],
["[Missiles]Inferno", 0, 1, 0, 0],
["[Missiles]Scourge", 0, 0, 1, 0],
["[Missiles]Nova", 0, 0, 0, 1],
["[Missiles][Structure] Standup Missile", 1, 1, 1, 1],
["[Projectile Ammo][T2] Hail", 0, 0, 3.3, 12.1],
["[Projectile Ammo][T2] Barrage", 0, 0, 5, 6],
["[Projectile Ammo][T2] Quake", 0, 0, 5, 9],
["[Projectile Ammo][T2] Tremor", 0, 0, 3, 5],
["[Projectile Ammo]EMP", 9, 0, 1, 2],
["[Projectile Ammo]Phased Plasma", 0, 10, 2, 0],
["[Projectile Ammo]Fusion", 0, 0, 2, 10],
["[Projectile Ammo]Depleted Uranium", 0, 3, 2, 3],
["[Projectile Ammo]Titanium Sabot", 0, 0, 6, 2],
["[Projectile Ammo]Proton", 3, 0, 2, 0],
["[Projectile Ammo]Carbonized Lead", 0, 0, 4, 1],
["[Projectile Ammo]Nuclear", 0, 0, 1, 4],
# Different sizes of plasma do different damage, the values here are
# average of proportions across sizes
["[Exotic Plasma][T2] Occult", "0", "55863", "0", "44137"],
["[Exotic Plasma][T2] Mystic", "0", "66319", "0", "33681"],
["[Exotic Plasma]Tetryon", "0", "69208", "0", "30792"],
["[Exotic Plasma]Baryon", "0", "59737", "0", "40263"],
["[Exotic Plasma]Meson", "0", "60519", "0", "39481"],
["[NPC][Burner] Cruor (Blood Raiders)", "90", "90", "0", "0"],
["[NPC][Burner] Dramiel (Angel)", "55", "0", "20", "96"],
["[NPC][Burner] Daredevil (Serpentis)", "0", "110", "154", "0"],
["[NPC][Burner] Succubus (Sanshas Nation)", "135", "30", "0", "0"],
["[NPC][Burner] Worm (Guristas)", "0", "0", "228", "0"],
["[NPC][Burner] Enyo", "0", "147", "147", "0"],
["[NPC][Burner] Hawk", "0", "0", "247", "0"],
["[NPC][Burner] Jaguar", "36", "0", "50", "182"],
["[NPC][Burner] Vengeance", "232", "0", "0", "0"],
["[NPC][Burner] Ashimmu (Blood Raiders)", "260", "100", "0", "0"],
["[NPC][Burner] Talos", "0", "413", "413", "0"],
["[NPC][Burner] Sentinel", "0", "75", "0", "90"],
["[NPC][Asteroid] Angel Cartel", "1838", "562", "2215", "3838"],
["[NPC][Deadspace] Angel Cartel", "369", "533", "1395", "3302"],
["[NPC][Deadspace] Blood Raiders", "6040", "5052", "10", "15"],
["[NPC][Asteroid] Guristas", "0", "1828", "7413", "0"],
["[NPC][Deadspace] Guristas", "0", "1531", "9680", "0"],
["[NPC][Asteroid] Rogue Drone", "394", "666", "1090", "1687"],
["[NPC][Deadspace] Rogue Drone", "276", "1071", "1069", "871"],
["[NPC][Asteroid] Sanshas Nation", "5586", "4112", "0", "0"],
["[NPC][Deadspace] Sanshas Nation", "3009", "2237", "0", "0"],
["[NPC][Asteroid] Serpentis", "0", "5373", "4813", "0"],
["[NPC][Deadspace] Serpentis", "0", "3110", "1929", "0"],
["[NPC][Mission] Amarr Empire", "4464", "3546", "97", "0"],
["[NPC][Mission] Caldari State", "0", "2139", "4867", "0"],
["[NPC][Mission] CONCORD", "336", "134", "212", "412"],
["[NPC][Mission] Gallente Federation", "9", "3712", "2758", "0"],
["[NPC][Mission] Khanid", "612", "483", "43", "6"],
["[NPC][Mission] Minmatar Republic", "1024", "388", "1655", "4285"],
["[NPC][Mission] Mordus Legion", "25", "262", "625", "0"],
["[NPC][Mission] Thukker", "0", "52", "10", "79"],
["[NPC][Other] Sleepers", "1472", "1472", "1384", "1384"],
["[NPC][Other] Sansha Incursion", "1682", "1347", "3678", "3678"]]
["[Exotic Plasma][T2] Occult", 0, 55863, 0, 44137],
["[Exotic Plasma][T2] Mystic", 0, 66319, 0, 33681],
["[Exotic Plasma]Tetryon", 0, 69208, 0, 30792],
["[Exotic Plasma]Baryon", 0, 59737, 0, 40263],
["[Exotic Plasma]Meson", 0, 60519, 0, 39481],
["[NPC][Burner] Cruor (Blood Raiders)", 90, 90, 0, 0],
["[NPC][Burner] Dramiel (Angel)", 55, 0, 20, 96],
["[NPC][Burner] Daredevil (Serpentis)", 0, 110, 154, 0],
["[NPC][Burner] Succubus (Sanshas Nation)", 135, 30, 0, 0],
["[NPC][Burner] Worm (Guristas)", 0, 0, 228, 0],
["[NPC][Burner] Enyo", 0, 147, 147, 0],
["[NPC][Burner] Hawk", 0, 0, 247, 0],
["[NPC][Burner] Jaguar", 36, 0, 50, 182],
["[NPC][Burner] Vengeance", 232, 0, 0, 0],
["[NPC][Burner] Ashimmu (Blood Raiders)", 260, 100, 0, 0],
["[NPC][Burner] Talos", 0, 413, 413, 0],
["[NPC][Burner] Sentinel", 0, 75, 0, 90],
["[NPC][Asteroid] Angel Cartel", 1838, 562, 2215, 3838],
["[NPC][Deadspace] Angel Cartel", 369, 533, 1395, 3302],
["[NPC][Deadspace] Blood Raiders", 6040, 5052, 10, 15],
["[NPC][Asteroid] Guristas", 0, 1828, 7413, 0],
["[NPC][Deadspace] Guristas", 0, 1531, 9680, 0],
["[NPC][Asteroid] Rogue Drone", 394, 666, 1090, 1687],
["[NPC][Deadspace] Rogue Drone", 276, 1071, 1069, 871],
["[NPC][Asteroid] Sanshas Nation", 5586, 4112, 0, 0],
["[NPC][Deadspace] Sanshas Nation", 3009, 2237, 0, 0],
["[NPC][Asteroid] Serpentis", 0, 5373, 4813, 0],
["[NPC][Deadspace] Serpentis", 0, 3110, 1929, 0],
["[NPC][Mission] Amarr Empire", 4464, 3546, 97, 0],
["[NPC][Mission] Caldari State", 0, 2139, 4867, 0],
["[NPC][Mission] CONCORD", 336, 134, 212, 412],
["[NPC][Mission] Gallente Federation", 9, 3712, 2758, 0],
["[NPC][Mission] Khanid", 612, 483, 43, 6],
["[NPC][Mission] Minmatar Republic", 1024, 388, 1655, 4285],
["[NPC][Mission] Mordus Legion", 25, 262, 625, 0],
["[NPC][Mission] Thukker", 0, 52, 10, 79],
["[NPC][Other] Sleepers", 1472, 1472, 1384, 1384],
["[NPC][Other] Sansha Incursion", 1682, 1347, 3678, 3678]]
for damageProfileRow in damageProfileList:
name, em, therm, kin, exp = damageProfileRow
@@ -130,61 +133,67 @@ class DefaultDatabaseValues:
if damageProfile is None:
damageProfile = es_DamagePattern(em, therm, kin, exp)
damageProfile.name = name
eos.db.save(damageProfile)
eos.db.add(damageProfile)
else:
damageProfile.emAmount = em
damageProfile.thermalAmount = therm
damageProfile.kineticAmount = kin
damageProfile.explosiveAmount = exp
eos.db.commit()
@classmethod
def importTargetProfileDefaults(cls):
targetProfileList = [["Uniform (25%)", "0.25", "0.25", "0.25", "0.25"],
["Uniform (50%)", "0.50", "0.50", "0.50", "0.50"],
["Uniform (75%)", "0.75", "0.75", "0.75", "0.75"],
["Uniform (90%)", "0.90", "0.90", "0.90", "0.90"],
["[T1 Resist]Shield", "0.0", "0.20", "0.40", "0.50"],
["[T1 Resist]Armor", "0.50", "0.45", "0.25", "0.10"],
["[T1 Resist]Hull", "0.33", "0.33", "0.33", "0.33"],
["[T1 Resist]Shield (+T2 DCU)", "0.125", "0.30", "0.475", "0.562"],
["[T1 Resist]Armor (+T2 DCU)", "0.575", "0.532", "0.363", "0.235"],
["[T1 Resist]Hull (+T2 DCU)", "0.598", "0.598", "0.598", "0.598"],
["[T2 Resist]Amarr (Shield)", "0.0", "0.20", "0.70", "0.875"],
["[T2 Resist]Amarr (Armor)", "0.50", "0.35", "0.625", "0.80"],
["[T2 Resist]Caldari (Shield)", "0.20", "0.84", "0.76", "0.60"],
["[T2 Resist]Caldari (Armor)", "0.50", "0.8625", "0.625", "0.10"],
["[T2 Resist]Gallente (Shield)", "0.0", "0.60", "0.85", "0.50"],
["[T2 Resist]Gallente (Armor)", "0.50", "0.675", "0.8375", "0.10"],
["[T2 Resist]Minmatar (Shield)", "0.75", "0.60", "0.40", "0.50"],
["[T2 Resist]Minmatar (Armor)", "0.90", "0.675", "0.25", "0.10"],
["[NPC][Asteroid] Angel Cartel", "0.54", "0.42", "0.37", "0.32"],
["[NPC][Asteroid] Blood Raiders", "0.34", "0.39", "0.45", "0.52"],
["[NPC][Asteroid] Guristas", "0.55", "0.35", "0.3", "0.48"],
["[NPC][Asteroid] Rogue Drones", "0.35", "0.38", "0.44", "0.49"],
["[NPC][Asteroid] Sanshas Nation", "0.35", "0.4", "0.47", "0.53"],
["[NPC][Asteroid] Serpentis", "0.49", "0.38", "0.29", "0.51"],
["[NPC][Deadspace] Angel Cartel", "0.59", "0.48", "0.4", "0.32"],
["[NPC][Deadspace] Blood Raiders", "0.31", "0.39", "0.47", "0.56"],
["[NPC][Deadspace] Guristas", "0.57", "0.39", "0.31", "0.5"],
["[NPC][Deadspace] Rogue Drones", "0.42", "0.42", "0.47", "0.49"],
["[NPC][Deadspace] Sanshas Nation", "0.31", "0.39", "0.47", "0.56"],
["[NPC][Deadspace] Serpentis", "0.49", "0.38", "0.29", "0.56"],
["[NPC][Mission] Amarr Empire", "0.34", "0.38", "0.42", "0.46"],
["[NPC][Mission] Caldari State", "0.51", "0.38", "0.3", "0.51"],
["[NPC][Mission] CONCORD", "0.47", "0.46", "0.47", "0.47"],
["[NPC][Mission] Gallente Federation", "0.51", "0.38", "0.31", "0.52"],
["[NPC][Mission] Khanid", "0.51", "0.42", "0.36", "0.4"],
["[NPC][Mission] Minmatar Republic", "0.51", "0.46", "0.41", "0.35"],
["[NPC][Mission] Mordus Legion", "0.32", "0.48", "0.4", "0.62"],
["[NPC][Other] Sleeper", "0.61", "0.61", "0.61", "0.61"],
["[NPC][Other] Sansha Incursion", "0.65", "0.63", "0.64", "0.65"],
["[NPC][Burner] Cruor (Blood Raiders)", "0.8", "0.73", "0.69", "0.67"],
["[NPC][Burner] Dramiel (Angel)", "0.35", "0.48", "0.61", "0.68"],
["[NPC][Burner] Daredevil (Serpentis)", "0.69", "0.59", "0.59", "0.43"],
["[NPC][Burner] Succubus (Sanshas Nation)", "0.35", "0.48", "0.61", "0.68"],
["[NPC][Burner] Worm (Guristas)", "0.48", "0.58", "0.69", "0.74"],
["[NPC][Burner] Enyo", "0.58", "0.72", "0.86", "0.24"],
["[NPC][Burner] Hawk", "0.3", "0.86", "0.79", "0.65"],
["[NPC][Burner] Jaguar", "0.78", "0.65", "0.48", "0.56"],
["[NPC][Burner] Vengeance", "0.66", "0.56", "0.75", "0.86"],
["[NPC][Burner] Ashimmu (Blood Raiders)", "0.8", "0.76", "0.68", "0.7"],
["[NPC][Burner] Talos", "0.68", "0.59", "0.59", "0.43"],
["[NPC][Burner] Sentinel", "0.58", "0.45", "0.52", "0.66"]]
targetProfileList = [["Uniform (25%)", 0.25, 0.25, 0.25, 0.25],
["Uniform (50%)", 0.50, 0.50, 0.50, 0.50],
["Uniform (75%)", 0.75, 0.75, 0.75, 0.75],
["Uniform (90%)", 0.90, 0.90, 0.90, 0.90],
["[T1 Resist]Shield", 0.0, 0.20, 0.40, 0.50],
["[T1 Resist]Armor", 0.50, 0.45, 0.25, 0.10],
["[T1 Resist]Hull", 0.33, 0.33, 0.33, 0.33],
["[T1 Resist]Shield (+T2 DCU)", 0.125, 0.30, 0.475, 0.562],
["[T1 Resist]Armor (+T2 DCU)", 0.575, 0.532, 0.363, 0.235],
["[T1 Resist]Hull (+T2 DCU)", 0.598, 0.598, 0.598, 0.598],
["[T2 Resist]Amarr (Shield)", 0.0, 0.20, 0.70, 0.875],
["[T2 Resist]Amarr (Armor)", 0.50, 0.35, 0.625, 0.80],
["[T2 Resist]Caldari (Shield)", 0.20, 0.84, 0.76, 0.60],
["[T2 Resist]Caldari (Armor)", 0.50, 0.8625, 0.625, 0.10],
["[T2 Resist]Gallente (Shield)", 0.0, 0.60, 0.85, 0.50],
["[T2 Resist]Gallente (Armor)", 0.50, 0.675, 0.8375, 0.10],
["[T2 Resist]Minmatar (Shield)", 0.75, 0.60, 0.40, 0.50],
["[T2 Resist]Minmatar (Armor)", 0.90, 0.675, 0.25, 0.10],
["[NPC][Asteroid] Angel Cartel", 0.54, 0.42, 0.37, 0.32],
["[NPC][Asteroid] Blood Raiders", 0.34, 0.39, 0.45, 0.52],
["[NPC][Asteroid] Guristas", 0.55, 0.35, 0.3, 0.48],
["[NPC][Asteroid] Rogue Drones", 0.35, 0.38, 0.44, 0.49],
["[NPC][Asteroid] Sanshas Nation", 0.35, 0.4, 0.47, 0.53],
["[NPC][Asteroid] Serpentis", 0.49, 0.38, 0.29, 0.51],
["[NPC][Deadspace] Angel Cartel", 0.59, 0.48, 0.4, 0.32],
["[NPC][Deadspace] Blood Raiders", 0.31, 0.39, 0.47, 0.56],
["[NPC][Deadspace] Guristas", 0.57, 0.39, 0.31, 0.5],
["[NPC][Deadspace] Rogue Drones", 0.42, 0.42, 0.47, 0.49],
["[NPC][Deadspace] Sanshas Nation", 0.31, 0.39, 0.47, 0.56],
["[NPC][Deadspace] Serpentis", 0.49, 0.38, 0.29, 0.56],
["[NPC][Mission] Amarr Empire", 0.34, 0.38, 0.42, 0.46],
["[NPC][Mission] Caldari State", 0.51, 0.38, 0.3, 0.51],
["[NPC][Mission] CONCORD", 0.47, 0.46, 0.47, 0.47],
["[NPC][Mission] Gallente Federation", 0.51, 0.38, 0.31, 0.52],
["[NPC][Mission] Khanid", 0.51, 0.42, 0.36, 0.4],
["[NPC][Mission] Minmatar Republic", 0.51, 0.46, 0.41, 0.35],
["[NPC][Mission] Mordus Legion", 0.32, 0.48, 0.4, 0.62],
["[NPC][Other] Sleeper", 0.61, 0.61, 0.61, 0.61],
["[NPC][Other] Sansha Incursion", 0.65, 0.63, 0.64, 0.65],
["[NPC][Burner] Cruor (Blood Raiders)", 0.8, 0.73, 0.69, 0.67],
["[NPC][Burner] Dramiel (Angel)", 0.35, 0.48, 0.61, 0.68],
["[NPC][Burner] Daredevil (Serpentis)", 0.69, 0.59, 0.59, 0.43],
["[NPC][Burner] Succubus (Sanshas Nation)", 0.35, 0.48, 0.61, 0.68],
["[NPC][Burner] Worm (Guristas)", 0.48, 0.58, 0.69, 0.74],
["[NPC][Burner] Enyo", 0.58, 0.72, 0.86, 0.24],
["[NPC][Burner] Hawk", 0.3, 0.86, 0.79, 0.65],
["[NPC][Burner] Jaguar", 0.78, 0.65, 0.48, 0.56],
["[NPC][Burner] Vengeance", 0.66, 0.56, 0.75, 0.86],
["[NPC][Burner] Ashimmu (Blood Raiders)", 0.8, 0.76, 0.68, 0.7],
["[NPC][Burner] Talos", 0.68, 0.59, 0.59, 0.43],
["[NPC][Burner] Sentinel", 0.58, 0.45, 0.52, 0.66]]
for targetProfileRow in targetProfileList:
name = targetProfileRow[0]
@@ -204,15 +213,25 @@ class DefaultDatabaseValues:
radius = targetProfileRow[7]
except:
radius = None
targetProfile = eos.db.eos.db.getTargetProfile(name)
targetProfile = eos.db.getTargetProfile(name)
if targetProfile is None:
targetProfile = es_TargetProfile(em, therm, kin, exp, maxVel, sigRad, radius)
targetProfile.name = name
eos.db.save(targetProfile)
eos.db.add(targetProfile)
else:
targetProfile.emAmount = em
targetProfile.thermalAmount = therm
targetProfile.kineticAmount = kin
targetProfile.explosiveAmount = exp
targetProfile.maxVelocity = maxVel
targetProfile.signatureRadius = sigRad
targetProfile.radius = radius
eos.db.commit()
@classmethod
def importRequiredDefaults(cls):
damageProfileList = [["Uniform", "25", "25", "25", "25"]]
damageProfileList = [["Uniform", 25, 25, 25, 25]]
for damageProfileRow in damageProfileList:
name, em, therm, kin, exp = damageProfileRow
@@ -220,4 +239,10 @@ class DefaultDatabaseValues:
if damageProfile is None:
damageProfile = es_DamagePattern(em, therm, kin, exp)
damageProfile.name = name
eos.db.save(damageProfile)
eos.db.add(damageProfile)
else:
damageProfile.emAmount = em
damageProfile.thermalAmount = therm
damageProfile.kineticAmount = kin
damageProfile.explosiveAmount = exp
eos.db.commit()

View File

@@ -1731,7 +1731,7 @@ class Effect596(BaseEffect):
ammoInfluenceRange
Used by:
Items from category: Charge (587 of 951)
Items from category: Charge (588 of 952)
"""
type = 'passive'
@@ -1783,7 +1783,7 @@ class Effect600(BaseEffect):
ammoTrackingMultiplier
Used by:
Items from category: Charge (182 of 951)
Items from category: Charge (182 of 952)
Charges from group: Projectile Ammo (128 of 128)
"""
@@ -2310,7 +2310,7 @@ class Effect804(BaseEffect):
ammoInfluenceCapNeed
Used by:
Items from category: Charge (493 of 951)
Items from category: Charge (494 of 952)
"""
type = 'passive'
@@ -9215,7 +9215,7 @@ class Effect3025(BaseEffect):
Used by:
Modules from group: Energy Weapon (101 of 214)
Modules from group: Hybrid Weapon (105 of 221)
Modules from group: Precursor Weapon (18 of 18)
Modules from group: Precursor Weapon (19 of 19)
Modules from group: Projectile Weapon (99 of 165)
"""
@@ -11746,7 +11746,7 @@ class Effect3771(BaseEffect):
armorHPBonusAddPassive
Used by:
Subsystems from group: Defensive Systems (9 of 12)
Subsystems from group: Defensive Subsystem (9 of 12)
"""
type = 'passive'
@@ -11761,7 +11761,7 @@ class Effect3773(BaseEffect):
hardPointModifierEffect
Used by:
Subsystems from group: Offensive Systems (12 of 12)
Subsystems from group: Offensive Subsystem (12 of 12)
"""
type = 'passive'
@@ -11794,7 +11794,7 @@ class Effect3782(BaseEffect):
powerOutputAddPassive
Used by:
Subsystems from group: Offensive Systems (8 of 12)
Subsystems from group: Offensive Subsystem (8 of 12)
"""
type = 'passive'
@@ -11809,7 +11809,7 @@ class Effect3783(BaseEffect):
cpuOutputAddCpuOutputPassive
Used by:
Subsystems from group: Offensive Systems (8 of 12)
Subsystems from group: Offensive Subsystem (8 of 12)
"""
type = 'passive'
@@ -11824,7 +11824,7 @@ class Effect3797(BaseEffect):
droneBandwidthAddPassive
Used by:
Subsystems from group: Offensive Systems (12 of 12)
Subsystems from group: Offensive Subsystem (12 of 12)
"""
type = 'passive'
@@ -11839,7 +11839,7 @@ class Effect3799(BaseEffect):
droneCapacityAdddroneCapacityPassive
Used by:
Subsystems from group: Offensive Systems (12 of 12)
Subsystems from group: Offensive Subsystem (12 of 12)
"""
type = 'passive'
@@ -11869,7 +11869,7 @@ class Effect3808(BaseEffect):
signatureRadiusAddPassive
Used by:
Subsystems from group: Defensive Systems (8 of 12)
Subsystems from group: Defensive Subsystem (8 of 12)
Subsystems named like: Propulsion Interdiction Nullifier (4 of 4)
"""
@@ -11916,7 +11916,7 @@ class Effect3831(BaseEffect):
shieldCapacityAddPassive
Used by:
Subsystems from group: Defensive Systems (8 of 12)
Subsystems from group: Defensive Subsystem (8 of 12)
"""
type = 'passive'
@@ -18769,7 +18769,7 @@ class Effect5262(BaseEffect):
covertOpsCloakCpuPenalty
Used by:
Subsystems from group: Defensive Systems (8 of 12)
Subsystems from group: Defensive Subsystem (8 of 12)
"""
type = 'passive'
@@ -18785,7 +18785,7 @@ class Effect5263(BaseEffect):
covertCynoCpuPenalty
Used by:
Subsystems from group: Defensive Systems (8 of 12)
Subsystems from group: Defensive Subsystem (8 of 12)
"""
type = 'passive'
@@ -18817,7 +18817,7 @@ class Effect5265(BaseEffect):
warfareLinkCpuPenalty
Used by:
Subsystems from group: Offensive Systems (8 of 12)
Subsystems from group: Offensive Subsystem (8 of 12)
"""
type = 'passive'
@@ -29035,7 +29035,8 @@ class Effect6582(BaseEffect):
# Turrets
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Capital Energy Turret') or
mod.item.requiresSkill('Capital Hybrid Turret') or
mod.item.requiresSkill('Capital Projectile Turret'),
mod.item.requiresSkill('Capital Projectile Turret') or
mod.item.requiresSkill('Capital Precursor Weapon'),
'damageMultiplier', src.getModifiedItemAttr('siegeTurretDamageBonus'), **kwargs)
fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill('Motion Prediction'),
@@ -33922,7 +33923,7 @@ class Effect6995(BaseEffect):
targetDisintegratorAttack
Used by:
Modules from group: Precursor Weapon (18 of 18)
Modules from group: Precursor Weapon (19 of 19)
"""
type = 'active'
@@ -35120,6 +35121,7 @@ class Effect7092(BaseEffect):
Ship: Hydra
Ship: Leshak
Ship: Tiamat
Ship: Triglavian Dreadnought
"""
type = 'passive'
@@ -35143,6 +35145,7 @@ class Effect7093(BaseEffect):
Ship: Hydra
Ship: Leshak
Ship: Tiamat
Ship: Triglavian Dreadnought
"""
type = 'passive'
@@ -35165,6 +35168,7 @@ class Effect7094(BaseEffect):
Ship: Hydra
Ship: Leshak
Ship: Tiamat
Ship: Triglavian Dreadnought
"""
type = 'passive'
@@ -35221,6 +35225,7 @@ class Effect7112(BaseEffect):
Ship: Hydra
Ship: Leshak
Ship: Tiamat
Ship: Triglavian Dreadnought
"""
type = 'passive'
@@ -36010,7 +36015,7 @@ class Effect7232(BaseEffect):
modifyDamageMultiplierBonusMax
Used by:
Implants named like: Low Grade Mimesis (5 of 6)
Implants named like: Grade Mimesis (10 of 18)
"""
type = 'passive'
@@ -36027,7 +36032,7 @@ class Effect7233(BaseEffect):
modifyDamageMultiplierBonusPerCycle
Used by:
Implants named like: Low Grade Mimesis (5 of 6)
Implants named like: Grade Mimesis (10 of 18)
"""
type = 'passive'
@@ -36044,7 +36049,7 @@ class Effect7234(BaseEffect):
implantSetMimesis
Used by:
Implants named like: Low Grade Mimesis (6 of 6)
Implants named like: Grade Mimesis (12 of 18)
"""
runTime = 'early'
@@ -36058,3 +36063,69 @@ class Effect7234(BaseEffect):
fit.appliedImplants.filteredItemMultiply(
lambda imp: imp.item.group.name == 'Cyberimplant', 'damageMultiplierBonusPerCycleModifier',
implant.getModifiedItemAttr('setBonusMimesis'), **kwargs)
class Effect7238(BaseEffect):
"""
shipBonusDreadnoughtPC1DamageMultMax
Used by:
Ship: Triglavian Dreadnought
"""
type = 'passive'
@staticmethod
def handler(fit, src, context, projectionRange, **kwargs):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Capital Precursor Weapon'), 'damageMultiplier',
src.getModifiedItemAttr('shipBonusDreadnoughtPC1'), skill='Precursor Dreadnought', **kwargs)
class Effect7239(BaseEffect):
"""
shipBonusDreadnoughtPC2ArmorResists
Used by:
Ship: Triglavian Dreadnought
"""
type = 'passive'
@staticmethod
def handler(fit, src, context, projectionRange, **kwargs):
for type in ('Em', 'Explosive', 'Kinetic', 'Thermal'):
fit.ship.boostItemAttr('armor{0}DamageResonance'.format(type), src.getModifiedItemAttr('shipBonusDreadnoughtPC2'),
skill='Precursor Dreadnought', **kwargs)
class Effect7240(BaseEffect):
"""
shipBonusDreadnoughtPC3WeaponSpeed
Used by:
Ship: Triglavian Dreadnought
"""
type = 'passive'
@staticmethod
def handler(fit, src, context, projectionRange, **kwargs):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Capital Precursor Weapon'), 'speed',
src.getModifiedItemAttr('shipBonusDreadnoughtPC3'), skill='Precursor Dreadnought', **kwargs)
class Effect7242(BaseEffect):
"""
capitalPrecursorTurretDmgBonusRequiredSkill
Used by:
Skill: Capital Precursor Weapon
"""
type = 'passive'
@staticmethod
def handler(fit, container, context, projectionRange, **kwargs):
level = container.level if 'skill' in context else 1
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Capital Precursor Weapon'),
'damageMultiplier', container.getModifiedItemAttr('damageMultiplierBonus') * level, **kwargs)

View File

@@ -609,10 +609,6 @@ class MetaGroup(EqBase):
pass
class MetaType(EqBase):
pass
class Unit(EqBase):
def __init__(self):

View File

@@ -122,7 +122,7 @@ class Booster(HandledItem, ItemAttrShortcut):
(effect.isType("passive") or effect.isType("boosterSideEffect")):
if effect.isType("boosterSideEffect") and effect not in self.activeSideEffectEffects:
continue
effect.handler(fit, self, ("booster",), None)
effect.handler(fit, self, ("booster",), None, effect=effect)
@validates("ID", "itemID", "ammoID", "active")
def validator(self, key, val):

View File

@@ -422,7 +422,7 @@ class Skill(HandledItem):
(not fit.isStructure or effect.isType("structure")) and \
effect.activeByDefault:
try:
effect.handler(fit, self, ("skill",), None)
effect.handler(fit, self, ("skill",), None, effect=effect)
except AttributeError:
continue

View File

@@ -334,7 +334,7 @@ class Drone(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
if self.charge:
for effect in self.charge.effects.values():
if effect.runTime == runTime and effect.activeByDefault:
effect.handler(fit, self, ("droneCharge",), projectionRange)
effect.handler(fit, self, ("droneCharge",), projectionRange, effect=effect)
def __deepcopy__(self, memo):
copy = Drone(self.item)

View File

@@ -95,7 +95,7 @@ class Implant(HandledItem, ItemAttrShortcut):
return
for effect in self.item.effects.values():
if effect.runTime == runTime and effect.isType("passive") and effect.activeByDefault:
effect.handler(fit, self, ("implant",), None)
effect.handler(fit, self, ("implant",), None, effect=effect)
@validates("fitID", "itemID", "active")
def validator(self, key, val):

View File

@@ -54,7 +54,7 @@ class Mode(ItemAttrShortcut, HandledItem):
if self.item:
for effect in self.item.effects.values():
if effect.runTime == runTime and effect.activeByDefault:
effect.handler(fit, self, ("module",), None)
effect.handler(fit, self, ("module",), None, effect=effect)
def __deepcopy__(self, memo):
copy = Mode(self.item)

View File

@@ -882,7 +882,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
and not forceProjected \
and effect.activeByDefault \
and ((gang and effect.isType("gang")) or not gang):
effect.handler(fit, self, context, projectionRange)
effect.handler(fit, self, context, projectionRange, effect=effect)
for effect in self.item.effects.values():
if effect.runTime == runTime and \

View File

@@ -98,7 +98,7 @@ class Ship(ItemAttrShortcut, HandledItem):
# skillbook modifiers will use the stale modifier value
# GH issue #351
fit.register(self)
effect.handler(fit, self, ("ship",), None)
effect.handler(fit, self, ("ship",), None, effect=effect)
def validateModeItem(self, item, owner=None):
""" Checks if provided item is a valid mode """

BIN
eve.db

Binary file not shown.

View File

@@ -116,9 +116,7 @@ class GraphFrame(AuxiliaryFrame):
self.SetMinSize(newSize)
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
if event.GetKeyCode() == wx.WXK_ESCAPE and event.GetModifiers() == wx.MOD_NONE:
self.Close()
return
event.Skip()

View File

@@ -152,10 +152,10 @@ class BaseWrapperList(gui.display.Display):
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == 65 and mstate.GetModifiers() == wx.MOD_CONTROL:
modifiers = event.GetModifiers()
if keycode == 65 and modifiers == wx.MOD_CONTROL:
self.selectAll()
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and mstate.GetModifiers() == wx.MOD_NONE:
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and modifiers == wx.MOD_NONE:
self.removeWrappers(self.getSelectedWrappers())
event.Skip()

View File

@@ -86,6 +86,7 @@ class AdditionsPane(TogglePanel):
self.notebook.AddPage(self.notes, "Notes", image=notesImg, closeable=False)
self.mainFrame.Bind(GE.FIT_CHANGED, self.OnFitChanged)
self.mainFrame.Bind(GE.FIT_NOTES_CHANGED, self.OnNotesChanged)
self.notebook.SetSelection(0)
@@ -118,6 +119,10 @@ class AdditionsPane(TogglePanel):
return
self.updateExtraText()
def OnNotesChanged(self, event):
event.Skip()
self.updateExtraText()
def updateExtraText(self):
refresh = False
for i in range(self.notebook.GetPageCount()):

View File

@@ -19,6 +19,7 @@
import io
import os.path
import zipfile
from collections import OrderedDict
# noinspection PyPackageRequirements
@@ -32,15 +33,12 @@ pyfalog = Logger(__name__)
class BitmapLoader:
# try:
# archive = zipfile.ZipFile(os.path.join(config.pyfaPath, 'imgs.zip'), 'r')
# logging.info("Using zipped image files.")
# except (IOError, TypeError):
# logging.info("Using local image files.")
# archive = None
pyfalog.info("Using local image files.")
archive = None
try:
archive = zipfile.ZipFile(config.imgsZIP, 'r')
pyfalog.info("Using zipped image files.")
except (IOError, TypeError):
pyfalog.info("Using local image files.")
archive = None
cached_bitmaps = OrderedDict()
dont_use_cached_bitmaps = False
@@ -131,8 +129,8 @@ class BitmapLoader:
try:
img_data = cls.archive.read(path)
sbuf = io.StringIO(img_data)
return wx.ImageFromStream(sbuf)
bbuf = io.BytesIO(img_data)
return wx.Image(bbuf)
except KeyError:
pyfalog.warning("Missing icon file from zip: {0}".format(path))
else:

View File

@@ -88,12 +88,12 @@ class BoosterView(d.Display):
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
modifiers = event.GetModifiers()
if keycode == wx.WXK_ESCAPE and modifiers == wx.MOD_NONE:
self.unselectAll()
elif keycode == 65 and mstate.GetModifiers() == wx.MOD_CONTROL:
elif keycode == 65 and modifiers == wx.MOD_CONTROL:
self.selectAll()
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and mstate.GetModifiers() == wx.MOD_NONE:
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and modifiers == wx.MOD_NONE:
boosters = self.getSelectedBoosters()
self.removeBoosters(boosters)
event.Skip()

View File

@@ -104,12 +104,12 @@ class CargoView(d.Display):
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
modifiers = event.GetModifiers()
if keycode == wx.WXK_ESCAPE and modifiers == wx.MOD_NONE:
self.unselectAll()
elif keycode == 65 and mstate.GetModifiers() == wx.MOD_CONTROL:
elif keycode == 65 and modifiers == wx.MOD_CONTROL:
self.selectAll()
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and mstate.GetModifiers() == wx.MOD_NONE:
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and modifiers == wx.MOD_NONE:
cargos = self.getSelectedCargos()
self.removeCargos(cargos)
event.Skip()

View File

@@ -102,12 +102,12 @@ class CommandView(d.Display):
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
modifiers = event.GetModifiers()
if keycode == wx.WXK_ESCAPE and modifiers == wx.MOD_NONE:
self.unselectAll()
elif keycode == 65 and mstate.GetModifiers() == wx.MOD_CONTROL:
elif keycode == 65 and modifiers == wx.MOD_CONTROL:
self.selectAll()
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and mstate.GetModifiers() == wx.MOD_NONE:
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and modifiers == wx.MOD_NONE:
commandFits = self.getSelectedCommandFits()
self.removeCommandFits(commandFits)
event.Skip()

View File

@@ -120,12 +120,12 @@ class DroneView(Display):
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
modifiers = event.GetModifiers()
if keycode == wx.WXK_ESCAPE and modifiers == wx.MOD_NONE:
self.unselectAll()
elif keycode == 65 and mstate.GetModifiers() == wx.MOD_CONTROL:
elif keycode == 65 and modifiers == wx.MOD_CONTROL:
self.selectAll()
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and mstate.GetModifiers() == wx.MOD_NONE:
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and modifiers == wx.MOD_NONE:
drones = self.getSelectedDrones()
self.removeDroneStacks(drones)
event.Skip()
@@ -260,7 +260,7 @@ class DroneView(Display):
drone = self.drones[row]
except IndexError:
return
if wx.GetMouseState().GetModifiers() == wx.MOD_ALT:
if event.GetModifiers() == wx.MOD_ALT:
self.removeDroneStacks([drone])
else:
self.removeDrone(drone)

View File

@@ -205,12 +205,12 @@ class FighterDisplay(d.Display):
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
modifiers = event.GetModifiers()
if keycode == wx.WXK_ESCAPE and modifiers == wx.MOD_NONE:
self.unselectAll()
elif keycode == 65 and mstate.GetModifiers() == wx.MOD_CONTROL:
elif keycode == 65 and modifiers == wx.MOD_CONTROL:
self.selectAll()
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and mstate.GetModifiers() == wx.MOD_NONE:
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and modifiers == wx.MOD_NONE:
fighters = self.getSelectedFighters()
self.removeFighters(fighters)
event.Skip()
@@ -315,12 +315,11 @@ class FighterDisplay(d.Display):
if row != -1:
col = self.getColumn(event.Position)
if col != self.getColIndex(State):
mstate = wx.GetMouseState()
try:
fighter = self.fighters[row]
except IndexError:
return
if mstate.GetModifiers() == wx.MOD_ALT:
if event.GetModifiers() == wx.MOD_ALT:
fighters = getSimilarFighters(self.original, fighter)
else:
fighters = [fighter]

View File

@@ -162,12 +162,12 @@ class ImplantDisplay(d.Display):
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
modifiers = event.GetModifiers()
if keycode == wx.WXK_ESCAPE and modifiers == wx.MOD_NONE:
self.unselectAll()
elif keycode == 65 and mstate.GetModifiers() == wx.MOD_CONTROL:
elif keycode == 65 and modifiers == wx.MOD_CONTROL:
self.selectAll()
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and mstate.GetModifiers() == wx.MOD_NONE:
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and modifiers == wx.MOD_NONE:
implants = self.getSelectedImplants()
self.removeImplants(implants)
event.Skip()

View File

@@ -1,10 +1,11 @@
# noinspection PyPackageRequirements
import wx
from service.fit import Fit
import gui.globalEvents as GE
import gui.mainFrame
from gui.utils.helpers_wxPython import HandleCtrlBackspace
from gui.utils.numberFormatter import formatAmount
from service.fit import Fit
class NotesView(wx.Panel):
@@ -14,14 +15,14 @@ class NotesView(wx.Panel):
self.lastFitId = None
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
mainSizer = wx.BoxSizer(wx.VERTICAL)
self.editNotes = wx.TextCtrl(self, style=wx.TE_MULTILINE | wx.BORDER_NONE, )
mainSizer.Add(self.editNotes, 1, wx.EXPAND)
self.editNotes = wx.TextCtrl(self, style=wx.TE_MULTILINE | wx.BORDER_NONE)
mainSizer.Add(self.editNotes, 1, wx.EXPAND | wx.ALL, 10)
self.SetSizer(mainSizer)
self.mainFrame.Bind(GE.FIT_CHANGED, self.fitChanged)
self.Bind(wx.EVT_TEXT, self.onText)
self.editNotes.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown)
self.saveTimer = wx.Timer(self)
self.Bind(wx.EVT_TIMER, self.delayedSave, self.saveTimer)
self.changeTimer = wx.Timer(self)
self.Bind(wx.EVT_TIMER, self.delayedSave, self.changeTimer)
def OnKeyDown(self, event):
if event.RawControlDown() and event.GetKeyCode() == wx.WXK_BACK:
@@ -38,7 +39,7 @@ class NotesView(wx.Panel):
sFit = Fit.getInstance()
fit = sFit.getFit(activeFitID)
self.saveTimer.Stop() # cancel any pending timers
self.changeTimer.Stop() # cancel any pending timers
self.Parent.Parent.DisablePage(self, not fit or fit.isStructure)
@@ -51,13 +52,32 @@ class NotesView(wx.Panel):
return
elif activeFitID != self.lastFitId:
self.lastFitId = activeFitID
self.editNotes.SetValue(fit.notes or "")
self.editNotes.ChangeValue(fit.notes or "")
wx.PostEvent(self.mainFrame, GE.FitNotesChanged())
def onText(self, event):
# delay the save so we're not writing to sqlite on every keystroke
self.saveTimer.Stop() # cancel the existing timer
self.saveTimer.Start(1000, True)
self.changeTimer.Stop() # cancel the existing timer
self.changeTimer.Start(1000, True)
def delayedSave(self, event):
event.Skip()
sFit = Fit.getInstance()
sFit.editNotes(self.lastFitId, self.editNotes.GetValue())
wx.PostEvent(self.mainFrame, GE.FitNotesChanged())
def getTabExtraText(self):
fitID = self.mainFrame.getActiveFit()
if fitID is None:
return None
sFit = Fit.getInstance()
fit = sFit.getFit(fitID)
if fit is None:
return None
opt = sFit.serviceFittingOptions["additionsLabels"]
# Amount of active implants
if opt in (1, 2):
amount = len(self.editNotes.GetValue())
return ' ({})'.format(formatAmount(amount, 2, 0, 3)) if amount else None
else:
return None

View File

@@ -129,12 +129,12 @@ class ProjectedView(d.Display):
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
modifiers = event.GetModifiers()
if keycode == wx.WXK_ESCAPE and modifiers == wx.MOD_NONE:
self.unselectAll()
elif keycode == 65 and mstate.GetModifiers() == wx.MOD_CONTROL:
elif keycode == 65 and modifiers == wx.MOD_CONTROL:
self.selectAll()
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and mstate.GetModifiers() == wx.MOD_NONE:
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and modifiers == wx.MOD_NONE:
self.mainFrame.command.Submit(cmd.GuiRemoveProjectedItemsCommand(
fitID=self.mainFrame.getActiveFit(),
items=self.getSelectedProjectors(),
@@ -267,7 +267,7 @@ class ProjectedView(d.Display):
selection = self.getSelectedProjectors()
if mainItem not in selection:
selection = [mainItem]
modPressed = wx.GetMouseState().GetModifiers() == wx.MOD_ALT
modPressed = event.GetModifiers() == wx.MOD_ALT
fitID = self.mainFrame.getActiveFit()
if isinstance(mainItem, EosModule) and modPressed:
fit = Fit.getInstance().getFit(fitID)
@@ -342,7 +342,7 @@ class ProjectedView(d.Display):
if mainItem is None:
return
fitID = self.mainFrame.getActiveFit()
modPressed = wx.GetMouseState().GetModifiers() == wx.MOD_ALT
modPressed = event.GetModifiers() == wx.MOD_ALT
if isinstance(mainItem, EosFit):
self.mainFrame.command.Submit(cmd.GuiRemoveProjectedItemsCommand(
fitID=fitID, items=[mainItem], amount=math.inf if modPressed else 1))

View File

@@ -1,7 +1,6 @@
# noinspection PyPackageRequirements
import wx
import gui.fitCommands as cmd
import gui.mainFrame
from gui.builtinViews.emptyView import BlankPage
from gui.contextMenu import ContextMenuUnconditional

View File

@@ -52,19 +52,18 @@ class ChangeItemProjectionRange(ContextMenuCombined):
newRange = cleanInputFloat * 1000
else:
newRange = None
fitID = self.mainFrame.getActiveFit()
items = selection
if wx.GetMouseState().GetModifiers() in (wx.MOD_ALT, wx.MOD_CONTROL):
if isinstance(mainItem, EosModule):
fit = Fit.getInstance().getFit(fitID)
positions = getSimilarModPositions(fit.projectedModules, mainItem)
items = [fit.projectedModules[p] for p in positions]
elif isinstance(mainItem, EosFighter):
fit = Fit.getInstance().getFit(fitID)
items = getSimilarFighters(fit.projectedFighters, mainItem)
self.mainFrame.command.Submit(cmd.GuiChangeProjectedItemsProjectionRangeCommand(
fitID=fitID, items=items, projectionRange=newRange))
fitID = self.mainFrame.getActiveFit()
items = selection
if wx.GetMouseState().GetModifiers() in (wx.MOD_ALT, wx.MOD_CONTROL):
if isinstance(mainItem, EosModule):
fit = Fit.getInstance().getFit(fitID)
positions = getSimilarModPositions(fit.projectedModules, mainItem)
items = [fit.projectedModules[p] for p in positions]
elif isinstance(mainItem, EosFighter):
fit = Fit.getInstance().getFit(fitID)
items = getSimilarFighters(fit.projectedFighters, mainItem)
self.mainFrame.command.Submit(cmd.GuiChangeProjectedItemsProjectionRangeCommand(
fitID=fitID, items=items, projectionRange=newRange))
ChangeItemProjectionRange.register()

View File

@@ -48,10 +48,9 @@ class ItemStats(ContextMenuSingle):
if srcContext == "fittingModule" and stuff.isEmpty:
return
mstate = wx.GetMouseState()
reuse = False
if mstate.GetModifiers() == wx.MOD_SHIFT:
if wx.GetMouseState().GetModifiers() == wx.MOD_SHIFT:
reuse = True
if self.mainFrame.GetActiveStatsWindow() is None and reuse:

View File

@@ -56,9 +56,7 @@ class ChangeItemToVariation(ContextMenuCombined):
fit = sFit.getFit(self.mainFrame.getActiveFit())
def get_metalevel(x):
if 'metaLevel' not in x.attributes:
return 0
return x.attributes['metaLevel'].value
return x.metaLevel or 0
def get_metagroup(x):
# We want deadspace before officer mods

View File

@@ -226,9 +226,8 @@ class ChangeModuleAmmo(ContextMenuCombined):
fitID = self.mainFrame.getActiveFit()
sFit = Fit.getInstance()
fit = sFit.getFit(fitID)
mstate = wx.GetMouseState()
# Switch in selection or all modules, depending on modifier key state and settings
switchAll = sFit.serviceFittingOptions['ammoChangeAll'] is not (mstate.GetModifiers() in (wx.MOD_ALT, wx.MOD_CONTROL))
switchAll = sFit.serviceFittingOptions['ammoChangeAll'] is not (wx.GetMouseState().GetModifiers() in (wx.MOD_ALT, wx.MOD_CONTROL))
if switchAll:
if self.srcContext == 'fittingModule':
command = cmd.GuiChangeLocalModuleChargesCommand

View File

@@ -38,6 +38,7 @@ class ItemAffectedBy(wx.Panel):
def __init__(self, parent, stuff, item):
wx.Panel.__init__(self, parent)
self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE))
self.stuff = stuff
self.item = item
@@ -52,6 +53,7 @@ class ItemAffectedBy(wx.Panel):
mainSizer = wx.BoxSizer(wx.VERTICAL)
self.affectedBy = wx.TreeCtrl(self, style=wx.TR_DEFAULT_STYLE | wx.TR_HIDE_ROOT | wx.NO_BORDER)
self.affectedBy.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))
mainSizer.Add(self.affectedBy, 1, wx.ALL | wx.EXPAND, 0)
self.m_staticline = wx.StaticLine(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)

View File

@@ -21,6 +21,8 @@ class ItemParams(wx.Panel):
def __init__(self, parent, stuff, item, context=None):
# Had to manually set the size here, otherwise column widths couldn't be calculated correctly. See #1878
wx.Panel.__init__(self, parent, size=(1000, 1000))
self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE))
mainSizer = wx.BoxSizer(wx.VERTICAL)
self.paramList = wx.lib.agw.hypertreelist.HyperTreeList(self, wx.ID_ANY, agwStyle=wx.TR_HIDE_ROOT | wx.TR_NO_LINES | wx.TR_FULL_ROW_HIGHLIGHT | wx.TR_HAS_BUTTONS)

View File

@@ -9,7 +9,7 @@ from gui.utils.numberFormatter import formatAmount
def defaultSort(item):
return (item.attributes['metaLevel'].value if 'metaLevel' in item.attributes else 0, item.name)
return (item.metaLevel or 0, item.name)
class ItemCompare(wx.Panel):
@@ -19,6 +19,7 @@ class ItemCompare(wx.Panel):
sPrice.getPrices(items, self.UpdateList, fetchTimeout=90)
wx.Panel.__init__(self, parent)
self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE))
mainSizer = wx.BoxSizer(wx.VERTICAL)
self.paramList = AutoListCtrl(self, wx.ID_ANY,

View File

@@ -21,6 +21,7 @@ class ItemMutatorPanel(wx.Panel):
def __init__(self, parent, mod):
wx.Panel.__init__(self, parent)
self.stuff = mod
self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE))
mainSizer = wx.BoxSizer(wx.VERTICAL)
@@ -72,6 +73,7 @@ class ItemMutatorList(wx.ScrolledWindow):
self.SetScrollRate(0, 15)
self.carryingFitID = gui.mainFrame.MainFrame.getInstance().getActiveFit()
self.initialMutations = {}
self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))
self.mod = mod
self.timer = None

View File

@@ -215,7 +215,7 @@ class ItemView(Display):
# Get position of market group
metagrpid = sMkt.getMetaGroupIdByItem(item)
metatab = self.metaMap.get(metagrpid)
metalvl = self.metalvls.get(item.ID, 0)
metalvl = item.metaLevel or 0
return catname, mktgrpid, parentname, metatab, metalvl, item.name
@@ -237,11 +237,6 @@ class ItemView(Display):
def populate(self, items):
if len(items) > 0:
# Get dictionary with meta level attribute
sAttr = Attribute.getInstance()
attrs = sAttr.getAttributeInfo("metaLevel")
sMkt = self.sMkt
self.metalvls = sMkt.directAttrRequest(items, attrs)
# Clear selection
self.unselectAll()
# Perform sorting, using item's meta levels besides other stuff
@@ -254,11 +249,6 @@ class ItemView(Display):
def refresh(self, items):
if len(items) > 1:
# Get dictionary with meta level attribute
sAttr = Attribute.getInstance()
attrs = sAttr.getAttributeInfo("metaLevel")
sMkt = self.sMkt
self.metalvls = sMkt.directAttrRequest(items, attrs)
# Re-sort stuff
if self.marketBrowser.mode != 'recent':
items.sort(key=self.itemSort)

View File

@@ -19,8 +19,7 @@ class PFContextMenuPref(PreferenceView):
self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
mainSizer.Add(self.stTitle, 0, wx.ALL, 5)
mainSizer.Add(self.stTitle, 0, wx.EXPAND | wx.ALL, 5)
self.stSubTitle = wx.StaticText(panel, wx.ID_ANY,
"Disabling context menus can improve responsiveness.",

View File

@@ -19,7 +19,7 @@ class PFGeneralPref(PreferenceView):
self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
mainSizer.Add(self.stTitle, 0, wx.ALL, 5)
mainSizer.Add(self.stTitle, 0, wx.EXPAND | wx.ALL, 5)
self.stSubTitle = wx.StaticText(panel, wx.ID_ANY, "(Cannot be changed while pyfa is running. Set via command line switches.)",
wx.DefaultPosition, wx.DefaultSize, 0)

View File

@@ -35,7 +35,7 @@ class PFFittingEnginePref(PreferenceView):
self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
mainSizer.Add(self.stTitle, 0, wx.ALL, 5)
mainSizer.Add(self.stTitle, 0, wx.EXPAND | wx.ALL, 5)
self.m_staticline1 = wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
mainSizer.Add(self.m_staticline1, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)

View File

@@ -24,8 +24,7 @@ class PFEsiPref(PreferenceView):
self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
mainSizer.Add(self.stTitle, 0, wx.ALL, 5)
mainSizer.Add(self.stTitle, 0, wx.EXPAND | wx.ALL, 5)
self.m_staticline1 = wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
mainSizer.Add(self.m_staticline1, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)

View File

@@ -1,496 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# noinspection PyPackageRequirements
import wx
from gui.bitmap_loader import BitmapLoader
from gui.preferenceView import PreferenceView
###########################################################################
# Class PFGaugePref
###########################################################################
class PFGaugePreview(wx.Window):
def __init__(self, parent, id=wx.ID_ANY, value=0, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0):
wx.Window.__init__(self, parent, id, pos=pos, size=size, style=style)
self.value = float(value)
self.oldValue = self.value
self.percS = 0
self.percE = 0
self.animate = True
self.animDir = 1
self._fractionDigits = 2
self.colorS = wx.Colour(0, 0, 0, 255)
self.colorE = wx.Colour(0, 0, 0, 255)
self.gradientStart = 0
self.bkColor = wx.Colour(0, 0, 0, 255)
self.SetMinSize((100, -1))
self.font = wx.FontFromPixelSize((0, 13), wx.SWISS, wx.NORMAL, wx.NORMAL, False)
self.timerID = wx.NewId()
self.timer = wx.Timer(self, self.timerID)
self.timerInterval = 20
self.Bind(wx.EVT_PAINT, self.OnPaint)
self.Bind(wx.EVT_ENTER_WINDOW, self.OnWindowEnter)
self.Bind(wx.EVT_LEAVE_WINDOW, self.OnWindowLeave)
self.Bind(wx.EVT_TIMER, self.OnTimer)
self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBk)
self.SetBackgroundStyle(wx.BG_STYLE_PAINT)
def OnEraseBk(self, event):
pass
def OnTimer(self, event):
if event.GetId() == self.timerID:
self.value += self.animDir
if self.value > 100:
self.value = 100
self.animDir = -1
if self.value < 0:
self.value = 0
self.animDir = 1
self.Refresh()
def OnWindowEnter(self, event):
if not self.animate:
return
self.oldValue = self.value
if self.timer.IsRunning():
self.timer.Stop()
self.timer.Start(self.timerInterval)
event.Skip()
def OnWindowLeave(self, event):
if not self.animate:
return
if self.timer.IsRunning():
self.timer.Stop()
self.value = self.oldValue
self.Refresh()
event.Skip()
def CanAnimate(self, anim=True):
self.animate = anim
if self.timer.IsRunning():
self.timer.Stop()
self.value = self.oldValue
self.Refresh()
def SetGradientStart(self, value):
self.gradientStart = value
self.Refresh()
def SetColour(self, colorS, colorE):
self.colorS = colorS
self.colorE = colorE
self.Refresh()
def SetValue(self, value):
self.value = min(max(value, 0), 100)
self.Refresh()
def SetPercentages(self, start, end):
self.percS = start
self.percE = end
self.Refresh()
def OnPaint(self, event):
pass
# rect = self.GetClientRect()
# dc = wx.AutoBufferedPaintDC(self)
# dc.SetBackground(wx.Brush(self.bkColor))
# dc.Clear()
#
# value = float(self.value)
# if self.percS >= 100:
# w = rect.width
# else:
# w = rect.width * (float(value) / 100)
# r = copy.copy(rect)
# r.width = w
#
# color = CalculateTransitionColor(self.colorS, self.colorE, float(value) / 100)
# if self.gradientStart > 0:
# gcolor = color.BrightenColor(color, float(self.gradientStart) / 100)
# gMid = color.BrightenColor(color, float(self.gradientStart / 2) / 100)
# else:
# gcolor = color.DarkenColor(color, float(-self.gradientStart) / 100)
# gMid = color.DarkenColor(color, float(-self.gradientStart / 2) / 100)
#
# gBmp = drawUtils.DrawGradientBar(r.width, r.height, gMid, color, gcolor)
# dc.DrawBitmap(gBmp, 0, 0)
# dc.SetFont(self.font)
#
# r = copy.copy(rect)
# r.left += 1
# r.top += 1
#
# formatStr = "{0:." + str(self._fractionDigits) + "f}%"
# value = (self.percE - self.percS) * value / (self.percE - self.percS)
# value = self.percS + (self.percE - self.percS) * value / 100
#
# dc.SetTextForeground(wx.Colour(80, 80, 80))
# dc.DrawLabel(formatStr.format(value), r, wx.ALIGN_CENTER)
#
# dc.SetTextForeground(wx.Colour(255, 255, 255))
# dc.DrawLabel(formatStr.format(value), rect, wx.ALIGN_CENTER)
class PFGaugePref(PreferenceView):
title = "Pyfa Gauge Theme"
def populatePanel(self, panel):
self.InitDefaultColours()
mainSizer = wx.BoxSizer(wx.VERTICAL)
gSizer1 = wx.BoxSizer(wx.HORIZONTAL)
self.st0100 = wx.StaticText(panel, wx.ID_ANY, "0 - 100", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_RIGHT)
self.st0100.Wrap(-1)
gSizer1.Add(self.st0100, 1, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
self.cp0100S = wx.ColourPickerCtrl(panel, wx.ID_ANY, wx.BLACK, wx.DefaultPosition, wx.DefaultSize,
wx.CLRP_DEFAULT_STYLE | wx.CLRP_SHOW_LABEL)
gSizer1.Add(self.cp0100S, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
self.cp0100E = wx.ColourPickerCtrl(panel, wx.ID_ANY, wx.BLACK, wx.DefaultPosition, wx.DefaultSize,
wx.CLRP_DEFAULT_STYLE | wx.CLRP_SHOW_LABEL)
gSizer1.Add(self.cp0100E, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
self.gauge0100S = PFGaugePreview(panel, wx.ID_ANY, 33, wx.DefaultPosition, wx.DefaultSize, wx.SIMPLE_BORDER)
gSizer1.Add(self.gauge0100S, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 5)
self.gauge0100M = PFGaugePreview(panel, wx.ID_ANY, 66, wx.DefaultPosition, wx.DefaultSize, wx.SIMPLE_BORDER)
gSizer1.Add(self.gauge0100M, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 5)
self.gauge0100E = PFGaugePreview(panel, wx.ID_ANY, 100, wx.DefaultPosition, wx.DefaultSize, wx.SIMPLE_BORDER)
gSizer1.Add(self.gauge0100E, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT | wx.LEFT, 5)
mainSizer.Add(gSizer1, 0, wx.EXPAND, 5)
gSizer2 = wx.BoxSizer(wx.HORIZONTAL)
self.st100101 = wx.StaticText(panel, wx.ID_ANY, "100 - 101", wx.DefaultPosition, wx.DefaultSize,
wx.ALIGN_RIGHT)
self.st100101.Wrap(-1)
gSizer2.Add(self.st100101, 1, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
self.cp100101S = wx.ColourPickerCtrl(panel, wx.ID_ANY, wx.BLACK, wx.DefaultPosition, wx.DefaultSize,
wx.CLRP_DEFAULT_STYLE | wx.CLRP_SHOW_LABEL)
gSizer2.Add(self.cp100101S, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
self.cp100101E = wx.ColourPickerCtrl(panel, wx.ID_ANY, wx.BLACK, wx.DefaultPosition, wx.DefaultSize,
wx.CLRP_DEFAULT_STYLE | wx.CLRP_SHOW_LABEL)
gSizer2.Add(self.cp100101E, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
self.gauge100101S = PFGaugePreview(panel, wx.ID_ANY, 33, wx.DefaultPosition, wx.DefaultSize, wx.SIMPLE_BORDER)
gSizer2.Add(self.gauge100101S, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 5)
self.gauge100101M = PFGaugePreview(panel, wx.ID_ANY, 66, wx.DefaultPosition, wx.DefaultSize, wx.SIMPLE_BORDER)
gSizer2.Add(self.gauge100101M, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 5)
self.gauge100101E = PFGaugePreview(panel, wx.ID_ANY, 100, wx.DefaultPosition, wx.DefaultSize, wx.SIMPLE_BORDER)
gSizer2.Add(self.gauge100101E, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT | wx.LEFT, 5)
mainSizer.Add(gSizer2, 0, wx.EXPAND, 5)
gSizer3 = wx.BoxSizer(wx.HORIZONTAL)
self.st101103 = wx.StaticText(panel, wx.ID_ANY, "101 - 103", wx.DefaultPosition, wx.DefaultSize,
wx.ALIGN_RIGHT)
self.st101103.Wrap(-1)
gSizer3.Add(self.st101103, 1, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
self.cp101103S = wx.ColourPickerCtrl(panel, wx.ID_ANY, wx.BLACK, wx.DefaultPosition, wx.DefaultSize,
wx.CLRP_DEFAULT_STYLE | wx.CLRP_SHOW_LABEL)
gSizer3.Add(self.cp101103S, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
self.cp101103E = wx.ColourPickerCtrl(panel, wx.ID_ANY, wx.BLACK, wx.DefaultPosition, wx.DefaultSize,
wx.CLRP_DEFAULT_STYLE | wx.CLRP_SHOW_LABEL)
gSizer3.Add(self.cp101103E, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
self.gauge101103S = PFGaugePreview(panel, wx.ID_ANY, 33, wx.DefaultPosition, wx.DefaultSize, wx.SIMPLE_BORDER)
gSizer3.Add(self.gauge101103S, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 5)
self.gauge101103M = PFGaugePreview(panel, wx.ID_ANY, 66, wx.DefaultPosition, wx.DefaultSize, wx.SIMPLE_BORDER)
gSizer3.Add(self.gauge101103M, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 5)
self.gauge101103E = PFGaugePreview(panel, wx.ID_ANY, 100, wx.DefaultPosition, wx.DefaultSize, wx.SIMPLE_BORDER)
gSizer3.Add(self.gauge101103E, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT | wx.LEFT, 5)
mainSizer.Add(gSizer3, 0, wx.EXPAND, 5)
gSizer4 = wx.BoxSizer(wx.HORIZONTAL)
self.st103105 = wx.StaticText(panel, wx.ID_ANY, "103 - 105", wx.DefaultPosition, wx.DefaultSize,
wx.ALIGN_RIGHT)
self.st103105.Wrap(-1)
gSizer4.Add(self.st103105, 1, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
self.cp103105S = wx.ColourPickerCtrl(panel, wx.ID_ANY, wx.BLACK, wx.DefaultPosition, wx.DefaultSize,
wx.CLRP_DEFAULT_STYLE | wx.CLRP_SHOW_LABEL)
gSizer4.Add(self.cp103105S, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
self.cp103105E = wx.ColourPickerCtrl(panel, wx.ID_ANY, wx.BLACK, wx.DefaultPosition, wx.DefaultSize,
wx.CLRP_DEFAULT_STYLE | wx.CLRP_SHOW_LABEL)
gSizer4.Add(self.cp103105E, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
self.gauge103105S = PFGaugePreview(panel, wx.ID_ANY, 33, wx.DefaultPosition, wx.DefaultSize, wx.SIMPLE_BORDER)
gSizer4.Add(self.gauge103105S, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 5)
self.gauge103105M = PFGaugePreview(panel, wx.ID_ANY, 66, wx.DefaultPosition, wx.DefaultSize, wx.SIMPLE_BORDER)
gSizer4.Add(self.gauge103105M, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 5)
self.gauge103105E = PFGaugePreview(panel, wx.ID_ANY, 100, wx.DefaultPosition, wx.DefaultSize, wx.SIMPLE_BORDER)
gSizer4.Add(self.gauge103105E, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT | wx.LEFT, 5)
mainSizer.Add(gSizer4, 0, wx.EXPAND, 5)
footerSizer = wx.BoxSizer(wx.VERTICAL)
self.sl1 = wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
footerSizer.Add(self.sl1, 0, wx.EXPAND | wx.ALL, 5)
previewSizer = wx.BoxSizer(wx.HORIZONTAL)
self.wndPreview0100 = PFGaugePreview(panel, wx.ID_ANY, 100, wx.DefaultPosition, wx.DefaultSize, 0)
previewSizer.Add(self.wndPreview0100, 1, wx.ALIGN_CENTER_VERTICAL, 5)
self.wndPreview100101 = PFGaugePreview(panel, wx.ID_ANY, 100, wx.DefaultPosition, wx.DefaultSize, 0)
previewSizer.Add(self.wndPreview100101, 1, wx.ALIGN_CENTER_VERTICAL, 5)
self.wndPreview101103 = PFGaugePreview(panel, wx.ID_ANY, 100, wx.DefaultPosition, wx.DefaultSize, 0)
previewSizer.Add(self.wndPreview101103, 1, wx.ALIGN_CENTER_VERTICAL, 5)
self.wndPreview103105 = PFGaugePreview(panel, wx.ID_ANY, 100, wx.DefaultPosition, wx.DefaultSize, 0)
previewSizer.Add(self.wndPreview103105, 1, wx.ALIGN_CENTER_VERTICAL, 5)
footerSizer.Add(previewSizer, 1, wx.EXPAND | wx.ALL, 5)
buttonsSizer = wx.BoxSizer(wx.HORIZONTAL)
self.cbLink = wx.CheckBox(panel, wx.ID_ANY, "Link Colors", wx.DefaultPosition, wx.DefaultSize, 0)
buttonsSizer.Add(self.cbLink, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT | wx.LEFT, 5)
self.sliderGradientStart = wx.Slider(panel, wx.ID_ANY, self.gradientStart, -100, 100, wx.DefaultPosition,
(127, -1), wx.SL_HORIZONTAL | wx.SL_LABELS)
buttonsSizer.Add(self.sliderGradientStart, 1, wx.EXPAND | wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
self.btnRestore = wx.Button(panel, wx.ID_ANY, "Restore Defaults", wx.DefaultPosition, wx.DefaultSize, 0)
buttonsSizer.Add(self.btnRestore, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
self.btnDump = wx.Button(panel, wx.ID_ANY, "Dump Colors", wx.DefaultPosition, wx.DefaultSize, 0)
buttonsSizer.Add(self.btnDump, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
self.btnOk = wx.Button(panel, wx.ID_ANY, "Apply", wx.DefaultPosition, wx.DefaultSize, 0)
buttonsSizer.Add(self.btnOk, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
footerSizer.Add(buttonsSizer, 1, wx.ALIGN_RIGHT, 5)
mainSizer.Add(footerSizer, 0, wx.EXPAND, 5)
panel.SetSizer(mainSizer)
self.SetColours()
# self.Fit()
# self.Layout()
self.sliderGradientStart.Bind(wx.EVT_SCROLL, self.OnGradientStartScroll)
self.btnRestore.Bind(wx.EVT_BUTTON, self.RestoreDefaults)
self.btnDump.Bind(wx.EVT_BUTTON, self.DumpColours)
self.btnOk.Bind(wx.EVT_BUTTON, self.OnOk)
self.cp0100S.Bind(wx.EVT_COLOURPICKER_CHANGED, self.OnColourChanged)
self.cp0100E.Bind(wx.EVT_COLOURPICKER_CHANGED, self.OnColourChanged)
self.cp100101S.Bind(wx.EVT_COLOURPICKER_CHANGED, self.OnColourChanged)
self.cp100101E.Bind(wx.EVT_COLOURPICKER_CHANGED, self.OnColourChanged)
self.cp101103S.Bind(wx.EVT_COLOURPICKER_CHANGED, self.OnColourChanged)
self.cp101103E.Bind(wx.EVT_COLOURPICKER_CHANGED, self.OnColourChanged)
self.cp103105S.Bind(wx.EVT_COLOURPICKER_CHANGED, self.OnColourChanged)
self.cp103105E.Bind(wx.EVT_COLOURPICKER_CHANGED, self.OnColourChanged)
def getImage(self):
return BitmapLoader.getBitmap("pref-gauges_big", "gui")
def InitDefaultColours(self):
self.c0100S = wx.Colour(191, 191, 191, 255)
self.c0100E = wx.Colour(96, 191, 0, 255)
self.c100101S = wx.Colour(191, 167, 96, 255)
self.c100101E = wx.Colour(255, 191, 0, 255)
self.c101103S = wx.Colour(255, 191, 0, 255)
self.c101103E = wx.Colour(255, 128, 0, 255)
self.c103105S = wx.Colour(255, 128, 0, 255)
self.c103105E = wx.Colour(255, 0, 0, 255)
self.gradientStart = -35
def SetColours(self):
self.cp0100S.SetColour(self.c0100S)
self.cp0100E.SetColour(self.c0100E)
self.gauge0100S.SetColour(self.c0100S, self.c0100E)
self.gauge0100M.SetColour(self.c0100S, self.c0100E)
self.gauge0100E.SetColour(self.c0100S, self.c0100E)
self.gauge0100S.SetPercentages(0, 99.99)
self.gauge0100M.SetPercentages(0, 99.99)
self.gauge0100E.SetPercentages(0, 99.99)
self.gauge0100S.SetGradientStart(self.sliderGradientStart.GetValue())
self.gauge0100M.SetGradientStart(self.sliderGradientStart.GetValue())
self.gauge0100E.SetGradientStart(self.sliderGradientStart.GetValue())
self.cp100101S.SetColour(self.c100101S)
self.cp100101E.SetColour(self.c100101E)
self.gauge100101S.SetColour(self.c100101S, self.c100101E)
self.gauge100101M.SetColour(self.c100101S, self.c100101E)
self.gauge100101E.SetColour(self.c100101S, self.c100101E)
self.gauge100101S.SetGradientStart(self.sliderGradientStart.GetValue())
self.gauge100101M.SetGradientStart(self.sliderGradientStart.GetValue())
self.gauge100101E.SetGradientStart(self.sliderGradientStart.GetValue())
self.gauge100101S.SetPercentages(100, 100.99)
self.gauge100101M.SetPercentages(100, 100.99)
self.gauge100101E.SetPercentages(100, 100.99)
self.gauge100101S.SetGradientStart(self.sliderGradientStart.GetValue())
self.gauge100101M.SetGradientStart(self.sliderGradientStart.GetValue())
self.gauge100101E.SetGradientStart(self.sliderGradientStart.GetValue())
self.cp101103S.SetColour(self.c101103S)
self.cp101103E.SetColour(self.c101103E)
self.gauge101103S.SetColour(self.c101103S, self.c101103E)
self.gauge101103M.SetColour(self.c101103S, self.c101103E)
self.gauge101103E.SetColour(self.c101103S, self.c101103E)
self.gauge101103S.SetPercentages(101, 102.99)
self.gauge101103M.SetPercentages(101, 102.99)
self.gauge101103E.SetPercentages(101, 102.99)
self.gauge101103S.SetGradientStart(self.sliderGradientStart.GetValue())
self.gauge101103M.SetGradientStart(self.sliderGradientStart.GetValue())
self.gauge101103E.SetGradientStart(self.sliderGradientStart.GetValue())
self.cp103105S.SetColour(self.c103105S)
self.cp103105E.SetColour(self.c103105E)
self.gauge103105S.SetColour(self.c103105S, self.c103105E)
self.gauge103105M.SetColour(self.c103105S, self.c103105E)
self.gauge103105E.SetColour(self.c103105S, self.c103105E)
self.gauge103105S.SetPercentages(103, 104.99)
self.gauge103105M.SetPercentages(103, 104.99)
self.gauge103105E.SetPercentages(103, 104.99)
self.gauge103105S.SetGradientStart(self.sliderGradientStart.GetValue())
self.gauge103105M.SetGradientStart(self.sliderGradientStart.GetValue())
self.gauge103105E.SetGradientStart(self.sliderGradientStart.GetValue())
self.wndPreview0100.SetColour(self.c0100S, self.c0100E)
self.wndPreview0100.SetPercentages(0, 99.99)
self.wndPreview0100.SetGradientStart(self.sliderGradientStart.GetValue())
self.wndPreview100101.SetColour(self.c100101S, self.c100101E)
self.wndPreview100101.SetPercentages(100, 100.99)
self.wndPreview100101.SetGradientStart(self.sliderGradientStart.GetValue())
self.wndPreview101103.SetColour(self.c101103S, self.c101103E)
self.wndPreview101103.SetPercentages(101, 102.99)
self.wndPreview101103.SetGradientStart(self.sliderGradientStart.GetValue())
self.wndPreview103105.SetColour(self.c103105S, self.c103105E)
self.wndPreview103105.SetPercentages(103, 104.99)
self.wndPreview103105.SetGradientStart(self.sliderGradientStart.GetValue())
def OnGradientStartScroll(self, event):
self.gradientStart = self.sliderGradientStart.GetValue()
self.SetColours()
event.Skip()
@staticmethod
def OnOk(event):
# Apply New Settings
event.Skip()
def DumpColours(self, event):
print(("Gradient start: %d" % self.sliderGradientStart.GetValue()))
print((" 0 <-> 100 Start: ", self.c0100S, " End: ", self.c0100E))
print(("100 <-> 101 Start: ", self.c100101S, " End: ", self.c100101E))
print(("101 <-> 103 Start: ", self.c101103S, " End: ", self.c101103E))
print(("103 <-> 105 Start: ", self.c103105S, " End: ", self.c103105E))
event.Skip()
def RestoreDefaults(self, event):
self.InitDefaultColours()
self.sliderGradientStart.SetValue(self.gradientStart)
self.SetColours()
event.Skip()
def OnColourChanged(self, event):
color = event.EventObject.GetColour()
cpObj = event.EventObject
if cpObj == self.cp0100S:
self.c0100S = color
if cpObj == self.cp0100E:
self.c0100E = color
if self.cbLink.IsChecked():
self.c100101S = color
if cpObj == self.cp100101S:
self.c100101S = color
if self.cbLink.IsChecked():
self.c0100E = color
if cpObj == self.cp100101E:
self.c100101E = color
if self.cbLink.IsChecked():
self.c101103S = color
if cpObj == self.cp101103S:
self.c101103S = color
if self.cbLink.IsChecked():
self.c100101E = color
if cpObj == self.cp101103E:
self.c101103E = color
if self.cbLink.IsChecked():
self.c103105S = color
if cpObj == self.cp103105S:
self.c103105S = color
if self.cbLink.IsChecked():
self.c101103E = color
if cpObj == self.cp103105E:
self.c103105E = color
self.SetColours()
event.Skip()
def __del__(self):
pass
PFGaugePref.register()

View File

@@ -24,9 +24,9 @@ class PFGeneralPref(PreferenceView):
self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
mainSizer.Add(self.stTitle, 0, wx.EXPAND | wx.ALL, 5)
helpCursor = wx.Cursor(wx.CURSOR_QUESTION_ARROW)
mainSizer.Add(self.stTitle, 0, wx.ALL, 5)
self.m_staticline1 = wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
mainSizer.Add(self.m_staticline1, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)

View File

@@ -29,7 +29,7 @@ class PFHTMLExportPref(PreferenceView):
self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
mainSizer.Add(self.stTitle, 0, wx.ALL, 5)
mainSizer.Add(self.stTitle, 0, wx.EXPAND | wx.ALL, 5)
self.m_staticline1 = wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
mainSizer.Add(self.m_staticline1, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)

View File

@@ -23,7 +23,7 @@ class PFGeneralPref(PreferenceView):
self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
mainSizer.Add(self.stTitle, 0, wx.ALL, 5)
mainSizer.Add(self.stTitle, 0, wx.EXPAND | wx.ALL, 5)
self.stSubTitle = wx.StaticText(panel, wx.ID_ANY, "(Cannot be changed while pyfa is running. Set via command line switches.)",
wx.DefaultPosition, wx.DefaultSize, 0)

View File

@@ -28,8 +28,7 @@ class PFMarketPref(PreferenceView):
self.stTitle = wx.StaticText(panel, wx.ID_ANY, "Market && Prices", wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
mainSizer.Add(self.stTitle, 0, wx.ALL, 5)
mainSizer.Add(self.stTitle, 0, wx.EXPAND | wx.ALL, 5)
self.m_staticline1 = wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
mainSizer.Add(self.m_staticline1, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)

View File

@@ -24,8 +24,7 @@ class PFNetworkPref(PreferenceView):
self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
mainSizer.Add(self.stTitle, 0, wx.ALL, 5)
mainSizer.Add(self.stTitle, 0, wx.EXPAND | wx.ALL, 5)
self.m_staticline1 = wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
mainSizer.Add(self.m_staticline1, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)

View File

@@ -23,8 +23,7 @@ class PFStatViewPref(PreferenceView):
self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
mainSizer.Add(self.stTitle, 0, wx.ALL, 5)
mainSizer.Add(self.stTitle, 0, wx.EXPAND | wx.ALL, 5)
self.stSubTitle = wx.StaticText(panel, wx.ID_ANY,
"Changes require restart of pyfa to take effect.",

View File

@@ -24,7 +24,7 @@ class PFUpdatePref(PreferenceView):
self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
mainSizer.Add(self.stTitle, 0, wx.ALL, 5)
mainSizer.Add(self.stTitle, 0, wx.EXPAND | wx.ALL, 5)
self.m_staticline1 = wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
mainSizer.Add(self.m_staticline1, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)

View File

@@ -283,9 +283,7 @@ class FitItem(SFItem.SFBrowserItem):
event.Skip()
def editCheckEsc(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
if event.GetKeyCode() == wx.WXK_ESCAPE and event.GetModifiers() == wx.MOD_NONE:
self.RestoreEditButton()
else:
event.Skip()

View File

@@ -109,10 +109,10 @@ class NavigationPanel(SFItem.SFBrowserItem):
def OnBrowserSearchBoxKeyPress(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
modifiers = event.GetModifiers()
if keycode == wx.WXK_ESCAPE and modifiers == wx.MOD_NONE:
self.BrowserSearchBox.Show(False)
elif event.RawControlDown() and event.GetKeyCode() == wx.WXK_BACK:
elif keycode == wx.WXK_BACK and modifiers == wx.MOD_CONTROL:
HandleCtrlBackspace(self.BrowserSearchBox)
else:
event.Skip()

View File

@@ -176,9 +176,7 @@ class ShipItem(SFItem.SFBrowserItem):
self.Refresh()
def editCheckEsc(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
if event.GetKeyCode() == wx.WXK_ESCAPE and event.GetModifiers() == wx.MOD_NONE:
self.tcFitName.Show(False)
else:
event.Skip()

View File

@@ -689,9 +689,8 @@ class Miscellanea(ViewColumn):
baseRange = stuff.getModifiedChargeAttr("baseScanRange")
if not scanStr or not baseRange:
return "", None
strTwoAu = scanStr / (2.0 / baseRange)
text = "{0}".format(formatAmount(strTwoAu, 3, 0, 3))
tooltip = "Scan strength with 2 AU scan range"
text = "{}".format(formatAmount(scanStr, 4, 0, 3))
tooltip = "Scan strength at {} AU scan range".format(formatAmount(baseRange, 3, 0, 0))
return text, tooltip
else:
return "", None

View File

@@ -280,12 +280,12 @@ class FittingView(d.Display):
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
modifiers = event.GetModifiers()
if keycode == wx.WXK_ESCAPE and modifiers == wx.MOD_NONE:
self.unselectAll()
elif keycode == 65 and mstate.GetModifiers() == wx.MOD_CONTROL:
elif keycode == 65 and modifiers == wx.MOD_CONTROL:
self.selectAll()
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and mstate.GetModifiers() == wx.MOD_NONE:
elif keycode in (wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE) and modifiers == wx.MOD_NONE:
modules = [m for m in self.getSelectedMods() if not m.isEmpty]
self.removeModule(modules)
event.Skip()

View File

@@ -258,9 +258,7 @@ class CharacterEditor(AuxiliaryFrame):
wx.PostEvent(self, GE.CharListUpdated())
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
if event.GetKeyCode() == wx.WXK_ESCAPE and event.GetModifiers() == wx.MOD_NONE:
self.Close()
return
event.Skip()

View File

@@ -65,9 +65,7 @@ class ErrorHandler:
class ErrorFrame(AuxiliaryFrame):
def __init__(self, parent=None, error_title='Error!'):
super().__init__(
parent, id=wx.ID_ANY, title="pyfa error", pos=wx.DefaultPosition,
size=wx.Size(500, 600), style=wx.STAY_ON_TOP)
super().__init__(parent, id=wx.ID_ANY, title="pyfa error", pos=wx.DefaultPosition, size=wx.Size(500, 600))
from eos.config import gamedata_version, gamedata_date

View File

@@ -92,9 +92,7 @@ class EveFittings(AuxiliaryFrame):
self.charChoice.SetSelection(0)
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
if event.GetKeyCode() == wx.WXK_ESCAPE and event.GetModifiers() == wx.MOD_NONE:
self.Close()
return
event.Skip()
@@ -248,9 +246,7 @@ class ExportToEve(AuxiliaryFrame):
self.charChoice.SetSelection(0)
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
if event.GetKeyCode() == wx.WXK_ESCAPE and event.GetModifiers() == wx.MOD_NONE:
self.Close()
return
event.Skip()
@@ -358,9 +354,7 @@ class SsoCharacterMgmt(AuxiliaryFrame):
event.Skip()
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
if event.GetKeyCode() == wx.WXK_ESCAPE and event.GetModifiers() == wx.MOD_NONE:
self.Close()
return
event.Skip()

View File

@@ -4,6 +4,7 @@ import wx.lib.newevent
FitRenamed, FIT_RENAMED = wx.lib.newevent.NewEvent()
FitChanged, FIT_CHANGED = wx.lib.newevent.NewEvent()
FitRemoved, FIT_REMOVED = wx.lib.newevent.NewEvent()
FitNotesChanged, FIT_NOTES_CHANGED = wx.lib.newevent.NewEvent()
CharListUpdated, CHAR_LIST_UPDATED = wx.lib.newevent.NewEvent()
CharChanged, CHAR_CHANGED = wx.lib.newevent.NewEvent()
GraphOptionChanged, GRAPH_OPTION_CHANGED = wx.lib.newevent.NewEvent()

View File

@@ -133,9 +133,7 @@ class ItemStatsFrame(AuxiliaryFrame):
self.parentWnd.SetActiveStatsWindow(self)
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
if event.GetKeyCode() == wx.WXK_ESCAPE and event.GetModifiers() == wx.MOD_NONE:
self.Close()
return
event.Skip()

View File

@@ -281,9 +281,7 @@ class DmgPatternEditor(AuxiliaryFrame):
self.stNotice.SetLabel("Patterns exported to clipboard")
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
if event.GetKeyCode() == wx.WXK_ESCAPE and event.GetModifiers() == wx.MOD_NONE:
self.Close()
return
event.Skip()

View File

@@ -81,9 +81,7 @@ class PreferenceDialog(wx.Dialog):
self.Close()
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
if event.GetKeyCode() == wx.WXK_ESCAPE and event.GetModifiers() == wx.MOD_NONE:
self.Close()
return
event.Skip()

View File

@@ -89,9 +89,7 @@ class AttributeEditor(AuxiliaryFrame):
self.Bind(wx.EVT_CHAR_HOOK, self.kbEvent)
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
if event.GetKeyCode() == wx.WXK_ESCAPE and event.GetModifiers() == wx.MOD_NONE:
self.Close()
return
event.Skip()

View File

@@ -185,9 +185,7 @@ class ImplantSetEditor(AuxiliaryFrame):
return
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
if event.GetKeyCode() == wx.WXK_ESCAPE and event.GetModifiers() == wx.MOD_NONE:
self.Close()
return
event.Skip()

View File

@@ -369,9 +369,7 @@ class TargetProfileEditor(AuxiliaryFrame):
self.stNotice.SetLabel("Profiles exported to clipboard")
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
if event.GetKeyCode() == wx.WXK_ESCAPE and event.GetModifiers() == wx.MOD_NONE:
self.Close()
return
event.Skip()

BIN
imgs/renders/73@1x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
imgs/renders/73@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -152,7 +152,7 @@ ig.categoryID = ic.categoryID'
QUERY_TYPEID_GROUPID = 'SELECT groupID FROM invtypes WHERE typeID = ? LIMIT 1'
QUERY_GROUPID_CATEGORYID = 'SELECT categoryID FROM invgroups WHERE \
groupID = ? LIMIT 1'
QUERY_TYPEID_PARENTTYPEID = 'SELECT parentTypeID FROM invmetatypes WHERE \
QUERY_TYPEID_PARENTTYPEID = 'SELECT variationParentTypeID FROM invtypes WHERE \
typeID = ? LIMIT 1'
QUERY_TYPEID_MARKETGROUPID = 'SELECT marketGroupID FROM invtypes WHERE \
typeID = ? LIMIT 1'

View File

@@ -56,15 +56,14 @@ def main(db, json_path):
# Config dict
tables = {
'clonegrades': ('fsd_lite', eos.gamedata.AlphaCloneSkill),
'dgmattribs': ('bulkdata', eos.gamedata.AttributeInfo),
'dgmeffects': ('bulkdata', eos.gamedata.Effect),
'dgmtypeattribs': ('bulkdata', eos.gamedata.Attribute),
'dgmtypeeffects': ('bulkdata', eos.gamedata.ItemEffect),
'dgmunits': ('bulkdata', eos.gamedata.Unit),
'dogmaattributes': ('bulkdata', eos.gamedata.AttributeInfo),
'dogmaeffects': ('bulkdata', eos.gamedata.Effect),
'dogmatypeattributes': ('bulkdata', eos.gamedata.Attribute),
'dogmatypeeffects': ('bulkdata', eos.gamedata.ItemEffect),
'dogmaunits': ('bulkdata', eos.gamedata.Unit),
'evecategories': ('fsd_lite', eos.gamedata.Category),
'evegroups': ('fsd_lite', eos.gamedata.Group),
'invmetagroups': ('bulkdata', eos.gamedata.MetaGroup),
'invmetatypes': ('bulkdata', eos.gamedata.MetaType),
'metagroups': ('fsd_binary', eos.gamedata.MetaGroup),
'evetypes': ('fsd_lite', eos.gamedata.Item),
'traits': ('phobos', eos.gamedata.Traits),
'metadata': ('phobos', eos.gamedata.MetaData),
@@ -73,13 +72,16 @@ def main(db, json_path):
fieldMapping = {
'marketgroups': {
'id': 'marketGroupID',
'name': 'marketGroupName'}}
'name': 'marketGroupName'},
'metagroups': {
'id': 'metaGroupID'}}
rowsInValues = (
'evetypes',
'evegroups',
'evecategories',
'marketgroups')
'marketgroups',
'metagroups')
def convertIcons(data):
new = []
@@ -176,13 +178,13 @@ def main(db, json_path):
# Get data on item effects
# Format: {type ID: set(effect, IDs)}
typesEffects = {}
for row in tables['dgmtypeeffects']:
for row in tables['dogmatypeeffects']:
typesEffects.setdefault(row['typeID'], set()).add(row['effectID'])
# Get data on type attributes
# Format: {type ID: {attribute ID: attribute value}}
typesNormalAttribs = {}
typesSkillAttribs = {}
for row in tables['dgmtypeattribs']:
for row in tables['dogmatypeattributes']:
attributeID = row['attributeID']
if attributeID in skillReqAttribsFlat:
typeSkillAttribs = typesSkillAttribs.setdefault(row['typeID'], {})
@@ -300,10 +302,11 @@ def main(db, json_path):
for row in data['evetypes']:
if (
row['published'] or
row['typeName'] == 'Capsule' or
# group Ship Modifiers, for items like tactical t3 ship modes
row['groupID'] == 1306 or
# Civilian weapons
row['typeName'].startswith('Civilian') or
(row['typeName'].startswith('Civilian') and "Shuttle" not in row['typeName']) or
# Micro Bombs (Fighters)
row['typeID'] in (41549, 41548, 41551, 41550) or
# Abyssal weather (environment)
@@ -313,14 +316,14 @@ def main(db, json_path):
1971,
# the "container" for the abyssal environments
1983) or
# Dark Blood Tracking Disruptor (rarely but drops)
# Dark Blood Tracking Disruptor (drops, but rarely)
row['typeID'] == 32416
):
eveTypes.add(row['typeID'])
# ignore checker
def isIgnored(file, row):
if file in ('evetypes', 'dgmtypeeffects', 'dgmtypeattribs', 'invmetatypes') and row['typeID'] not in eveTypes:
if file in ('evetypes', 'dogmatypeeffects', 'dogmatypeattributes') and row['typeID'] not in eveTypes:
return True
return False
@@ -337,8 +340,8 @@ def main(db, json_path):
if (
jsonName == 'evetypes' and (
# Apparently people really want Civilian modules available
row['typeName'].startswith('Civilian') or
row['typeName'] == 'Dark Blood Tracking Disruptor')
(row['typeName'].startswith('Civilian') and "Shuttle" not in row['typeName']) or
row['typeName'] in ('Capsule', 'Dark Blood Tracking Disruptor'))
):
row['published'] = True

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
wget "https://www.python.org/ftp/python/${PYTHON}/python-${PYTHON}-macosx10.6.pkg"
sudo installer -pkg python-${PYTHON}-macosx10.6.pkg -target /
sudo python3 -m ensurepip
sudo python3 -m ensurepip --upgrade
# A manual check that the correct version of Python is running.
python3 --version
pip3 install -r requirements.txt
python3 -m pip install -r requirements.txt

View File

@@ -0,0 +1,8 @@
"""
Conversion pack for August 2019 release
"""
CONVERSIONS = {
# Renamed items
"Gravid 1MN Afterburner MutaPlasmid": "Gravid 1MN Afterburner Mutaplasmid",
}

View File

@@ -20,6 +20,7 @@
import queue
import threading
from collections import OrderedDict
from itertools import chain
# noinspection PyPackageRequirements
import wx
@@ -29,7 +30,7 @@ from sqlalchemy.sql import or_
import config
import eos.db
from eos.gamedata import Category as types_Category, Group as types_Group, Item as types_Item, MarketGroup as types_MarketGroup, \
MetaGroup as types_MetaGroup, MetaType as types_MetaType
MetaGroup as types_MetaGroup
from service import conversions
from service.jargon import JargonLoader
from service.settings import SettingsProvider
@@ -118,13 +119,13 @@ class SearchWorkerThread(threading.Thread):
if len(request) >= config.minItemSearchLength:
results = eos.db.searchItems(request, where=filter_,
join=(types_Item.group, types_Group.category),
eager=("group.category", "metaGroup", "metaGroup.parent"))
eager=("group.category", "metaGroup"))
jargon_results = []
if len(jargon_request) >= config.minItemSearchLength:
jargon_results = eos.db.searchItems(jargon_request, where=filter_,
join=(types_Item.group, types_Group.category),
eager=("group.category", "metaGroup", "metaGroup.parent"))
eager=("group.category", "metaGroup"))
items = set()
# Return only published items, consult with Market service this time
@@ -174,8 +175,8 @@ class Market:
self.les_grp.description = ""
self.les_grp.icon = None
self.ITEMS_FORCEGROUP = {
"Opux Luxury Yacht" : self.les_grp,
# One of those is wedding present at CCP fanfest, another was hijacked from ISD guy during an event
"Capsule" : self.getGroup("Shuttle"),
"Opux Luxury Yacht" : self.les_grp, # One of those is wedding present at CCP fanfest, another was hijacked from ISD guy during an event
"Silver Magnate" : self.les_grp, # Amarr Championship prize
"Gold Magnate" : self.les_grp, # Amarr Championship prize
"Armageddon Imperial Issue" : self.les_grp, # Amarr Championship prize
@@ -217,7 +218,8 @@ class Market:
}
self.ITEMS_FORCEGROUP_R = self.__makeRevDict(self.ITEMS_FORCEGROUP)
self.les_grp.addItems = list(self.getItem(itmn) for itmn in self.ITEMS_FORCEGROUP_R[self.les_grp])
for grp, itemNames in self.ITEMS_FORCEGROUP_R.items():
grp.addItems = list(self.getItem(i) for i in itemNames)
self.customGroups.add(self.les_grp)
# List of items which are forcibly published or hidden
@@ -313,10 +315,12 @@ class Market:
# Misc definitions
# 0 is for items w/o meta group
self.META_MAP = OrderedDict([("normal", frozenset((0, 1, 2, 14))),
("faction", frozenset((4, 3))),
self.META_MAP = OrderedDict([("faction", frozenset((4, 3, 52))),
("complex", frozenset((6,))),
("officer", frozenset((5,)))])
nonNormalMetas = set(chain(*self.META_MAP.values()))
self.META_MAP["normal"] = frozenset((0, *(mg.ID for mg in eos.db.getMetaGroups() if mg.ID not in nonNormalMetas)))
self.META_MAP.move_to_end("normal", last=False)
self.META_MAP_REVERSE = {sv: k for k, v in self.META_MAP.items() for sv in v}
self.SEARCH_CATEGORIES = (
"Drone",
@@ -461,19 +465,8 @@ class Market:
"""Get meta group by item"""
# Check if item is in forced metagroup map
if item.name in self.ITEMS_FORCEDMETAGROUP:
# Create meta group from scratch
metaGroup = types_MetaType()
# Get meta group info object based on meta group name
metaGroupInfo = self.getMetaGroup(self.ITEMS_FORCEDMETAGROUP[item.name][0])
# Get parent item based on its name
parent = self.getItem(self.ITEMS_FORCEDMETAGROUP[item.name][1])
# Assign all required for metaGroup variables
metaGroup.info = metaGroupInfo
metaGroup.items = item
metaGroup.parent = parent
metaGroup.metaGroupID = metaGroupInfo.ID
metaGroup.parentTypeID = parent.ID
metaGroup.typeID = item.ID
metaGroupName = self.ITEMS_FORCEDMETAGROUP[item.name][0]
metaGroup = eos.db.getMetaGroup(metaGroupName)
# If no forced meta group is provided, try to use item's
# meta group if any
else:
@@ -513,14 +506,15 @@ class Market:
def getParentItemByItem(self, item, selfparent=True):
"""Get parent item by item"""
mg = self.getMetaGroupByItem(item)
if mg:
parent = mg.parent
parent = None
if item.name in self.ITEMS_FORCEDMETAGROUP:
parentName = self.ITEMS_FORCEDMETAGROUP[item.name][1]
parent = self.getItem(parentName)
if parent is None:
parent = item.varParent
# Consider self as parent if item has no parent in database
elif selfparent is True:
if parent is None and selfparent is True:
parent = item
else:
parent = None
return parent
def getVariationsByItems(self, items, alreadyparent=False):
@@ -756,7 +750,7 @@ class Market:
filter_ = types_Category.name.in_(["Ship", "Structure"])
results = eos.db.searchItems(name, where=filter_,
join=(types_Item.group, types_Group.category),
eager=("group.category", "metaGroup", "metaGroup.parent"))
eager=("group.category", "metaGroup"))
ships = set()
for item in results:
if self.getPublicityByItem(item):

View File

@@ -460,13 +460,11 @@ class EfsPort:
def getT2ItemsWhere(additionalFilter, mustBeOffensive=False, category="Module"):
# Used to obtain a smaller subset of items while still containing examples of each group.
T2_META_LEVEL = 5
metaLevelAttrID = getAttributeInfo("metaLevel").attributeID
categoryID = getCategory(category).categoryID
result = gamedata_session.query(Item).join(ItemEffect, Group, Attribute).\
filter(
additionalFilter,
Attribute.attributeID == metaLevelAttrID,
Attribute.value == T2_META_LEVEL,
Item.metaLevel == T2_META_LEVEL,
Group.categoryID == categoryID,
).all()
if mustBeOffensive:
@@ -591,18 +589,18 @@ class EfsPort:
preTraitMultipliers = getCurrentMultipliers(tf)
for effect in fit.ship.item.effects.values():
if effect.isImplemented:
effect.handler(tf, tf.ship, [])
effect.handler(tf, tf.ship, [], None, effect=effect)
# Factor in mode effects for T3 Destroyers
if fit.mode is not None:
for effect in fit.mode.item.effects.values():
if effect.isImplemented:
effect.handler(tf, fit.mode, [])
effect.handler(tf, fit.mode, [], None, effect=effect)
if fit.ship.item.groupID == getGroup("Strategic Cruiser").ID:
subSystems = list(filter(lambda mod: mod.slot == FittingSlot.SUBSYSTEM and mod.item, fit.modules))
for sub in subSystems:
for effect in sub.item.effects.values():
if effect.isImplemented:
effect.handler(tf, sub, [])
effect.handler(tf, sub, [], None, effect=effect)
postTraitMultipliers = getCurrentMultipliers(tf)
getMaxRatio = lambda dictA, dictB, key: max(map(lambda a, b: b / a, dictA[key], dictB[key]))
multipliers["turret"] = round(getMaxRatio(preTraitMultipliers, postTraitMultipliers, "turrets"), 6)

View File

@@ -1 +1 @@
version: v2.11.1
version: v2.13.1dev1