From 13c6aa79aa4bb443a917fae049ababcf84ed8c1f Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Thu, 18 Jan 2024 17:32:01 -0500 Subject: [PATCH] red burning is now a setting --- mods/a_mod_by_alice.js | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index 7981ebcb..624c9b92 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -4710,7 +4710,7 @@ color1 and color2 spread through striped paint like dye does with itself. col }; } } - if (pixel.burning && view !== 2) { // Yellow glow on charge + if (pixel.burning && settings.burnOverlay && view !== 2) { // Red glow on burn if (!elements[pixel.element].colorOn) { ctx.fillStyle = "rgba(255,0,0,0.5)"; switch(mode) { @@ -4856,6 +4856,28 @@ color1 and color2 spread through striped paint like dye does with itself. col //console.log(lastSetting); lastSetting.setAttribute("style","padding-bottom:0"); //remove padding from last setting; + var redBurnSettingSpan = document.createElement("span"); + redBurnSettingSpan.setAttribute("setting","burnOverlay"); + redBurnSettingSpan.setAttribute("class","setting-span"); + redBurnSettingSpan.textContent = "Red overlay on burning pixels "; + var settingDropdown = document.createElement("select"); + settingDropdown.setAttribute("onchange","settings.burnOverlay = (this.value === 'true'); saveSettings();"); + var options = { + "false": "Disabled", + "true": "Enabled" + }; + for(value in options) { + var newOption = document.createElement("option"); + if(value == "0") { + newOption.setAttribute("selected",""); + }; + newOption.setAttribute("value",value); + newOption.innerText = options[value]; + settingDropdown.appendChild(newOption); + }; + redBurnSettingSpan.appendChild(settingDropdown); + settingsMenu.appendChild(redBurnSettingSpan); + console.log(everyTick(function() { if(paused) { return }; for(var propName in specialProperties) { @@ -15418,7 +15440,6 @@ Pixel size (rendering only): (Use if the save looks cut o var lastSetting = settingNodes[settingNodes.length - 1]; //console.log(lastSetting); //console.log(lastSetting.getAttribute("style")); - lastSetting.removeAttribute("style"); //restore padding for worldgen setting; //console.log(lastSetting.getAttribute("style")); //Shape setting