Add support for insurgency suppression bonus

This commit is contained in:
DarkPhoenix
2025-03-13 11:28:57 +01:00
parent 9c519b878e
commit 7e92b58c62
3 changed files with 28 additions and 5 deletions

View File

@@ -651,6 +651,16 @@ def update_db():
effect.effectName = effectName
item.effects[effectName] = effect
def hardcodeSuppressionTackleRange():
beaconTypeID = 79839
attrMap = {
'warfareBuff1ID': 2405,
'warfareBuff1Value': 10}
effectMap = {100000: 'pyfaCustomSuppressionTackleRange'}
_hardcodeAttribs(beaconTypeID, attrMap)
_hardcodeEffects(beaconTypeID, effectMap)
def hardcodeShapash():
shapashTypeID = 1000000
_copyItem(srcName='Utu', tgtTypeID=shapashTypeID, tgtName='Shapash')
@@ -794,8 +804,7 @@ def update_db():
_hardcodeAttribs(cybeleTypeID, attrMap)
_hardcodeEffects(cybeleTypeID, effectMap)
# hardcodeShapash()
# hardcodeCybele()
hardcodeSuppressionTackleRange()
eos.db.gamedata_session.commit()
eos.db.gamedata_engine.execute('VACUUM')

View File

@@ -37,6 +37,20 @@ class DummyEffect(BaseEffect):
pass
class Effect100000(BaseEffect):
runTime = 'early'
type = ('projected', 'passive', 'gang')
@staticmethod
def handler(fit, beacon, context, projectionRange, **kwargs):
if beacon.getModifiedItemAttr('warfareBuff1ID'):
value = beacon.getModifiedItemAttr('warfareBuff1Value')
id = beacon.getModifiedItemAttr('warfareBuff1ID')
if id:
fit.addCommandBonus(id, value, beacon, kwargs['effect'], 'early')
class Effect4(BaseEffect):
"""
shieldBoosting

View File

@@ -124,8 +124,9 @@ class AddEnvironmentEffect(ContextMenuUnconditional):
data.groups[_t('Sansha Incursion')] = self.getEffectBeacons(
_t('ContextMenu|ProjectedEffectManipulation|Sansha Incursion'))
data.groups[_t('Triglavian Invasion')] = self.getInvasionBeacons()
# data.groups[_t('Pirate Insurgency')] = self.getEffectBeacons(
# _t('ContextMenu|ProjectedEffectManipulation|Insurgency'))
data.groups[_t('Pirate Insurgency')] = self.getEffectBeacons(
_t('ContextMenu|ProjectedEffectManipulation|Insurgency'),
extra_garbage=(_t('ContextMenu|ProjectedEffectManipulation|Beacon'),))
return data
def getEffectBeacons(self, *groups, extra_garbage=()):
@@ -176,7 +177,6 @@ class AddEnvironmentEffect(ContextMenuUnconditional):
container.append(Entry(beacon.ID, beaconname, shortname))
# Break loop on 1st result
break
data.sort()
return data
def getAbyssalWeather(self):