Add set of hacks to rename caustic to tachyon
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
|
|
||||||
import json
|
import json
|
||||||
from collections import OrderedDict
|
import re
|
||||||
|
|
||||||
from logbook import Logger
|
from logbook import Logger
|
||||||
from sqlalchemy.orm import reconstructor
|
from sqlalchemy.orm import reconstructor
|
||||||
@@ -33,6 +33,10 @@ from .eqBase import EqBase
|
|||||||
pyfalog = Logger(__name__)
|
pyfalog = Logger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
def _t(x):
|
||||||
|
return x
|
||||||
|
|
||||||
|
|
||||||
class Effect(EqBase):
|
class Effect(EqBase):
|
||||||
"""
|
"""
|
||||||
The effect handling class, it is used to proxy and load effect handler code,
|
The effect handling class, it is used to proxy and load effect handler code,
|
||||||
@@ -245,6 +249,10 @@ class Item(EqBase):
|
|||||||
pass
|
pass
|
||||||
return shortName
|
return shortName
|
||||||
|
|
||||||
|
@property
|
||||||
|
def customName(self):
|
||||||
|
return re.sub(_t('Caustic'), _t('Tachyon'), self.name)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def attributes(self):
|
def attributes(self):
|
||||||
return self.__attributes
|
return self.__attributes
|
||||||
|
|||||||
@@ -206,17 +206,16 @@ class AddEnvironmentEffect(ContextMenuUnconditional):
|
|||||||
for beacon in sMkt.getGroup("Abyssal Hazards").items:
|
for beacon in sMkt.getGroup("Abyssal Hazards").items:
|
||||||
if not beacon.isType('projected'):
|
if not beacon.isType('projected'):
|
||||||
continue
|
continue
|
||||||
name = beacon.name.replace(_t('Caustic'), _t('Tachyon'))
|
|
||||||
groups = (_t('Bioluminescence'), _t('Tachyon'), _t('Filament'))
|
groups = (_t('Bioluminescence'), _t('Tachyon'), _t('Filament'))
|
||||||
for group in groups:
|
for group in groups:
|
||||||
if re.search(group, name):
|
if re.search(group, beacon.customName):
|
||||||
key = group
|
key = group
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
subsubdata = subdata.groups.setdefault(key, Group())
|
subsubdata = subdata.groups.setdefault(key, Group())
|
||||||
subsubdata.items.append(Entry(beacon.ID, name, name))
|
subsubdata.items.append(Entry(beacon.ID, beacon.customName, beacon.customName))
|
||||||
subdata.sort()
|
subdata.sort()
|
||||||
|
|
||||||
# PVP weather
|
# PVP weather
|
||||||
|
|||||||
@@ -107,17 +107,17 @@ class BaseName(ViewColumn):
|
|||||||
elif isinstance(stuff, Module):
|
elif isinstance(stuff, Module):
|
||||||
if self.projectedView:
|
if self.projectedView:
|
||||||
# check for projected abyssal name
|
# check for projected abyssal name
|
||||||
name_check = stuff.item.name[0:-2]
|
name_check = stuff.item.customName[0:-2]
|
||||||
type = AddEnvironmentEffect.abyssal_mapping.get(name_check, None)
|
type = AddEnvironmentEffect.abyssal_mapping.get(name_check, None)
|
||||||
if type:
|
if type:
|
||||||
sMkt = Market.getInstance()
|
sMkt = Market.getInstance()
|
||||||
type = sMkt.getItem(type)
|
type = sMkt.getItem(type)
|
||||||
return "{} {}".format(type.name, stuff.item.name[-1:])
|
return "{} {}".format(type.name, stuff.item.customName[-1:])
|
||||||
|
|
||||||
if stuff.isEmpty:
|
if stuff.isEmpty:
|
||||||
return "%s Slot" % FittingSlot(stuff.slot).name.capitalize()
|
return "%s Slot" % FittingSlot(stuff.slot).name.capitalize()
|
||||||
else:
|
else:
|
||||||
return stuff.item.name
|
return stuff.item.customName
|
||||||
elif isinstance(stuff, Implant):
|
elif isinstance(stuff, Implant):
|
||||||
return stuff.item.name
|
return stuff.item.name
|
||||||
elif isinstance(stuff, TargetProfile):
|
elif isinstance(stuff, TargetProfile):
|
||||||
|
|||||||
Reference in New Issue
Block a user