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"
|
||||
}
|
||||
@@ -25,6 +25,7 @@ import Queue
|
||||
|
||||
import eos.db
|
||||
import eos.types
|
||||
from eos.itemMapping import itemMapping
|
||||
|
||||
from service.settings import SettingsProvider, ProxySettings
|
||||
|
||||
@@ -209,33 +210,12 @@ class Market():
|
||||
"QA Multiship Module - 5 Players": False,
|
||||
"QA Remote Armor Repair System - 5 Players": False,
|
||||
"QA Shield Transporter - 5 Players": False,
|
||||
"Aliastra Catalyst": False, # Vanity
|
||||
"Inner Zone Shipping Catalyst": False, # Vanity
|
||||
"Intaki Syndicate Catalyst": False, # Vanity
|
||||
"InterBus Catalyst": False, # Vanity
|
||||
"Quafe Catalyst": False, # Vanity
|
||||
"Nefantar Thrasher": False, # Vanity
|
||||
"Sarum Magnate": False, # Vanity
|
||||
"Sukuuvestaa Heron": False, # Vanity
|
||||
"Inner Zone Shipping Imicus": False, # Vanity
|
||||
"Vherokior Probe": False, # Vanity
|
||||
"Miasmos Quafe Ultra Edition": False, # Vanity
|
||||
"Miasmos Quafe Ultramarine Edition": False, # Vanity
|
||||
"Miasmos Amastris Edition": False, # Vanity
|
||||
"Goru's Shuttle": False, # Vanity
|
||||
"Guristas Shuttle": False, # Vanity
|
||||
"Tash-Murkon Magnate": False, # Vanity
|
||||
"Scorpion Ishukone Watch": False, # Vanity
|
||||
"Incursus Aliastra Edition": False, # Vanity
|
||||
"Merlin Nugoeihuvi Edition": False, # Vanity
|
||||
"Police Pursuit Comet": False, # Vanity
|
||||
"Punisher Kador Edition": False, # Vanity
|
||||
"Rifter Krusual Edition": False, # Vanity
|
||||
"Abaddon Kador Edition": False, # Vanity
|
||||
"Hyperion Aliastra Edition": False, # Vanity
|
||||
"Maelstrom Krusual Edition": False, # Vanity
|
||||
"Rokh Nugoeihuvi Edition": False, # Vanity
|
||||
"Mammoth Nefantar Edition": False } # Vanity
|
||||
"Goru's Shuttle": False,
|
||||
"Guristas Shuttle": False}
|
||||
|
||||
# do not publish anything that we convert
|
||||
for name, _ in itemMapping.iteritems():
|
||||
self.ITEMS_FORCEPUBLISHED[name] = False
|
||||
|
||||
# List of groups which are forcibly published
|
||||
self.GROUPS_FORCEPUBLISHED = {
|
||||
|
||||
Reference in New Issue
Block a user