From e05a7d1f25c09590086c44c5eb949a8654dde82e Mon Sep 17 00:00:00 2001 From: Alexthetransfem <124483815+theenchantedsword@users.noreply.github.com> Date: Mon, 18 Dec 2023 20:06:01 -0600 Subject: [PATCH 1/3] Update morechemistry.js --- mods/morechemistry.js | 133 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 115 insertions(+), 18 deletions(-) diff --git a/mods/morechemistry.js b/mods/morechemistry.js index a5fa278f..c29fc2a3 100644 --- a/mods/morechemistry.js +++ b/mods/morechemistry.js @@ -1,4 +1,5 @@ //This mod was made by Alex the transfem, https://discord.com/users/778753696804765696 on discord and https://www.tiktok.com/@alextheagenenby?_t=8hoCVI3NRhu&_r=1 on tiktok. +//V1.4.1: added a mixer element and an improved sensor element. function customExplosion(pixel1, pixel2, radius, list) { let x = pixel1.x; let y = pixel1.y; @@ -278,23 +279,7 @@ elements.acid.ignore.push("aqua_regia"); elements.cwall = { "color": "rgb(128,128,128)", "name": "Conductive Wall", - "behavior": [ - [ - "XX", - "XX", - "XX" - ], - [ - "XX", - "XX", - "XX" - ], - [ - "XX", - "XX", - "XX" - ] - ], + "behavior": [["XX", "XX", "XX"], ["XX", "XX", "XX"], ["XX", "XX", "XX"]], "category": "solids", "insulate": false, "hardness": 1, @@ -811,7 +796,6 @@ elements.rubidiumsalt = { density: 2800, } -elements.hydrogen.burnInto = "steam"; elements.irradiate = { "color": "rgb(25,150,25)", "temp": 2, @@ -910,3 +894,116 @@ elements.rubidiumhydroxidecrystals = { stateHigh: "potassiumhydroxidecrystals", tempHigh: "1388", } +elements.esuperheater = { + conduct: 1, + color: '#dd1111', + colorObject: { + "r": 221, + "g": 17, + "b": 17 + }, + behavior: behaviors.WALL, + behaviorOn: [ + [ + "XX", + "HT:10", + "XX" + ], + [ + "HT:10", + "XX", + "HT:10" + ], + [ + "XX", + "HT:10", + "XX" + ] + ], + category: "machines", + name: "e-superheater", +}, + elements.efreezer = { + conduct: 1, + color: '#ffffff', + colorObject: { + "r": 255, + "g": 255, + "b": 255 + }, + behavior: behaviors.WALL, + behaviorOn: [ + [ + "XX", + "CO:10", + "XX" + ], + [ + "CO:10", + "XX", + "CO:10" + ], + [ + "XX", + "CO:10", + "XX" + ] + ], + category: "machines", + name: "e-freezer", + }, + elements.mixer = { + name: "Mixer", + behavior:[ + [ + "SW", + "SW", + "SW" + ], + [ + "SW", + "XX", + "SW" + ], + [ + "SW", + "SW", + "SW" + ] + ], + category: "machines", + noMix: true, + } +let item = ""; +elements.improvedsensor = { + behavior: behaviors.WALL, + color: "#bebfa3", + onSelect: function(){ + item = prompt("what item should it detect?"); + }, + tick: function(pixel) { + if(pixel.start == pixelTicks){ + pixel.clone = item; + } + + for (var i = 0; i < adjacentCoords.length; i++) { + var coords = adjacentCoords[i]; + var x = pixel.x + coords[0]; + var y = pixel.y + coords[1]; + if (!isEmpty(x,y,true)) { + var sensed = pixelMap[x][y]; + if (sensed.element == pixel.clone) { + pixel.charge = 5; + break; + } + } + } + doDefaults(pixel); + }, + conduct: 1, + movable: false, + category:"machines", + darkText: true, + hardness: 1, + + }; From 1567c84929991e55cf19173c8ca887cb8da29676 Mon Sep 17 00:00:00 2001 From: Alexthetransfem <124483815+theenchantedsword@users.noreply.github.com> Date: Mon, 18 Dec 2023 20:14:18 -0600 Subject: [PATCH 2/3] Update mod-list.html --- mod-list.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mod-list.html b/mod-list.html index 394b68fe..2aeeb4e3 100644 --- a/mod-list.html +++ b/mod-list.html @@ -121,6 +121,7 @@ change.jsAdds a tool that only replaces existing pixelsAlice color_tools.jsAdds tools that manipulate colorsAlice controllable_pixel_test.jsAdds a pixel that can be controlled with the keyboard keys. Read the commit description for more info. [PC ONLY]Alice +customexplosion.jsAdded a custom explosion element and interface for it. check out its source code for how modders can use it.Alex cpt_alt.jsAdds a more destructive variant of the controllable pixelAlice delete_all_of_element.jsAdds a tool that deletes every pixel of the element(s) the user clicks onAlice descriptions.jsAdds descriptions to the info page and tooltips of elementsmollthecoder @@ -163,6 +164,7 @@ liquid_energy.jsAdds liquid versions of the elements in the Energy categoryAlice metals.jsAdds several metalsAlice mixture.jsAllows many chemicals to be mixedlllllllllwith10ls +morechemistry.jsAdds many new chemicals and compounds as well as some new machinesAlex moreliquids.jsAdds various liquidste-agma-at nellfire.jsAdds a weird transforming flame and several rock typesAlice Neutronium Mod.jsVariety of scientific elements
ExplosionsStellarX20 @@ -220,6 +222,7 @@ toothpaste.jsTeeth and pasteAlice Fun & Games +allliquids.jsMade all elements liquidsAlex amogus.jsAdds a small amogus structureAlice elem3.jsAdds all elements and combinations from Elemental 3 [Very Large]Sophie funny elements 2022-11-15.jsAdds a few curated randomly-generated elementsAlice From ccfb140f2c14d34eafb3451cea8427a40e5e9edc Mon Sep 17 00:00:00 2001 From: Alexthetransfem <124483815+theenchantedsword@users.noreply.github.com> Date: Mon, 18 Dec 2023 20:14:36 -0600 Subject: [PATCH 3/3] Create allliquids.js --- allliquids.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 allliquids.js diff --git a/allliquids.js b/allliquids.js new file mode 100644 index 00000000..ae92e535 --- /dev/null +++ b/allliquids.js @@ -0,0 +1,21 @@ +let liquid = [["XX", "XX", "XX"], ["M1", "XX", "M1"], ["M1", "M2", "M1"]] +for (var element in elements){ + + let a = elements[element].behavior; + console.log(a, elements[element], liquid) + if(a != undefined && typeof a != 'function'){ + let i = 0; + while (i < a.length){ + if(typeof a[i] == "string"){ + a[i] = a[i].split("|"); + i += 1; + } else { + i += 1; + } + } + elements[element].behavior = [[a[0][0], a[0][1], a[0][2]], [`${a[1][0]} AND M1`, a[1][1], `${a[1][2]} AND M1`], [`${a[2][0]} AND M1`, `${a[2][1]} AND M2`, `${a[2][2]} AND M1`]]; + } else { + elements[element].behavior = liquid; + } + +}