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

Fix issue caused by new drive PR #896 #134

Merged
merged 3 commits into from
Nov 24, 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
17 changes: 17 additions & 0 deletions python/base_computer/ship_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,25 @@ def get_durability(ship_stats):
return text


def clean_ship_stats(ship_stats):
skip = ['Directory']

for key, value in ship_stats.items():
resource = value.split('/')

# Check if resource
if len(resource) != 3:
continue

# Skip?
if key in skip:
continue

ship_stats[key] = float(resource[0])


def get_ship_description(ship_stats):
clean_ship_stats(ship_stats)
locale.setlocale(locale.LC_ALL, '')

text = get_notes(ship_stats)
Expand Down
8 changes: 4 additions & 4 deletions units/ships.json
Original file line number Diff line number Diff line change
Expand Up @@ -6183,9 +6183,9 @@
"Use_Rapid": "1",
"Mass": "250",
"Shield_Recharge": "8",
"Warp_Capacitor": "325",
"Warp_Capacitor": "400",
"Primary_Capacitor": "200",
"Reactor_Recharge": "30",
"Reactor_Recharge": "44",
"Outsystem_Jump_Cost": "200",
"Afterburner_Speed_Governor": "120",
"Default_Speed_Governor": "120",
Expand All @@ -6195,7 +6195,7 @@
"Lock_Cone": "25",
"Light": "{supernova.bmp.bfxm;0;0.35;-2.09200;2;;;;;}{supernova.bmp.bfxm;1.31;0;-1.82200;2;;;;;}{supernova.bmp.bfxm;-1.32800;0;-1.82200;2;;;;;}{supernova.bmp.bfxm;1.316;0.450;-1.37;0.5;1;1;1;1;0.0005;0;-1;0}{supernova.bmp.bfxm;1.963;0.010;-1.37;0.5;1;1;1;1;0.0005;-1;0;0}{supernova.bmp.bfxm;1.316;-0.431;-1.37;0.5;1;1;1;1;0.0005;0;1;0}{supernova.bmp.bfxm;-1.316;0.450;-1.37;0.5;1;1;1;1;0.0005;0;-1;0}{supernova.bmp.bfxm;-1.963;0.010;-1.37;0.5;1;1;1;1;0.0005;1;0;0}{supernova.bmp.bfxm;-1.316;-0.431;-1.37;0.5;1;1;1;1;0.0005;0;1;0}{supernova.bmp.bfxm;1.059;0.346;2.327;0.5;1;1;1;1;0.0005;0;-1;0}{supernova.bmp.bfxm;1.454;0.094;2.327;0.5;1;1;1;1;0.0005;-1;0;0}{supernova.bmp.bfxm;1.059;-0.157;2.327;0.5;1;1;1;1;0.0005;0;1;0}{supernova.bmp.bfxm;-1.059;0.346;2.327;0.5;1;1;1;1;0.0005;0;-1;0}{supernova.bmp.bfxm;-1.454;0.094;2.327;0.5;1;1;1;1;0.0005;1;0;0}{supernova.bmp.bfxm;-1.059;-0.157;2.327;0.5;1;1;1;1;0.0005;0;1;0}{supernova.bmp.bfxm;1.652;0.208;1.565;0.8;1;1;1;1;0.0005;0;0;-1}{supernova.bmp.bfxm;-1.652;0.208;1.565;0.8;1;1;1;1;0.0005;0;0;-1}",
"Mounts": "{laser;;15;Light;1.01200;-6.80000e-2;3.40800;;;;;;;;;1;1}{laser;;15;Light;-0.964000;-6.80000e-2;3.40800;;;;;;;;;1;1}{laser;;3;Light;0.380000;0.176000;1.07600;;;;;;;;;1;1}{laser;;3;Light;-0.336000;0.176000;1.07600;;;;;;;;;1;1}{Dumbfire;48;48;light-missile medium-missile special-missile;0;0;0;;;;;;;;;1;1}{;;48;light-missile medium-missile special-missile;0;0;0;;;;;;;;;1;1}",
"Cargo": "{skyscope1;upgrades/Sensors/Common;200;1;0.01;1;1;1;@upgrades/skyscope_alpha.png@Refurbished Part;0}{capacitor02;upgrades/Capacitors/Standard;200;1;4;4;1;1;@upgrades/capacitor.png@Refurbished Part;0}{reactor02;upgrades/Reactors/Standard;200;1;2;3.5;1;1;@upgrades/reactor.png@Refurbished Part;0}{add_spec_capacitor01;upgrades/SPEC_Capacitors;200;1;5;4;1;1;@upgrades/reactor_capacitance.png@Refurbished Part;0}{quadshield02;upgrades/Shield_Systems/Standard_Quad_Shields;200;1;2;8;1;1;@upgrades/shield.png@Refurbished Part;0}{armor02;upgrades/Armor;200;1;20;0;1;1;@cargo/plasteel.png@Refurbished Part;0}",
"Cargo": "{skyscope1;upgrades/Sensors/Common;200;1;0.01;1;1;1;@upgrades/skyscope_alpha.png@Refurbished Part;0}{capacitor02;upgrades/Capacitors/Standard;200;1;4;4;1;1;@upgrades/capacitor.png@Refurbished Part;0}{reactor03;upgrades/Reactors/Standard;200;1;2;3.5;1;1;@upgrades/reactor.png@Refurbished Part;0}{add_spec_capacitor01;upgrades/SPEC_Capacitors;200;1;5;4;1;1;@upgrades/reactor_capacitance.png@Refurbished Part;0}{quadshield02;upgrades/Shield_Systems/Standard_Quad_Shields;200;1;2;8;1;1;@upgrades/shield.png@Refurbished Part;0}{armor02;upgrades/Armor;200;1;20;0;1;1;@cargo/plasteel.png@Refurbished Part;0}",
"shield_facets": "4",
"armor": "100",
"shield_strength": "150"
Expand Down Expand Up @@ -7363,4 +7363,4 @@
]
}
]
}
}
14 changes: 7 additions & 7 deletions units/units.json
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@
{
"Key": "mult_overdrive01__upgrades",
"Name": "Overdrive I",
"Upgrade_Type": "Afterburner",
"Upgrade_Type": "Afterburner_Upgrade",
"Object_Type": "Upgrade_Replacement",
"Textual_Description": "\"@upgrades/afterburner_generic.png@Engine overdrive. Increases thrust at the expense of decreased fuel efficiency. Comes bundled with appropriate vector-governor firmware updates.\"\n",
"Mass": "1",
Expand All @@ -779,7 +779,7 @@
{
"Key": "mult_overdrive02__upgrades",
"Name": "Overdrive II",
"Upgrade_Type": "Afterburner",
"Upgrade_Type": "Afterburner_Upgrade",
"Object_Type": "Upgrade_Replacement",
"Textual_Description": "\"@upgrades/afterburner_generic.png@Engine overdrive. Increases thrust at the expense of decreased fuel efficiency. Comes bundled with appropriate vector-governor firmware updates.\"\n",
"Mass": "1",
Expand All @@ -791,7 +791,7 @@
{
"Key": "mult_overdrive03__upgrades",
"Name": "Overdrive III",
"Upgrade_Type": "Afterburner",
"Upgrade_Type": "Afterburner_Upgrade",
"Object_Type": "Upgrade_Replacement",
"Textual_Description": "\"@upgrades/afterburner_generic.png@Engine overdrive. Increases thrust at the expense of decreased fuel efficiency. Comes bundled with appropriate vector-governor firmware updates.\"\n",
"Mass": "1",
Expand All @@ -803,7 +803,7 @@
{
"Key": "mult_overdrive04__upgrades",
"Name": "Overdrive IV",
"Upgrade_Type": "Afterburner",
"Upgrade_Type": "Afterburner_Upgrade",
"Object_Type": "Upgrade_Replacement",
"Textual_Description": "\"@upgrades/afterburner.png@Engine overdrive. Increases thrust at the expense of decreased fuel efficiency. Comes bundled with appropriate vector-governor firmware updates.\"\n",
"Mass": "1",
Expand All @@ -815,7 +815,7 @@
{
"Key": "mult_overdrive05__upgrades",
"Name": "Overdrive V",
"Upgrade_Type": "Afterburner",
"Upgrade_Type": "Afterburner_Upgrade",
"Object_Type": "Upgrade_Replacement",
"Textual_Description": "\"@upgrades/afterburner.png@Engine overdrive. Increases thrust at the expense of decreased fuel efficiency. Comes bundled with appropriate vector-governor firmware updates.\"\n",
"Mass": "1",
Expand All @@ -827,7 +827,7 @@
{
"Key": "mult_overdrive06__upgrades",
"Name": "Overdrive VI",
"Upgrade_Type": "Afterburner",
"Upgrade_Type": "Afterburner_Upgrade",
"Object_Type": "Upgrade_Replacement",
"Textual_Description": "\"@upgrades/afterburner.png@Engine overdrive. Increases thrust at the expense of decreased fuel efficiency. Comes bundled with appropriate vector-governor firmware updates.\"\n",
"Mass": "1",
Expand Down Expand Up @@ -13663,4 +13663,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