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

Misc. Components #159

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
19 changes: 18 additions & 1 deletion python/base_computer/ship_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,15 @@ def get_radar(ship_stats):
lock_cone = get_dbl(ship_stats,'Lock_Cone', 180 / math.pi)
itts = ship_stats['ITTS']
iff = ship_stats['Radar_Color']


# ecm
ecm_parts = ship_stats['ecm'].split('/')
ecm_current = int(ecm_parts[0])
ecm_max = int(ecm_parts[1])
# TODO: drain here is hard coded. Get from config
ecm_drain = ecm_max * 0.05 * megajoules_multiplier


text = f"{green}[TARGETTING SUBSYSTEM]{newline}#-c{newline}"
text += f"{light_grey}Tracking range: #-c{radar_range} km{newline}"

Expand All @@ -223,6 +231,15 @@ def get_radar(ship_stats):
text += f"{light_grey}Missile locking cone: #-c{fmt_dbl(lock_cone * 2)} radians{newline}"
text += f"{light_grey}ITTS (Intelligent Target Tracking System) support: #-c{get_itts(itts)}{newline}"
text += f"{light_grey}AFHH (Advanced Flag & Hostility Heuristics) support: #-c{get_iff(iff)} {newline}{newline}"

if ecm_current > 0:
text = f"{green}[ELECTRONIC COUNTER-MEASURES]{newline}#-c{newline}"
if ecm_current == ecm_max:
text += f"{light_grey}ECM pod with a rating of #-c{ecm_current} installed.{newline}"
else:
text += f"{light_grey}ECM pod with a rating of #-c{ecm_current} (orig. {ecm_max}) installed.{newline}"
text += f"{light_grey}ECM energy drain: #-c{ecm_drain} MJ.{newline}{newline}"

return text

def get_energy_spec_and_jump(ship_stats):
Expand Down
5 changes: 2 additions & 3 deletions python/base_computer/upgrade_view.schema
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@
Activated energy usage: #-c<Cloak_Energy> MJ/s

// ECM
#c.75:.9:#Provides an ECM rating of #-c<ECM_Rating> #-c
#c.75:.9:#Provides an ECM resistence of #-c<ECM_Resist> #-c
#c.75:.9:#Energy usage: #-c<Ecm_Drain> MJ/s
#c.75:.9:#Provides an ECM rating of #-c<ecm> #-c
#c.75:.9:#Energy usage: #-c<ecm_rating> MJ/s

