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