Skip to content

Commit 7e92b58

Browse files
committed
Add support for insurgency suppression bonus
1 parent 9c519b8 commit 7e92b58

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed

db_update.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,16 @@ def _hardcodeEffects(typeID, effectMap):
651651
effect.effectName = effectName
652652
item.effects[effectName] = effect
653653

654+
def hardcodeSuppressionTackleRange():
655+
beaconTypeID = 79839
656+
attrMap = {
657+
'warfareBuff1ID': 2405,
658+
'warfareBuff1Value': 10}
659+
effectMap = {100000: 'pyfaCustomSuppressionTackleRange'}
660+
_hardcodeAttribs(beaconTypeID, attrMap)
661+
_hardcodeEffects(beaconTypeID, effectMap)
662+
663+
654664
def hardcodeShapash():
655665
shapashTypeID = 1000000
656666
_copyItem(srcName='Utu', tgtTypeID=shapashTypeID, tgtName='Shapash')
@@ -794,8 +804,7 @@ def hardcodeCybele():
794804
_hardcodeAttribs(cybeleTypeID, attrMap)
795805
_hardcodeEffects(cybeleTypeID, effectMap)
796806

797-
# hardcodeShapash()
798-
# hardcodeCybele()
807+
hardcodeSuppressionTackleRange()
799808

800809
eos.db.gamedata_session.commit()
801810
eos.db.gamedata_engine.execute('VACUUM')

eos/effects.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ class DummyEffect(BaseEffect):
3737
pass
3838

3939

40+
class Effect100000(BaseEffect):
41+
42+
runTime = 'early'
43+
type = ('projected', 'passive', 'gang')
44+
45+
@staticmethod
46+
def handler(fit, beacon, context, projectionRange, **kwargs):
47+
if beacon.getModifiedItemAttr('warfareBuff1ID'):
48+
value = beacon.getModifiedItemAttr('warfareBuff1Value')
49+
id = beacon.getModifiedItemAttr('warfareBuff1ID')
50+
if id:
51+
fit.addCommandBonus(id, value, beacon, kwargs['effect'], 'early')
52+
53+
4054
class Effect4(BaseEffect):
4155
"""
4256
shieldBoosting

gui/builtinContextMenus/envEffectAdd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ def getData(self):
124124
data.groups[_t('Sansha Incursion')] = self.getEffectBeacons(
125125
_t('ContextMenu|ProjectedEffectManipulation|Sansha Incursion'))
126126
data.groups[_t('Triglavian Invasion')] = self.getInvasionBeacons()
127-
# data.groups[_t('Pirate Insurgency')] = self.getEffectBeacons(
128-
# _t('ContextMenu|ProjectedEffectManipulation|Insurgency'))
127+
data.groups[_t('Pirate Insurgency')] = self.getEffectBeacons(
128+
_t('ContextMenu|ProjectedEffectManipulation|Insurgency'),
129+
extra_garbage=(_t('ContextMenu|ProjectedEffectManipulation|Beacon'),))
129130
return data
130131

131132
def getEffectBeacons(self, *groups, extra_garbage=()):
@@ -176,7 +177,6 @@ def getEffectBeacons(self, *groups, extra_garbage=()):
176177
container.append(Entry(beacon.ID, beaconname, shortname))
177178
# Break loop on 1st result
178179
break
179-
data.sort()
180180
return data
181181

182182
def getAbyssalWeather(self):

0 commit comments

Comments
 (0)