// FTL Capacitor
#c.75:.9:1#Adds a SPEC capacitor with a capacity of #-c<Warp_Capacitor> MJ
Expand Down
11 changes: 6 additions & 5 deletions units/ships.json
Original file line number Diff line number Diff line change
Expand Up @@ -6183,12 +6183,13 @@
"Use_Rapid": "1",
"Mass": "250",
"Shield_Recharge": "8",
"Warp_Capacitor": "400",
"Warp_Capacitor": "325",
"Primary_Capacitor": "200",
"Reactor_Recharge": "44",
"Reactor_Recharge": "30",
"Outsystem_Jump_Cost": "200",
"Default_Speed_Governor": "120/125",
"Radar_Range": "125000000/300000000",
"Afterburner_Speed_Governor": "120",
"Default_Speed_Governor": "120",
"Radar_Range": "300000000",
"Tracking_Cone": "4",
"Max_Cone": "180",
"Lock_Cone": "25",
Expand Down Expand Up @@ -7362,4 +7363,4 @@
]
}
]
}
}
148 changes: 74 additions & 74 deletions units/units.json
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,78 @@
"Afterburner_Accel": "2.3",
"Afterburner_Speed_Governor": "2.1"
},
{
"Key": "ecm_package01__upgrades",
"Name": "ECM Package I",
"Object_Type": "Upgrade_Replacement",
"Upgrade_Type": "ECM",
"Mass": "1",
"ecm": "1",
"Textual_Description": "\"@upgrades/ecm1.png@Electronic CounterMeasures\\ ECM refers to a broad spectrum of techniques designed to defeat or spoof enemy sensors and communications.\"\n"
},
{
"Key": "ecm_package02__upgrades",
"Name": "ECM Package II",
"Object_Type": "Upgrade_Replacement",
"Upgrade_Type": "ECM",
"Mass": "1",
"ecm": "2",
"Textual_Description": "\"@upgrades/ecm2.png@Electronic CounterMeasures\\ ECM refers to a broad spectrum of techniques designed to defeat or spoof enemy sensors and communications.\"\n"
},
{
"Key": "ecm_package03__upgrades",
"Name": "ECM Package III",
"Object_Type": "Upgrade_Replacement",
"Upgrade_Type": "ECM",
"Mass": "1",
"ecm": "3",
"Textual_Description": "\"@upgrades/ecm3.png@Electronic CounterMeasures\\ ECM refers to a broad spectrum of techniques designed to defeat or spoof enemy sensors and communications.\"\n"
},
{
"Key": "repair_droid01__upgrades",
"Name": "Repair Droid I",
"Object_Type": "Upgrade_Replacement",
"Upgrade_Type": "Repair_Bot",
"Textual_Description": "\"@cargo/cargo_hud.png@Repairs ship upgrades in-flight\"\n",
"Mass": "1",
"repair": "1"
},
{
"Key": "repair_droid02__upgrades",
"Name": "Repair Droid II",
"Object_Type": "Upgrade_Replacement",
"Upgrade_Type": "Repair_Bot",
"Textual_Description": "\"@cargo/cargo_hud.png@Repairs ship upgrades in-flight\"\n",
"Mass": "1",
"repair": "2"
},
{
"Key": "repair_droid03__upgrades",
"Name": "Repair Droid III",
"Object_Type": "Upgrade_Replacement",
"Upgrade_Type": "Repair_Bot",
"Textual_Description": "\"@cargo/cargo_hud.png@Repairs ship upgrades in-flight\"\n",
"Mass": "1",
"repair": "3"
},
{
"Key": "repair_droid04__upgrades",
"Name": "Repair Droid IV",
"Object_Type": "Upgrade_Replacement",
"Upgrade_Type": "Repair_Bot",
"Textual_Description": "\"@cargo/cargo_hud.png@Repairs ship upgrades in-flight\"\n",
"Mass": "1",
"repair": "4"
},
{
"Key": "repair_droid05__upgrades",
"Name": "Repair Droid V",
"Object_Type": "Upgrade_Replacement",
"Upgrade_Type": "Repair_Bot",
"Textual_Description": "\"@cargo/cargo_hud.png@Repairs ship upgrades in-flight\"\n",
"Mass": "1",
"repair": "5"
},
{
"Key": "skyscope1__upgrades",
"Name": "SkyScope Alpha",
Expand Down Expand Up @@ -3782,7 +3854,7 @@
"Max_FireControl_Functionality": "1",
"SPECDrive_Functionality": "1",
"Max_SPECDrive_Functionality": "1",
"Cargo_Import": "{Consumer_and_Commercial_Goods/Domestic;1;.1;1000;.100000000000023}{Consumer_and_Commercial_Goods/Electronics;1;.1;1000;.1}{Consumer_and_Commercial_Goods/Luxury;1;.1;10;.1}{Consumer_and_Commercial_Goods/Personal;1;.1;1000;.1}{Contraband/Aera;1;.1;10;.1}{Contraband/Confed;1;.1;10;.1}{Contraband/Rlaan;1;.1;10;.1}{Industrially_Manufactured_Goods/Agricultural;1;.1;10;.1}{Industrially_Manufactured_Goods/Construction;1;.1;10;.1}{Industrially_Manufactured_Goods/Recycled_Products;1;.1;10000;.1}{Industrially_Manufactured_Goods/Xenoforming;1;.1;10;.1}{Natural_Products/Food/Aera;1;.1;10000;.1}{Natural_Products/Food/Confed;1;.1;10000;.1}{Natural_Products/Food/Generic;1;.1;10000;.1}{Natural_Products/Food/Rlaan;1;.1;10000;.1}{Natural_Products/Life-forms;1;.1;1000;.1}{Natural_Products/Liquor/Confed;1;.1;100;.1}{Natural_Products/Liquor/Uln;1;.1;100;.1}{Natural_Products/Liquor;.9;.1;200;400}{Natural_Products/Plant_Products;1;.1;10;.1}{Natural_Products/Renewable_Resources;1;.1;10000;.1}{Raw_Materials/Gases;1;.1;100000;.1}{Raw_Materials/Hydrocarbons;1;.1;20000;.2}{Raw_Materials/Metals;6;.7;-100;300}{Raw_Materials/Ores;5;.4;-1000;2000}{Refined_Materials/Alloys/Aera;10;.3;-100;150}{Refined_Materials/Alloys/Confed;3;.1;100;45}{Refined_Materials/Alloys/Rlaan;2;.1;10;15}{Refined_Materials/Precious_Metals;3;.1;10;12}{Refined_Materials/Purified_and_Enhanced_Materials;1;.1;10;.1}{Refined_Materials/Radioactive_Metals;1;.1;100;.1}{Research;11;.4;-10;13}{Specialty_Goods/Augmentation;1;.1;-3;5}{Specialty_Goods/Entertainment;1;.2;100;34}{Specialty_Goods/Medical;1.25;.2;80;120}{Specialty_Goods/Pharmaceutical;1;.2;4;5}{starships/Andolian/Medium;1;;;5}{starships/Hunter/Light;1;;;5}{starships/Merchant/Light;1;;;5}{starships/Merchant/Medium;1;;;5}{starships/Regional_Guard/Light;1;;;5}{upgrades/Ammunition/Confed;1;.1;100;280}{upgrades/Ammunition/Common;1;.1;200;280}{upgrades/Ammunition/Uncommon;2;.1;60;180}{upgrades/Ammunition/Rlaan;6;.7;-10;28}{upgrades/Ammunition/Aera;13;.7;-10;28}{upgrades/Armor;1;.1;10;5}{upgrades/Capacitors/Standard;1;.1;10;5}{upgrades/Cargo;1;.1;2;1}{upgrades/ECM_Systems;1;.1;6;3}{upgrades/Jump_Drives;1;.1;4;2}{upgrades/Overdrive;1;.1;3;2}{upgrades/Passenger_Quarters;1;.1;10;2}{upgrades/Reactors/Standard;1;.1;10;5}{upgrades/Sensors/Confed;1;.1;6;5}{upgrades/Sensors/Common;1;.1;10;5}{upgrades/Shady_Mechanic;1;.1;-2;5}{upgrades/Shield_Systems/Standard_Dual_Shields;1;.1;20;5}{upgrades/Shield_Systems/Standard_Quad_Shields;1;.1;20;5}{upgrades/SPEC_Capacitors;1;.1;6;2}{upgrades/Weapons/Beam_Arrays_Light;1;.1;;5}{upgrades/Weapons/Beam_Arrays_Medium;1;.1;-3;5}{upgrades/Weapons/Mount_Enhancements;1;.1;-50;51}{upgrades/Weapons/Mounted_Guns_Light;1;.1;;4}{upgrades/Weapons/Mounted_Guns_Medium;1;.1;;3}",
"Cargo_Import": "{Consumer_and_Commercial_Goods/Domestic;1;.1;1000;.100000000000023}{Consumer_and_Commercial_Goods/Electronics;1;.1;1000;.1}{Consumer_and_Commercial_Goods/Luxury;1;.1;10;.1}{Consumer_and_Commercial_Goods/Personal;1;.1;1000;.1}{Contraband/Aera;1;.1;10;.1}{Contraband/Confed;1;.1;10;.1}{Contraband/Rlaan;1;.1;10;.1}{Industrially_Manufactured_Goods/Agricultural;1;.1;10;.1}{Industrially_Manufactured_Goods/Construction;1;.1;10;.1}{Industrially_Manufactured_Goods/Recycled_Products;1;.1;10000;.1}{Industrially_Manufactured_Goods/Xenoforming;1;.1;10;.1}{Natural_Products/Food/Aera;1;.1;10000;.1}{Natural_Products/Food/Confed;1;.1;10000;.1}{Natural_Products/Food/Generic;1;.1;10000;.1}{Natural_Products/Food/Rlaan;1;.1;10000;.1}{Natural_Products/Life-forms;1;.1;1000;.1}{Natural_Products/Liquor/Confed;1;.1;100;.1}{Natural_Products/Liquor/Uln;1;.1;100;.1}{Natural_Products/Liquor;.9;.1;200;400}{Natural_Products/Plant_Products;1;.1;10;.1}{Natural_Products/Renewable_Resources;1;.1;10000;.1}{Raw_Materials/Gases;1;.1;100000;.1}{Raw_Materials/Hydrocarbons;1;.1;20000;.2}{Raw_Materials/Metals;6;.7;-100;300}{Raw_Materials/Ores;5;.4;-1000;2000}{Refined_Materials/Alloys/Aera;10;.3;-100;150}{Refined_Materials/Alloys/Confed;3;.1;100;45}{Refined_Materials/Alloys/Rlaan;2;.1;10;15}{Refined_Materials/Precious_Metals;3;.1;10;12}{Refined_Materials/Purified_and_Enhanced_Materials;1;.1;10;.1}{Refined_Materials/Radioactive_Metals;1;.1;100;.1}{Research;11;.4;-10;13}{Specialty_Goods/Augmentation;1;.1;-3;5}{Specialty_Goods/Entertainment;1;.2;100;34}{Specialty_Goods/Medical;1.25;.2;80;120}{Specialty_Goods/Pharmaceutical;1;.2;4;5}{starships/Andolian/Medium;1;;;5}{starships/Hunter/Light;1;;;5}{starships/Merchant/Light;1;;;5}{starships/Merchant/Medium;1;;;5}{starships/Regional_Guard/Light;1;;;5}{upgrades/Ammunition/Confed;1;.1;100;280}{upgrades/Ammunition/Common;1;.1;200;280}{upgrades/Ammunition/Uncommon;2;.1;60;180}{upgrades/Ammunition/Rlaan;6;.7;-10;28}{upgrades/Ammunition/Aera;13;.7;-10;28}{upgrades/Armor;1;.1;10;5}{upgrades/Capacitors/Standard;1;.1;10;5}{upgrades/Cargo;1;.1;2;1}{upgrades/ECM_Systems;1;.1;6;3}{upgrades/Jump_Drives;1;.1;4;2}{upgrades/Overdrive;1;.1;3;2}{upgrades/Passenger_Quarters;1;.1;10;2}{upgrades/Reactors/Standard;1;.1;10;5}{upgrades/Sensors/Confed;1;.1;6;5}{upgrades/Sensors/Common;1;.1;10;5}{upgrades/Shady_Mechanic;1;.1;-2;5}{upgrades/Shield_Systems/Standard_Dual_Shields;1;.1;20;5}{upgrades/Shield_Systems/Standard_Quad_Shields;1;.1;20;5}{upgrades/SPEC_Capacitors;1;.1;6;2}{upgrades/Weapons/Beam_Arrays_Light;1;.1;;5}{upgrades/Weapons/Beam_Arrays_Medium;1;.1;-3;5}{upgrades/Weapons/Mount_Enhancements;1;.1;-50;51}{upgrades/Weapons/Mounted_Guns_Light;1;.1;;4}{upgrades/Weapons/Mounted_Guns_Medium;1;.1;;3}{upgrades/Repair_Systems;1;.1;;3}",
"Upgrade_Storage_Volume": "100000000"
},
{
Expand Down Expand Up @@ -11692,37 +11764,6 @@
"Mounts": "{MOUNT_UPGRADE;;;autotracking;;;;;;;;;;;;1;1}",
"Textual_Description": "\"@cargo/cargo_hud.png@While all mounted weapons have inherent auto-tracking capabilities, these defaults are limited in civilian mounts. A full-powered military auto-tracker like this greatly enhances weapon accuracy.\"\n"
},
{
"Key": "ecm_package01__upgrades",
"Name": "ECM Package I",
"Object_Type": "Upgrade_Replacement",
"Mass": "1",
"ECM_Rating": "1",
"ECM_Resist": "0.1",
"Ecm_Drain": "5",
"Textual_Description": "\"@upgrades/ecm1.png@Electronic CounterMeasures\\ ECM refers to a broad spectrum of techniques designed to defeat or spoof enemy sensors and communications.\"\n"
},
{
"Key": "ecm_package02__upgrades",
"Name": "ECM Package II",
"Object_Type": "Upgrade_Replacement",
"Mass": "1",
"ECM_Rating": "2",
"ECM_Resist": "0.2",
"Ecm_Drain": "8",
"Textual_Description": "\"@upgrades/ecm2.png@Electronic CounterMeasures\\ ECM refers to a broad spectrum of techniques designed to defeat or spoof enemy sensors and communications.\"\n"
},
{
"Key": "ecm_package03__upgrades",
"Name": "ECM Package III",
"Object_Type": "Upgrade_Replacement",
"Mass": "1",
"ECM_Rating": "3",
"ECM_Resist": "0.3",
"Ecm_Drain": "12",
"Textual_Description": "\"@upgrades/ecm3.png@Electronic CounterMeasures\\ ECM refers to a broad spectrum of techniques designed to defeat or spoof enemy sensors and communications.\"\n"
},

