Skip to content

Commit

Permalink
Fix consumption rate for fluids in power generators
Browse files Browse the repository at this point in the history
  • Loading branch information
adepierre committed Jan 23, 2025
1 parent 2cd1be2 commit e7a76cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions assets/satisfactory.json
Original file line number Diff line number Diff line change
Expand Up @@ -7156,7 +7156,7 @@
{
"name": "Power (Fuel)",
"alternate": false,
"time": "0.75/250.000000",
"time": "750.0/250.000000",
"building": "Fuel-Powered Generator",
"inputs": [
{
Expand All @@ -7169,7 +7169,7 @@
{
"name": "Power (Turbofuel)",
"alternate": false,
"time": "2.0/250.000000",
"time": "2000.0/250.000000",
"building": "Fuel-Powered Generator",
"inputs": [
{
Expand All @@ -7182,7 +7182,7 @@
{
"name": "Power (Liquid Biofuel)",
"alternate": false,
"time": "0.75/250.000000",
"time": "750.0/250.000000",
"building": "Fuel-Powered Generator",
"inputs": [
{
Expand All @@ -7195,7 +7195,7 @@
{
"name": "Power (Rocket Fuel)",
"alternate": false,
"time": "3.6/250.000000",
"time": "3600.0/250.000000",
"building": "Fuel-Powered Generator",
"inputs": [
{
Expand All @@ -7208,7 +7208,7 @@
{
"name": "Power (Ionized Fuel)",
"alternate": false,
"time": "5.0/250.000000",
"time": "5000.0/250.000000",
"building": "Fuel-Powered Generator",
"inputs": [
{
Expand Down
2 changes: 1 addition & 1 deletion scripts/data_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def parse_counted_item_list(s: str, items: Dict):
recipes[gen["ClassName"] + "_" + fuel["mFuelClass"]] = {
"name": "Power (" + fuel_item["name"] + ")",
"alternate": False,
"time": f"{fuel_item['energy']}/{gen['mPowerProduction']}", # Write time as a fraction string to prevent floating point precision error
"time": f"{fuel_item['energy'] * (1.0 if fuel_item['state'] == 'RF_SOLID' else 1000.0)}/{gen['mPowerProduction']}", # Write time as a fraction string to prevent floating point precision error
"building": buildings[gen["ClassName"]]["name"],
"inputs": [{"name": fuel_item["name"], "amount": 1.0}] + ([] if gen["mRequiresSupplementalResource"] != "True" else [{"name": items[fuel["mSupplementalResourceClass"]]["name"], "amount": float(gen["mSupplementalToPowerRatio"]) * fuel_item["energy"] / (1.0 if items[fuel["mSupplementalResourceClass"]]["state"] == "RF_SOLID" else 1000.0)}]),
"outputs": [] if not fuel["mByproduct"] else [{"name": items[fuel["mByproduct"]]["name"], "amount": float(fuel["mByproductAmount"])}]
Expand Down

0 comments on commit e7a76cc

Please sign in to comment.