From dbb0ff02359ba16472f25291cb094459cb5e1f96 Mon Sep 17 00:00:00 2001 From: Lily-129 <68935009+Lily-129@users.noreply.github.com> Date: Thu, 3 Mar 2022 09:56:15 -0500 Subject: [PATCH] mod change for incoming file --- mods/nested_for_reaction_example.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/mods/nested_for_reaction_example.js b/mods/nested_for_reaction_example.js index 01e44da3..8751dcae 100644 --- a/mods/nested_for_reaction_example.js +++ b/mods/nested_for_reaction_example.js @@ -1,5 +1,13 @@ -arrayNameA = ["radiation", "alcohol", "soap", "acid", "ammonia", "acid_gas"] -arrayNameB = ["plant", "frozen_plant", "grass", "algae", "sapling", "seeds", "grass_seed", "wheat_seed", "wheat", "flower_seed", "pistil", "petal", "vine", "bamboo", "bamboo_plant", "corn_seed", "potato_seed", "root", "berry_seed", "old_berry_leaf", "berry_leaf", "berry"] +arrayNameA = ["radiation", "alcohol", "soap", "acid", "ammonia", "acid_gas"]; +arrayNameB = ["plant", "frozen_plant", "grass", "algae", "sapling", "seeds", "grass_seed", "wheat_seed", "wheat", "flower_seed", "pistil", "petal", "vine", "bamboo", "bamboo_plant", "corn_seed", "potato_seed", "root", "berry_seed", "old_berry_leaf", "berry_leaf", "berry"]; +if(enabledMods.includes("mods/alcohol.js")) { + arrayNameA.push("methanol"); + arrayNameA.push("propanol"); + arrayNameA.push("isopropanol"); + arrayNameA.push("butanol"); +}; + +runAfterLoad(function() { for(i = 0; i < arrayNameA.length; i++) { if(!elements[arrayNameA[i]].reactions) { elements[arrayNameA[i]].reactions = {} @@ -7,4 +15,5 @@ for(i = 0; i < arrayNameA.length; i++) { for(j = 0; j < arrayNameB.length; j++) { elements[arrayNameA[i]].reactions[arrayNameB[j]] = { "elem1":null, "elem2":"dead_plant" } }; -}; \ No newline at end of file +}; +});