diff --git a/mod-list.html b/mod-list.html index 3cc4c843..8ad490b1 100644 --- a/mod-list.html +++ b/mod-list.html @@ -230,15 +230,16 @@ nocancer.jsRemoves cancer from the game one tick after it is createdmollthecoder nocancer2.jsRemoves cancer from the game altogether. May be incompatible with other mods that spawn cancermollthecoder nograssgrow.jsPrevents Grass from growingmollthecoder -obsidian.jsAdds ObsidianJayd pizzasstuff.jsNew animals, foods, and plants_ilikepizza_ primordial_birthpool.jsA cross between Primordial Soup and Birthpool. Requires F&MAlice spring.jsMany nature elements, like sakura trees, butterflies, beehives, and moreR74n the_ground_og.jsSimplified and more stable version of the_ground.jsAlice the_ground.jsAdds several rock types, worldgen settings, and gemstonesAlice toothpaste.jsTeeth and pasteAlice +volcanic_expansion.jsAdds Obsidian, Pumice, and Andesite rocksJayd Fun & Games +all_around_fillers.jsAdds directional Filler variantsidk73248 allliquids.jsMade all elements liquidsAlex amogus.jsAdds a small amogus structureAlice elem3.jsAdds all elements and combinations from Elemental 3 [Very Large]Sophie @@ -271,6 +272,9 @@ rainbow_tests.jsAdds variants of the rainbow element with different mathsAlice Shroomboxels.jsA variant of acid_and_shapes.js that uses a different trigonometric functionAlice +Compilations +a_mod_by_alice.jsA mod combining most of Alice’s mods, and some other thingsAlice + Technical Libraries & Tests a_bundle_of_tests.jsSeveral test functionsAlice betterMenuScreens.jsLibrary for mods to create their own menusggod diff --git a/mods/aChefsDream.js b/mods/aChefsDream.js index 6269b075..e026916d 100644 --- a/mods/aChefsDream.js +++ b/mods/aChefsDream.js @@ -2,7 +2,7 @@ Created by SquareScreamYT and RealerRaddler Thanks to Alice, nousernamefound and Fioushemastor for helping :) -v1.1 +v1.3.2 Changelog (v1.0) - added chickens @@ -127,6 +127,49 @@ Changelog (v1.2) - added cream of tartar - added wine - added corn syrup + + + +Changelog (v1.3) + - added shrimp + - added coconuts + - added coconut stems + - added coconut leaves + - added coconut tree tops + - added coconut milk and coconut juice + - added cut coconuts + - salmon and tuna meats no longer melt + - added knife description + - added lemons and related stuff + - lemons + - lemon wood + - lemon branches + - lemon leaves + - lemon juice + - made by smashing lemons + - lemon seeds + - lemon slices + - made by cutting lemons + - lemon zest + - byproduct of cutting lemons + - lemon marmalade can now be made by mixing lemon slices or lemon zest with sugar + - added carrots + - added carrot seeds and leaves + - added carrot juice + - added dry icing + + + +Changelog (v1.3.1) + - added lemonade + + + +Changelog (v1.3.2) + - added apple cider vinegar + - added turnips + - added turnip seeds and leaves + - added turnip juice */ /* @@ -150,6 +193,8 @@ elements.knife = { changePixel(pixel, cutInto) }, category:"tools", + canPlace: false, + desc: "Use on pixels to cut them, if possible." } elements.chicken = { @@ -857,7 +902,8 @@ elements.apple_juice = { hidden: true, temp: 30, reactions: { - "sugar": { elem1:"apple_jam", elem2:null, chance:0.35 } + "sugar": { elem1:"apple_jam", elem2:null, chance:0.35 }, + "yeast": { elem1:"apple_cider_vinegar", elem2:null, chance:0.35 } }, tempLow: 0 }; @@ -905,20 +951,32 @@ elements.icing_sugar = { viscosity: 1.5, category: "food", state: "solid", - hidden: true, density: 1036.86, isFood: true }; elements.icing = { color: "#fefefb", - behavior: behaviors.STURDYPOWDER, + behavior: behaviors.LIQUID, onMix: function(icing_sugar1, icing_sugar2) { if ((shiftDown && Math.random() < 0.2) || (elements[icing_sugar2.element].id === elements.icing_sugar.id && Math.random() < 0.25)) { changePixel(icing_sugar1,"icing") } }, - viscosity: 1.5, + tempHigh: 45, + stateHigh: ["dry_icing"], + stateLowColorMultiplier: 0.97, + category: "food", + isFood: true, + state: "solid", + density: 959.97, + viscosity: 9000, + hidden: true +}; + +elements.dry_icing = { + color: "#fffefa", + behavior: behaviors.STURDYPOWDER, tempHigh: 1000, stateHigh: ["smoke","smoke","smoke","steam","steam","calcium"], stateLowColorMultiplier: 0.97, @@ -926,6 +984,8 @@ elements.icing = { isFood: true, state: "solid", density: 959.97, + viscosity: 9000, + hidden: true }; elements.cream.reactions.baked_batter = {elem2: "cake" } @@ -1085,7 +1145,7 @@ elements.orange_slice = { burn:65, burnTime:60, burnInto: "dead_plant", - breakInto: "apple_juice", + breakInto: "orange_juice", state: "solid", density: 1050, hidden: true, @@ -1370,18 +1430,18 @@ elements.smoked_salmon = { state: "solid", temp:55, tempHigh: 600, - stageHigh: ["ash", "smoke"], + stateHigh: ["ash", "smoke"], isFood: true, } -elements.steaned_salmon = { +elements.steamed_salmon = { color: ["#BB7B4B", "#B07B54"], behavior: behaviors.STURDYPOWDER, category: "food", state: "solid", temp:60, tempHigh: 600, - stageHigh: ["ash", "smoke"], + stateHigh: ["ash", "smoke"], isFood: true, } @@ -1392,7 +1452,7 @@ elements.boiled_salmon = { state: "solid", temp:70, tempHigh: 600, - stageHigh: ["ash", "smoke"], + stateHigh: ["ash", "smoke"], isFood: true, } @@ -1403,7 +1463,7 @@ elements.fried_salmon = { state: "solid", temp:70, tempHigh: 600, - stageHigh: ["ash", "smoke"], + stateHigh: ["ash", "smoke"], isFood: true, } @@ -1443,7 +1503,7 @@ elements.smoked_tuna = { state: "solid", temp:55, tempHigh: 600, - stageHigh: ["ash", "smoke"], + stateHigh: ["ash", "smoke"], isFood: true, } @@ -1454,7 +1514,7 @@ elements.steamed_tuna = { state: "solid", temp:60, tempHigh: 600, - stageHigh: ["ash", "smoke"], + stateHigh: ["ash", "smoke"], isFood: true, } @@ -1465,7 +1525,7 @@ elements.boiled_tuna = { state: "solid", temp:70, tempHigh: 600, - stageHigh: ["ash", "smoke"], + stateHigh: ["ash", "smoke"], isFood: true, } @@ -1476,7 +1536,7 @@ elements.fried_tuna = { state: "solid", temp:70, tempHigh: 600, - stageHigh: ["ash", "smoke"], + stateHigh: ["ash", "smoke"], isFood: true, } @@ -1655,6 +1715,7 @@ elements.grape_juice = { "clay_soil": { elem1: null, elem2: "clay" }, "seltzer": { elem1: "soda", elem2: "foam" }, "carbon_dioxide": { elem1: "soda", elem2: "foam" }, + "milk": { elem1: "fruit_milk", elem2: "fruit_milk" }, "yeast": { elem1: ["wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","cream_of_tartar"], elem2: null, chance:80 }, }, tempHigh: 160, @@ -1664,7 +1725,7 @@ elements.grape_juice = { category: "liquids", state: "liquid", density: 1054, - stain: 0.05, + hidden: true, isFood: true }; @@ -1677,6 +1738,7 @@ elements.cream_of_tartar = { stateHigh: "caramel", density: 1500, isFood: true, + hidden: true, reaction: { "sugar_water": {elem2: "corn_syrup", elem1: null, tempMin: 110} } @@ -1690,7 +1752,9 @@ elements.wine = { tempHigh: 100, stateHigh: "steam", isFood: true, - density: 1200, + density: 1000, + hidden: true, + tempLow: 0 } elements.corn_syrup = { @@ -1701,5 +1765,795 @@ elements.corn_syrup = { tempHigh: 100, stateHigh: "caramel", isFood: true, + hidden: true, viscosity: 10000 } + +elements.shrimp = { + color: ["#EE5422", "#E9683C", "#F3583F", "#EDA270"], + behavior: [ + "SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14|M2%7.5 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%5|SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14", + "SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14|FX%20|SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14", + "M2 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%15|M1|M2 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%15", + ], + category: "life", + state: "solid", + reactions: { + "algae": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL }, + "plant": { elem2:null, chance:0.125, func:behaviors.FEEDPIXEL }, + "fly": { elem2:null, chance:0.4, func:behaviors.FEEDPIXEL }, + "firefly": { elem2:null, chance:0.6, func:behaviors.FEEDPIXEL }, + "worm": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL }, + "tadpole": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL }, + "oxygen": { elem2:"carbon_dioxide", chance:0.5 }, + "dead_bug": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL }, + "broth": { elem2:"water", chance:0.2, func:behaviors.FEEDPIXEL }, + "slug": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL }, + "herb": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "lettuce": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "dead_plant": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "lichen": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL }, + "yeast": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "yogurt": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "tea": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL }, + "meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "rotten_meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "cooked_meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "yolk": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "cell": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "crumb": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL }, + }, +} + + +elements.coconut_seed = { + color: "#7a603d", + tick: function(pixel) { + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100) { + if (!outOfBounds(pixel.x,pixel.y+1)) { + var dirtPixel = pixelMap[pixel.x][pixel.y+1]; + if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") { + changePixel(dirtPixel,"root"); + } + } + if (isEmpty(pixel.x,pixel.y-1) && pixel.height < 7) { + movePixel(pixel,pixel.x,pixel.y-1); + createPixel(Math.random() > 0.5 ? "coconut_stem" : "coconut_stem",pixel.x,pixel.y+1); + + pixel.height++ + } + } + else if (pixel.age > 150 && pixel.height > 6 && Math.random() < 0.1) { + changePixel(pixel,"coconut_tree_top"); + } + pixel.age++; + doDefaults(pixel); + }, + properties: { + "age":0, + "height": 0 + }, + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -2, + stateLow: "frozen_plant", + burn: 65, + burnTime: 15, + category: "life", + state: "solid", + density: 1500, + cooldown: defaultCooldown, + seed: true, + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "XX|M1|XX", + ], +}; + +elements.coconut_stem = { + color: "#8f6c3f", + behavior: behaviors.WALL, + tempHigh: 400, + stateHigh: ["ember","charcoal","fire","fire","fire"], + category: "solids", + burn: 5, + burnTime: 300, + burnInto: ["ember","charcoal","fire"], + state: "solid", + hardness: 0.15, + breakInto: "sawdust", + breakIntoColor: ["#dba66e","#cc8a64"], + hidden: true +} +elements.coconut_tree_top = { + color: "#8f6c3f", + behavior: behaviors.WALL, + tempHigh: 400, + stateHigh: ["ember","charcoal","fire","fire","fire"], + category: "solids", + burn: 5, + burnTime: 300, + burnInto: ["ember","charcoal","fire"], + state: "solid", + hardness: 0.15, + breakInto: "sawdust", + breakIntoColor: ["#dba66e","#cc8a64"], + properties:{ + "leftleaves": 0, + "rightleaves": 0, + }, + hidden: true, + tick: function(pixel) { + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100 && pixel.rightleaves == 0) { + if (isEmpty(pixel.x+1,pixel.y)) { + createPixel(Math.random() > 0.5 ? "coconut_leaves" : "coconut_leaves",pixel.x+1,pixel.y); + + pixel.rightleaves++ + } + } + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100 && pixel.rightleaves == 1) { + if (isEmpty(pixel.x+2,pixel.y)) { + createPixel(Math.random() > 0.5 ? "coconut_leaves" : "coconut_leaves",pixel.x+2,pixel.y); + + pixel.rightleaves++ + } + } + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100 && pixel.rightleaves == 2) { + if (isEmpty(pixel.x+3,pixel.y)) { + createPixel(Math.random() > 0.5 ? "coconut_leaves" : "coconut_leaves",pixel.x+3,pixel.y); + + pixel.rightleaves++ + } + } + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100 && pixel.rightleaves == 3) { + if (isEmpty(pixel.x+4,pixel.y+1)) { + createPixel(Math.random() > 0.5 ? "coconut_leaves" : "coconut_leaves",pixel.x+4,pixel.y+1); + + pixel.rightleaves++ + } + } + + + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100 && pixel.leftleaves == 0) { + if (isEmpty(pixel.x-1,pixel.y)) { + createPixel(Math.random() > 0.5 ? "coconut_leaves" : "coconut_leaves",pixel.x-1,pixel.y); + + pixel.leftleaves++ + } + } + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100 && pixel.leftleaves == 1) { + if (isEmpty(pixel.x-2,pixel.y)) { + createPixel(Math.random() > 0.5 ? "coconut_leaves" : "coconut_leaves",pixel.x-2,pixel.y); + + pixel.leftleaves++ + } + } + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100 && pixel.leftleaves == 2) { + if (isEmpty(pixel.x-3,pixel.y)) { + createPixel(Math.random() > 0.5 ? "coconut_leaves" : "coconut_leaves",pixel.x-3,pixel.y); + + pixel.leftleaves++ + } + } + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100 && pixel.leftleaves == 3) { + if (isEmpty(pixel.x-4,pixel.y+1)) { + createPixel(Math.random() > 0.5 ? "coconut_leaves" : "coconut_leaves",pixel.x-4,pixel.y+1); + + pixel.leftleaves++ + } + } + + + if (Math.random() < 0.1 && pixel.age > 70 && pixel.temp < 100 && pixel.leftleaves > 0 && pixel.rightleaves > 0) { + if (isEmpty(pixel.x+1,pixel.y+1)) { + createPixel(Math.random() > 0.5 ? "coconut" : "coconut",pixel.x+1,pixel.y+1); + } + } + if (Math.random() < 0.1 && pixel.age > 70 && pixel.temp < 100 && pixel.leftleaves > 0 && pixel.rightleaves > 0) { + if (isEmpty(pixel.x-1,pixel.y+1)) { + createPixel(Math.random() > 0.5 ? "coconut" : "coconut",pixel.x-1,pixel.y+1); + } + } + pixel.age++; + doDefaults(pixel); +}, +} +elements.coconut_leaves = { + color: ["#569923","#5ea12b"], + reactions: { + "vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "bleach": { elem1:"dead_plant", elem2:null, chance:0.05 }, + "alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 } + }, + category:"life", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "dead_plant", + state: "solid", + density: 1050, + hidden: true +} +elements.coconut = { + color: "#6e4621", + behavior: [ + "ST:coconut_tree_top|ST:coconut_leaves|ST:coconut_tree_top", + "ST:coconut_stem|XX|ST:coconut_stem", + "M2|M1|M2", + ], + reactions: { + "vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "bleach": { elem1:"dead_plant", elem2:null, chance:0.05 }, + "alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 } + }, + category:"food", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "coconut_milk", + cutInto: ["cut_coconut"], + state: "solid", + density: 1050, +} + +elements.coconut_milk = { + color: "#fffcf2", + behavior: behaviors.LIQUID, + reactions: { + "melted_chocolate": { elem1:"chocolate_milk", elem2:null }, + "chocolate": { elem1:"chocolate_milk", elem2:"melted_chocolate", chance:0.05 }, + "coffee_ground": { elem1:"chocolate_milk", chance:0.05 }, + "juice": { elem1:"fruit_milk", elem2:null, chance:0.05 }, + "soda": { elem1:"pilk", elem2:null, chance:0.1 }, + "yolk": { elem1:"eggnog", elem2:null, chance:0.1 }, + "dirt": { elem1: null, elem2: "mud" }, + "sand": { elem1: null, elem2: "wet_sand" }, + "clay_soil": { elem1: null, elem2: "clay" }, + "caramel": { color1:"#C8B39A", elem2:null, chance:0.05 }, + "sugar": { elem2:null, chance:0.005}, + }, + tempLow: 0, + stateLow: "ice_cream", + stateLowColorMultiplier: [0.97,0.93,0.87], + tempHigh: 93, + stateHigh: "yogurt", + viscosity: 1.5, + category: "liquids", + state: "liquid", + density: 1036.86, + isFood: true +} + +elements.tea.reactions.coconut_milk = { elem2:null, color1:"#ad8955", chance:0.005} +elements.coffee.reactions.coconut_milk = { elem2:"foam", color1:"#856545", chance:0.005} + +elements.cut_coconut = { + color: "#fff2cf", + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "M2|M1|M2", + ], + reactions: { + "vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "bleach": { elem1:"dead_plant", elem2:null, chance:0.05 }, + "alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 } + }, + category:"food", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "coconut_juice", + state: "solid", + density: 1050, + hidden: true, +} + +elements.coconut_juice = { + color: "#e9ebe4", + behavior: behaviors.LIQUID, + reactions: { + "dirt": { elem1: null, elem2: "mud" }, + "sand": { elem1: null, elem2: "wet_sand" }, + "clay_soil": { elem1: null, elem2: "clay" }, + "caramel": { color1:"#C8B39A", elem2:null, chance:0.05 }, + }, + tempLow: 0, + tempHigh: 93, + stateHigh: ["sugar","steam"], + viscosity: 1.5, + category: "liquids", + state: "liquid", + density: 1036.86, + hidden: true, + isFood: true +} + +elements.lemon_wood = { + color: "#786531", + behavior: behaviors.WALL, + tempHigh: 400, + stateHigh: ["ember","charcoal","fire","fire","fire"], + category: "solids", + burn: 5, + burnTime: 300, + burnInto: ["ember","charcoal","fire"], + state: "solid", + hardness: 0.15, + breakInto: "sawdust", + breakIntoColor: ["#dba66e","#cc8a64"], +} +elements.lemon_branch = { + color: "#786531", + behavior: [ + "CR:lemon_leaves,lemon_branch%2|CR:lemon_leaves,lemon_leaves,lemon_leaves,lemon_branch%2|CR:lemon_leaves,lemon_branch%2", + "XX|XX|XX", + "XX|XX|XX", + ], + tempHigh: 100, + stateHigh: "lemon_wood", + tempLow: -30, + stateLow: "lemon_wood", + category: "life", + burn: 40, + burnTime: 50, + burnInto: ["sap","ember","charcoal"], + hidden: true, + state: "solid", + density: 1500, + hardness: 0.15, + breakInto: ["sap","sawdust"], + hidden: true, +} +elements.lemon_leaves = { + color: ["#42b336","#46a83b"], + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "XX|CR:lemon%0.15|XX", + ], + reactions: { + "vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "bleach": { elem1:"dead_plant", elem2:null, chance:0.05 }, + "alcohol": { elem1:"dead_plant", elem2:null, chance:0.035} + }, + category:"life", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "dead_plant", + state: "solid", + density: 1050, + seed: "lemon_seed", + hidden: true +} +elements.lemon = { + color: ["#dbd937","#e0dd28"], + behavior: behaviors.POWDER, + reactions: { + "vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "bleach": { elem1:"dead_plant", elem2:null, chance:0.05 }, + "alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "sugar": { elem1:"marmalade", elem2:null, color1:"#e0bf2b", chance:0.35 } + }, + category:"food", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "lemon_juice", + state: "solid", + density: 1050, + isFood: true, + cutInto: ["lemon_zest","lemon_slice","lemon_slice","lemon_slice","lemon_slice"], +} + +elements.lemon_juice = { + color: "#e0d358", + behavior: behaviors.LIQUID, + category: "liquids", + tempHigh: 100, + stateHigh: ["steam","sugar"], + burn: 70, + burnTime: 300, + burnInto: ["steam", "smoke"], + state: "liquid", + density: 825, + hidden: true, + temp: 30, + hidden: true, + tempLow: 0, + reactions: { + "sugar": {elem1:"lemonade", elem2: "null", chance:0.35} + } +}; + +elements.lemonade = { + color: "#fff378", + behavior: behaviors.LIQUID, + category: "liquids", + tempHigh: 100, + stateHigh: ["steam","sugar"], + burn: 70, + burnTime: 300, + burnInto: ["steam", "smoke"], + state: "liquid", + density: 825, + hidden: true, + temp: 30, + hidden: true, + tempLow: 0 +}; + +elements.lemon_zest = { + color: "#dbc535", + behavior: behaviors.POWDER, + category:"food", + tempHigh: 100, + stateHigh: ["sugar","steam"], + burn:65, + burnTime:60, + burnInto: "dead_plant", + state: "solid", + density: 1050, + hidden: true, + reactions: { + "sugar": { elem1:"marmalade", elem2:null, color1:"#e0bf2b", chance:0.35 } + }, +} + +elements.lemon_slice = { + color: "#ebe431", + behavior: behaviors.STURDYPOWDER, + category:"food", + tempHigh: 100, + stateHigh: ["sugar","steam"], + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "lemon_juice", + state: "solid", + density: 1050, + hidden: true, + reactions: { + "sugar": { elem1:"marmalade", elem2:null, color1:"#e0bf2b", chance:0.35 } + }, +} + +elements.lemon_seed = { + color: "#854610", + tick: function(pixel) { + if (isEmpty(pixel.x,pixel.y+1)) { + movePixel(pixel,pixel.x,pixel.y+1); + } + else { + if (Math.random() < 0.02 && pixel.age > 50 && pixel.temp < 100) { + if (!outOfBounds(pixel.x,pixel.y+1)) { + var dirtPixel = pixelMap[pixel.x][pixel.y+1]; + if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") { + changePixel(dirtPixel,"root"); + } + } + if (isEmpty(pixel.x,pixel.y-1)) { + movePixel(pixel,pixel.x,pixel.y-1); + createPixel(Math.random() > 0.5 ? "lemon_wood" : "lemon_branch",pixel.x,pixel.y+1); + } + } + else if (pixel.age > 1000) { + changePixel(pixel,"lemon_wood"); + } + pixel.age++; + } + doDefaults(pixel); + }, + properties: { + "age":0 + }, + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -2, + stateLow: "frozen_plant", + burn: 65, + burnTime: 15, + category: "life", + state: "solid", + density: 1500, + cooldown: defaultCooldown, + seed: true, + behavior: [ + "XX|XX|XX", + "XX|FX%10|XX", + "XX|M1|XX", + ], +}; + + +elements.carrot_seed = { + color: "#b08d35", + tick: function(pixel) { + if (Math.random() < 0.1 && pixel.age > 100 && pixel.temp < 100 && pixel.leafgrown == true && pixel.growthpixel == 0) { + if (!outOfBounds(pixel.x,pixel.y+1)) { + var randomNumber1 = Math.round(Math.random()) + pixel.growthpixel = pixel.growthpixel+randomNumber1 + var dirtPixel = pixelMap[pixel.x][pixel.y+1]; + if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") { + deletePixel(pixel.x,pixel.y+1); + movePixel(pixel,pixel.x,pixel.y+1); + createPixel("carrot_leaves",pixel.x,pixel.y-1); + pixel.growthpixel++; + } + } + } + if (Math.random() < 0.1 && pixel.age > 100 && pixel.temp < 100 && pixel.leafgrown == true && pixel.growthpixel > 0 && pixel.growthpixel < 4) { + if (!outOfBounds(pixel.x,pixel.y+1)) { + var dirtPixel = pixelMap[pixel.x][pixel.y+1]; + if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") { + deletePixel(pixel.x,pixel.y+1); + movePixel(pixel,pixel.x,pixel.y+1); + createPixel("carrot",pixel.x,pixel.y-1); + pixel.growthpixel++; + } + } + } + if (!isEmpty(pixel.x,pixel.y+1) && Math.random() > 0.95 && isEmpty(pixel.x-1,pixel.y-1) && isEmpty(pixel.x+1,pixel.y-1) && pixel.leafgrown == false) { + if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") { + createPixel("carrot_leaves",pixel.x-1,pixel.y-1); + createPixel("carrot_leaves",pixel.x+1,pixel.y-1); + pixel.leafgrown++ + } + } + else if (pixel.age > 150 && pixel.growthpixel == 4 && Math.random() < 0.1) { + changePixel(pixel,"carrot"); + } + pixel.age++; + doDefaults(pixel); + }, + properties: { + "age":0, + "growthpixel": 0, + "leafgrown": false + }, + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -2, + stateLow: "frozen_plant", + burn: 65, + burnTime: 15, + category: "life", + state: "solid", + density: 1500, + cooldown: defaultCooldown, + seed: true, + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "XX|M1|XX", + ], +}; +elements.carrot_leaves = { + color: ["#61cc3d","#58c234"], + behavior: behaviors.WALL, + reactions: { + "vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "bleach": { elem1:"dead_plant", elem2:null, chance:0.05 }, + "alcohol": { elem1:"dead_plant", elem2:null, chance:0.035} + }, + category:"life", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "dead_plant", + state: "solid", + density: 1050, + seed: "carrot_seed", + hidden: true +} +elements.carrot = { + color: "#e39919", + behavior: behaviors.STURDYPOWDER, + category:"food", + tempHigh: 100, + stateHigh: ["steam"], + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "carrot_juice", + state: "solid", + density: 1050, + hidden: true, +} + +elements.carrot_juice = { + color: "#f5a742", + behavior: behaviors.LIQUID, + category: "liquids", + tempHigh: 100, + stateHigh: ["steam","sugar"], + burn: 70, + tempLow: 0, + burnTime: 300, + burnInto: ["steam", "smoke"], + state: "liquid", + density: 825, + hidden: true, + temp: 30, +}; + +elements.apple_cider_vinegar = { + color: "#fffe75", + behavior: behaviors.LIQUID, + category: "liquids", + tempHigh: 100, + stateHigh: ["steam","sugar"], + burn: 70, + burnTime: 300, + burnInto: ["steam", "smoke"], + state: "liquid", + density: 825, + hidden: true, + temp: 30, + tempLow: 0 +}; + +elements.turnip_seed = { + color: "#994828", + tick: function(pixel) { + if (Math.random() < 0.1 && pixel.age > 100 && pixel.temp < 100 && pixel.leafgrown == true && pixel.growthpixel == 0) { + if (!outOfBounds(pixel.x,pixel.y+1)) { + var dirtPixel = pixelMap[pixel.x][pixel.y+1]; + if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") { + deletePixel(pixel.x,pixel.y+1); + movePixel(pixel,pixel.x,pixel.y+1); + createPixel("turnip_leaves",pixel.x,pixel.y-1); + pixel.growthpixel++; + } + } + + } + if (pixel.age > 100 && pixel.temp < 100 && pixel.leafgrown == true && pixel.growthpixel > 0 && pixel.growthpixel < 3) { + if (!outOfBounds(pixel.x-1,pixel.y)) { + var pixelleft = pixelMap[pixel.x-1][pixel.y]; + if (pixelleft.element === "dirt" || pixelleft.element === "mud" || pixelleft.element === "sand" || pixelleft.element === "wet_sand" || pixelleft.element === "clay_soil" || pixelleft.element === "mycelium") { + deletePixel(pixel.x-1,pixel.y); + createPixel("turnip",pixel.x-1,pixel.y); + } + } + if (!outOfBounds(pixel.x+1,pixel.y)) { + var pixelright = pixelMap[pixel.x+1][pixel.y]; + if (pixelright.element === "dirt" || pixelright.element === "mud" || pixelright.element === "sand" || pixelright.element === "wet_sand" || pixelright.element === "clay_soil" || pixelright.element === "mycelium") { + deletePixel(pixel.x+1,pixel.y); + createPixel("turnip",pixel.x+1,pixel.y); + } + } + } + if (Math.random() < 0.1 && pixel.age > 100 && pixel.temp < 100 && pixel.leafgrown == true && pixel.growthpixel > 0 && pixel.growthpixel < 3) { + if (!outOfBounds(pixel.x,pixel.y+1)) { + var dirtPixel = pixelMap[pixel.x][pixel.y+1]; + if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") { + deletePixel(pixel.x,pixel.y+1); + movePixel(pixel,pixel.x,pixel.y+1); + createPixel("turnip",pixel.x,pixel.y-1); + pixel.growthpixel++; + } + } + + } + if (!isEmpty(pixel.x,pixel.y+1) && Math.random() > 0.95 && isEmpty(pixel.x-1,pixel.y-1) && isEmpty(pixel.x+1,pixel.y-1) && pixel.leafgrown == false) { + var dirtPixel = pixelMap[pixel.x][pixel.y+1]; + if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") { + createPixel("turnip_leaves",pixel.x-1,pixel.y-1); + createPixel("turnip_leaves",pixel.x+1,pixel.y-1); + pixel.leafgrown++ + } + } + else if (pixel.age > 150 && pixel.growthpixel == 3 && Math.random() < 0.1) { + changePixel(pixel,"turnip"); + } + pixel.age++; + doDefaults(pixel); + }, + properties: { + "age":0, + "growthpixel": 0, + "leafgrown": false + }, + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -2, + stateLow: "frozen_plant", + burn: 65, + burnTime: 15, + category: "life", + state: "solid", + density: 1500, + cooldown: defaultCooldown, + seed: true, + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "XX|M1|XX", + ], +}; +elements.turnip_leaves = { + color: ["#399431","#3b8c34"], + behavior: behaviors.WALL, + reactions: { + "vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "bleach": { elem1:"dead_plant", elem2:null, chance:0.05 }, + "alcohol": { elem1:"dead_plant", elem2:null, chance:0.035} + }, + category:"life", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "dead_plant", + state: "solid", + density: 1050, + seed: "turnip_seed", + hidden: true +} +elements.turnip = { + color: ["#945bb3","#a05cbd","#a053b8","#b364c4"], + behavior: behaviors.STURDYPOWDER, + category:"food", + tempHigh: 100, + stateHigh: ["steam"], + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "turnip_juice", + state: "solid", + density: 1050, + hidden: true, +} + +elements.turnip_juice = { + color: "#700f5d", + behavior: behaviors.LIQUID, + category: "liquids", + tempHigh: 100, + stateHigh: ["steam","sugar"], + burn: 70, + tempLow: 0, + burnTime: 300, + burnInto: ["steam", "smoke"], + state: "liquid", + density: 825, + hidden: true, + temp: 30, +}; diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index bedefec0..bc37daca 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -14,7 +14,7 @@ try { //ESSENTIAL COMMON FUNCTIONS (CODE LIBRARY) ## - //U.R.L. + //URL urlParams = new URLSearchParams(window.location.search); @@ -616,9 +616,10 @@ try { throw new Error("Offset is NaN"); }; + var oldColor = color; //for error display color = hexToRGB(color); if(color === null) { - throw new Error("hexToRGB(color) was null (maybe it's an invalid hex triplet?)"); + throw new Error(`hexToRGB(color) was null (${oldColor}, maybe it's an invalid hex triplet?)`); }; //console.log("converted color: " + JSON.stringify(color)); @@ -772,9 +773,10 @@ try { }; //console.log(`octothorpe checked: ${color}`); + var oldColor = color; color = hexToRGB(color); if(color === null) { - throw new Error("hexToRGB(color) was null (maybe it's an invalid hex triplet?)"); + throw new Error(`hexToRGB(color) was null (${oldColor}, maybe it's an invalid hex triplet?)`); }; switch(outputType.toLowerCase()) { @@ -1498,18 +1500,29 @@ try { }; }; - function breakPixel(pixel,changetemp=false) { - var info = elements[pixel.element]; - if(typeof(info.breakInto) === "undefined") { - return false; + function breakPixel(pixel,changeTemp=false,defaultBreakIntoDust=false) { + var result = elements[pixel.element].breakInto; + if (result === undefined) {if(defaultBreakIntoDust) { result = "dust" } else { return }}; + // if it is an array, choose a random item, else just use the value + while (Array.isArray(result)) { + result = randomChoice(result); }; - var breakIntoElement = info.breakInto; - if(Array.isArray(breakIntoElement)) { - breakIntoElement = breakIntoElement[Math.floor(Math.random() * breakIntoElement.length)] + // change the pixel to the result + if (result === null) { + deletePixel(pixel.x,pixel.y); + return }; - changePixel(pixel,breakIntoElement,changetemp) - }; + if (elements[pixel.element].breakIntoColor) { + var oldelement = pixel.element; + changePixel(pixel,result); + pixel.color = pixelColorPick(pixel, elements[oldelement].breakIntoColor); + } + else { + changePixel(pixel,result); + } + } + defaultHardness = 0.3; function tryBreak(pixel,changetemp=false,defaultBreakIntoDust=false) { var info = elements[pixel.element]; var hardness = defaultHardness; @@ -2052,6 +2065,26 @@ try { }*/ }; + //Language + + function englishFormatList(thingsArrayIn) { + var thingsArray = thingsArrayIn; + var amount = thingsArray.length; + if(amount == 1) { + return thingsArray[0] + } else if(amount == 2) { + return thingsArray.join(" and ") + } else { + var lastItem = thingsArray[thingsArray.length - 1]; + thingsArray[thingsArray.length - 1] = "and " + lastItem; + return thingsArray.join(", ") + }; + }; + + function capitalizeFirstLetter(string,locale=null) { + return string[0][locale ? "toLocaleUpperCase" : "toUpperCase"](locale) + string.slice(1) + }; + //COLOR MANIPULATION TOOLS ## var colorToolCounter = 0; @@ -3337,7 +3370,14 @@ color1 and color2 spread through striped paint like dye does with itself. col createCategoryDiv(category); categoryDiv = document.getElementById("category-"+category); } - createElementButton(element); + if(Array.isArray(elements[element].color) && elements[element].color.length == 1) { + //temporarily make the single-item array into a string just for button generation, and then turn it back into an array just in case + elements[element].color = elements[element].color[0]; + createElementButton(element); + elements[element].color = [elements[element].color] + } else { + createElementButton(element); + } } // Set the first button in categoryControls div to be the current category document.getElementById("categoryControls").children[0].click() @@ -3504,6 +3544,8 @@ color1 and color2 spread through striped paint like dye does with itself. col var firstDiv = document.getElementsByClassName("category")[0]; var firstElementButton = firstDiv.getElementsByClassName("elementButton")[0]; selectElement(firstElementButton.getAttribute("element")); + + gameLoaded = true }; @@ -3592,18 +3634,17 @@ color1 and color2 spread through striped paint like dye does with itself. col else 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)]; + if (info.breakInto !== undefined) { + breakPixel(pixel); + } else { + if (Array.isArray(fire)) { + var newfire = fire[Math.floor(Math.random() * fire.length)]; + } + else { + var newfire = fire; + } + changePixel(pixel,newfire); } - else { - var result = info.breakInto; - } - if(typeof(breakIntoElement) === "undefined") { - deletePixel(pixel.x,pixel.y); - continue - }; - // change the pixel to the result - changePixel(pixel,result,changeTemp); if(info.onExplosionBreakOrSurvive) { info.onExplosionBreakOrSurvive(pixel,x,y,radius,fire,smoke,power,damage); }; @@ -3875,8 +3916,41 @@ color1 and color2 spread through striped paint like dye does with itself. col //No changeTemp for fire=>smoke elements.fire.tick = function(pixel){ - behaviors.UL_UR_OPTIMIZED(pixel); - if (!pixel.del && settings.burn===0 && (pixelTicks-pixel.start > 70) && Math.random() < 0.1 ) { changePixel(pixel,"smoke",false) } + if (pixel.start === pixelTicks) {return} + if (pixel.charge && elements[pixel.element].behaviorOn) { + pixelTick(pixel) + } + var move1Spots = [ + [pixel.x, pixel.y-1], + [pixel.x+1, pixel.y-1], + [pixel.x-1, pixel.y-1], + ] + var moved = false; + for (var i = 0; i < move1Spots.length; i++) { + var coords = move1Spots[Math.floor(Math.random()*move1Spots.length)]; + coords = {x: coords[0], y: coords[1]}; + if(!isEmpty(coords.x,coords.y,true) && pixelMap[coords.x]?.[coords.y]?.element == pixel.element && pixelMap[coords.x][coords.y].temp < pixel.temp) { + swapPixels(pixel,pixelMap[coords.x][coords.y]); + moved = true; break + } else { + if (tryMove(pixel, coords.x, coords.y)) { moved = true; break; } + else { move1Spots.splice(move1Spots.indexOf(coords), 1);} + } + } + if (!moved && !pixel.del) { + var move2Spots = [ + [pixel.x, pixel.y+1], + [pixel.x+1, pixel.y], + [pixel.x-1, pixel.y], + ] + for (var i = 0; i < move2Spots.length; i++) { + var coords = move2Spots[Math.floor(Math.random()*move2Spots.length)]; + if (tryMove(pixel, coords[0], coords[1])) { break; } + else { move2Spots.splice(move2Spots.indexOf(coords), 1); } + } + } + if (!pixel.del) { doDefaults(pixel); } + if (!pixel.del && settings.burn===0 && (pixelTicks-pixel.start > 70) && Math.random() < 0.1 ) { changePixel(pixel,"smoke",false) }; }; //New elements @@ -4214,6 +4288,9 @@ color1 and color2 spread through striped paint like dye does with itself. col ignoreAir: true }; + elements.cloner.burnTime = Infinity; + elements.cloner.burnInto = "cloner"; + elements.cold_torch = { "color": "#4394d6", "behavior": [ @@ -6827,7 +6904,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = -1; j < 2; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -6854,7 +6931,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = -3; j < 4; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -6882,7 +6959,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -6910,7 +6987,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -6938,7 +7015,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -6966,7 +7043,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -6994,7 +7071,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -7022,7 +7099,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -7050,7 +7127,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -7078,7 +7155,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -7106,7 +7183,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -7136,9 +7213,9 @@ color1 and color2 spread through striped paint like dye does with itself. col if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { if(pixel.uwu < 8) { - pixel.uwu += 1 + pixel.uwu++ } else { - pixel.owo += 1 + pixel.owo++ } } } @@ -7916,7 +7993,7 @@ color1 and color2 spread through striped paint like dye does with itself. col behavior: behaviors.GAS, category: "gases", state: "gas", - density: 550, + density: 550, //7989 yay soshi! tick: function(pixel) { if(pixel.y % 6 == 0) { if(pixel.x % 6 == 0) { @@ -7986,7 +8063,7 @@ color1 and color2 spread through striped paint like dye does with itself. col } } } else { - if(!settings.bg || settings.bg == "#fffff0") { //7989 yay soshi! + if(!settings.bg || settings.bg == "#fffff0") { pixel.color = "rgb(255,255,247)" } else { pixel.color = "rgb(255,255,240)" @@ -8207,6 +8284,8 @@ color1 and color2 spread through striped paint like dye does with itself. col ["peach", "#ffbf7f"], ["mint", "#4df0a9"], ["gray", "#7F7F7F"], + ["lime", "#7FFF00"], + ["black", "#000000"], ["white", "#FFFFFF"], ["sky_blue", "#99d1f2"] ]; @@ -8215,6 +8294,62 @@ color1 and color2 spread through striped paint like dye does with itself. col newLegacyFnmDye(dyeColors[i][0],dyeColors[i][1]) }; + eLists.LED = ["led_r","led_g","led_b"]; + + function newLED(abbrev,hexColor,baseColorOverrideHex=null) { + if(!(hexColor.startsWith("#"))) { hexColor = "#" + hexColor }; + if(baseColorOverrideHex && !(baseColorOverrideHex.startsWith("#"))) { baseColorOverrideHex = "#" + baseColorOverrideHex }; + abbrev = abbrev.toLowerCase(); + var key = `led_${abbrev}`; + var pixelColor = baseColorOverrideHex ?? changeLuminance(hexColor,0x66/0xff,"multiply","hex",null,false); + + elements[key] = { + behavior: behaviors.WALL, + reactions: { + "light": {"charge1":1}, + "liquid_light": {"charge1":1}, + }, + color: pixelColor, + colorOn: hexColor, + category: "machines", + tempHigh: 1500, + stateHigh: ["molten_glass","molten_glass","molten_glass","molten_gallium"], + conduct: 1, + breakInto: "glass_shard" + }; + + eLists.LED.push(key) + }; + + var ledColors = [ + ["c", "#00FFFF"], //cyan + ["y", "#FFFF00"], //yellow + ["m", "#FF00FF"], //magenta (cursed) + ["p", "#AB00C2"], //purple (cursed) + ["v", "#7700FF"], //violet + ["w", "#FFFFFF"], //white (cursed) + ["gy", "#7F7F7F"], //gray (more cursed) + ["bl", "#000000", "#2b2b2b"], //black (super cursed) + ["o", "#FF7F00"], //orange + ["a", "#FFBF00"], //amber + ["l", "#7FFF00"], //lime + ["rs", "#FF0067"], //rose (cursed) + ["pk", "#FF7FFF"], //pink (cursed) + ["bg", "#9F005F"], //burgundy (cursed) + ["pc", "#ffbf7f"], //peach + ["mg", "#4df0a9"], //mint green + ["sb", "#99d1f2"] //sky blue (cursed) + ]; + + for(var i = 0; i < ledColors.length; i++) { + newLED(...ledColors[i]); + }; + + for(var i = 0; i < eLists.LED.length; i++) { + var key = eLists.LED[i]; + elements.malware.reactions[key] = { elem2:eLists.LED, chance:0.01 } + }; + //ASSORTED RAINBOW VARIANTS ## elements.concoction.reactions.diorite_gravel = { @@ -10275,7 +10410,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = -1; j < 2; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == "msmine") { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -10627,7 +10762,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = -1; j < 2; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1; + pixel.uwu++; }; }; }; @@ -10719,7 +10854,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = -1; j < 2; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1; + pixel.uwu++; }; }; }; @@ -15537,9 +15672,14 @@ Pixel size (rendering only): (Use if the save looks cut o viscosity: 3**4, } - elements.redstone_dust.tempHigh = 2500 + elements.redstone_dust.tempHigh = 2500; - elements.redstone_dust.stateHigh = "destabilized_redstone" + elements.redstone_dust.stateHigh = "destabilized_redstone"; + + elements.redstone_dust.conduct = 0.9; + + elements.redstone_dust.colorOn = ["#FF2424","#FF0000","#FF1200"]; + elements.redstone_dust.color = ["#7f0000","#5f0000","#5f0500"]; elements.destabilized_redstone = { color: ["#9e0303", "#98061a", "#b80704", "#c4020c", "#f70008", "#9e0303", "#98061a", "#b80704", "#e3020a", "#8c0303", "#8c0303"], @@ -16770,9 +16910,10 @@ Pixel size (rendering only): (Use if the save looks cut o "fire": { elem2: null } }, tick: function(pixel) { - backgroundColor = hexToRGB(settings.bg); - pixel.rgbValue = "rgb("+backgroundColor.r+","+backgroundColor.g+","+backgroundColor.b+")"; - pixel.color = pixel.rgbValue; + /*var baseColor = settings.bg instanceof Array ? averageRgbPrefixedColorArray(settings.bg.map(x => convertColorFormats(x,"rgb"))) : convertColorFormats(settings.bg,"rgb"); + baseColor = convertColorFormats(baseColor,"json"); + pixel.color = "rgba(" + Object.values(baseColor).join(",") + ",0)"*/ + pixel.color = "rgba(0,0,0,0)" }, hardness: 0.6, category: "gases", @@ -17986,7 +18127,81 @@ Pixel size (rendering only): (Use if the save looks cut o elements[kesddfroged2[i]].reactions ??= {}; elements[kesddfroged2[i]].reactions[kesddfroged[j]] = {"elem1": "kurshuth_alloy", "elem2": "kurshuth_alloy"} } }; - }) + }); + + function newMetal(name,color,meltingPoint,boilingPoint,hardness,density,gasDensity,conduct,categoryOverride = null) { + var temp = { + "name": name, + "color": color, + "meltingPoint": meltingPoint, + "boilingPoint": boilingPoint, + "hardness": hardness, + "density": density, + "gasDensity": gasDensity, + "conduct": conduct + }; + var tempNulls = Object.keys(temp).filter(key => (typeof(temp[key]) == undefined || temp[key] == null)); + if(tempNulls.length > 0) { + var errorMessage = capitalizeFirstLetter(englishFormatList(tempNulls)); + throw new Error(`newMetal: ${errorMessage} {tempNulls.length == 1 ? "is" : "are"} required (generating "${name}")`); + }; + + var scrapColor = gravelizeToHex(color); + + elements[name] = { + "color": (window["gameLoaded"] ?? false) ? (Array.isArray(color) ? color.map(x => convertColorFormats(x,"rgb")) : convertColorFormats(color,"rgb")) : color, + "colorObject": (window["gameLoaded"] ?? false) ? (Array.isArray(color) ? color.map(x => convertColorFormats(x,"json")) : convertColorFormats(color,"json")) : undefined, + "behavior": behaviors.WALL, + "category": "solids", + "state": "solid", + "density": density, + "conduct": conduct, + "tempHigh": meltingPoint, + "breakInto": `${name}_scrap`, + "hardness": hardness + }; + + if(categoryOverride) { elements[name].category = categoryOverride }; + + elements[`molten_${name}`] = { + "tempHigh": boilingPoint + }; + + elements[`${name}_gas`] = { + "density": gasDensity + }; + + elements[`${name}_scrap`] = { + "color": (window["gameLoaded"] ?? false) ? (Array.isArray(scrapColor) ? scrapColor.map(x => convertColorFormats(x,"rgb")) : convertColorFormats(scrapColor,"rgb")) : scrapColor, + "colorObject": (window["gameLoaded"] ?? false) ? (Array.isArray(scrapColor) ? scrapColor.map(x => convertColorFormats(x,"json")) : convertColorFormats(scrapColor,"json")) : undefined, + "behavior": (window["gameLoaded"] ?? false) ? undefined : behaviors.POWDER, + "tick": (window["gameLoaded"] ?? false) ? behaviors.POWDER : undefined, + "tempHigh": meltingPoint, + "stateHigh": `molten_${name}`, + "category": "powders", + "hidden": true, + "density": density * 0.09, + "conduct": conduct * 0.4, + "movable": true, + }; + + if(window["gameLoaded"] ?? false) { + delete elements[`${name}_scrap`].behavior; + createElementButton(name); + if(settings.unhide == 1) { createElementButton(`${name}_scrap`) } + autoGen(`molten_${name}`,name,"molten"); + elements[`molten_${name}`].color = elements[`molten_${name}`].color.map(x => convertColorFormats(x,"rgb")); + elements[`molten_${name}`].colorObject = elements[`molten_${name}`].color.map(x => convertColorFormats(x,"json")); + } else { + delete elements[`${name}_scrap`].tick; + }; + + return [elements[name],elements[`${name}_scrap`]]; + }; + + //newMetal( "exidmaden", ["#F8EDCF", "#EEAAAE", "#E5678D", "#A6659C", "#6763AD"], 2134, 6769, 0.8, 32333, 49.9, 0.88 ); + //newMetal( "jisooium", "#9d0ac2", 8367, 10003, 0.63, 15024, 12.2, 0.9 ); + //newMetal( "twicium", ["#F9C596", "#FC5D9D"], 10240, 18018, 0.88, 29029, 24.3, 0.91 ); //ASSORTED LOONA-THEMED MATERIALS ## @@ -19295,9 +19510,12 @@ Pixel size (rendering only): (Use if the save looks cut o if(isNaN(pixel.temp)) { pixel.temp = 20 }; if(Math.random() < 0.013 && exposedToAir(pixel)) { changePixel(pixel,"vivite_oxide",false); - pixel.temp += 0.1; + pixel.temp += 4; }; }, + burnTime: 160, + burnTempChange: 10.65, + burnInto: "vivite_oxide_powder", noResistance: true, reactions: { "ice": { elem1: "vivite_oxide", elem2: null, temp1: 0.2 }, @@ -19327,10 +19545,23 @@ Pixel size (rendering only): (Use if the save looks cut o behavior: behaviors.POWDER, tick: function(pixel) { if(Math.random() < 0.027 && exposedToAir(pixel)) { - changePixel(pixel,"vivite_oxide_powder",false); - pixel.temp += 0.1; + if(getEmptyMooreNeighbors(pixel).length > 4) { + pixel.burning = true; + pixel.burnStart = pixelTicks; + } else { + pixel.temp += 18; + changePixel(pixel,getStateAtTemp("vivite_oxide_powder",pixel.temp),false); + }; + + if(pixel.burning && ((pixel.temp + (2 * elements[pixel.element].burnTempChange)) > elements[pixel.element].tempHigh)) { + changePixel(pixel,elements[pixel.element].burnInto,false); + pixel.temp += 213; + }; }; }, + burnTime: 8, + burnTempChange: 213, + burnInto: "vivite_oxide_powder", reactions: { "ice": { elem1: "vivite_oxide_powder", elem2: null, temp1: 0.2 }, "water": { elem1: "vivite_oxide_powder", elem2: null, temp1: 0.2 }, @@ -19345,7 +19576,7 @@ Pixel size (rendering only): (Use if the save looks cut o "salt_ice": { elem1: "vivite_oxide_powder", elem2: "salt" } }, noResistance: true, - tempHigh: 938, + tempHigh: 1725, stateHigh: "molten_vivite", category: "solids", state: "solid", @@ -19382,7 +19613,7 @@ Pixel size (rendering only): (Use if the save looks cut o return false; }; - if(elements[newElement].noViviteSlag) { //Excluded + if(elements[newElement].noViviteSlag || elements[pixel.element].ignore?.includes(newPixel.element)) { //Excluded return false; }; @@ -19399,12 +19630,13 @@ Pixel size (rendering only): (Use if the save looks cut o color: ["#f7a6e5", "#fa70d1", "#f0bbf2"], colorOn: ["#ff63ac", "#ff21bd", "#e81af0"], fireColor: ["#ff66ba", "#ff85ef", "#ff99f7"], + ignore: ["wall","heejinite","jinsoulite","haseulite","molten_heejinite","molten_jinsoulite","molten_haseulite","yvesite","molten_yvesite"], tick: function(pixel) { var info = elements[pixel.element]; if(Math.random() < 0.022 && exposedToAir(pixel)) { changePixel(pixel,pixel.temp > 7315.27 ? "molten_vivite_oxide" : "vivite_oxide_powder",false) - pixel.temp += 0.1; + pixel.temp += 18; }; if(Math.random() < 0.025) { @@ -19448,10 +19680,13 @@ Pixel size (rendering only): (Use if the save looks cut o }, density: 8212, state: "liquid", + burnTime: 160, + burnTempChange: 10.65, + burnInto: "vivite_oxide_powder", hardness: 0.88, viscosity: 10000, breakInto: "vivite_gas", - temp: 1100, + temp: 2000, tempHigh: 2256, stateHigh: "vivite_gas", tempLow: 938, @@ -19582,13 +19817,22 @@ Pixel size (rendering only): (Use if the save looks cut o fireColor: ["#ff66ba", "#ff85ef", "#ff99f7"], tick: function(pixel) { if(Math.random() < 0.032 && exposedToAir(pixel)) { - changePixel(pixel,pixel.temp > 15500 ? "vivite_oxide_gas" : pixel.temp > 7315.27 ? "molten_vivite_oxide" : "vivite_oxide_powder",false); + if(getEmptyMooreNeighbors(pixel).length > 4) { + pixel.burning = true; + pixel.burnStart = pixelTicks; + } else { + pixel.temp += 18; + changePixel(pixel,pixel.temp > 15500 ? "vivite_oxide_gas" : pixel.temp > 7315.27 ? "molten_vivite_oxide" : "vivite_oxide_powder",false); + }; }; }, behavior: behaviors.GAS, state: "gas", tempLow: 2256, stateLow: "molten_vivite", + burnTime: 8, + burnTempChange: 213, + burnInto: "vivite_oxide_powder", density: 18.02, temp: 3300, hardness: 1, @@ -20275,7 +20519,7 @@ Pixel size (rendering only): (Use if the save looks cut o if(typeof(elements[thing]) == "object") { if(typeof(elements[thing]?.breakInto) == "undefined") { elements[`${thing}_scrap`] = { - color: elements[thing].color, + color: gravelizeToHex(elements[thing].color), behavior: behaviors.POWDER, tempHigh: elements[thing].tempHigh, stateHigh: thing, @@ -21088,13 +21332,14 @@ Pixel size (rendering only): (Use if the save looks cut o //Gravels function gravelizeToHex(colorIn) { - //console.log("gravelizeToHex called",colorIn); var colorInput = colorIn; //side effects? + //console.log(`gravelizeToHex: ${colorInput}`) //make sure in is array - if(!colorInput instanceof Array) { + if(!(colorInput instanceof Array)) { colorInput = [colorInput]; }; + //console.log(`gravelizeToHex: ${colorInput}`) //console.log(colorInput); @@ -26059,7 +26304,7 @@ Pixel size (rendering only): (Use if the save looks cut o }; for(var i in adjacentCoords) { if(Math.random() < 0.005) { - pixel.temp+=1; + pixel.temp++; var newCoords = [ pixel.x+adjacentCoords[i][0], pixel.y+adjacentCoords[i][1] @@ -29425,29 +29670,6 @@ Make sure to save your command in a file if you want to add this preset again.` }; }; - function breakPixel(pixel,changetemp=false,defaultBreakIntoDust=false) { - var info = elements[pixel.element]; - if(typeof(info.breakInto) === "undefined") { - if(defaultBreakIntoDust) { - if(Math.random() < defaultBreakIntoDust) { changePixel(pixel,"dust",changetemp) }; - }; - return defaultBreakIntoDust; - }; - var breakIntoElement = info.breakInto; - if(Array.isArray(breakIntoElement)) { - breakIntoElement = breakIntoElement[Math.floor(Math.random() * breakIntoElement.length)] - }; - if(breakIntoElement === null) { - deletePixel(pixel.x,pixel.y); - return true; - }; - if(typeof(breakIntoElement) === "undefined") { return false }; - changePixel(pixel,breakIntoElement,changetemp) - return true; - }; - - defaultHardness = 0.3; - function arrowAltTb(pixel,breakChanceMultiplier,changetemp=false,defaultBreakIntoDust=false) { var info = elements[pixel.element]; var hardness = defaultHardness; @@ -35465,7 +35687,16 @@ Make sure to save your command in a file if you want to add this preset again.` //water reaction steal if(elements[newPixel.element].reactions?.water) { var waterRxn = elements[newPixel.element].reactions.water; - var elem2 = waterRxn.elem2; + var elem1 = waterRxn.elem1; + while(Array.isArray(elem1)) { + elem1 = randomChoice(elem1) + }; + if(elem1 !== null) { + changePixel(newPixel,elem1,true) + } + } else if(elements.water.reactions[newPixel.element]) { + var waterRxn2 = elements.water.reactions[newPixel.element]; + elem2 = waterRxn2.elem2; while(Array.isArray(elem2)) { elem2 = randomChoice(elem2) }; @@ -35477,7 +35708,7 @@ Make sure to save your command in a file if you want to add this preset again.` //add velocity; newPixel.vx ??= 0; newPixel.vy ??= 0; - newPixel.vx += (pixel.direction * 6) + newPixel.vx += (pixel.direction * 5) newPixel.vy += 3; }; }; @@ -35488,6 +35719,92 @@ Make sure to save your command in a file if you want to add this preset again.` density: elements.water.density }; + elements.megatsunami = { + color: ["#1f2aa3","#2641c9","#3a57c9"], + behavior: behaviors.WALL, + properties: { + active: true, + }, + tick: function(pixel) { + //Iteration initial checks + if(!pixel) { + return; + }; + if(!pixel.active) { + deletePixel(pixel.x,pixel.y); + }; + + //Initial property-setting + var pixelIsOnLeft = (pixel.x < (width/2)); + pixel.fromX ??= pixelIsOnLeft ? 1 : width - 1; + pixel.direction ??= pixelIsOnLeft ? 1 : -1; + + var floorHeight = pixel.y + 1; + while(isEmpty(pixel.x,floorHeight,false)) { + floorHeight++ + }; + pixel.floorHeight ??= floorHeight; + + //Actual doer code + var bottomY = (pixel.floorHeight + 9); //extend 10 pixels below + var topY = bottomY - 43; //topY < bottomY because in this game +Y is *downward* + for(var h = 0; h < 2; h++) { + var newX = pixel.fromX + pixel.direction; + + if(outOfBounds(newX,1)) { + pixel.active = false; + return + }; + + for(var i = bottomY; i >= topY; i--) { + var waterToDo = randomChoice(["salt_water","salt_water","salt_water","dirty_water","dirty_water"]); + var fc = {x: newX, y: i}; + if(outOfBounds(fc.x,fc.y)) {continue}; + if(isEmpty(fc.x,fc.y,false)) { + //fill with water + createPixel(waterToDo,fc.x,fc.y) + } else { + var newPixel = pixelMap[fc.x]?.[fc.y]; + if(!newPixel) { continue }; + //break + tryBreak(newPixel,true,true); + if(!newPixel) { continue }; + //water reaction steal + if(elements[newPixel.element].reactions?.water) { + var waterRxn = elements[newPixel.element].reactions.water; + var elem1 = waterRxn.elem1; + while(Array.isArray(elem1)) { + elem1 = randomChoice(elem1) + }; + if(elem1 !== null) { + changePixel(newPixel,elem1,true) + } + } else if(elements.water.reactions[newPixel.element]) { + var waterRxn2 = elements.water.reactions[newPixel.element]; + elem2 = waterRxn2.elem2; + while(Array.isArray(elem2)) { + elem2 = randomChoice(elem2) + }; + if(elem2 !== null) { + changePixel(newPixel,elem2,true) + } + }; + if(!newPixel) { continue }; + //add velocity; + newPixel.vx ??= 0; + newPixel.vy ??= 0; + newPixel.vx += (pixel.direction * 13) + newPixel.vy += 6; + }; + }; + pixel.fromX += pixel.direction + }; + }, + state: "solid", + category: "special", + density: elements.water.density + }; + elements.lava_tsunami = { color: ["#ff370a","#e84a23","#e67740"], behavior: behaviors.WALL, @@ -40922,7 +41239,7 @@ Make sure to save your command in a file if you want to add this preset again.` for (var i = 1; i < width; i++) { for (var j = 1; j < height; j++) { if (!isEmpty(i,j)) { - pixelMap[i][j].temp += 1 + pixelMap[i][j].temp++ } } } @@ -41001,7 +41318,7 @@ Make sure to save your command in a file if you want to add this preset again.` for (let j = -8; j < 9; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -41038,7 +41355,7 @@ Make sure to save your command in a file if you want to add this preset again.` for (let j = -8; j < 9; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -41074,7 +41391,7 @@ Make sure to save your command in a file if you want to add this preset again.` for (let j = -8; j < 9; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } diff --git a/mods/all_around_fillers.js b/mods/all_around_fillers.js new file mode 100644 index 00000000..972b5476 --- /dev/null +++ b/mods/all_around_fillers.js @@ -0,0 +1,73 @@ +elements.top_filler = { + color: "#ae4cd9", + behavior: [ + ["XX","CL","XX"], + ["XX","XX","XX"], + ["XX","XX","XX"] + ], + category:"fillers", + excludeRandom: true, + reactions: { + "neutron": { elem1:"lattice" }, + "proton": { elem1:"vertical" }, + "electric": { elem1:"horizontal" }, + "positron": { elem1:"vertical" }, + "plasma": { elem1:"armageddon", tempMin:500, charged:true }, + } +}, + +elements.bottom_filler = { + color: "#ae4cd9", + behavior: [ + ["XX","XX","XX"], + ["XX","XX","XX"], + ["XX","CL","XX"] + ], + category:"fillers", + excludeRandom: true, + reactions: { + "neutron": { elem1:"lattice" }, + "proton": { elem1:"vertical" }, + "electric": { elem1:"horizontal" }, + "positron": { elem1:"vertical" }, + "plasma": { elem1:"armageddon", tempMin:500, charged:true }, + } +}, + +elements.right_filler = { + color: "#ae4cd9", + behavior: [ + ["XX","XX","XX"], + ["XX","XX","CL"], + ["XX","XX","XX"] + ], + category:"fillers", + excludeRandom: true, + reactions: { + "neutron": { elem1:"lattice" }, + "proton": { elem1:"vertical" }, + "electric": { elem1:"horizontal" }, + "positron": { elem1:"vertical" }, + "plasma": { elem1:"armageddon", tempMin:500, charged:true }, + } +}, + +elements.left_filler = { + color: "#ae4cd9", + behavior: [ + ["XX","XX","XX"], + ["CL","XX","XX"], + ["XX","XX","XX"] + ], + category:"fillers", + excludeRandom: true, + reactions: { + "neutron": { elem1:"lattice" }, + "proton": { elem1:"vertical" }, + "electric": { elem1:"horizontal" }, + "positron": { elem1:"vertical" }, + "plasma": { elem1:"armageddon", tempMin:500, charged:true }, + } +} + +elements.filler.category = "fillers" \ No newline at end of file diff --git a/mods/collab_mod.js b/mods/collab_mod.js new file mode 100644 index 00000000..66158472 --- /dev/null +++ b/mods/collab_mod.js @@ -0,0 +1,253 @@ +elements.lemon = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + }, + color: ["#ffaa1d","#ffd300","#ffdf00","#ffff00","#fff44f"], + behavior: behaviors.POWDER, + category: "food", + state: "solid", + breakInto: "lemonade", + tempHigh: 256, + stateHigh: "steam", + reactions: { + "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#ffffd8","#fffecf"] }, + } +}; + +elements.lemonade = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + }, + tempHigh: 150, + stateHigh: "steam", + tempMin: -15, + color: ["#f8ff80","#f6ff6c","#f5ff57","#f3ff39","#f0ff00"], + behavior: behaviors.LIQUID, + category: "liquids", + state: "liquid", +}; + +elements.uranium_tea = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + }, + viscosity: 1000, + tempHigh: 1100, + stateHigh: ["molten_uranium", "steam", "fragrance", "null"], + color: ["#943e04", "#aa7a20", "#806612"], + behavior: behaviors.RADLIQUID, + category: "liquids", + state: "liquid", + reactions: { + "neutron": { elem1:"n_explosion", tempMin:500, chance:0.1 } + }, +}; + +elements.sned = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + }, + desc: "slowly expanding...", + color: "#dfe0d9", + behavior: [ + "XX|XX AND CR:sned%1|XX", + "M2 AND CR:sned%1|XX|M2 AND CR:sned%1", + "M1|M1 AND CH:sned%1|M1", + ], + category: "joke", + state: "liquid", + excludeRandom: true +}; + +elements.uranium_coffee = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + },color: "#24100b", + behavior: behaviors.LIQUID, + reactions: { + "stench": { elem2:null }, + "oxygen": { elem2:"fragrance", chance:0.01 }, + "sugar": { elem2:null, color1:"#99552A", chance:0.005}, + "honey": { elem2:null, color1:"#99552A", chance:0.005}, + "milk": { elem2:"foam", color1:"#CA9D68", chance:0.005}, + "nut_milk": { elem2:"foam", color1:"#CA9D68", chance:0.005}, + "cream": { elem2:"foam", color1:"#CA9D68", chance:0.005}, + "ice_cream": { elem2:null, color1:"#CA9D68", chance:0.005}, + "chocolate": { elem2:null, color1:"#6A3517", chance:0.005}, + "melted_chocolate": { elem2:null, color1:"#6A3517", chance:0.005}, + "water": { elem2:"coffee", tempMin:70, chance:0.2 }, + "salt_water": { elem2:"coffee", tempMin:70, chance:0.2 }, + "sugar_water": { elem2:"melted_uranium", tempMin:60, chance:0.3 }, + "seltzer": { elem2:"coffee", tempMin:70, chance:0.2 }, + "neutron": { elem1:"n_explosion", tempMin:500, chance:0.1 } + }, + tempHigh: 130, + stateHigh: ["steam","fragrance","molten_uranium",null], + tempLow: 0, + category:"liquids", + state: "liquid", + density: 1001.74, + stain: 0.01, + hidden: true, + isFood: true +} + +elements.uranium_soda = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + }, + color: "#19ad19", + behavior: [ + "XX|CR:foam%2|XX", + "M2|XX|M2", + "M2|M1|M2", + ], + tempHigh: 100, + stateHigh: ["steam","carbon_dioxide","molten_uranium"], + tempLow: -1.11, + category: "liquids", + reactions: { + "dirt": { elem1: null, elem2: "fallout" }, + "sand": { elem1: null, elem2: "fallout" }, + "clay_soil": { elem1: null, elem2: "fallout" }, + "rock": { elem2: "fallout", chance: 0.0004 }, + "water": { elem1: "uranium", elem2: "uranium" }, + "salt": { elem2:"foam", chance:0.05 }, + "salt_water": { elem2:"foam", chance:0.01 }, + "sugar": { elem2:"foam", chance:0.001 }, + "candy": { elem2:"foam", chance:0.01 }, + "caramel": { elem2:"foam", chance:0.01 }, + "rust": { elem2:"fallout", chance:0.01 }, + "oxidized_copper": { elem2:"fallout", chance:0.01 }, + "neutron": { elem1:"n_explosion", tempMin:500, chance:0.1 } + }, + state: "liquid", + density: 1030, + isFood: true +} + +elements.uranium_juice = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + }, + color: "#84dd84", + behavior: behaviors.RADLIQUID, + reactions: { + "dirt": { elem1: null, elem2: "fallout" }, + "sand": { elem1: null, elem2: "fallout" }, + "clay_soil": { elem1: null, elem2: "fallout" }, + "seltzer": { elem1: "uranium_soda", elem2: "foam" }, + "carbon_dioxide": { elem1: "uranium_soda", elem2: "foam" }, + "neutron": { elem1:"n_explosion", tempMin:500, chance:0.1 } + }, + tempHigh: 160, + stateHigh: ["steam","molten_uranium"], + tempLow: -10, + stateLowColorMultiplier: 1.1, + category: "liquids", + state: "liquid", + density: 1054, + stain: 0.05, + isFood: true, +} + +elements.plutonium_tea = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + }, + viscosity: 1100, + tempHigh: 1000, + stateHigh: ["fragrance", "null"], + color: ["#795508", "#828b09"], + behavior: behaviors.RADLIQUID, + category: "liquids", + state: "liquid", + tempLow: 0, + stateLow: "plutonium" +}; +// mrapples stuffs +elements.plutonium = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + }, + color: ["#38a30e", "#0d662b", "#5d995d"], + behavior: behaviors.RADPOWDER, + category: "powders", + state: "solid", + tempHigh: 100, + stateHigh: "plutonium_tea" +}; + +elements.your_dad = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + }, + color: "#000000", + behavior: behaviors.WALL, + category: "joke", + state: "solid", + behavior: [ + "XX|XX|XX", + "XX|DL|XX", + "XX|XX|XX" + ], + canPlace: false, // exists: false +}; + +// end of mrapples stuffs + +elements.how_the_fuck_did_you_burn_the_water = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + }, + color: "#18202c", + behavior: behaviors.LIQUID, + category: "joke", + hidden: true, + alias: "SANS HOW THE FUCK DID YOU BURN THE WATER?", +}; + +elements.theres_a_bomb_strapped_to_my_chest = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + }, + color: "#b42020", + behavior: [ + "XX|XX|XX", + "XX|EX:15>explosion|XX", // let me finish + "XX|XX|XX", + ], + category: "joke", + hidden: true, + burn: 100, + burnTime: 1, + burnInto: "explosion", + tempHigh: 600, + stateHigh: "explosion", + state: "solid", + density: 1630, + excludeRandom: true, + alias: "ITS GOING TO EXPLODE IN THREE SECON-", +}; + +if (!elements.uranium.reactions) elements.uranium.reactions = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + }, +}; +elements.uranium.reactions.herbs = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + }, elem1: "uranium_tea", elem2: null, chance: 20 } +elements.uranium.reactions.coffee_ground = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + }, elem1: "uranium_coffee", elem2: null, chance: 30 } +elements.uranium.reactions.seltzer = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + }, elem2: "uranium_soda", elem2: null, chance: 30 } +elements.uranium.reactions.juice = { + onSelect: function() { + logMessage("Mod made by mrapple, ilikepizza and stefanblox"); + }, elem1: "uranium_juice", elem2: null, chance: 30 } diff --git a/mods/fantasy_elements.js b/mods/fantasy_elements.js index f7fd6f6e..4ddc7e54 100644 --- a/mods/fantasy_elements.js +++ b/mods/fantasy_elements.js @@ -1,3 +1,6 @@ +// 1.3.2 fantasy_elements.js mod +// adds plode a bomb + elements.dragon_breath = { color: "#f94e4e", behavior: behaviors.GAS, @@ -608,3 +611,17 @@ elements.nebulaflare_wall = { "water": { elem1: "nebulaflare", elem2: "nebulaflare" }, }, }; +// end, chanelog moves to top + +elements.plode = { + color: "#7f03fc", + behavior: [ + "XX|EX:90>plasma,heat_ray,plasma,fire,fire|XX", + "XX|XX|XX", + "M2|M1 AND EX:90>fire,plasma,fire,fire,heat_ray,fire|M2", + ], + category: "fantasyweapons", + state: "solid", + density: 2500, + excludeRandom: true, +}; diff --git a/mods/more_gold.js b/mods/more_gold.js index 0e7d944d..8886aaaf 100644 --- a/mods/more_gold.js +++ b/mods/more_gold.js @@ -15,4 +15,4 @@ elements.molten_green_gold = { density: 13000, conduct: 0.87, Hidden: true -}; \ No newline at end of file +}; diff --git a/mods/sbstuff.js b/mods/sbstuff.js index cb05c5bd..596e6999 100644 --- a/mods/sbstuff.js +++ b/mods/sbstuff.js @@ -66,7 +66,7 @@ elements.maple_syrup = { tempHigh: 500, stateHigh: "steam", color: "#9c6000", - behavior: behaviors.LIQUID, + behavior: behaviors.CRAWLER, category: "liquids", state: "liquid", }; @@ -362,6 +362,15 @@ elements.coca_cola = { state: "liquid", }; +elements.pepsi = { + tempHigh: 500, + stateHigh: "steam", + color: "#2b1717", + behavior: behaviors.LIQUID, + category: "liquids", + state: "liquid", +}; + elements.piss = { tempHigh: 500, stateHigh: "steam", @@ -1409,7 +1418,7 @@ elements.silver_coin = { state: "solid", }; -elements.max_graphics_in_roblox = { +elements.uraniumaniumaniumaniumanium_popcornicecream_plutoniumeptunium_238239 = { color: "#238fe8", behavior: [ "XX|XX|XX", @@ -1425,7 +1434,199 @@ elements.max_graphics_in_roblox = { excludeRandom: true, maxSize: 1, noMix: true, - desc: "ok now ACTUALLY use it at your own risk IM NOT KIDDING! THIS CAN FUCKING CRASH YOUR GAME" + desc: "ok now ACTUALLY use it at your own risk IM NOT KIDDING! THIS CAN FUCKING CRASH YOUR GAME", + excludeRandom: true, +}; + +elements.coffee_milk = { + tempHigh: 300, + stateHigh: "steam", + color: "#5c4c42", + behavior: behaviors.LIQUID, + category: "liquids", + state: "liquid", +}; + +elements.mentos = { + tempHigh: 500, + stateHigh: "ash", + color: "#d0cbd6", + behavior: behaviors.STURDYPOWDER, + category: "food", + state: "liquid" +}; + +elements.oreo = { + tempHigh: 300, + stateHigh: "steam", + color: ["#211e1e","#fff6f5"], + singleColor: true, + behavior: behaviors.STURDYPOWDER, + category: "food", + state: "liquid" +}; + +elements.uranium_238 = { + tempHigh: 1200, + stateHigh: "molten_uranium", + color: ["#0f400b", "#30522d", "#4d6b4a", "#6f8f6d"], + behavior: [ + "XX|CR:radiation%1|XX", + "CR:radiation%1|CH:lead%0.001|CR:radiation%1", + "M2|M1|M2", + ], + category: "powders", + state: "liquid", + density: 19100, + hardness: 0.6, + conduct: 0.235, + excludeRandom: true, + reactions: { + "neutron": {elem1: "uranium_239",}, + } +}; + +elements.uranium_239 = { + tempHigh: 1300, + stateHigh: "molten_uranium", + color: ["#153816", "#135e14", "#379138", "#567556", "#7bb37b"], + behavior: [ + "XX|CR:radiation%2|XX", + "CR:radiation%2|CH:lead%0.002|CR:radiation%2", + "M2|M1|M2", + ], + category: "powders", + state: "liquid", + hidden: true, + density: 19100, + hardness: 0.6, + conduct: 0.235, + excludeRandom: true, + reactions: { + "electron": {elem1: "neptunium_239"} + } +}; + +elements.neptunium_239 = { + tempHigh: 1500, + stateHigh: "molten_uranium", + color: ["#082e19", "#173b27", "#354a3f", "#4c635a", "#344a41"], + behavior: [ + "XX|CR:radiation%3|XX", + "CR:radiation%3|CH:lead%0.003|CR:radiation%3", + "M2|M1|M2", + ], + category: "powders", + state: "liquid", + hidden: true, + density: 20000, + hardness: 0.7, + conduct: 0.3, + excludeRandom: true, + reactions: { + "electron": {elem1: "plutonium"}, + "neutron": { elem1:"n_explosion", tempMin:500, chance:0.1 } + } +}; + +elements.plutonium = { + tempHigh: 2000, + stateHigh: "molten_uranium", + color: ["#0a4a17", "#194d23", "#263b2a", "#475449"], + behavior: [ + "XX|CR:radiation%4|XX", + "CR:radiation%4|CH:lead%0.004|CR:radiation%4", + "M2|M1|M2", + ], + category: "powders", + state: "liquid", + hidden: true, + density: 22000, + hardness: 0.8, + conduct: 0.4, + excludeRandom: true, + reactions: { + "neutron": { elem1:"n_explosion", tempMin:500, chance:0.2 }, + "electron": { elem1:"n_explosion", tempMin:500, chance:0.00000000000000000000001 } + } +}; + +elements.electron = { + color: "#c99d16", + behavior: behaviors.BOUNCY, + reactions: { + "uranium": { temp2:100 }, + }, + temp: 35, + category: "energy", + state: "gas", + density: 0.00002, + ignoreAir: true +}; + +elements.sned = { + color: "#dfe0d9", + behavior: [ + "XX|XX AND CR:sned%1|XX", + "M2 AND CR:sned%1|XX|M2 AND CR:sned%1", + "M1|M1 AND CH:sned%1|M1", + ], + category: "joke", + state: "liquid", + excludeRandom: true +}; + +elements.uranium_tea = { + temp: 60, + tempHigh: 400, + stateHigh: "molten_uranium", + color: ["#0f8b15", "#316624", "#59864b", "#502e0f"], + behavior: behaviors.RADLIQUID, + category: "liquids", + state: "liquid" +}; + +elements.powerlaser = { + color: ["#ed0ca9","#ff2b95"], + tick: function(pixel) { + var x = pixel.x; + for (var y = pixel.y; y < height; y++) { + if (outOfBounds(x, y)) { + break; + } + if (isEmpty(x, y)) { + if (Math.random() > 0.05) { continue } + createPixel("flash", x, y); + pixelMap[x][y].color = "#b80ced"; + pixelMap[x][y].temp = 1001000; + } + else { + if (elements[pixelMap[x][y].element].isGas) { continue } + if (elements[pixelMap[x][y].element].id === elements.heat_ray.id) { break } + pixelMap[x][y].temp += 901000; + pixelTempCheck(pixelMap[x][y]); + break; + } + } + deletePixel(pixel.x, pixel.y); + }, + temp: 1000000, + category: "energy", + state: "gas", + excludeRandom: true, + noMix: true +}; + +elements.magma_bomb = { + temp: 100, + color: "#b83109", + behavior: [ + "XX|EX:6>magma|XX", + "XX|XX|XX", + "M2|M1 AND EX:6>magma|M2" + ], + category: "weapons", + state: "liquid" }; elements.incinerate.category = "tools", @@ -1463,13 +1664,17 @@ if (!elements.water.reactions) elements.water.reactions = {}; elements.water.reactions.cocaine = { elem1: "solid_water", elem2: null } if (!elements.paper.reactions) elements.paper.reactions = {}; -elements.paper.reactions.bless = { elem1: "robux", elem2: null, chance: 0.001 } +elements.paper.reactions.bless = { elem1: "robux", elem2: null, chance: 0.0000001 } if (!elements.uranium.reactions) elements.uranium.reactions = {}; elements.uranium.reactions.ice_cream = {elem1: "uranium_ice_cream", elem2: null}, -elements.uranium.reactions.cream = {elem1: "uranium_ice_cream", elem2: null} +elements.uranium.reactions.cream = {elem1: "uranium_ice_cream", elem2: null}, +elements.uranium.reactions.tea = {elem1: "uranium_tea", elem2: null} if (!elements.dough.reactions) elements.dough.reactions = {}; elements.dough.reactions.yolk = {elem1: null, elem2: "spaghetti", tempMin: 25} +if (!elements.coffee.reactions) elements.coffee.reactions = {}; +elements.coffee.reactions.milk = {elem1: null, elem2: "coffee_milk",} + elements.silver.breakInto = "silver_coin" diff --git a/mods/weapons.js b/mods/weapons.js index 88f77107..04ed8a20 100644 --- a/mods/weapons.js +++ b/mods/weapons.js @@ -25,7 +25,7 @@ elements.little_boy = { cooldown: defaultCooldown }, elements.fat_man = { - color: ["#ffff00","#000000"], + color: ["#ffff00","#333333"], behavior: [ "XX|EX:28>plasma|XX", "XX|XX|XX", @@ -69,20 +69,20 @@ elements.fat_man = { category: "weapons" }, elements.left_missile = { - color: "#4c4e42", + color: "#4c4e42", behavior: [ - "XX|EX:10|XX", - "CR:left_missile AND EX:10|CH:fire|EX:10", - "M2|M1 AND EX:10|M2", + "M2|EX:10|XX", + "M1 AND EX:10|XX|EX:10", + "M2|EX:10|XX", ], category:"weapons", }, elements.right_missile = { - color: "#4c4e42", + color: "#4c4e42", behavior: [ - "XX|EX:10|XX", - "EX:10|CH:fire|EX:10 AND CR:right_missile", - "M2|M1 AND EX:10|M2", + "XX|EX:10|M2", + "EX:10|XX|M1 AND EX:10", + "XX|EX:10|M2", ], category:"weapons", },