{
"Key": "passenger_quarters_01__upgrades",
"Name": "Cryochamber",
Expand Down Expand Up @@ -11751,47 +11792,6 @@
"Textual_Description": "\"@upgrades/passenger_comfort_class.png@Life-support, seat and even bunk-beds provide a level of comfort the captain would like to have. Provides life-support and space for up to 2 passengers.\"\n",
"Mass": "1.2"
},
{
"Key": "repair_droid01__upgrades",
"Name": "Repair Droid I",
"Object_Type": "Upgrade_Replacement",
"Textual_Description": "\"@cargo/cargo_hud.png@Repairs ship upgrades in-flight\"\n",
"Mass": "1",
"Repair_Droid": "1"
},
{
"Key": "repair_droid02__upgrades",
"Name": "Repair Droid II",
"Object_Type": "Upgrade_Replacement",
"Textual_Description": "\"@cargo/cargo_hud.png@Repairs ship upgrades in-flight\"\n",
"Mass": "1",
"Repair_Droid": "2"
},
{
"Key": "repair_droid03__upgrades",
"Name": "Repair Droid III",
"Object_Type": "Upgrade_Replacement",
"Textual_Description": "\"@cargo/cargo_hud.png@Repairs ship upgrades in-flight\"\n",
"Mass": "1",
"Repair_Droid": "3"
},
{
"Key": "repair_droid04__upgrades",
"Name": "Repair Droid IV",
"Object_Type": "Upgrade_Replacement",
"Textual_Description": "\"@cargo/cargo_hud.png@Repairs ship upgrades in-flight\"\n",
"Mass": "1",
"Repair_Droid": "4"
},
{
"Key": "repair_droid05__upgrades",
"Name": "Repair Droid V",
"Object_Type": "Upgrade_Replacement",
"Textual_Description": "\"@cargo/cargo_hud.png@Repairs ship upgrades in-flight\"\n",
"Mass": "1",
"Repair_Droid": "5"
},

{
"Key": "surveyor1__upgrades",
"Name": "SpaceSurveyor H1",
Expand Down Expand Up @@ -13676,4 +13676,4 @@
"Key": "AeraNerveStimuli",
"Textual_Description": "\"@cargo/cargo-hud.png@Ever watched an Aera spasm in something that looks like a cross between an epileptic fit and an orgasm? Give them some of this and sit back. Way back. Preferably behind a barrier, because when the Aera in question starts to go into withdrawl induced fits of berserker rage, you might live to tell the tale.\"\n"
}
]
]
Loading
Loading