diff --git a/mods/liquid_energy.js b/mods/liquid_energy.js new file mode 100644 index 00000000..984095bb --- /dev/null +++ b/mods/liquid_energy.js @@ -0,0 +1,294 @@ +elements.liquid_plasma = { + color: ["#8800ff","#b184d9","#8800ff"], + behavior: [ + "XX|XX|XX", + "M2|DL%0.1|M2", + "M1|M1|M1", + ], + behaviorOn: [ + "XX|CL%5|XX", + "CL%5 AND M2|XX|CL%5 AND M2", + "M1|M1 AND CL%5|M1", + ], + temp:7065, + tempLow:5000, + stateLow: "liquid_fire", + category: "energy_liquids", + state: "energy_liquids", + density: 70, + charge: 0.5, + conduct: 1, +}, + +elements.liquid_fire = { + color: ["#ff6b21","#ffa600","#ff4000"], + behavior: [ + "XX|M2|XX", + "M2|XX|M2", + "M1|M1|M1", + ], + reactions: { + "water": { "elem1": "liquid_smoke" }, + }, + temp:600, + tempLow:100, + stateLow: "liquid_smoke", + tempHigh: 7000, + stateHigh: "liquid_plasma", + category: "energy_liquids", + burning: true, + burnTime: 500, + burnInto: "liquid_smoke", + state: "liquid", + density: 21, +}, + +elements.liquid_smoke = { + color: "#383838", + behavior: [ + "XX|XX|XX", + "M2|DL%0.1|M2", + "M1|M1|M1", + ], + reactions: { + "water": { "elem1": "dirty_water", "elem2": null }, + "steam": { "elem1": "pyrocumulus", "chance":0.08, "y":[0,15] }, + "rain_cloud": { "elem1": "pyrocumulus", "chance":0.08, "y":[0,15] }, + "snow_cloud": { "elem1": "pyrocumulus", "chance":0.08, "y":[0,15] }, + "acid_cloud": { "elem1": "pyrocumulus", "chance":0.05, "y":[0,15] }, + "fire_cloud": { "elem1": "pyrocumulus", "chance":0.05, "y":[0,15] }, + "pyrocumulus": { "elem1": "pyrocumulus", "chance":0.08, "y":[0,15] }, + }, + temp: 114, + tempHigh: 605, + stateHigh: "liquid_fire", + category: "energy_liquids", + state: "energy_liquids", + density: 2180, +}, + +elements.liquid_cold_fire = { + color: ["#21cbff","#006aff","#00ffff"], + behavior: [ + "XX|M2|XX", + "M2|CH:liquid_smoke%0.1|M2", + "M1|M1|M1", + ], + reactions: { + "fire": { "elem1": "liquid_smoke", "elem2": "liquid_smoke" }, + "plasma": { "elem1": "le_liquid_light", "elem2": "le_liquid_light" }, //prefixed to avoid conflict with F&M liquid_light + }, + temp:-200, + tempHigh:0, + stateHigh: "liquid_smoke", + category: "energy_liquids", + state: "liquid", + density: 42, +}, + +elements.le_liquid_light = { + color: "#ffffa8", + behavior: [ + "XX|XX|XX", + "M2|DL%0.1 AND RT%0.5|M2 AND BO", + "M1|M1|M1", + ], + temp: 40, + category: "energy_liquids", +}, + +elements.liquid_laser = { + color: "#ff0000", + behavior: [ + "XX|M2|XX", + "M2|DL%0.05 AND RT%0.5|M2 AND BO:1,2,3", + "XX|M1|XX", + ], + temp: 40, + category: "energy_liquids", +}, + +elements.liquid_electric = { + color: "#dddd00", + behavior: [ + "CL%3|CL%3 AND SH|CL%3", + "M2%15 AND CL%3 AND SH|SH%3 AND DL%15|M2%15 AND CL%3 AND SH", + "M1%15 AND CL%4|M1%50 AND CL%9 AND SH|M1%15 AND CL%4", + ], + charge: 3, + category: "energy_liquids", + state: "solid", + density: 44.1, +}, + +elements.liquid_radiation = { + color: ["#00ff00","#6fff00"], + behavior: [ + "XX|M2%50 AND HT|XX", + "M2%50 AND HT|DL%0.2|M2%50 AND HT", + "M1%50|M1 AND HT|M1%50", + ], + reactions: { + "water": { "elem2":"rad_steam", "chance":0.8 }, + "steam": { "elem2":"rad_steam", "chance":0.8 }, + "salt_water": { "elem2":"rad_steam", "chance":0.8 }, + "sugar_water": { "elem2":"rad_steam", "chance":0.8 }, + "dirty_water": { "elem2":"rad_steam", "chance":0.8 }, + "bubble": { "elem2":"rad_steam", "chance":0.8 }, + "foam": { "elem2":"rad_steam", "chance":0.8 }, + "ice": { "elem2":"rad_steam", "chance":0.8 }, + "snow": { "elem2":"rad_steam", "chance":0.8 }, + "packed_snow": { "elem2":"rad_steam", "chance":0.8 }, + "slime": { "elem2":"rad_steam", "chance":0.8 }, + "milk": { "elem2":"cheese", "chance":0.8 }, + "permafrost": { "elem1":"rad_steam", "elem2":"dirt", "chance":0.8 }, + "mud": { "elem1":"rad_steam", "elem2":"dirt", "chance":0.8 }, + "wet_sand": { "elem1":"rad_steam", "elem2":"sand", "chance":0.8 }, + "clay": { "elem1":"rad_steam", "elem2":"clay_soil", "chance":0.8 }, + "slaked_lime": { "elem1":"rad_steam", "elem2":"limestone", "chance":0.8 }, + "rain_cloud": { "elem2":"rad_cloud", "chance":0.8 }, + "snow_cloud": { "elem2":"rad_cloud", "chance":0.8 }, + "plant": { "elem2":"straw", "chance":0.8 }, + "grass": { "elem2":["straw","grass_seed","wheat_seed"], "chance":0.8 }, + "algae": { "elem2":["mushroom_spore","lichen","yeast"], "chance":0.8 }, + "mushroom_spore": { "elem2":["lichen","yeast"], "chance":0.8 }, + "mushroom_cap": { "elem2":["lichen","plant"], "chance":0.8 }, + "mushroom_stalk": { "elem2":["lichen","yeast"], "chance":0.8 }, + "mushroom_gill": { "elem2":["lichen","yeast"], "chance":0.8 }, + "flea": { "elem2":["ash","ant","termite"], "chance":0.8 }, + "ant": { "elem2":["ash","flea","termite"], "chance":0.8 }, + "termite": { "elem2":["ash","flea","ant"], "chance":0.8 }, + "fly": { "elem2":["ash","firefly","bee"], "chance":0.8 }, + "bee": { "elem2":["ash","firefly","fly"], "chance":0.8 }, + "firefly": { "elem2":["ash","bee","fly"], "chance":0.8 }, + "frog": { "elem2":["ash","meat","rotten_meat","cooked_meat"], "chance":0.8 }, + "fish": { "elem2":["ash","meat","rotten_meat","cooked_meat"], "chance":0.8 }, + "rat": { "elem2":["ash","meat","rotten_meat","cooked_meat","plague"], "chance":0.8 }, + "bone": { "elem2":["calcium","calcium","calcium","cancer"], "chance":0.8 }, + "meat": { "elem2":["ash","rotten_meat","cooked_meat"], "chance":0.8 }, + "rotten_meat": { "elem2":["ash","meat","cooked_meat"], "chance":0.8 }, + "cooked_meat": { "elem2":["ash","rotten_meat"], "chance":0.8 }, + "bamboo": { "elem2":["wood","plant","bamboo_plant"], "chance":0.8 }, + "bamboo_plant": { "elem2":["wood","plant","bamboo"], "chance":0.8 }, + "sapling": { "elem2":["wood","plant","tree_branch"], "chance":0.8 }, + "tree_branch": { "elem2":["wood","plant","sapling"], "chance":0.8 }, + "grass_seed": { "elem2":["straw","wheat_seed"], "chance":0.8 }, + "lichen": { "elem2":"algae", "chance":0.8 }, + "yeast": { "elem2":["algae","mushroom_spore","lichen"], "chance":0.8 }, + "wheat_seed": { "elem2":["straw","wheat","grass_seed"], "chance":0.8 }, + "flower_seed": { "elem2":["straw","grass","pistil","petal"], "chance":0.8 }, + "pistil": { "elem2":["straw","grass","flower_seed","petal"], "chance":0.8 }, + "petal": { "elem2":["straw","grass","flower_seed","pistil"], "chance":0.8 }, + "vine": { "elem1":["vine"], "chance":0.8 }, + "worm": { "elem2":"ash", "chance":0.8 }, + "corn": { "elem2":"corn_seed", "chance":0.8 }, + "corn_seed": { "elem2":"corn", "chance":0.8 }, + "potato": { "elem2":"potato_seed", "chance":0.8 }, + "potato_seed": { "elem2":"potato", "chance":0.8 }, + "slug": { "elem2":"slime", "chance":0.8 }, + "snail": { "elem2":"slime", "chance":0.8 }, + "cell": { "elem2":"cancer", "chance":0.8 }, + "blood": { "elem2":["infection","cancer"], "chance":0.8 }, + "antibody": { "elem2":"cancer", "chance":0.8 }, + "infection": { "elem2":"cancer", "chance":0.8 }, + "cancer": { "elem2":null, "chance":0.2 }, + + }, + state: "liquid", + density: 4.2, + category: "energy_liquids", +}, + +elements.liquid_explosion = { + color: ["#ffb48f","#ffd991","#ffad91"], + behavior: [ + "XX|XX|XX", + "M2|EX:10>fire,fire,fire,liquid_explosion,liquid_explosion%0.4 AND DL%0.3|M2", + "M1|M1|M1", + ], + temp: 300, + category: "energy_liquids", + state: "liquid", + density: 2000, + excludeRandom: true, +} + +runAfterLoad(function() { + if(enabledMods.includes("mods/fey_and_more.js")) { + elements.everfire_liquid = { + "name": "everfire liquid", + "color": "#06142b", + "state": "liquid", + "behavior": behaviors.LIQUID, + "density": 1290, + "burn": 100, + "burnTime": 2000, + "burnInto": "extinguished_everfire_liquid", + "category": "energy_liquids", + "fireColor": ["#0041a8","#8ab7ff"], + }, + elements.extinguished_everfire_liquid = { + "name": "extinguished everfire liquid", + "color": "#242d3b", + "state": "liquid", + "behavior": behaviors.LIQUID, + "density": 1290, + "fireColor": ["#0041a8","#8ab7ff"], + "category": "energy_liquids", + "hidden": true, + }, + elements.liquid_magic = { + "name": "liquid magic", + "color": ["#a270ff","#f2d9ff"], + "state": "liquid", + "behavior": [ + "M2%50|M2%50|M2%50", + "M2|DL%0.2|M2", + "M1|M1|M1", + ], + "density": 21, + "category": "energy_liquids", + "reactions": { + "water": { "elem1": null, "elem2": "pure_water", }, + "little_star": { "elem1": "mystic_fire", "elem2": "liquid_mystic_fire", }, + "cheese": { "elem1": null, "elem2": "moonrock", }, + "sapling": { "elem1": null, "elem2": "celie_seed", }, + "old_celie_leaves": { "elem1": null, "elem2": "celie_leaves", }, + "ketchup": { "elem1": null, "elem2": "enchanted_ketchup", }, + "tomato_sauce": { "elem1": null, "elem2": "enchanted_ketchup", }, + "rain_cloud": { "elem1": null, "elem2": "raincloud_cotton", }, + "snow_cloud": { "elem1": null, "elem2": "snowcloud_cotton", }, + "cloud": { "elem1": null, "elem2": "cloud_cotton", }, + }, + }, + elements.liquid_mystic_fire = { + "name": "liquid mystic fire", + "color": ["#5454ff","#2020d4","#5800c4"], + "behavior": [ + "M2%50|M2%50 AND CR:liquid_mystic_fire%10 AND CR:mystic_fire%5|M2%50", + "M2 AND CR:liquid_mystic_fire%5|EX:15>liquid_mystic_fire%0.1|M2 AND CR:liquid_mystic_fire%5", + "M1|M1|M1", + ], + "temp":8500, + "tempChange":-100, + "tempLow":8000, + "stateLow": "liquid_fire", + "category": "energy_liquids", + "burning": true, + }, + //concoction and essence are already liquid + elements.liquid_frostbomb = { + color: "#72dfed", + behavior: [ + "XX|XX|XX", + "M2|EX:15>frostwind,frostwind,frostwind,liquid_frostbomb%0.4 AND DL%0.2|M2", + "M1|M1|M1", + ], + temp: 300, + category: "energy_liquids", + state: "liquid", + density: 2000, + excludeRandom: true, + } + } +}); diff --git a/mods/randomness.js b/mods/randomness.js index b1b81341..c75970b2 100644 --- a/mods/randomness.js +++ b/mods/randomness.js @@ -374,8 +374,8 @@ elements.cluster_nuke = { elements.estradiol = { color: "#f2fcee", //it absorbs shorter wavelength UV than testosterone and I am treating this like absorbing violet for convenience - //https://www.researchgate.net/publication/226065469_Optical_Properties_of_Two_Types_of_Sex_Hormones_of_the_Cyclopentenephenanthrene_Series - //http://depts.washington.edu/cmditr/modules/lum/color.html + //https://www.researchgate.net/publication/226065469_Optical_Properties_of_Two_Types_of_Sex_Hormones_of_the_Cyclopentenephenanthrene_Series + //http://depts.washington.edu/cmditr/modules/lum/color.html behavior: behaviors.POWDER, state: "solid", category: "solids", @@ -404,8 +404,8 @@ elements.vaporized_estradiol = { elements.progesterone = { color: "#f7eefc", //slightly different? from testosterone but exaggerated - //https://downloads.hindawi.com/journals/ijps/2017/9603140.pdf - //these hormones all absorb in the uv region anyway so they would all look white to us + //https://downloads.hindawi.com/journals/ijps/2017/9603140.pdf + //these hormones all absorb in the uv region anyway so they would all look white to us behavior: behaviors.POWDER, state: "solid", category: "solids", @@ -466,8 +466,8 @@ elements.vaporized_testosterone = { elements.cyproterone_acetate = { color: "#efeef8", //it absorbs far longer uv than the others, which i am rendering as red absorption - //https://www.researchgate.net/figure/UV-spectrum-for-drospirenone-cyproterone-acetate-desogestrel-and-ethinyl-estradiol-at-1_fig1_315746083 - //i didn't really expect to find a spectrum for this + //https://www.researchgate.net/figure/UV-spectrum-for-drospirenone-cyproterone-acetate-desogestrel-and-ethinyl-estradiol-at-1_fig1_315746083 + //i didn't really expect to find a spectrum for this behavior: behaviors.POWDER, state: "solid", category: "solids", @@ -505,7 +505,7 @@ elements.vaporized_cyproterone_acetate = { elements.spironolactone = { color: "#f7eef1", //UV absorbance peak wavelength is slightly shorter than that of testosterone - //https://www.researchgate.net/publication/348592381_Quantification_of_Spironolactone_by_first_and_second_order_UV_Derivative_Spectrophotometry_in_bulk_and_tablet_dosage_form/link/6006b3cf299bf14088a649bd/download + //https://www.researchgate.net/publication/348592381_Quantification_of_Spironolactone_by_first_and_second_order_UV_Derivative_Spectrophotometry_in_bulk_and_tablet_dosage_form/link/6006b3cf299bf14088a649bd/download behavior: behaviors.POWDER, state: "solid", category: "solids", @@ -537,7 +537,7 @@ elements.vaporized_spironolactone = { elements.finasteride = { color: "#fcfcf1", //UV absorbance peak wavelength is even shorter than that of estradiol - //https://www.researchgate.net/publication/312317200 + //https://www.researchgate.net/publication/312317200 behavior: behaviors.POWDER, state: "solid", category: "solids", @@ -566,7 +566,7 @@ elements.vaporized_finasteride = { elements.dutasteride = { color: "#fbf6ee", //High UV absorbances around the peak wavelengths of both estradiol and testosterone - //https://sphinxsai.com/sphinxsaivol_2no.1/pharmtech_vol_2no.1/PharmTech_Vol_2No.1PDF/PT=18%20(113-117).pdf + //https://sphinxsai.com/sphinxsaivol_2no.1/pharmtech_vol_2no.1/PharmTech_Vol_2No.1PDF/PT=18%20(113-117).pdf behavior: behaviors.POWDER, state: "solid", category: "solids", @@ -595,8 +595,8 @@ elements.vaporized_dutasteride = { elements.bicalutamide = { color: "#f4fcee", //peaks at 200-220 and at 270 - //i am probably mapping uv to visible wrong and misreading color.html - //https://www.researchgate.net/publication/257679318 + //i am probably mapping uv to visible wrong and misreading color.html + //https://www.researchgate.net/publication/257679318 behavior: behaviors.POWDER, state: "solid", category: "solids", @@ -741,8 +741,8 @@ elements.bomb_3 = { elements.sebA = { color: "#ffffff", behavior: [ - "SH%50|EX:8>electric AND SH%50 |SH%50", - "SH%50|EX:9>electric%0.5 |SH%50", + "SH%50|EX:8>electric AND SH%50 |SH%50", + "SH%50|EX:9>electric%0.5|SH%50", "M2 AND SH%50|M1 AND SH%50 AND EX:8>electric AND SW:electric|M2 AND SH%50", ], category: "weapons", @@ -756,8 +756,8 @@ elements.sebA = { elements.seb = { color: "#ffffff", behavior: [ - "SH%50|EX:8>sebA AND SH%50 |SH%50", - "SH%50|XX |SH%50", + "SH%50|EX:8>sebA AND SH%50 |SH%50", + "SH%50|XX |SH%50", "M2 AND SH%50|M1 AND SH%50 AND EX:8>sebA AND SW:electric|M2 AND SH%50", ], category: "weapons", @@ -768,18 +768,15 @@ elements.seb = { hardness: 0.3, }, -this.aaa = ["plasma","plasma","plasma","plasma","plasma","plasma","plasma","plasma","plasma","plasma","plasma","plasma","smoke","plasma","plasma","fire","smoke","fire","smoke","plasma","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","acid","acid","oil","oil","oil","oil","oil","oil","oil","plasma","plasma","plasma","plasma","plasma","smoke","plasma","plasma","fire","smoke","plasma","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","flash","flash","flash","flash","flash","acid_gas","acid_gas","acid_gas","acid","oil","oil","oil","oil","oil","oil","oil","oil","oil","oil","plasma","plasma","plasma","plasma","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","acid","acid","oil","oil","oil","oil","oil","oil","oil","plasma","plasma","plasma","plasma","plasma","smoke","plasma","plasma","fire","smoke","plasma","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","seb","seb","flash","flash","flash","flash","flash","acid_gas","acid_gas","acid_gas","acid","oil","oil","oil","oil","oil","oil","oil","oil","oil","oil","plasma","plasma","plasma","plasma","bomb_2","bomb_2","bomb_2","plague","plague","plague","plague","plague","plague","radiation","radiation","radiation","radiation","radiation","radiation","radiation","radiation","uranium","uranium","uranium","uranium","uranium","uranium","greek_fire","greek_fire","greek_fire","greek_fire","greek_fire","antimatter","antimatter","antimatter","antimatter","antimatter","smoke_grenade","antimatter","smoke_grenade","fireball","flash","acid_gas","acid_gas","acid_gas","burning_unnamed_gas","warp","burning_unnamed_gas","warp","warp","plague","plague","plague","plague","plague","plague","radiation","radiation","radiation","radiation","radiation","radiation","radiation","radiation","uranium","uranium","uranium","uranium","uranium","uranium","greek_fire","greek_fire","greek_fire","greek_fire","greek_fire","hot_bomb","antimatter","antimatter","antimatter","antimatter","antimatter","smoke_grenade","antimatter","flash","acid_gas","acid_gas","acid_gas","burning_unnamed_gas","warp","burning_unnamed_gas","warp","warp"] +this.aaa = ["plasma","plasma","plasma","plasma","plasma","plasma","plasma","plasma","plasma","plasma","plasma","plasma","smoke","plasma","plasma","fire","smoke","fire","smoke","plasma","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","acid","acid","oil","oil","oil","oil","oil","oil","oil","plasma","plasma","plasma","plasma","plasma","smoke","plasma","plasma","fire","smoke","plasma","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","flash","flash","flash","flash","flash","acid_gas","acid_gas","acid_gas","acid","oil","oil","oil","oil","oil","oil","oil","oil","oil","oil","plasma","plasma","plasma","plasma","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","acid","acid","oil","oil","oil","oil","oil","oil","oil","plasma","plasma","plasma","plasma","plasma","smoke","plasma","plasma","fire","smoke","plasma","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","seb","seb","flash","flash","flash","flash","flash","acid_gas","acid_gas","acid_gas","acid","oil","oil","oil","oil","oil","oil","oil","oil","oil","oil","plasma","plasma","plasma","plasma","bomb_2","bomb_2","bomb_2","plague","plague","plague","plague","plague","plague","radiation","radiation","radiation","radiation","radiation","radiation","radiation","radiation","uranium","uranium","uranium","uranium","uranium","uranium","greek_fire","greek_fire","greek_fire","greek_fire","greek_fire","antimatter","antimatter","antimatter","antimatter","antimatter","smoke_grenade","antimatter","smoke_grenade","fireball","flash","acid_gas","acid_gas","acid_gas","burning_unnamed_gas","warp","burning_unnamed_gas","warp","warp","plague","plague","plague","plague","plague","plague","radiation","radiation","radiation","radiation","radiation","radiation","radiation","radiation","uranium","uranium","uranium","uranium","uranium","uranium","greek_fire","greek_fire","greek_fire","greek_fire","greek_fire","op_hottester_bomb","antimatter","antimatter","antimatter","antimatter","antimatter","smoke_grenade","antimatter","flash","acid_gas","acid_gas","acid_gas","burning_unnamed_gas","warp","burning_unnamed_gas","warp","warp"] + +this.bbb = ["smoke","smoke","smoke","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","acid","acid","oil","oil","oil","oil","oil","oil","oil","smoke","smoke","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","flash","flash","flash","flash","flash","acid_gas","acid_gas","acid_gas","acid","oil","oil","oil","oil","oil","oil","oil","oil","oil","oil","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","acid","acid","oil","oil","oil","oil","oil","oil","oil","smoke","smoke","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","metal_scrap","seb","flash","flash","flash","flash","flash","acid_gas","acid_gas","acid_gas","acid","oil","oil","oil","oil","oil","oil","oil","oil","oil","oil","plague","plague","plague","plague","plague","plague","radiation","radiation","radiation","radiation","radiation","radiation","radiation","radiation","uranium","uranium","uranium","uranium","uranium","uranium","greek_fire","greek_fire","greek_fire","greek_fire","greek_fire","antimatter","antimatter","antimatter","antimatter","antimatter","smoke_grenade","antimatter","smoke_grenade","flash","acid_gas","acid_gas","acid_gas","unnamed_gas","warp","unnamed_gas","warp","warp","plague","plague","plague","plague","plague","plague","radiation","radiation","radiation","radiation","radiation","radiation","radiation","radiation","uranium","uranium","uranium","uranium","uranium","uranium","greek_fire","greek_fire","greek_fire","greek_fire","greek_fire","antimatter","smoke_grenade","flash","acid_gas","acid_gas","acid_gas","unnamed_gas","warp","unnamed_gas","warp","warp"] elements.amalgamated_bomb = { color: ["#FF0000","#FF0000","#FFFF00","#FFFF00","#00FF00","#00FF00","#0000FF","#0000FF"], tick: function(pixel) { eee = Math.random() doHeat(pixel); - fire = aaa - smoke = aaa - radius = 30 - x = pixel.x - y = pixel.y if(!isEmpty(pixel.x,pixel.y-1) && !outOfBounds(pixel.x,pixel.y-1)) { if(pixelMap[pixel.x][pixel.y-1].element != pixel.element) { steppedOn = true @@ -799,6 +796,117 @@ elements.amalgamated_bomb = { } tryMove(pixel, pixel.x, pixel.y+1) if(steppedOn == true || landed == true) { + fire = bbb + smoke = bbb + radius = 45 + x = pixel.x + y = pixel.y + //SECONDARY + // if fire contains , split it into an array + if (fire.includes(",")) { + fire = fire.split(","); + } + // if smoke contains , split it into an array + if (smoke.includes(",")) { + smoke = smoke.split(","); + } + var coords = circleCoords(x,y,radius); + var power = radius/10; + //for (var p = 0; p < Math.round(radius/10+1); p++) { + for (var i = 0; i < coords.length; i++) { + // damage value is based on distance from x and y + var damage = Math.random() + (Math.floor(Math.sqrt(Math.pow(coords[i].x-x,2) + Math.pow(coords[i].y-y,2)))) / radius; + // invert + damage = 1 - damage; + if (damage < 0) { damage = 0; } + damage *= power; + if (isEmpty(coords[i].x,coords[i].y)) { + // create smoke or fire depending on the damage if empty + if (damage < 0.02) { } // do nothing + else if (damage < 0.2) { + // if smoke is an array, choose a random item + if (Array.isArray(smoke)) { + createPixel(smoke[Math.floor(Math.random() * smoke.length)],coords[i].x,coords[i].y); + } + else { + createPixel(smoke,coords[i].x,coords[i].y); + } + } + else { + // if fire is an array, choose a random item + if (Array.isArray(fire)) { + createPixel(fire[Math.floor(Math.random() * fire.length)],coords[i].x,coords[i].y); + } + else { + createPixel(fire,coords[i].x,coords[i].y); + } + } + } + else if (!outOfBounds(coords[i].x,coords[i].y)) { + // damage the pixel + var pixel = pixelMap[coords[i].x][coords[i].y]; + var info = elements[pixel.element]; + if (info.hardness) { // lower damage depending on hardness(0-1) + if (info.hardness < 1) { + damage = damage * ((1 - info.hardness)*10); + } + else { damage = 0; } + } + if (damage > 0.25) { + if (info.breakInto) { + // if it is an array, choose a random item, else just use the value + if (Array.isArray(info.breakInto)) { + var result = info.breakInto[Math.floor(Math.random() * info.breakInto.length)]; + } + else { + var result = info.breakInto; + } + // change the pixel to the result + pixel.element = result; + pixel.color = pixelColorPick(pixel); + if (elements[result].burning) { + pixel.burning = true; + pixel.burnStart = pixelTicks; + } + else if (pixel.burning && !elements[result].burn) { + pixel.burning = false; + delete pixel.burnStart; + } + } + else { + if (Array.isArray(fire)) { + var newfire = fire[Math.floor(Math.random() * fire.length)]; + } + else { + var newfire = fire; + } + pixel.element = newfire; + pixel.color = pixelColorPick(pixel); + if (elements[newfire].burning) { + pixel.burning = true; + pixel.burnStart = pixelTicks; + } + else if (pixel.burning && !elements[newfire].burn) { + pixel.burning = false; + delete pixel.burnStart; + } + } + } + if (damage > 0.75) { + if (info.burn) { + pixel.burning = true; + pixel.burnStart = pixelTicks; + } + } + pixel.temp += damage*radius*power; + pixelTempCheck(pixel); + } + } + + fire = aaa + smoke = aaa + radius = 30 + //PRIMARY // if fire contains , split it into an array if (fire.includes(",")) { fire = fire.split(","); @@ -906,6 +1014,346 @@ elements.amalgamated_bomb = { density: 1800, excludeRandom: true, extraInfo: "a little bit of everything \":eggTF:\" ", +}, + +elements.colder_bomb = { + color: "#43648e", + tick: function(pixel) { + eee = Math.random() + doHeat(pixel); + if(!isEmpty(pixel.x,pixel.y-1) && !outOfBounds(pixel.x,pixel.y-1)) { + if(pixelMap[pixel.x][pixel.y-1].element != pixel.element) { + steppedOn = true + } else steppedOn = false + } else { + steppedOn = false + } + if(!isEmpty(pixel.x,pixel.y+1) && !outOfBounds(pixel.x,pixel.y+1)) { + if(pixelMap[pixel.x][pixel.y+1].element != pixel.element) { + landed = true + } else landed = false + } else { + landed = false + } + if(outOfBounds(pixel.x,pixel.y+1)) { + landed = true + } + tryMove(pixel, pixel.x, pixel.y+1) + if(steppedOn == true || landed == true) { + fire = "cold_fire" + smoke = "cold_fire" + radius = 10 + x = pixel.x + y = pixel.y + // if fire contains , split it into an array + if (fire.includes(",")) { + fire = fire.split(","); + } + // if smoke contains , split it into an array + if (smoke.includes(",")) { + smoke = smoke.split(","); + } + var coords = circleCoords(x,y,radius); + var power = radius/10; + //for (var p = 0; p < Math.round(radius/10+1); p++) { + for (var i = 0; i < coords.length; i++) { + // damage value is based on distance from x and y + var damage = Math.random() + (Math.floor(Math.sqrt(Math.pow(coords[i].x-x,2) + Math.pow(coords[i].y-y,2)))) / radius; + // invert + damage = 1 - damage; + if (damage < 0) { damage = 0; } + damage *= power; + if (isEmpty(coords[i].x,coords[i].y)) { + // create smoke or fire depending on the damage if empty + if (damage < 0.02) { } // do nothing + else if (damage < 0.2) { + // if smoke is an array, choose a random item + if (Array.isArray(smoke)) { + createPixel(smoke[Math.floor(Math.random() * smoke.length)],coords[i].x,coords[i].y); + } + else { + createPixel(smoke,coords[i].x,coords[i].y); + } + } + else { + // if fire is an array, choose a random item + if (Array.isArray(fire)) { + createPixel(fire[Math.floor(Math.random() * fire.length)],coords[i].x,coords[i].y); + } + else { + createPixel(fire,coords[i].x,coords[i].y); + } + } + } + else if (!outOfBounds(coords[i].x,coords[i].y)) { + // damage the pixel + var pixel = pixelMap[coords[i].x][coords[i].y]; + var info = elements[pixel.element]; + if (info.hardness) { // lower damage depending on hardness(0-1) + if (info.hardness < 1) { + damage = damage * ((1 - info.hardness)*10); + } + else { damage = 0; } + } + if (damage > 0.25) { + if (info.breakInto) { + // if it is an array, choose a random item, else just use the value + if (Array.isArray(info.breakInto)) { + var result = info.breakInto[Math.floor(Math.random() * info.breakInto.length)]; + } + else { + var result = info.breakInto; + } + // change the pixel to the result + pixel.element = result; + pixel.color = pixelColorPick(pixel); + if (elements[result].burning) { + pixel.burning = true; + pixel.burnStart = pixelTicks; + } + else if (pixel.burning && !elements[result].burn) { + pixel.burning = false; + delete pixel.burnStart; + } + } + else { + if (Array.isArray(fire)) { + var newfire = fire[Math.floor(Math.random() * fire.length)]; + } + else { + var newfire = fire; + } + pixel.element = newfire; + pixel.color = pixelColorPick(pixel); + if (elements[newfire].burning) { + pixel.burning = true; + pixel.burnStart = pixelTicks; + } + else if (pixel.burning && !elements[newfire].burn) { + pixel.burning = false; + delete pixel.burnStart; + } + } + } + if (damage > 0.75) { + if (info.burn) { + pixel.burning = true; + pixel.burnStart = pixelTicks; + } + } + pixel.temp -= damage*radius*power; + pixelTempCheck(pixel); + } + } + } + }, + category: "weapons", + state: "solid", + density: 1300, + excludeRandom: true, +}, + +elements.op_hottester_bomb = { + color: "#cc436e", + tick: function(pixel) { + eee = Math.random() + doHeat(pixel); + if(!isEmpty(pixel.x,pixel.y-1) && !outOfBounds(pixel.x,pixel.y-1)) { + if(pixelMap[pixel.x][pixel.y-1].element != pixel.element) { + steppedOn = true + } else steppedOn = false + } else { + steppedOn = false + } + if(!isEmpty(pixel.x,pixel.y+1) && !outOfBounds(pixel.x,pixel.y+1)) { + if(pixelMap[pixel.x][pixel.y+1].element != pixel.element) { + landed = true + } else landed = false + } else { + landed = false + } + if(outOfBounds(pixel.x,pixel.y+1)) { + landed = true + } + tryMove(pixel, pixel.x, pixel.y+1) + if(steppedOn == true || landed == true) { + fire = "plasma" + smoke = "plasma" + radius = 15 + x = pixel.x + y = pixel.y + // if fire contains , split it into an array + if (fire.includes(",")) { + fire = fire.split(","); + } + // if smoke contains , split it into an array + if (smoke.includes(",")) { + smoke = smoke.split(","); + } + var coords = circleCoords(x,y,radius); + var power = radius/10; + //for (var p = 0; p < Math.round(radius/10+1); p++) { + for (var i = 0; i < coords.length; i++) { + // damage value is based on distance from x and y + var damage = Math.random() + (Math.floor(Math.sqrt(Math.pow(coords[i].x-x,2) + Math.pow(coords[i].y-y,2)))) / radius; + // invert + damage = 1 - damage; + if (damage < 0) { damage = 0; } + damage *= power; + if (isEmpty(coords[i].x,coords[i].y)) { + // create smoke or fire depending on the damage if empty + if (damage < 0.02) { } // do nothing + else if (damage < 0.2) { + // if smoke is an array, choose a random item + if (Array.isArray(smoke)) { + createPixel(smoke[Math.floor(Math.random() * smoke.length)],coords[i].x,coords[i].y); + } + else { + createPixel(smoke,coords[i].x,coords[i].y); + } + } + else { + // if fire is an array, choose a random item + if (Array.isArray(fire)) { + createPixel(fire[Math.floor(Math.random() * fire.length)],coords[i].x,coords[i].y); + } + else { + createPixel(fire,coords[i].x,coords[i].y); + } + } + } + else if (!outOfBounds(coords[i].x,coords[i].y)) { + // damage the pixel + var pixel = pixelMap[coords[i].x][coords[i].y]; + var info = elements[pixel.element]; + if (info.hardness) { // lower damage depending on hardness(0-1) + if (info.hardness < 1) { + damage = damage * ((1 - info.hardness)*10); + } + else { damage = 0; } + } + if (damage <= 0.25) { + pixel.temp += Math.floor((damage*radius*power*10)**1.3) + } + if (damage > 0.25) { + if (info.breakInto) { + // if it is an array, choose a random item, else just use the value + if (Array.isArray(info.breakInto)) { + var result = info.breakInto[Math.floor(Math.random() * info.breakInto.length)]; + } + else { + var result = info.breakInto; + } + // change the pixel to the result + pixel.element = result; + pixel.color = pixelColorPick(pixel); + if (elements[result].burning) { + pixel.burning = true; + pixel.burnStart = pixelTicks; + } + else if (pixel.burning && !elements[result].burn) { + pixel.burning = false; + delete pixel.burnStart; + } + } + else { + if (Array.isArray(fire)) { + var newfire = fire[Math.floor(Math.random() * fire.length)]; + } + else { + var newfire = fire; + } + pixel.element = newfire; + pixel.color = pixelColorPick(pixel); + if (elements[newfire].burning) { + pixel.burning = true; + pixel.burnStart = pixelTicks; + } + else if (pixel.burning && !elements[newfire].burn) { + pixel.burning = false; + delete pixel.burnStart; + } + } + pixel.temp += Math.floor((damage*radius*power*15)**1.5) + } + if (damage > 0.75) { + if (info.burn) { + pixel.burning = true; + pixel.burnStart = pixelTicks; + pixel.temp += Math.floor((damage*radius*power*20)**1.7) + } + } + pixel.temp += Math.floor((damage*radius*power*5)**1.1); + pixelTempCheck(pixel); + } + } + } + }, + category: "weapons", + state: "solid", + temp: 7065, + density: 1300, + excludeRandom: true, +}, + +elements.netherrack = { + color: ["#802b2b","#4f1b1b","#943232"], + behavior: behaviors.POWDER, + tempHigh: 7550, + category: "land", + state: "solid", + density: 2550, + hardness: 0.07, + breakInto: ["crushed_netherrack","crushed_netherrack","crushed_netherrack","crushed_netherrack","crushed_netherrack","crushed_netherrack","crushed_netherrack","sulfur"], // and some copper, gold, iron, nickel after processing //sulfur closer to 1/7 in-game + burn: 9, + burnTime: 9007199254740995, + burnInto: "netherrack", +}, + +elements.crushed_netherrack = { + color: ["#e34b46","#b04235","#73431f","#522510","#7a3326"], + behavior: behaviors.POWDER, + category:"land", + tempHigh: 7550, + stateHigh: "molten_netherrack", + state: "solid", + density: 1680, + burn: 20, + burnTime: 9007199254740995, + hardness: 0.02, + hidden: true, +}, + +elements.soul_sand = { + color: "#755e35", + behavior: behaviors.POWDER, + tempHigh: 3000, + stateHigh: "molten_soul_glass", + category: "land", + state: "solid", + density: 1602, +}, + +elements.soul_glass = { + color: ["#998060","#a18654"], + behavior: behaviors.WALL, + tempHigh: 3000, + category: "solids", + state: "solid", + density: 2500, + breakInto: "soul_glass_shard", + hidden: true, +}, + +elements.soul_glass_shard = { + color: ["#998060","#a18654","#8f764a"], + behavior: behaviors.POWDER, + tempHigh: 3000, + stateHigh: "molten_soul_glass", + category: "powders", + state: "solid", + density: 2500, + hidden: true, } runAfterLoad(function() { @@ -939,16 +1387,40 @@ runAfterLoad(function() { aaa.push("firesea") aaa.push("firesea") aaa.push("firesea") + aaa.push("lektre") + aaa.push("lektre") + aaa.push("lektre") + bbb.push("poisonwater") + bbb.push("poisonwater") + bbb.push("poisonwater") + bbb.push("poisonwater") + bbb.push("mystic_fire") + bbb.push("mystic_fire") + bbb.push("firesea") + bbb.push("firesea") + bbb.push("firesea") + bbb.push("poisonwater") + bbb.push("poisonwater") + bbb.push("poisonwater") + bbb.push("poisonwater") + bbb.push("mystic_fire") + bbb.push("mystic_fire") + bbb.push("firesea") + bbb.push("firesea") + bbb.push("firesea") + bbb.push("lektre") + bbb.push("lektre") + bbb.push("lektre") } if(enabledMods.includes("mods/Neutronium Mod.js")) { aaa.push("flamer") - aaa.push("flamer") - aaa.push("flamebomb") aaa.push("flamebomb") aaa.push("flamer") - aaa.push("flamer") - aaa.push("flamebomb") aaa.push("flamebomb") + bbb.push("flamer") + bbb.push("flamebomb") + bbb.push("flamer") + bbb.push("flamebomb") } elements.vaporized_histrelin = elements.molten_histrelin delete elements.molten_histrelin diff --git a/mods/randomness_but_tick.js b/mods/randomness_but_tick.js index f0e71074..2445fc6f 100644 --- a/mods/randomness_but_tick.js +++ b/mods/randomness_but_tick.js @@ -341,4 +341,176 @@ elements.void_first = { }, category:"special", hardness: 1, +}, + +conveyorIgnoreList = ["conveyor_1","conveyor_2","wall"] + +elements.conveyor_1 = { + color: "#7f7f7f", + tick: function(pixel) { + //top right + if (!isEmpty(pixel.x,pixel.y-1) && !outOfBounds(pixel.x,pixel.y-1)) { + if (pixelMap[pixel.x][pixel.y-1].element == "body") { + if(!isEmpty(pixel.x,pixel.y-2) && !outOfBounds(pixel.x,pixel.y-2)) { + if (pixelMap[pixel.x][pixel.y-2].element == "head") { + if(isEmpty(pixel.x+1,pixel.y-1) && isEmpty(pixel.x+1,pixel.y-2) && !outOfBounds(pixel.x+1,pixel.y-1) && !outOfBounds(pixel.x+1,pixel.y-2)) { + tryMove(pixelMap[pixel.x][pixel.y-1],pixel.x+1,pixel.y-1) + tryMove(pixelMap[pixel.x][pixel.y-2],pixel.x+1,pixel.y-2) + } + } + } else { + if(isEmpty(pixel.x+1,pixel.y-1) && !outOfBounds(pixel.x+1,pixel.y-1)) { + tryMove(pixelMap[pixel.x][pixel.y-1],pixel.x+1,pixel.y-1) + } + } + } else if(!conveyorIgnoreList.includes(pixelMap[pixel.x][pixel.y-1].element)) { + tryMove(pixelMap[pixel.x][pixel.y-1],pixel.x+1,pixel.y-1) + } + } + //right down + if (!isEmpty(pixel.x+1,pixel.y) && !outOfBounds(pixel.x+1,pixel.y)) { + if (pixelMap[pixel.x+1][pixel.y].element == "body") { + if(!isEmpty(pixel.x+1,pixel.y-1) && !outOfBounds(pixel.x+1,pixel.y-1)) { + if (pixelMap[pixel.x+1][pixel.y-1].element == "head") { + if(isEmpty(pixel.x+1,pixel.y+1) && !outOfBounds(pixel.x+1,pixel.y+1)) { + tryMove(pixelMap[pixel.x+1][pixel.y],pixel.x+1,pixel.y+1) + tryMove(pixelMap[pixel.x+1][pixel.y-1],pixel.x+1,pixel.y) + } + } + } else { + if(isEmpty(pixel.x+1,pixel.y+1) && !outOfBounds(pixel.x+1,pixel.y+1)) { + tryMove(pixelMap[pixel.x+1][pixel.y],pixel.x+1,pixel.y+1) + } + } + } else if(!conveyorIgnoreList.includes(pixelMap[pixel.x+1][pixel.y].element)) { + tryMove(pixelMap[pixel.x+1][pixel.y],pixel.x+1,pixel.y+1) + } + } + //bottom left + if (!isEmpty(pixel.x,pixel.y+1) && !outOfBounds(pixel.x,pixel.y+1)) { + if (pixelMap[pixel.x][pixel.y+1].element == "head") { + if(!isEmpty(pixel.x,pixel.y+2) && !outOfBounds(pixel.x,pixel.y+2)) { + if (pixelMap[pixel.x][pixel.y+2].element == "body") { + if(isEmpty(pixel.x-1,pixel.y+1) && isEmpty(pixel.x-1,pixel.y+2) && !outOfBounds(pixel.x-1,pixel.y+2) && !outOfBounds(pixel.x-1,pixel.y+2)) { + tryMove(pixelMap[pixel.x][pixel.y+1],pixel.x-1,pixel.y+1) + tryMove(pixelMap[pixel.x][pixel.y+2],pixel.x-1,pixel.y+2) + } + } + } else { + if(isEmpty(pixel.x-1,pixel.y+1) && !outOfBounds(pixel.x-1,pixel.y+1)) { + tryMove(pixelMap[pixel.x][pixel.y+1],pixel.x-1,pixel.y+1) + } + } + } else if(!conveyorIgnoreList.includes(pixelMap[pixel.x][pixel.y+1].element)) { + tryMove(pixelMap[pixel.x][pixel.y+1],pixel.x-1,pixel.y+1) + } + } + //left up + if (!isEmpty(pixel.x-1,pixel.y) && !outOfBounds(pixel.x-1,pixel.y)) { + if (pixelMap[pixel.x-1][pixel.y].element == "head") { + if(!isEmpty(pixel.x-1,pixel.y+1) && !outOfBounds(pixel.x-1,pixel.y+1)) { + if (pixelMap[pixel.x-1][pixel.y+1].element == "body") { + if(isEmpty(pixel.x-1,pixel.y-1) && !outOfBounds(pixel.x-1,pixel.y-1)) { + tryMove(pixelMap[pixel.x-1][pixel.y],pixel.x-1,pixel.y-1) + tryMove(pixelMap[pixel.x-1][pixel.y+1],pixel.x-1,pixel.y) + } + } + } else { + if(isEmpty(pixel.x-1,pixel.y-1) && !outOfBounds(pixel.x-1,pixel.y-1)) { + tryMove(pixelMap[pixel.x-1][pixel.y],pixel.x-1,pixel.y-1) + } + } + } else if(!conveyorIgnoreList.includes(pixelMap[pixel.x-1][pixel.y].element)) { + tryMove(pixelMap[pixel.x-1][pixel.y],pixel.x-1,pixel.y-1) + } + } + }, + category: "machines", + insulate: true, + state: "solid", +}, + +elements.conveyor_2 = { + color: "#7f7f7f", + tick: function(pixel) { + //top left + if (!isEmpty(pixel.x,pixel.y-1) && !outOfBounds(pixel.x,pixel.y-1)) { + if (pixelMap[pixel.x][pixel.y-1].element == "body") { + if(!isEmpty(pixel.x,pixel.y-2) && !outOfBounds(pixel.x,pixel.y-2)) { + if (pixelMap[pixel.x][pixel.y-2].element == "head") { + if(isEmpty(pixel.x-1,pixel.y-1) && isEmpty(pixel.x-1,pixel.y-2) && !outOfBounds(pixel.x-1,pixel.y-1) && !outOfBounds(pixel.x-1,pixel.y-2)) { + tryMove(pixelMap[pixel.x][pixel.y-1],pixel.x-1,pixel.y-1) + tryMove(pixelMap[pixel.x][pixel.y-2],pixel.x-1,pixel.y-2) + } + } + } else { + if(isEmpty(pixel.x-1,pixel.y-1) && !outOfBounds(pixel.x-1,pixel.y-1)) { + tryMove(pixelMap[pixel.x][pixel.y-1],pixel.x-1,pixel.y-1) + } + } + } else if(!conveyorIgnoreList.includes(pixelMap[pixel.x][pixel.y-1].element)) { + tryMove(pixelMap[pixel.x][pixel.y-1],pixel.x-1,pixel.y-1) + } + } + //right up + if (!isEmpty(pixel.x+1,pixel.y) && !outOfBounds(pixel.x+1,pixel.y)) { + if (pixelMap[pixel.x+1][pixel.y].element == "head") { + if(!isEmpty(pixel.x+1,pixel.y+1) && !outOfBounds(pixel.x+1,pixel.y+1)) { + if (pixelMap[pixel.x+1][pixel.y+1].element == "body") { + if(isEmpty(pixel.x+1,pixel.y-1) && !outOfBounds(pixel.x+1,pixel.y-1)) { + tryMove(pixelMap[pixel.x+1][pixel.y],pixel.x+1,pixel.y-1) + tryMove(pixelMap[pixel.x+1][pixel.y+1],pixel.x+1,pixel.y) + } + } + } else { + if(isEmpty(pixel.x+1,pixel.y-1) && !outOfBounds(pixel.x+1,pixel.y-1)) { + tryMove(pixelMap[pixel.x+1][pixel.y],pixel.x+1,pixel.y-1) + } + } + } else if(!conveyorIgnoreList.includes(pixelMap[pixel.x+1][pixel.y].element)) { + tryMove(pixelMap[pixel.x+1][pixel.y],pixel.x+1,pixel.y-1) + } + } + //bottom right + if (!isEmpty(pixel.x,pixel.y+1) && !outOfBounds(pixel.x,pixel.y+1)) { + if (pixelMap[pixel.x][pixel.y+1].element == "head") { + if(!isEmpty(pixel.x,pixel.y+2) && !outOfBounds(pixel.x,pixel.y+2)) { + if (pixelMap[pixel.x][pixel.y+2].element == "body") { + if(isEmpty(pixel.x+1,pixel.y+1) && isEmpty(pixel.x+1,pixel.y+2) && !outOfBounds(pixel.x+1,pixel.y+2) && !outOfBounds(pixel.x+1,pixel.y+2)) { + tryMove(pixelMap[pixel.x][pixel.y+1],pixel.x+1,pixel.y+1) + tryMove(pixelMap[pixel.x][pixel.y+2],pixel.x+1,pixel.y+2) + } + } + } else { + if(isEmpty(pixel.x+1,pixel.y+1) && !outOfBounds(pixel.x+1,pixel.y+1)) { + tryMove(pixelMap[pixel.x][pixel.y+1],pixel.x+1,pixel.y+1) + } + } + } else if(!conveyorIgnoreList.includes(pixelMap[pixel.x][pixel.y+1].element)) { + tryMove(pixelMap[pixel.x][pixel.y+1],pixel.x+1,pixel.y+1) + } + } + //left down + if (!isEmpty(pixel.x-1,pixel.y) && !outOfBounds(pixel.x-1,pixel.y)) { + if (pixelMap[pixel.x-1][pixel.y].element == "body") { + if(!isEmpty(pixel.x-1,pixel.y-1) && !outOfBounds(pixel.x-1,pixel.y-1)) { + if (pixelMap[pixel.x-1][pixel.y-1].element == "head") { + if(isEmpty(pixel.x-1,pixel.y+1) && !outOfBounds(pixel.x-1,pixel.y+1)) { + tryMove(pixelMap[pixel.x-1][pixel.y],pixel.x-1,pixel.y+1) + tryMove(pixelMap[pixel.x-1][pixel.y-1],pixel.x-1,pixel.y) + } + } + } else { + if(isEmpty(pixel.x-1,pixel.y+1) && !outOfBounds(pixel.x-1,pixel.y+1)) { + tryMove(pixelMap[pixel.x-1][pixel.y],pixel.x-1,pixel.y+1) + } + } + } else if(!conveyorIgnoreList.includes(pixelMap[pixel.x-1][pixel.y].element)) { + tryMove(pixelMap[pixel.x-1][pixel.y],pixel.x-1,pixel.y+1) + } + } + }, + category: "machines", + insulate: true, + state: "solid", } diff --git a/mods/ticking_temp_stuff.js b/mods/ticking_temp_stuff.js index efffa10a..4cc0c03d 100644 --- a/mods/ticking_temp_stuff.js +++ b/mods/ticking_temp_stuff.js @@ -61,6 +61,7 @@ elements.super_heater_2 = { insulate: true, state: "solid", hidden: true, + excludeRandom: true, }, elements.super_cooler_2 = { @@ -78,6 +79,7 @@ elements.super_cooler_2 = { insulate: true, state: "solid", hidden: true, + excludeRandom: true, }, elements.super_warmer_2 = { @@ -95,6 +97,7 @@ elements.super_warmer_2 = { insulate: true, state: "solid", hidden: true, + excludeRandom: true, }, elements.global_heater = { @@ -112,6 +115,7 @@ elements.global_heater = { insulate: true, state: "solid", hidden: true, + excludeRandom: true, }, elements.global_cooler = { @@ -129,6 +133,7 @@ elements.global_cooler = { insulate: true, state: "solid", hidden: true, + excludeRandom: true, }, elements.global_warmer = { @@ -146,6 +151,7 @@ elements.global_warmer = { insulate: true, state: "solid", hidden: true, + excludeRandom: true, }, elements.agw = { //adjustable global warmer @@ -165,6 +171,7 @@ elements.agw = { //adjustable global warmer insulate: true, state: "solid", hidden: true, + excludeRandom: true, }, elements.super_heater_3 = { @@ -201,6 +208,7 @@ elements.super_heater_3 = { category:"machines", insulate: true, state: "solid", + excludeRandom: true, }, elements.super_cooler_3 = { @@ -237,6 +245,7 @@ elements.super_cooler_3 = { category:"machines", insulate: true, state: "solid", + excludeRandom: true, }, elements.super_warmer_3 = { @@ -271,6 +280,7 @@ elements.super_warmer_3 = { category:"machines", insulate: true, state: "solid", + excludeRandom: true, }, elements.tc = { //temperature checker diff --git a/mods/worldgen_test.js b/mods/worldgen_test.js index 061ee226..868f0857 100644 --- a/mods/worldgen_test.js +++ b/mods/worldgen_test.js @@ -91,4 +91,83 @@ elements.worldgen_test = { insulate: true, state: "solid", excludeRandom: true, -} \ No newline at end of file +} + +runAfterLoad(function() { + if(enabledMods.includes("mods/randomness.js")) { + +elements.nether_gen_test = { + color: ["#751318","#694a20","#f0771a"], + tick: function(pixel) { + for (var i = 1; i < width; i++) { + + for (var j = 1; j < height; j++) { + + if (isEmpty(i,j)) { + + if(j >= Math.floor(5*height/7) && j < Math.floor(7*height/7)) { + + if(Math.random() < 0.95) { + + if(Math.random() < 2/3) { + + if(i >= Math.floor(11*width/14) && i < Math.floor(14*width/14)) { + + createPixel("soul_sand",i,j) + + } else { + + createPixel("netherrack",i,j) + + } + + } else { + + createPixel("gravel",i,j) + + } + + } + + } + + if(j >= Math.floor(4*height/7) && j < Math.floor(5*height/7)) { + + if(Math.random() < 0.95) { + + if(i >= Math.floor(11*width/14) && i < Math.floor(14*width/14)) { + + createPixel("soul_sand",i,j) + + } else { + + createPixel("netherrack",i,j) + + } + + } + + } + + } + + } + + } + + explodeAt(Math.floor(51*width/56),Math.floor(10*height/14),Math.floor(1.8*height/7),fire="magma") + + if(!isEmpty(Math.floor(51*width/56),Math.floor(10*height/14))) { + pixelMap[Math.floor(51*width/56)][Math.floor(10*height/14)].temp += 10**(3*(Math.floor(Math.log10(Math.sqrt((height**2)+(width**2)))))) + } + + deletePixel(pixel.x,pixel.y) + + }, + category: "machines", + insulate: true, + state: "solid", + excludeRandom: true, + } +} +});