Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2202] Add a number of missing modules #2204

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions edmc_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
'advancedtorppylon': 'Torpedo Pylon',
'atdumbfiremissile': 'AX Missile Rack',
'atmulticannon': 'AX Multi-Cannon',
('atmulticannon', 'v2'): 'Enhanced AX Multi-Cannon',
('atdumbfiremissile', 'v2'): 'Enhanced AX Missile Rack',
'basicmissilerack': 'Seeker Missile Rack',
'beamlaser': 'Beam Laser',
('beamlaser', 'heat'): 'Retributor Beam Laser',
Expand All @@ -88,6 +90,8 @@
'mining_abrblstr': 'Abrasion Blaster',
'mining_seismchrgwarhd': 'Seismic Charge Launcher',
'mining_subsurfdispmisle': 'Sub-Surface Displacement Missile',
'human_extraction': 'Sub-Surface Extraction Missile',
'atventdisruptorpylon': 'Guardian Nanite Torpedo Pylon',
'mininglaser': 'Mining Laser',
('mininglaser', 'advanced'): 'Mining Lance Beam Laser',
'multicannon': 'Multi-Cannon',
Expand Down Expand Up @@ -266,6 +270,11 @@
'hpt_slugshot_turret_medium': 'D',
'hpt_slugshot_turret_large': 'C',
'hpt_xenoscannermk2_basic_tiny': '?',
'hpt_atmulticannon_gimbal_large': 'C',
'hpt_atmulticannon_gimbal_medium': 'E',
'hpt_human_extraction_fixed_medium': 'B',
'hpt_atventdisruptorpylon_fixed_medium': 'I',
'hpt_atventdisruptorpylon_fixed_large': 'I',
}

# Old standard weapon variants
Expand All @@ -278,13 +287,14 @@
}

outfitting_countermeasure_map = {
'antiunknownshutdown': ('Shutdown Field Neutraliser', 'F'),
'chafflauncher': ('Chaff Launcher', 'I'),
'electroniccountermeasure': ('Electronic Countermeasure', 'F'),
'heatsinklauncher': ('Heat Sink Launcher', 'I'),
'plasmapointdefence': ('Point Defence', 'I'),
'xenoscanner': ('Xeno Scanner', 'E'),
'xenoscannermk2': ('Unknown Xeno Scanner Mk II', '?'),
'antiunknownshutdown': ('Shutdown Field Neutraliser', 'F'),
('antiunknownshutdown', 'v2'): ('Thargoid Pulse Neutraliser', 'E'),
'chafflauncher': ('Chaff Launcher', 'I'),
'electroniccountermeasure': ('Electronic Countermeasure', 'F'),
'heatsinklauncher': ('Heat Sink Launcher', 'I'),
'plasmapointdefence': ('Point Defence', 'I'),
'xenoscanner': ('Xeno Scanner', 'E'),
'xenoscannermk2': ('Unknown Xeno Scanner Mk II', '?'),
}

outfitting_utility_map = {
Expand Down Expand Up @@ -347,6 +357,7 @@
'guardianpowerdistributor': 'Guardian Hybrid Power Distributor',
'guardianpowerplant': 'Guardian Hybrid Power Plant',
'hyperdrive': 'Frame Shift Drive',
('hyperdrive', 'overcharge'): 'Frame Shift Drive',
'lifesupport': 'Life Support',
# 'planetapproachsuite': handled separately
'powerdistributor': 'Power Distributor',
Expand Down Expand Up @@ -376,13 +387,19 @@
'refinery': 'Refinery',
'recon': 'Recon Limpet Controller',
'repair': 'Repair Limpet Controller',
'rescue': 'Rescue Limpet Controller',
'mining': 'Mining Multi Limpet Controller',
'xeno': 'Xeno Multi Limpet Controller',
'operations': 'Operations Multi Limpet Controller',
'universal': 'Universal Multi Limpet Controller',
'repairer': 'Auto Field-Maintenance Unit',
'resourcesiphon': 'Hatch Breaker Limpet Controller',
'shieldcellbank': 'Shield Cell Bank',
'shieldgenerator': 'Shield Generator',
('shieldgenerator', 'fast'): 'Bi-Weave Shield Generator',
('shieldgenerator', 'strong'): 'Prismatic Shield Generator',
'unkvesselresearch': 'Research Limpet Controller',
'expmodulestabiliser': 'Experimental Weapon Stabiliser',
}

# Dashboard Flags constants
Expand Down
17 changes: 16 additions & 1 deletion outfitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ def lookup(module, ship_map, entitled=False) -> dict | None: # noqa: C901, CCR0
elif not entitled and name[1] == 'planetapproachsuite':
return None

# V2 Shutdown Field Neutralizer - Hpt_AntiUnknownShutdown_Tiny_V2
elif name[0] == 'hpt' and name[1] in countermeasure_map and len(name) == 4 and name[3] == 'v2':
new['category'] = 'utility'
new['name'], new['rating'] = countermeasure_map[name[1]]
new['class'] = weaponclass_map[name[-2]]

# Countermeasures - e.g. Hpt_PlasmaPointDefence_Turret_Tiny
elif name[0] == 'hpt' and name[1] in countermeasure_map:
new['category'] = 'utility'
Expand Down Expand Up @@ -179,12 +185,18 @@ def lookup(module, ship_map, entitled=False) -> dict | None: # noqa: C901, CCR0
if name[1] == 'dronecontrol': # e.g. Int_DroneControl_Collection_Size1_Class1
name.pop(0)

elif name[1] == 'multidronecontrol': # e.g. Int_MultiDroneControl_Rescue_Size3_Class3
name.pop(0)

elif name[-1] == 'free': # Starter Sidewinder or Freagle modules - just treat them like vanilla modules
name.pop()

if name[1] in standard_map: # e.g. Int_Engine_Size2_Class1, Int_ShieldGenerator_Size8_Class5_Strong
new['category'] = 'standard'
new['name'] = standard_map[len(name) > 4 and (name[1], name[4]) or name[1]]
if name[2] == 'overcharge':
new['name'] = standard_map[(name[1], name[2])]
else:
new['name'] = standard_map[len(name) > 4 and (name[1], name[4]) or name[1]]

elif name[1] in internal_map: # e.g. Int_CargoRack_Size8_Class1
new['category'] = 'internal'
Expand All @@ -209,6 +221,9 @@ def lookup(module, ship_map, entitled=False) -> dict | None: # noqa: C901, CCR0
elif len(name) < 4 and name[1] == 'guardianfsdbooster': # Hack! No class.
(new['class'], new['rating']) = (str(name[2][4:]), 'H')

elif len(name) > 4 and name[1] == 'hyperdrive': # e.g. Int_Hyperdrive_Overcharge_Size6_Class3
(new['class'], new['rating']) = (str(name[4][-1:]), 'C')

else:
if len(name) < 3:
raise AssertionError(f'{name}: length < 3]')
Expand Down
Loading