Add support for explicitly converting items to another.
This commit is contained in:
@@ -23,6 +23,7 @@ from sqlalchemy.sql import and_, or_, select, func
|
||||
from sqlalchemy.orm import join, exc
|
||||
from eos.types import Item, Category, Group, MarketGroup, AttributeInfo, MetaData, MetaGroup
|
||||
from eos.db.util import processEager, processWhere
|
||||
from eos.itemMapping import itemMapping
|
||||
import eos.config
|
||||
|
||||
configVal = getattr(eos.config, "gamedataCache", None)
|
||||
@@ -86,6 +87,8 @@ def getItem(lookfor, eager=None):
|
||||
itemNameMap[lookfor] = item.ID
|
||||
else:
|
||||
raise TypeError("Need integer or string as argument")
|
||||
if item.name in itemMapping:
|
||||
item = getItem(itemMapping[item.name], eager)
|
||||
return item
|
||||
|
||||
groupNameMap = {}
|
||||
|
||||
30
eos/itemMapping.py
Normal file
30
eos/itemMapping.py
Normal file
@@ -0,0 +1,30 @@
|
||||
# Map of items that will convert to a new item (for old item names / skinned ships)
|
||||
# Key must be str with exact name of item to be converted, value can be str (name)
|
||||
# or int (id) of item to be converted to
|
||||
itemMapping = {
|
||||
"Aliastra Catalyst": "Catalyst",
|
||||
"Inner Zone Shipping Catalyst": "Catalyst",
|
||||
"Intaki Syndicate Catalyst": "Catalyst",
|
||||
"InterBus Catalyst": "Catalyst",
|
||||
"Quafe Catalyst": "Catalyst",
|
||||
"Nefantar Thrasher": "Thrasher",
|
||||
"Sarum Magnate": "Magnate",
|
||||
"Sukuuvestaa Heron": "Heron:",
|
||||
"Inner Zone Shipping Imicus": "Imicus",
|
||||
"Vherokior Probe": "Probe",
|
||||
"Miasmos Quafe Ultra Edition": "Miasmos",
|
||||
"Miasmos Quafe Ultramarine Edition": "Miasmos",
|
||||
"Miasmos Amastris Edition": "Miasmos",
|
||||
"Tash-Murkon Magnate": "Magnate",
|
||||
"Scorpion Ishukone Watch": "Scorpion",
|
||||
"Incursus Aliastra Edition": "Incursus",
|
||||
"Merlin Nugoeihuvi Edition": "Merlin",
|
||||
"Police Pursuit Comet": "Federation Navy Comet",
|
||||
"Punisher Kador Edition": "Punisher",
|
||||
"Rifter Krusual Edition": "Rifter",
|
||||
"Abaddon Kador Edition": "Abaddon",
|
||||
"Hyperion Aliastra Edition": "Hyperion",
|
||||
"Maelstrom Krusual Edition": "Maelstrom",
|
||||
"Rokh Nugoeihuvi Edition": "Rokh",
|
||||
"Mammoth Nefantar Edition": "Mammoth"
|
||||
}
|
||||
Reference in New Issue
Block a user