From 13c0b38ed6b2f510202c66d7f3a850dfb18288ef Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Mon, 20 May 2024 19:02:18 -0400 Subject: [PATCH 1/3] oil tweaks --- mods/a_mod_by_alice.js | 49 +++++++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index cbf541e1..8fa29b54 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -14410,7 +14410,7 @@ Pixel size (rendering only): (Use if the save looks cut o burnTime: 800, fireElement: ["fire","fire","fire","smoke","smoke","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_monoxide","carbon_monoxide","carbon_monoxide","sulfur_dioxide","sulfur_trioxide_gas","poison_gas"], burnInto: "fire,fire,fire,fire,fire,fire,ash,ash,ash,carbon_monoxide,carbon_monoxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,poison_gas".split(","), - viscosity: 7.04, + viscosity: 500, state: "liquid", density: 755, alias: "petrol" @@ -14470,9 +14470,10 @@ Pixel size (rendering only): (Use if the save looks cut o } }; elements.oil.temp = 20; + delete elements.oil.behavior; elements.oil.tick = function(pixel) { if(!pixel.role) { - var value = Math.random() + var value = Math.random(); if(value <= 0.03) { pixel.role = "lpg"; } else if(value <= 0.45) { //42% @@ -14491,6 +14492,42 @@ Pixel size (rendering only): (Use if the save looks cut o pixel.role = "bitumen"; }; }; + + var _viscosity; + switch(pixel.role) { + case "lpg": + _viscosity = 1; + break + case "gasoline": + _viscosity = 28.16; + break + case "naphtha": + _viscosity = 23.08; + break + case "kerosene": + _viscosity = 12; + break + case "diesel": + _viscosity = 24; + break + default: + _viscosity = 250; + break + case "lubricant": + _viscosity = 300; + break + case "heavy_fuel_oil": + _viscosity = 600; + break + case "bitumen": + _viscosity = 100000; + break + }; + _viscosity /= (1.09 ** pixel.temp); + + liquidMoveCustomViscosity(pixel,_viscosity); + doDefaults(pixel); + if(pixel.temp > 35 && pixel.role == "lpg" && Math.random() < ((pixel.temp - 34) / 210)) { //https://www.crownoil.co.uk/guides/crude-oil-fractional-distillation/: Butane and propane and other petroleum gases are formed right at the top of the distillation tower, where it is coolest, a very mild 25°C: the temperature range that forms these gases is between 25°C and 50°C. These gases are the lightest products formed in crude oil distillation and are flammable gases. changePixel(pixel,"light_petroleum_fuel_gas") } else if(pixel.temp > 70 && pixel.role == "gasoline" && Math.random() < ((pixel.temp - 69) / 420)) { //The numbers in the equation are mathematical coincidence. @@ -14503,12 +14540,8 @@ Pixel size (rendering only): (Use if the save looks cut o changePixel(pixel,"diesel_gas") } else if(pixel.temp > 300 && pixel.role == "heavy_fuel_oil" && Math.random() < ((pixel.temp - 299) / 1200)) { changePixel(pixel,"heavy_fuel_oil_gas") - } else if(pixel.temp > 350 && pixel.role == "lubricant" && Math.random() < ((pixel.temp - 349) / 1350)) { - if(pixel.role == "lubricant") { - changePixel(pixel,"lubricating_oil_gas") - } else { - changePixel(pixel,"bitumen") - } + } else if(pixel.temp > 350 && Math.random() < ((pixel.temp - 349) / 1350)) { + changePixel(pixel,pixel.role == "lubricant" ? "lubricating_oil_gas" : "bitumen") } }; //UREA ## From be815797d4c45d526d30c15ac0f3f542d304fbbb Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Mon, 20 May 2024 20:57:43 -0400 Subject: [PATCH 2/3] kjhgf --- mods/funnynames.js | 1 + 1 file changed, 1 insertion(+) diff --git a/mods/funnynames.js b/mods/funnynames.js index 61fec296..ef657e4a 100644 --- a/mods/funnynames.js +++ b/mods/funnynames.js @@ -70,6 +70,7 @@ elements.name_settings = { settings.funnyname.customNameString = customName saveSettings() } else {settings.funnyname.customName = false} + saveSettings() } } runAfterAutogen( From 0ddefb1aea4c47cb6ba23dbc1fad363192d21962 Mon Sep 17 00:00:00 2001 From: redbirdly <155550833+redbirdly@users.noreply.github.com> Date: Tue, 21 May 2024 09:29:41 +0800 Subject: [PATCH 3/3] removed console.log spam --- mods/nicer_flame.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mods/nicer_flame.js b/mods/nicer_flame.js index 73a61b73..a988a719 100644 --- a/mods/nicer_flame.js +++ b/mods/nicer_flame.js @@ -4,7 +4,6 @@ let topColor = 'rgb(130, 0, 0)'; let blending = 0.7; function cssColorToRGB(color) { - console.log(color); let rgbMatch = color.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); return [parseInt(rgbMatch[1]), parseInt(rgbMatch[2]), parseInt(rgbMatch[3])]; } @@ -29,4 +28,4 @@ elements.fire.tick = function(pixel) { let originalColor = pixel.color; pixel.color = blendColors(originalColor, topColor, blending); } -}; \ No newline at end of file +};