Skip to content

Commit c5487b1

Browse files
committed
Add new FW sites
1 parent b7377ad commit c5487b1

5 files changed

Lines changed: 63 additions & 9 deletions

File tree

db_update.py

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,9 @@ def processEveTypes():
174174
# Micro Bombs (Fighters)
175175
row['typeID'] in (41549, 41548, 41551, 41550) or
176176
# Abyssal weather (environment)
177-
row['groupID'] in (
178-
1882,
179-
1975,
180-
1971,
181-
1983) # the "container" for the abyssal environments
177+
row['groupID'] in (1882, 1975, 1971, 1983) or
178+
# FW-specific proximity beacons
179+
row['typeID'] in (92609, 95625)
182180
):
183181
newData.append(row)
184182
map = {'typeName_en-us': 'typeName', 'description_en-us': '_description'}
@@ -754,6 +752,25 @@ def hardcodeTrigSystemEffects():
754752
_hardcodeEffects(typeID, effectMap, clearEffects=True)
755753
eos.db.gamedata_session.flush()
756754

755+
def hardcodeFwProxyEffects():
756+
typeBuffMap = {
757+
# BC level up
758+
92609: ('FW Moderate Site BC Skill Bonus', {
759+
'warfareBuff1ID': 2544,
760+
'warfareBuff1Value': 20}),
761+
# T3D HP
762+
95625: ('FW ELT-5 Site T3D HP Bonus', {
763+
'warfareBuff1ID': 2545,
764+
'warfareBuff1Value': 500})}
765+
effectMap = {100003: 'pyfaCustomFwProxyBuffEffect'}
766+
for typeID, (name, attrMap) in typeBuffMap.items():
767+
item = eos.db.gamedata_session.query(eos.gamedata.Item).filter(eos.gamedata.Item.ID == typeID).one()
768+
item.published = True
769+
item.name = name
770+
_hardcodeAttribs(typeID, attrMap)
771+
_hardcodeEffects(typeID, effectMap, clearEffects=True)
772+
eos.db.gamedata_session.flush()
773+
757774

758775
def hardcodeShapash():
759776
shapashTypeID = 1000000
@@ -901,6 +918,7 @@ def hardcodeCybele():
901918
hardcodeSuppressionTackleRange()
902919
hardcodeSovUpgradeBuffs()
903920
hardcodeTrigSystemEffects()
921+
hardcodeFwProxyEffects()
904922

905923
eos.db.gamedata_session.commit()
906924
eos.db.gamedata_engine.execute('VACUUM')

eos/effects.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,25 @@ def handler(fit, beacon, context, projectionRange, **kwargs):
9595
fit.addCommandBonus(id, value, beacon, kwargs['effect'], 'early')
9696

9797

98+
class Effect100003(BaseEffect):
99+
"""
100+
pyfaCustomFwProxyBuffEffect
101+
102+
Used by:
103+
Celestials from group: Cloud (2 of 2)
104+
"""
105+
106+
runTime = 'early'
107+
type = ('projected', 'passive', 'gang')
108+
109+
@staticmethod
110+
def handler(fit, beacon, context, projectionRange, **kwargs):
111+
for i in range(1, 5):
112+
if id := beacon.getModifiedItemAttr(f'warfareBuff{i}ID'):
113+
value = beacon.getModifiedItemAttr(f'warfareBuff{i}Value')
114+
fit.addCommandBonus(id, value, beacon, kwargs['effect'], 'early')
115+
116+
98117
class Effect4(BaseEffect):
99118
"""
100119
shieldBoosting

eos/saveddata/fit.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,12 @@ def __runCommandBoosts(self, runTime="normal"):
968968
mod.item.requiresSkill("Shield Emission Systems")
969969
or mod.item.requiresSkill("Capital Shield Emission Systems")),
970970
"shieldBonus", value, stackingPenalties=True)
971+
elif warfareBuffID == 2544: # FW Moderate Site BC Skill Bonus
972+
for base in ('shipBonusABC', 'shipBonusCBC', 'shipBonusGBC', 'shipBonusMBC'):
973+
for i in range(1, 5):
974+
self.ship.boostItemAttr(f'{base}{i}', value)
975+
elif warfareBuffID == 2545: # FW ELT-5 Site T3D HP Bonus
976+
self.ship.increaseItemAttr("proximityDbuffEffectTacticalDestroyerHP", value)
971977

972978
del self.commandBonuses[warfareBuffID]
973979

eos/saveddata/module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut, M
6767
MINING_ATTRIBUTES = ("miningAmount",)
6868
SYSTEM_GROUPS = (
6969
"Effect Beacon", "MassiveEnvironments", "Abyssal Hazards", "Non-Interactable Object",
70-
"Destructible Effect Beacon", "Sovereignty Hub System Effect Generator Upgrades")
70+
"Destructible Effect Beacon", "Sovereignty Hub System Effect Generator Upgrades", "Cloud")
7171

7272
def __init__(self, item, baseItem=None, mutaplasmid=None):
7373
"""Initialize a module from the program"""

gui/builtinContextMenus/envEffectAdd.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,7 @@ def getData(self):
125125
_t('ContextMenu|ProjectedEffectManipulation|Sansha Incursion'))
126126
data.groups[_t('Drifter Incursion')] = self.getDrifterIncursion()
127127
data.groups[_t('Triglavian Invasion')] = self.getInvasionBeacons()
128-
data.groups[_t('Pirate Insurgency')] = self.getEffectBeacons(
129-
_t('ContextMenu|ProjectedEffectManipulation|Insurgency'),
130-
extra_garbage=(_t('ContextMenu|ProjectedEffectManipulation|Beacon'),))
128+
data.groups[_t('FW/Insurgency')] = self.getFwEffects()
131129
data.groups[_t('IHub Upgrades')] = self.getIHubEffects()
132130
return data
133131

@@ -242,6 +240,19 @@ def getInvasionBeacons(self):
242240
data.items.append(Entry(item.ID, item.name, item.name))
243241
return data
244242

243+
def getFwEffects(self):
244+
data = Group()
245+
# Insurgency suppression buff
246+
item = Market.getInstance().getItem(79839)
247+
data.items.append(Entry(item.ID, item.name, item.name))
248+
# FW BC buff
249+
item = Market.getInstance().getItem(92609)
250+
data.items.append(Entry(item.ID, item.name, item.name))
251+
# FW T3D buff
252+
item = Market.getInstance().getItem(95625)
253+
data.items.append(Entry(item.ID, item.name, item.name))
254+
return data
255+
245256
def getIHubEffects(self):
246257
data = Group()
247258
# Electric

0 commit comments

Comments
 (0)