diff --git a/eve.db b/eve.db index 9e2c5bd9a..5756cf5c6 100644 Binary files a/eve.db and b/eve.db differ diff --git a/imgs/icons/burstprojectorecm.png b/imgs/icons/burstprojectorecm.png new file mode 100644 index 000000000..4595ca69c Binary files /dev/null and b/imgs/icons/burstprojectorecm.png differ diff --git a/imgs/icons/burstprojectorenergyneutralization.png b/imgs/icons/burstprojectorenergyneutralization.png new file mode 100644 index 000000000..5299d48a5 Binary files /dev/null and b/imgs/icons/burstprojectorenergyneutralization.png differ diff --git a/imgs/icons/burstprojectorsensordampening.png b/imgs/icons/burstprojectorsensordampening.png new file mode 100644 index 000000000..a417287aa Binary files /dev/null and b/imgs/icons/burstprojectorsensordampening.png differ diff --git a/imgs/icons/burstprojectorstasiswebification.png b/imgs/icons/burstprojectorstasiswebification.png new file mode 100644 index 000000000..24309b580 Binary files /dev/null and b/imgs/icons/burstprojectorstasiswebification.png differ diff --git a/imgs/icons/burstprojectortargetillumination.png b/imgs/icons/burstprojectortargetillumination.png new file mode 100644 index 000000000..70f663847 Binary files /dev/null and b/imgs/icons/burstprojectortargetillumination.png differ diff --git a/imgs/icons/burstprojectortrackingdisruption.png b/imgs/icons/burstprojectortrackingdisruption.png new file mode 100644 index 000000000..9c6a72a51 Binary files /dev/null and b/imgs/icons/burstprojectortrackingdisruption.png differ diff --git a/imgs/icons/burstprojectorwarpdisruption.png b/imgs/icons/burstprojectorwarpdisruption.png new file mode 100644 index 000000000..8506b9007 Binary files /dev/null and b/imgs/icons/burstprojectorwarpdisruption.png differ diff --git a/imgs/icons/emergencyhullenergizer.png b/imgs/icons/emergencyhullenergizer.png new file mode 100644 index 000000000..9918995d4 Binary files /dev/null and b/imgs/icons/emergencyhullenergizer.png differ diff --git a/imgs/icons/icon_fireworks.png b/imgs/icons/icon_fireworks.png new file mode 100644 index 000000000..2e8a27c3d Binary files /dev/null and b/imgs/icons/icon_fireworks.png differ diff --git a/imgs/icons/marketicon_amarr.png b/imgs/icons/marketicon_amarr.png new file mode 100644 index 000000000..fdb721f65 Binary files /dev/null and b/imgs/icons/marketicon_amarr.png differ diff --git a/imgs/icons/marketicon_caldari.png b/imgs/icons/marketicon_caldari.png new file mode 100644 index 000000000..edd49286e Binary files /dev/null and b/imgs/icons/marketicon_caldari.png differ diff --git a/imgs/icons/marketicon_gallente.png b/imgs/icons/marketicon_gallente.png new file mode 100644 index 000000000..4039ba05c Binary files /dev/null and b/imgs/icons/marketicon_gallente.png differ diff --git a/imgs/icons/marketicon_minmatar.png b/imgs/icons/marketicon_minmatar.png new file mode 100644 index 000000000..dba4a2726 Binary files /dev/null and b/imgs/icons/marketicon_minmatar.png differ diff --git a/imgs/icons/remote_repair.png b/imgs/icons/remote_repair.png new file mode 100644 index 000000000..16d4337ee Binary files /dev/null and b/imgs/icons/remote_repair.png differ diff --git a/imgs/icons/remote_repairer.png b/imgs/icons/remote_repairer.png new file mode 100644 index 000000000..5899ec386 Binary files /dev/null and b/imgs/icons/remote_repairer.png differ diff --git a/scripts/icons_update.py b/scripts/icons_update.py index 6280d0acb..f8cd1602c 100644 --- a/scripts/icons_update.py +++ b/scripts/icons_update.py @@ -23,6 +23,7 @@ db_path = os.path.abspath(os.path.join(script_dir, '..', 'eve.db')) icons_dir = os.path.abspath(os.path.join(script_dir, '..', 'imgs', 'icons')) export_dir = os.path.abspath(os.path.expanduser(os.path.join(args.icons, 'items'))) +dirs = [export_dir, os.path.join(export_dir, "Modules")] db = sqlite3.connect(db_path) cursor = db.cursor() @@ -150,21 +151,20 @@ for fname in os.listdir(icons_dir): print fname,"exists" existing.add(fname) - -for fname in os.listdir(export_dir): - if not os.path.isfile(os.path.join(export_dir, fname)): - continue - stripped = strip_path(fname) - stripped = unzero(stripped) - # Icons in export often specify size in their name, but references often use - # convention without size specification - sizeless = re.sub('^(?P[^_]+)_(?P\d+)_(?P[^_]+)$', r'\1_\3', stripped) - # Often items referred to with 01_01 format, - fnames = export.setdefault(stripped, set()) - fnames.add(fname) - fnames = export.setdefault(sizeless, set()) - fnames.add(fname) - +for dir in dirs: + for fname in os.listdir(dir): + if not os.path.isfile(os.path.join(dir, fname)): + continue + stripped = strip_path(fname) + stripped = unzero(stripped) + # Icons in export often specify size in their name, but references often use + # convention without size specification + sizeless = re.sub('^(?P[^_]+)_(?P\d+)_(?P[^_]+)$', r'\1_\3', stripped) + # Often items referred to with 01_01 format, + fnames = export.setdefault(stripped.lower(), set()) + fnames.add(fname) + fnames = export.setdefault(sizeless.lower(), set()) + fnames.add(fname) def crop_image(img): w, h = img.size @@ -195,10 +195,13 @@ def get_icon_file(request): return None # {(h, w): source full path} sizes = {} - for fname in fnames: - fullpath = os.path.join(export_dir, fname) - img = Image.open(fullpath) - sizes[img.size] = fullpath + for dir in dirs: + for fname in fnames: + fullpath = os.path.join(dir, fname) + if not os.path.isfile(fullpath): + continue + img = Image.open(fullpath) + sizes[img.size] = fullpath # Try to return image which is already in necessary format try: fullpath = sizes[ICON_SIZE] diff --git a/scripts/jsonToSql.py b/scripts/jsonToSql.py index 659a0aa64..2a35814bc 100755 --- a/scripts/jsonToSql.py +++ b/scripts/jsonToSql.py @@ -204,6 +204,8 @@ def main(db, json_path): split = row['iconFile'].split('_') if len(split) == 3: row['iconFile'] = "{}_{}".format(split[0], split[2]) + if jsonName is "icons" and "modules/" in str(row["iconFile"]).lower(): + row["iconFile"] = row["iconFile"].lower().replace("modules/", "").replace(".png", "") for k, v in row.iteritems(): setattr(instance, fieldMap.get(k, k), v)