diff --git a/fonts/Vietnamese_Pixel.ttf b/fonts/Vietnamese_Pixel.ttf new file mode 100644 index 00000000..8e46c16c Binary files /dev/null and b/fonts/Vietnamese_Pixel.ttf differ diff --git a/fonts/fusion-pixel-12px-monospaced-ja.ttf b/fonts/fusion-pixel-12px-monospaced-ja.ttf new file mode 100644 index 00000000..02437daf Binary files /dev/null and b/fonts/fusion-pixel-12px-monospaced-ja.ttf differ diff --git a/fonts/fusion-pixel-12px-monospaced-ko.ttf b/fonts/fusion-pixel-12px-monospaced-ko.ttf new file mode 100644 index 00000000..3c9156c3 Binary files /dev/null and b/fonts/fusion-pixel-12px-monospaced-ko.ttf differ diff --git a/fonts/fusion-pixel-12px-monospaced-latin.ttf b/fonts/fusion-pixel-12px-monospaced-latin.ttf new file mode 100644 index 00000000..1ef94732 Binary files /dev/null and b/fonts/fusion-pixel-12px-monospaced-latin.ttf differ diff --git a/fonts/fusion-pixel-12px-monospaced-zh_hans.ttf b/fonts/fusion-pixel-12px-monospaced-zh_hans.ttf new file mode 100644 index 00000000..e88bb7f6 Binary files /dev/null and b/fonts/fusion-pixel-12px-monospaced-zh_hans.ttf differ diff --git a/fonts/fusion-pixel-12px-monospaced-zh_hant.ttf b/fonts/fusion-pixel-12px-monospaced-zh_hant.ttf new file mode 100644 index 00000000..7dbfe5db Binary files /dev/null and b/fonts/fusion-pixel-12px-monospaced-zh_hant.ttf differ diff --git a/lang/de.json b/lang/de.json index 008463cb..fe290762 100644 --- a/lang/de.json +++ b/lang/de.json @@ -1,6 +1,6 @@ { "#lang.name": "Deutsch", -"#lang.credit": "pirany", +"#lang.credit": "pirany, squarescreamyt", "land":"Land", "liquids":"Flüssigkeiten", "life":"Leben", @@ -99,7 +99,7 @@ "ant":"Ameise", "fly":"Fliege", "firefly":"Glühwürmchen", -"hive":"Nest", +"hive":"Bienenstock", "bee":"Biene", "stink_bug":"Wanze", "dead_bug":"Töter_Käfer", diff --git a/lang/tok.json b/lang/tok.json index 90a70d54..57e8460b 100644 --- a/lang/tok.json +++ b/lang/tok.json @@ -227,7 +227,7 @@ "bamboo":"kasi_palisa", "iron":"", "copper":"", -"gold":"", +"gold":"kiwen_mani", "steel":"", "nickel":"", "zinc":"", @@ -243,14 +243,14 @@ "gallium":"kiwen_pimeja_walo_pi_wile_kama_telo", "molten_gallium":"telo_pimeja_walo_pi_seli", "gallium_gas":"kon_pimeja_walo_pi_seli_mute", -"rose_gold":"kiwen_jelo_mute_pi_loje_walo", -"purple_gold":"kiwen_jelo_mute_pi_loje_laso", -"blue_gold":"kiwen_jelo_mute_pi_laso_sewi", -"electrum":"kiwen_jelo_mute_pi_laso_kasi", +"rose_gold":"kiwen_mani_pi_loje_walo", +"purple_gold":"kiwen_mani_pi_loje_laso", +"blue_gold":"kiwen_mani_pi_laso_sewi", +"electrum":"kiwen_mani_pi_laso_kasi", "pyrite":"", "solder":"", "molten_copper":"", -"molten_gold":"", +"molten_gold":"telo_seli_pi_kiwen_mani", "molten_silver":"", "molten_iron":"", "molten_nickel":"", @@ -301,13 +301,13 @@ "crumb":"pan_ko", "baked_batter":"pan_pi_ko_telo_pan", "wheat":"", -"candy":"", +"candy":"kiwen_suwi", "coffee_bean":"kili_pi_telo_pimeja_loje", "coffee_ground":"ko_kili_pi_telo_pimeja_loje", "nut":"kili_lili_pi_loje_pimeja", "nut_meat":"ko_kili_lili_pi_loje_pimeja", "nut_butter":"ko_telo_pi_kili_loje_pimeja", -"jelly":"", +"jelly":"ko_telo_pi_kili", "baking_soda":"", "yogurt":"ko_walo_pi_telo_walo", "frozen_yogurt":"ko_walo_lete_pi_telo_walo", @@ -374,8 +374,8 @@ "smog":"", "stench":"", "liquid_stench":"", -"fragrance":"", -"perfume":"", +"fragrance":"kon_pi_pona_tawa_nena", +"perfume":"telo_pi_pona_tawa_nena", "cyanide":"", "cyanide_gas":"", "ozone":"", @@ -409,7 +409,7 @@ "uranium":"", "molten_uranium":"", "diamond":"", -"gold_coin":"", +"gold_coin":"mani", "rust":"", "oxidized_copper":"", "alga":"", @@ -528,9 +528,9 @@ "grease": "telo_jelo_pi_moku_soweli", "fat": "kiwen_walo_pi_moku_soweli", "potassium": "kiwen_pi_telo_pakala", -"molten_potassium": "", +"molten_potassium": "telo_seli_pi_kiwen_telo_pakala", "magnesium": "kiwen_pi_kiwen_walo_sijelo", -"molten_magnesium": "", +"molten_magnesium": "telo_seli_pi_kiwen_walo_sijelo", "sandstorm": "", "caustic_potash": "", "antibomb": "kiwen_pakala_pi_pana_ijo", diff --git a/lang/vi.json b/lang/vi.json index 1afe1c5b..9b1f3073 100644 --- a/lang/vi.json +++ b/lang/vi.json @@ -1,7 +1,7 @@ { "#lang.name": "Tiếng Việt", "#lang.credit": "VoidInstructions, NguyenChiBao, SalmonFishy", -"#lang.font": "Arial", +"#lang.font": "Vietnamese_Pixel", "land": "Đất đai", "liquids": "Chất lỏng", "life": "Sự sống", @@ -524,21 +524,21 @@ "molten_potassium_salt": "Muối kali nóng chảy", "molten_sodium_acetate": "Natri axetat nóng chảy", "frozen_nitro": "Nitro đóng băng", -"cured_meat": "", -"nut_oil": "", -"grease": "", -"fat": "", -"potassium": "", -"molten_potassium": "", -"magnesium": "", -"molten_magnesium": "", -"sandstorm": "", -"caustic_potash": "", -"antibomb": "", -"tornado": "", -"earthquake": "", -"tsunami": "", -"blaster": "", -"propane_ice": "", -"molten_caustic_potash": "" -} \ No newline at end of file +"cured_meat": "Thịt muối", +"nut_oil": "Dầu hạt", +"grease": "Mỡ dầu", +"fat": "Mỡ", +"potassium": "Kali", +"molten_potassium": "Kali nóng chảy", +"magnesium": "Ma-giê", +"molten_magnesium": "Ma-giê nóng chảy", +"sandstorm": "Bão cát", +"caustic_potash": "Kali hiđroxit", +"antibomb": "Phản bom", +"tornado": "Lốc xoáy", +"earthquake": "Động đất", +"tsunami": "Sóng thần", +"blaster": "Tia nổ", +"propane_ice": "Propan đóng băng", +"molten_caustic_potash": "Kali hiđroxit nóng chảy" +} diff --git a/lang/zh_cn.json b/lang/zh_cn.json index 7ce3b1ee..c79f77c7 100644 --- a/lang/zh_cn.json +++ b/lang/zh_cn.json @@ -1,6 +1,7 @@ { "#lang.name": "简体中文", -"#lang.credit": "squarescreamyt", +"#lang.credit": "squarescreamyt, pixelegend4", +"#lang.font": "fusion-pixel-12px-monospaced-zh_hans", "land":"地", "liquids":"液体", "life":"生活", @@ -420,7 +421,7 @@ "baked_clay":"", "clay_shard":"", "porcelain_shard":"", -"feather":"", +"feather":"羽毛", "confetti":"", "glitter":"", "bead":"", @@ -475,15 +476,15 @@ "molten_dirt":"", "debug":"", "prop":"", -"salt_ice":"", -"sugar_ice":"", -"seltzer_ice":"", +"salt_ice":"盐水冰", +"sugar_ice":"糖水冰", +"seltzer_ice":"苏打水冰", "dirty_ice":"", "pool_ice":"", -"blood_ice":"", +"blood_ice":"血冰", "antibody_ice":"", "infection_ice":"", -"unknown":"", +"unknown":"未知", "slime_ice":"", "antiice":"", "ammonia_ice":"", @@ -527,17 +528,17 @@ "nut_oil": "花生油", "grease": "", "fat": "肥", -"potassium": "", -"molten_potassium": "", -"magnesium": "", -"molten_magnesium": "", +"potassium": "钾", +"molten_potassium": "熔融钾", +"magnesium": "镁", +"molten_magnesium": "熔融镁", "sandstorm": "", -"caustic_potash": "", +"caustic_potash": "氢氧化钾", "antibomb": "", "tornado": "龙卷风", "earthquake": "地震", "tsunami": "海啸", "blaster": "", "propane_ice": "", -"molten_caustic_potash": "" +"molten_caustic_potash": "熔融氢氧化钾" } diff --git a/lang/zh_hant.json b/lang/zh_hant.json index 60f85a5a..ccc51803 100644 --- a/lang/zh_hant.json +++ b/lang/zh_hant.json @@ -1,6 +1,7 @@ { "#lang.name": "繁體中文", -"#lang.credit": "guinea_of_pig, Feeshmaster", +"#lang.credit": "guinea_of_pig, Feeshmaster, squarescreamyt", +"#lang.font": "fusion-pixel-12px-monospaced-zh_hant", "land":"地", "liquids":"液", "life":"生活", @@ -523,21 +524,21 @@ "molten_potassium_salt":"熔鉀鹽", "molten_sodium_acetate":"熔醋酸鈉", "frozen_nitro":"冰硝酸甘油", -"cured_meat": "", -"nut_oil": "", -"grease": "", -"fat": "", -"potassium": "", -"molten_potassium": "", -"magnesium": "", -"molten_magnesium": "", -"sandstorm": "", -"caustic_potash": "", -"antibomb": "", -"tornado": "", -"earthquake": "", -"tsunami": "", -"blaster": "", -"propane_ice": "", -"molten_caustic_potash": "" -} \ No newline at end of file +"cured_meat": "醃製肉", +"nut_oil": "堅果油", +"grease": "油脂", +"fat": "脂肪", +"potassium": "鉀", +"molten_potassium": "熔鉀", +"magnesium": "鎂", +"molten_magnesium": "熔鎂", +"sandstorm": "沙暴", +"caustic_potash": "氢氧化鉀", +"antibomb": "防爆", +"tornado": "龍捲風", +"earthquake": "地震", +"tsunami": "海嘯", +"blaster": "爆破器", +"propane_ice": "丙烷冰", +"molten_caustic_potash": "熔氢氧化鉀" +} diff --git a/mod-list.html b/mod-list.html index 97910bad..06e0a360 100644 --- a/mod-list.html +++ b/mod-list.html @@ -243,7 +243,7 @@ fwibblen.jsAdds a flying creature that turns nickel into itself, and a second creature that does the same to the first oneAlice human_edit.jsImprovements to humansAlice kopalstuff.jsAdds creatures, spirits, DNA, foods, and moreDaviStudios -lost_souls.jsAdds souls and related elementspixelegend4 +lost_souls.jsAdds souls and related elements, the mod can also be found https://github.com/HACKERPRO908/lost_souls.jspixelegend4, SquareScreamYT, salmonfishy miscible_psoup_and_birthpool.jsMakes Primordial Soup and Birthpool mix instead of the birthpool settling to the bottom. Will be deprecated upon the release of Magical MenagerieAlice mobs.jsAdds Creepers, Zombies, and SkeletonsAlice nocancer.jsRemoves cancer from the game one tick after it is createdmollthecoder diff --git a/mods/ExtraMachines.js b/mods/ExtraMachines.js index 2ea54034..56cf9d9a 100644 --- a/mods/ExtraMachines.js +++ b/mods/ExtraMachines.js @@ -1,6 +1,6 @@ // this is a epic mod -let heatSen = 0; +let heatSen = null; elements.heatSensor = { color: "#ff0000", @@ -15,11 +15,9 @@ elements.heatSensor = { tick: function(pixel) { - if((pixel.start == pixelTicks) && !(heatSen == 0)){ - pixel.clone.temp = heatSen - } + - if (pixel.temp > pixel.clone ) { + if (pixel.temp >= heatSen ) { pixel.charge = 1; } @@ -183,7 +181,7 @@ elements.molten_titanium = { desc: "Melted version of titanium", temp : 3000, conduct: 0, - color: "#d16e04", + color: ["#d16e04","#FFCC99","#FF6600","#FF7F50","#DC143C","#800020"], tempLow:2999, stateLow: "titanium", category: "states", @@ -577,6 +575,7 @@ compactPi = "dead_plant"; compactPi2 = "coal"; elements.compacter = { color: "#4e524f", + conduct : 1, desc: "Turns dead plants into coal and needs power", tick: function(pixel) { if (pixel.start === pixelTicks) { @@ -650,17 +649,18 @@ elements.compacter = { } } else if (!pixel.con ) { //suck up pixel - if ((newPixel.element == pixel.CompactEl) || (newPixel.element == pixel.CompactEl2) && pixel.charge > 0 ) { - - pixel.con = newPixel; - changePixel(newPixel, "coal") - newPixel.color = elements.coal.color - deletePixel(newPixel.x,newPixel.y); - pixel.con.x = pixel.x; - pixel.con.y = pixel.y; - pixel.con.del; - moved = true; - break; + if ((newPixel.element == pixel.CompactEl) || (newPixel.element == pixel.CompactEl2) ) { + if (pixel.charge > 0) { + pixel.con = newPixel; + changePixel(newPixel, "coal") + newPixel.color = elements.coal.color + deletePixel(newPixel.x,newPixel.y); + pixel.con.x = pixel.x; + pixel.con.y = pixel.y; + pixel.con.del; + moved = true; + break; + } } } } @@ -1047,7 +1047,7 @@ elements.grinder = { break; } } - else if (!pixel.con && !doNotEF.includes(newPixel.element) ) { //suck up pixel + else if (!pixel.con && !doNotEF.includes(newPixel.element)) { //suck up pixel // (!pixel.con && !(newPixel.element === "e_grinder") && pixel.charge > 0 && !(newPixel.element.movable)) // (!pixel.con && !(newPixel.element === "grinder") && !(newPixel.element === "e_grinder") && !(newPixel.element === "filter") && (newPixel.element.movable)) //!(newPixel.element === "grinder") && !(newPixel.element === "e_grinder") @@ -1225,6 +1225,8 @@ elements.e_grinder = { insulate: true, } + + elements.quickSand = { color: elements.sand.color, category: "land", @@ -1233,3 +1235,498 @@ elements.quickSand = { density: 500, conduct: 0.02, } + +elements.Acid_Bomb = { + color: "#524c41", + category: "weapons", + state: "solid", + density: 1300, + ignore: "Acid_Bomb", + excludeRandom: true, + behavior: behaviors.POWDER, + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "M2|M1 AND EX:15>acid,acid_gas,acid_gas|M2", + ], + + + + +} + +elements.E_Spout = { + color: "#606378", + behavior: behaviors.WALL, + behaviorOn: [ + "XX|CR:water|XX", + "CR:water|XX|CR:water", + "XX|CR:water|XX", + ], + category:"special", + tempHigh: 1455.5, + stateHigh: "molten_steel", + conduct: 1, +} + + +elements.DestroyableWire = { + color: "#4d0a03", + behavior: behaviors.WALL, + category: "machines", + insulate: true, + conduct: 1, + breakInto : "metal_scrap", + noMix: true, +} + + +elements.pusherRight = { + behavior: behaviors.WALL, + ignore: "pushTest", + tick: function(pixel) { + + for (var i = 0; i < adjacentCoords.length; i++) { + var coords = adjacentCoords[i]; + var x = pixel.x + coords[0]; + var y = pixel.y + coords[1]; + if (!isEmpty(x,y,true)) { + let sensed = pixelMap[x][y]; + if (!(sensed.element == "pusherRight") ) { + + + var newX = sensed.x + 1; + var newY = sensed.y ; + + tryMove(sensed,newX,newY); + //break; + } + } + } + doDefaults(pixel); + }, + conduct: 1, + movable: true, + category:"machines", + darkText: true, + hardness: 1, + + + } + + elements.pusherLeft = { + behavior: behaviors.WALL, + ignore: "pushTest", + tick: function(pixel) { + + for (var i = 0; i < adjacentCoords.length; i++) { + var coords = adjacentCoords[i]; + var x = pixel.x + coords[0]; + var y = pixel.y + coords[1]; + if (!isEmpty(x,y,true)) { + let sensed = pixelMap[x][y]; + if (!(sensed.element == "pusherLeft") ) { + + + var newX = sensed.x - 1; + var newY = sensed.y ; + + tryMove(sensed,newX,newY); + //break; + } + } + } + doDefaults(pixel); + }, + conduct: 1, + movable: true, + category:"machines", + darkText: true, + hardness: 1, + + + } + + elements.de_leadifyer = { + color: "#ff0000", + tool: function(pixel) { + if (pixel.element == "lead") { + deletePixel(pixel.x,pixel.y); + } + }, + category: "tools", +}; + +elements.missile = { + behavior: behaviors.WALL, + maxSize: 1, + + properties: { + luanched : false, + }, + ignore: "pushTest", + tick: function(pixel) { + + for (var i = 0; i < adjacentCoords.length; i++) { + var coords = adjacentCoords[i]; + var x = pixel.x + coords[0]; + var y = pixel.y + coords[1]; + if (!isEmpty(x,y,true)) { + let sensed = pixelMap[x][y]; + if (!(sensed.element == "missile") && sensed.element && !(sensed.element == "fire") && !(sensed.element == "smoke") && pixel.luanched == true || pixel.y ==1 ||outOfBounds(pixel.x,pixel.y) ) { + explodeAt(x, y, 13, ["fire","fire","plasma","plasma","plasma","plasma"]); + explodeAt(x, y, 5, "molten_metal_scrap"); + deletePixel(pixel.x,pixel.y); + } + + } else if(pixel.temp >= 100) { + + pixel.luanched = true; + pixel.clone = "fire"; + var newX = pixel.x ; + var newY = pixel.y - 0.5; + let test = createPixel("fire",pixel.x,pixel.y+2); + tryMove(pixel,newX,newY,test); + + + + } + + } + doDefaults(pixel); + }, + conduct: 1, + movable: true, + category:"weapons", + darkText: true, + hardness: 1, + + + } + + elements.NewWater = { + color: elements.water.color, + behavior : behaviors.LIQUID, + category: "test", + state: "liquid", + tick:function(pixel) { + if (pixel.temp < 20) { + pixel.color = "#317d7d"; + } + else if (pixel.temp == 20 ) { + pixel.color = elements.water.color; + } + else if (pixel.temp > 20 && pixel.temp < 30) { + pixel.color = "#eb8634"; + } + else if (pixel.temp > 30) { + pixel.color = "#eb4034"; + } + + }, + // make it work like normal water + tempHigh: 100, + stateHigh: "steam", + tempLow: 0, + stateLow: "ice", + + heatCapacity: 4.184, + reactions: { + "dirt": { // React with (water reacts with dirt to make mud) + elem1: null, // First element transforms into; in this case, water deletes itself + elem2: "mud", // Second element transforms into; in this case, dirt turns to mud + }, + "sand": { elem1: null, elem2: "wet_sand" }, + "clay_soil": { elem1: null, elem2: "clay" }, + "salt": { elem1: "salt_water", elem2: null, temp1:-20 }, + "sugar": { elem1: "sugar_water", elem2: null }, + "honey": { elem1: "sugar_water" }, + "caramel": { elem1: "sugar_water" }, + "molasses": { elem1: "sugar_water" }, + "dust": { elem1: "dirty_water", elem2: null }, + "ash": { elem1: "dirty_water", elem2: null }, + "cyanide": { elem1: "dirty_water", elem2: null }, + "cyanide_gas": { elem1: "dirty_water", elem2: null }, + "carbon_dioxide": { elem1: "seltzer", elem2: null, oneway:true }, + "sulfur": { elem1: "dirty_water", elem2: null }, + "rat": { elem1: "dirty_water", chance:0.005 }, + "plague": { elem1: "dirty_water", elem2: null }, + "rust": { elem1: "dirty_water", chance:0.005 }, + "lead": { elem1: "dirty_water", chance:0.005 }, + "solder": { elem1: "dirty_water", chance:0.005 }, + "fallout": { elem1: "dirty_water", chance:0.25 }, + "radiation": { elem1: "dirty_water", chance:0.25 }, + "uranium": { elem1: "dirty_water", chance:0.25 }, + "rotten_meat": { elem1: "dirty_water", chance:0.25 }, + "rotten_cheese": { elem1: "dirty_water", chance:0.25 }, + "cancer": { elem1: "dirty_water", chance:0.25 }, + "oil": { elem1: "dirty_water", chance:0.005 }, + "dioxin": { elem1: "dirty_water", chance:0.1 }, + "quicklime": { elem1: "slaked_lime", elem2: "slaked_lime", temp2:100, temp1:100, chance:0.05 }, + "rock": { elem2: "wet_sand", chance: 0.00035 }, + "limestone": { elem2: "wet_sand", chance: 0.00035 }, + "tuff": { elem2: "wet_sand", color2:"#7a6b5c", chance: 0.00035 }, + "ruins": { elem2: "rock", chance: 0.00035 }, + "mudstone": { elem2: "mud", chance: 0.00035 }, + "methane": { elem1:"primordial_soup", elem2:"primordial_soup", tempMin:60, charged:true }, + "ammonia": { elem1:"primordial_soup", elem2:"primordial_soup", tempMin:60, charged:true }, + "fly": { elem2:"dead_bug", chance:0.1, oneway:true }, + "firefly": { elem2:"dead_bug", chance:0.1, oneway:true }, + "bee": { elem2:"dead_bug", chance:0.05, oneway:true }, + "stink_bug": { elem2:"dead_bug", chance:0.1, oneway:true }, + "cured_meat": { elem1:"salt_water", elem2:"meat" }, + // electrolysis: + "aluminum": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.0025 }, + "zinc": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.015 }, + "steel": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.0125 }, + "iron": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.0125 }, + "tin": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.01 }, + "brass": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.001 }, + "bronze": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.001 }, + "copper": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.0075 }, + "silver": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.0075 }, + "gold": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.0075 }, + }, + state: "liquid", + density: 997, + conduct: 0.02, + stain: -0.5, + extinguish: true + } + + elements.test1 = { + //seed: true, + maxSize: 1, + behavior: behaviors.WALL, + properties : { + //min: 10, + //max: 40, + Curheight : 1, + height : 40, //Math.floor(Math.random() * (max - min + 1)) + min, + age: 0, + + }, + category:"test", + tick:function(pixel) { + if(isEmpty(pixel.x+1,pixel.y) && pixel.Curheight < pixel.height){ + createPixel("steel",pixel.x+1,pixel.y, ); + } + if(isEmpty(pixel.x-1,pixel.y) && pixel.Curheight < pixel.height){ + createPixel("steel",pixel.x-1,pixel.y, ); + } + if(isEmpty(pixel.x+2,pixel.y) && pixel.Curheight < pixel.height){ + createPixel("steel",pixel.x+2,pixel.y, ); + } + if(isEmpty(pixel.x-2,pixel.y) && pixel.Curheight < pixel.height){ + createPixel("steel",pixel.x-2,pixel.y, ); + } + + + + + if(isEmpty(pixel.x,pixel.y-39) ) { + //var built + createPixel("concrete",pixel.x,pixel.y-40, ); + } + if(isEmpty(pixel.x-1,pixel.y-39) ) { + createPixel("concrete",pixel.x-1,pixel.y-40, ); + } + if(isEmpty(pixel.x+1,pixel.y-39 )) { + createPixel("concrete",pixel.x+1,pixel.y-40, ); + } + for (let i = pixel.Curheight; i < pixel.height; i++) { + if(isEmpty(pixel.x,pixel.y-i) && pixel.Curheight < pixel.height){ + + + if(isEmpty(pixel.x-2,pixel.y-i) ) { + createPixel("concrete",pixel.x-2,pixel.y-i, ); + } + if(isEmpty(pixel.x+2,pixel.y-i) ) { + createPixel("concrete",pixel.x+2,pixel.y-i, ); + } + i+1 + pixel.Curheight +1; + } + } + + + + + + + + if(pixel.age > 100) { + changePixel(pixel,"steel"); + } + pixel.age++ + doDefaults(pixel); + + } +} + + +elements.test2 = { + //seed: true, + maxSize: 1, + behavior: behaviors.WALL, + properties : { + //min: 10, + //max: 40, + baseLimit : 18, + base:1, + + Curheight : 1, + height : 18, //Math.floor(Math.random() * (max - min + 1)) + min, + age: 0, + + }, + category:"test", + tick:function(pixel) { + //base + if(isEmpty(pixel.x-i,pixel.y) ) { + createPixel("steel",pixel.x-18,pixel.y, ); + } + for (let i = pixel.base; i < pixel.baseLimit; i++) { + + + + if(isEmpty(pixel.x-i,pixel.y) ) { + createPixel("steel",pixel.x-i,pixel.y, ); + } + + i+1 + pixel.base +1; + + } + + for (let i = pixel.Curheight; i < pixel.height; i++) { + + + + if(isEmpty(pixel.x,pixel.y-i) ) { + createPixel("steel",pixel.x,pixel.y-i, ); + } + if(isEmpty(pixel.x-18,pixel.y-i) ) { + createPixel("steel",pixel.x-18,pixel.y-i, ); + } + if(isEmpty(pixel.x-i,pixel.y-17) ) { + createPixel("steel",pixel.x-i,pixel.y-17); + } + + i+1 + pixel.Curheight +1; + + } + + + if(pixel.age > 100) { + changePixel(pixel,"steel"); + } + pixel.age++ + doDefaults(pixel); + + } +} + + + + tarY = null; + tarX = null; + +elements.guided_missile = { + maxSize: 1, + behavior: behaviors.WALL, + + onSelect: function(pixel){ + + tarX = prompt("enter x"); + tarY = prompt("enter y"); + + }, + properties: { + luanched : false, + speed :1, + AtY : false, + }, + + + tick: function(pixel) { + if(pixel.start == pixelTicks){ + + } + for (var i = 0; i < adjacentCoords.length; i++) { + var coords = adjacentCoords[i]; + var x = pixel.x + coords[0]; + var y = pixel.y + coords[1]; + if (!isEmpty(x,y,true)) { + let sensed = pixelMap[x][y]; + if (!(sensed.element == "missile") &&!(sensed.element == "guided_missile") && sensed.element && !(sensed.element == "fire") && !(sensed.element == "smoke") && pixel.luanched == true || pixel.y ==1 ||outOfBounds(pixel.x,pixel.y)) { + explodeAt(x, y, 13, ["fire","fire","plasma","plasma","plasma","plasma"]); + explodeAt(x, y, 5, "molten_metal_scrap"); + deletePixel(pixel.x,pixel.y); + } + + } else if(pixel.temp >= 100) { + + pixel.luanched = true; + pixel.clone = "fire"; + var newX = pixel.x ; + var newY = pixel.y - pixel.speed; + + + if (!(pixel.y == tarY) && pixel.y > tarY ) { + let test = createPixel("fire",pixel.x,pixel.y+2); + tryMove(pixel,newX,newY,test); + pixel.AtY = true; + + } + else if(!(pixel.y == tarY) && pixel.y < tarY ){ + let test = createPixel("fire",pixel.x,pixel.y-2); + tryMove(pixel,pixel.x,pixel.y + pixel.speed,test); + pixel.AtY = true; + + } + else if(pixel.AtY = true) { + if(pixel.x > tarX) { + let test = createPixel("fire",pixel.x,pixel.y); + tryMove(pixel,pixel.x-pixel.speed,pixel.y,test); + } + else if(pixel.x < tarX) { + let test = createPixel("fire",pixel.x,pixel.y); + tryMove(pixel,pixel.x+pixel.speed,pixel.y,test); + + } + else if (pixel.x == tarX){ + explodeAt(x, y, 13, ["fire","fire","plasma","plasma","plasma","plasma"]); + explodeAt(x, y, 5, "molten_metal_scrap"); + deletePixel(pixel.x,pixel.y); + } + + + } + + + + + + + + + } + + } + doDefaults(pixel); + }, + conduct: 1, + movable: true, + category:"weapons", + darkText: true, + hardness: 1, + + + } + + + elements.room_temp.category = "tools" + elements.uncharge.category = "tools" + elements.unburn.category = "tools" diff --git a/mods/Vegan.js b/mods/Vegan.js new file mode 100644 index 00000000..8788a6a2 --- /dev/null +++ b/mods/Vegan.js @@ -0,0 +1,255 @@ +/* + +Vegan.js Adds all vegetables, fruits and nut to Sandboxels! +Create by Salmonfishyy + + +Changelog - Berries Update - v1 + - v1 feature : + - Added Blueberries + - Added Raspberries + - Added Blackberries + - Added Cranberries + - Added Boysenberries + - Added Elderberries + - Added Boysenberries + - Added Elderberries + - Added Goji berries + - Added Black mulberries + - Added Black currants + - Added Acai berries + - Added Salmon berries + - Added Juneberries + - Added Cloudberries + - Added Red Mulberries + - Added Strawberries + - Added Serviceberries + - Added Huckleberries + +*/ + +elements.blueberry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#464196","#2E2B64"], + breakInto: "juice", + breakIntoColor: "#1F1C42", + reactions: {}, +}; +elements.raspberry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#FF0000","#FFCCCC"], + breakInto: "juice", + breakIntoColor: "#FF0000", + reactions: {}, +}; +elements.blackberry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#000000","#660066"], + breakInto: "juice", + breakIntoColor: "#660066", + reactions: {}, +}; +elements.cranberry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#FF0000","#FF6600"], + breakInto: "juice", + breakIntoColor: "#FF0000", + reactions: {}, +}; +elements.boysenberry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#660066","#CC99FF"], + breakInto: "juice", + breakIntoColor: "#CC99FF", + reactions: {}, +}; +elements.elderberries = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#660066","#990099"] + breakInto: "juice", + breakIntoColor: "#990099", + reactions: {}, +}; +elements.goji_berry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#FF6600","#FFCC99"], + breakInto: "juice", + breakIntoColor: "#FF6600", + reactions: {}, +}; +elements.black_mulberry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#000000","#660066"], + breakInto: "juice", + breakIntoColor: "#660066", + reactions: {}, +}; +elements."black_currants", = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#000000","#660066"], + breakInto: "juice", + breakIntoColor: "#660066", + reactions: {}, +}; +elements.acai_berry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#660066","#990099"], + breakInto: "juice", + breakIntoColor: "#990099", + reactions: {}, +}; +elements.salmon_berry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#FF6600","#FFCC99"], + breakInto: "juice", + breakIntoColor: "#FF6600", + reactions: {}, +}; +elements.june_berry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#0000FF","#CCCCFF"], + breakInto: "juice", + breakIntoColor: "#0000FF", + reactions: {}, +}; +elements.cloud_berry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#FF6600","#FFCC99"], + breakInto: "juice", + breakIntoColor: "#FF6600", + reactions: {}, +}; +elements.red_mulberry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#FF0000","#FF9999"], + breakInto: "juice", + breakIntoColor: "#FF0000", + reactions: {}, +}; +elements.huckle_berry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#FF0000","#FFCCCC"], + breakInto: "juice", + breakIntoColor: "#FF0000", + reactions: {}, +}; +elements.service_berry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#FFFFFF","#EEEEEE"] + breakInto: "juice", + breakIntoColor: "#FFFFFF", + reactions: {}, +}; +elements.strawberry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#FF0000","#FF9999"], + breakInto: "juice", + breakIntoColor: "#f5589c", + reactions: {}, +}; +elements.marionberry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#3E385A","#2C0589"], + breakInto: "juice", + breakIntoColor: "#1E034A", + reactions: {}, +}; +elements.crowberry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#003447","#000000"], + breakInto: "juice", + breakIntoColor: "#000000", + reactions: {}, +}; +elements.dewberry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#502554","#3E385A"], + breakInto: "juice", + breakIntoColor: "#381E4A", + reactions: {}, +}; +elements.fox_grape = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#C0C0C0","#6F2DA8"], + breakInto: "juice", + breakIntoColor: "#38194A", + reactions: {}, +}; +elements.green_grape = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#DBE465","#9CE465"], + breakInto: "juice", + breakIntoColor: "#A8E4A0", + reactions: {}, +}; +elements.purple_grape = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#502554","#3E385A"], + breakInto: "juice", + breakIntoColor: "#5D345C", + reactions: {}, +}; +elements.witch_finger_grape = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#8B0000","#000000"], + breakInto: "juice", + breakIntoColor: "#6E65E4", + reactions: {}, +}; +elements.chokeberry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#8B0000","#000000"], + breakInto: "juice", + breakIntoColor: "#000000", + reactions: {}, +}; \ No newline at end of file diff --git a/mods/aChefsDream.js b/mods/aChefsDream.js index d33bd982..5330f1df 100644 --- a/mods/aChefsDream.js +++ b/mods/aChefsDream.js @@ -2,7 +2,7 @@ Created by SquareScreamYT <@918475812884344852> and RealerRaddler <@914371295561535508> Thanks to Alice <@697799964985786450>, nousernamefound <@316383921346707468>, Adora the Transfem <@778753696804765696> and Fioushemastor <@738828785482203189> for helping :) -v1.10.2 +v1.10.5 you can support me at my youtube: https://youtube.com/@sqec @@ -16,7 +16,6 @@ Upcoming Features: - pigs, ham and bacon - garlic - stainless steel -- chili - pepper plants - hot chocolate - cows and beef @@ -329,7 +328,16 @@ Changelog (v1.10.1) Changelog (v1.10.2) - - added chocolate chip, sprinkles and topping explosions + - added sprinkle explosions + + + + +Changelog (v1.10.5) + - added chilli + - added chilli seed, stem and leaves + - added chilli powder + - added hot sauce @@ -6109,10 +6117,6 @@ elements.vanilla_stem = { elements.vanilla_leaves = { color: "#5d9c48", reactions: { - "water": { elem2:"vanilla_tea", tempMin:80 }, - "salt_water": { elem2:"vanilla_tea", tempMin:80 }, - "sugar_water": { elem2:"vanilla_tea", tempMin:80 }, - "seltzer": { elem2:"vanilla_tea", tempMin:80 }, "stench": { elem2:null, chance:0.25 }, "steam": { elem2:"fragrance", chance:0.1 }, "flea": { elem2:null, chance:0.01 }, @@ -6439,3 +6443,256 @@ elements.sprinkle_bomb = { excludeRandom: true, cooldown: defaultCooldown } + +elements.chilli_stem = { + color: "#5d9c48", + 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 }, + "mercury": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "stench": { elem2:null, chance:0.25 }, + "carbon_dioxide": { elem2:"oxygen", chance:0.25 }, + }, + category:"life", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:15, + burnTime:60, + burnInto: "dead_plant", + state: "solid", + density: 1050, + hidden: true, + breakInto: "herb", + breakIntoColor:"#245c1b", + tick: function(pixel) { + if (isEmpty(pixel.x,pixel.y+1) && pixel.grower == false && pixel.leafgrower == false) { + movePixel(pixel,pixel.x,pixel.y+1); + } + if (pixel.grower == true) { + // check if left side has stem if no set direction to right + if (!isEmpty(pixel.x-1,pixel.y) && pixel.direction == "undefined") { + if (pixelMap[pixel.x-1][pixel.y].element == "chilli_stem") { + pixel.direction = "right"; + } + } + // same thing to set direction the left + else if (!isEmpty(pixel.x+1,pixel.y) && pixel.direction == "undefined") { + if (pixelMap[pixel.x+1][pixel.y].element == "chilli_stem") { + pixel.direction = "left"; + } + } + } + if (pixel.grower == true) { + // left + if (pixel.direction == "left") { + if (isEmpty(pixel.x-1,pixel.y-1) && Math.random() < 0.1) { + createPixel("chilli_leaves",pixel.x-1,pixel.y-1); + if (isEmpty(pixel.x-2,pixel.y-2) && Math.random() < 0.2) { + createPixel("chilli_leaves",pixel.x-2,pixel.y-2); + if (isEmpty(pixel.x-3,pixel.y-3) && Math.random() < 0.4) { + createPixel("chilli_leaves",pixel.x-3,pixel.y-3); + } + } + } + } + // right + else if (pixel.direction == "right") { + if (isEmpty(pixel.x+1,pixel.y-1) && Math.random() < 0.1) { + createPixel("chilli_leaves",pixel.x+1,pixel.y-1); + if (isEmpty(pixel.x+2,pixel.y-2) && Math.random() < 0.2) { + createPixel("chilli_leaves",pixel.x+2,pixel.y-2); + if (isEmpty(pixel.x+3,pixel.y-3) && Math.random() < 0.4) { + createPixel("chilli_leaves",pixel.x+3,pixel.y-3); + } + } + } + } + } + pixel.age++; + doDefaults(pixel); + }, + properties: { + "grower":false, + "age":0, + "direction":"undefined", + } +} +elements.chilli_leaves = { + color: "#5d9c48", + reactions: { + "water": { elem2:"chilli_tea", tempMin:80 }, + "salt_water": { elem2:"chilli_tea", tempMin:80 }, + "sugar_water": { elem2:"chilli_tea", tempMin:80 }, + "seltzer": { elem2:"chilli_tea", tempMin:80 }, + "stench": { elem2:null, chance:0.25 }, + "steam": { elem2:"fragrance", chance:0.1 }, + "flea": { elem2:null, chance:0.01 }, + "termite": { elem2:null, chance:0.01 }, + "fly": { elem2:null, chance:0.01 }, + "ant": { elem2:null, chance:0.01 }, + "stink_bug": { elem2:null, chance:0.01 }, + "yeast": {elem1:"tea", chance:0.01}, + }, + tick: function(pixel) { + if (isEmpty(pixel.x-1,pixel.y-1) && !isEmpty(pixel.x+1,pixel.y+1) && Math.random() < 0.03) { + createPixel("chilli",pixel.x-1,pixel.y-1); + } + if (isEmpty(pixel.x+1,pixel.y-1) && !isEmpty(pixel.x-1,pixel.y+1) && Math.random() < 0.03) { + createPixel("chilli",pixel.x+1,pixel.y-1); + } + pixel.age++; + doDefaults(pixel); + }, + behavior: behaviors.WALL, + tempHigh: 300, + stateHigh: ["fire","smoke","smoke","smoke","ash"], + tempLow: -2, + stateLow: "frozen_plant", + burn:10, + burnTime:300, + burnInto: ["fire","smoke","smoke","smoke","smoke","smoke","smoke","fragrance"], + category:"life", + state: "solid", + density: 1400, + isFood: true, + hidden:true, + breakInto: "herb", + breakIntoColor:"#245c1b", +}, +elements.chilli_seed = { + color: "#806d3b", + tick: function(pixel) { + if (isEmpty(pixel.x,pixel.y+1)) { + movePixel(pixel,pixel.x,pixel.y+1); + } + else { + 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)) { + movePixel(pixel,pixel.x,pixel.y-1); + createPixel("chilli_stem",pixel.x,pixel.y+1); + pixel.height++; + } + if (pixel.height < 12 && pixel.height > 2 && pixel.height == 3) { + if (isEmpty(pixel.x+1,pixel.y)) { + createPixel("chilli_stem",pixel.x+1,pixel.y); + pixelMap[pixel.x+1][pixel.y].grower = true; + } + } + if (pixel.height < 12 && pixel.height > 2 && pixel.height == 9) { + if (isEmpty(pixel.x+1,pixel.y)) { + createPixel("chilli_stem",pixel.x+1,pixel.y); + pixelMap[pixel.x+1][pixel.y].grower = true; + } + } + if (pixel.height < 12 && pixel.height > 2 && pixel.height == 6) { + if (isEmpty(pixel.x-1,pixel.y)) { + createPixel("chilli_stem",pixel.x-1,pixel.y); + pixelMap[pixel.x-1][pixel.y].grower = true; + } + } + if (pixel.height > 11) { + if (isEmpty(pixel.x-1,pixel.y) && isEmpty(pixel.x+1,pixel.y)) { + createPixel("chilli_stem",pixel.x-1,pixel.y); + pixelMap[pixel.x-1][pixel.y].grower = true; + createPixel("chilli_stem",pixel.x+1,pixel.y); + pixelMap[pixel.x+1][pixel.y].grower = true; + deletePixel(pixel.x,pixel.y); + } + } + } + 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.chilli = { + color: "#ba3030", + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "ST:chilli_leaves|M1|ST:chilli_leaves", + ], + category:"food", + tempHigh: 100, + stateHigh: "dead_plant", + burn:15, + burnTime:60, + burnInto: "dead_plant", + state: "solid", + density: 1050, + breakInto: "chilli_powder", + reactions: { + "sauce": {elem1:null, elem2:"hot_sauce", chance:2} + }, +} +elements.chilli_powder = { + color: "#a32121", + reactions: { + "stench": { elem2:null, chance:0.25 }, + "steam": { elem2:"fragrance", chance:0.1 }, + "flea": { elem2:null, chance:0.01 }, + "termite": { elem2:null, chance:0.01 }, + "fly": { elem2:null, chance:0.01 }, + "ant": { elem2:null, chance:0.01 }, + "stink_bug": { elem2:null, chance:0.01 }, + "sauce": {elem1:null, elem2:"hot_sauce", chance:2} + }, + behavior: behaviors.POWDER, + tempHigh: 300, + stateHigh: ["fire","smoke","smoke","smoke","ash"], + burn:10, + burnTime:300, + burnInto: ["fire","smoke","smoke","smoke","smoke","smoke","smoke","fragrance"], + category:"food", + state: "solid", + density: 1400, + isFood: true, +} +elements.hot_sauce = { + color: "#a31414", + behavior: behaviors.LIQUID, + reactions: { + "stench": { elem2:null }, + }, + viscosity: 2600, + tempHigh: 260, + stateHigh: ["steam","salt","fragrance"], + tempLow: -2, + category:"food", + state: "liquid", + density: 1031.33, + stain: 0.01, + isFood: true +} +elements.head.reactions.hot_sauce = {elem2:["smoke","fire",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null], chance:3} diff --git a/mods/lost_souls.js b/mods/lost_souls.js index 40350902..a39b9a6c 100644 --- a/mods/lost_souls.js +++ b/mods/lost_souls.js @@ -1,6 +1,6 @@ elements.ghost_particle = { color: "#d9d2d0", - behavior: behaviors.GAS, + behavior: behaviors.DGAS, category: "soul", state: "gas", }; @@ -9,9 +9,9 @@ elements.soul_fish = { color: ["#808080","#a52a2a"], category: "soul", behavior: [ - "XX|CR:flash|XX", - "CR:flash AND M2|XX|CR:flash AND M2", - "M1|CR:flash AND M1|M1", + "XX|M2|M1", + "XX|FX%2|BO", + "XX|XX|M1", ], reactions: { "algae": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL }, @@ -35,7 +35,12 @@ elements.soul_fish = { "cell": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, "crumb": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL }, "alcohol": { elem1:"meat", chance:0.001 }, - } + }, + tempHigh: 50000, + stateHigh: "ghost_particle", + category:"soul", + state: "solid", + density: 1080, }; elements.soul_anger_block = { color: ["#eb4034","#ed2415"], @@ -60,7 +65,6 @@ elements.soul_dirt = { } else { pixel.methaned = true; }; - createPixel("ghost_particle",pixel.x,pixel.y); }; pixel.age++ }, @@ -69,3 +73,105 @@ elements.soul_dirt = { density: 1050, excludeRandom: true, }; + +elements.death_reaper = { + color: "#454545", + behavior: [ + "XX|M2|M1", + "XX|FX%2|BO", + "XX|XX|M1", + ], + reactions: { + human: { elem2: ["ghost_particle",null] }, + head: { elem2: ["ghost_particle",null] }, + body: { elem2: ["ghost_particle",null] }, + worm: { elem2: ["ghost_particle",null] }, + fish: { elem2: ["ghost_particle",null] }, + frozen_fish: { elem2: ["ghost_particle",null] }, + slug: { elem2: ["ghost_particle",null] }, + snail: { elem2: ["ghost_particle",null] }, + bird: { elem2: ["ghost_particle",null] }, + rat: { elem2: ["ghost_particle",null] }, + frog: { elem2: ["ghost_particle",null] }, + frozen_frog: { elem2: ["ghost_particle",null] }, + tadpole: { elem2: ["ghost_particle",null] }, + stink_bug: { elem2: ["ghost_particle",null] }, + bee: { elem2: ["ghost_particle",null] }, + ghost_particle: { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL }, + flea: { elem2: ["ghost_particle",null] }, + termite: { elem2: ["ghost_particle",null] }, + frozen_worm: { elem2: ["ghost_particle",null] }, + flea: { elem2: ["ghost_particle",null] }, + ant: { elem2: ["ghost_particle",null] }, + fly: { elem2: ["ghost_particle",null] }, + firefly: { elem2: ["ghost_particle",null] }, + bee: { elem2: ["ghost_particle",null] }, + }, + tempHigh: 10000, + stateHigh: "bone", + category:"soul", + state: "solid", + density: 1500, +}; +elements.tombstone = { + color: "#aaaaaa", + behavior: behaviors.STURDYPOWDER, + tempHigh: 1500, + tick: function(pixel) { + if (isEmpty(pixel.x+1,pixel.y) && Math.random() < 0.1) { + createPixel("ghost_particle",pixel.x+1,pixel.y); + } + doDefaults(pixel); + }, + stateHigh: "magma", + category: "soul", + state: "solid", + density: 2400, + hardness: 0.5, + breakInto: "dust", + darkText: true +} +elements.tombstone_seed = { + color: "#eeeff2", + tick: function(pixel) { + if (isEmpty(pixel.x+1,pixel.y) && + isEmpty(pixel.x-1,pixel.y) + isEmpty(pixel.x+1,pixel.y-1) && + isEmpty(pixel.x-1,pixel.y-1) && + isEmpty(pixel.x,pixel.y-1) && + isEmpty(pixel.x+1,pixel.y-2) && + isEmpty(pixel.x-1,pixel.y-2) && + isEmpty(pixel.x,pixel.y-2) && + isEmpty(pixel.x+1,pixel.y-3) && + isEmpty(pixel.x-1,pixel.y-3) && + isEmpty(pixel.x,pixel.y-3)) { + createPixel("tombstone",pixel.x+1,pixel.y); + createPixel("tombstone",pixel.x-1,pixel.y); + createPixel("tombstone",pixel.x+1,pixel.y-1); + createPixel("tombstone",pixel.x-1,pixel.y-1); + createPixel("tombstone",pixel.x,pixel.y-1); + createPixel("tombstone",pixel.x+1,pixel.y-2); + createPixel("tombstone",pixel.x-1,pixel.y-2); + createPixel("tombstone",pixel.x,pixel.y-2); + createPixel("tombstone",pixel.x+1,pixel.y-3); + createPixel("tombstone",pixel.x-1,pixel.y-3); + createPixel("tombstone",pixel.x,pixel.y-3); + } + if (pixel.age > 100) { + changePixel(pixel,"tombstone"); + } + pixel.age++ + doDefaults(pixel); + }, + properties: { + age:0 + }, + category: "soul", + state: "solid", + density: 1500, + cooldown: defaultCooldown, + seed: true, + maxSize: 1, + excludeRandom: true, + behavior: behaviors.STURDYPOWDER, +}; diff --git a/mods/morechemistry.js b/mods/morechemistry.js index 65bb4326..59a57b3e 100644 --- a/mods/morechemistry.js +++ b/mods/morechemistry.js @@ -1,4 +1,5 @@ //This mod was made by Adora the transfem, https://discord.com/users/778753696804765696 on discord and https://www.tiktok.com/@alextheagenenby?_t=8hoCVI3NRhu&_r=1 on tiktok. +let version = "1.5.2"; function pixelInRange(pixel, range){ let i = 0; while (i < range.length) { @@ -1162,6 +1163,7 @@ function conditionTrue(condition, pixel){ let ifCondition = ""; let currentProp = ""; let currentPropValue = ""; +let Func = ""; elements.propmachine = { name: "PropMachine", behavior: behaviors.WALL, @@ -1186,41 +1188,48 @@ onSelect: function(pixel) { } else { exclude2 += "propmachine"; } - var answer1 = prompt("Warning - This tool may break the simulator if used incorrectly.\n\nEnter a pixel attribute to modify:",(currentProp||undefined)); + var answer1 = prompt("Warning - This tool may break the simulator if used incorrectly.\n\nEnter a pixel attribute to modify or enter !FUNC to execute a function on pixels.",(currentProp||undefined)); + if(answer1.includes("!FUNC")){ + alert("enter the function you wish to execute in the function textbox at the bottom of the page. if you have not before you get this alert, nothing will happen. make sure the function has \"function(){\" before it and \"}\" after it. an example is: \"function(){console.log(\"Hello World!\")}\""); + var answer2 = Func; + } console.log(answer1) if (!answer1) { return } - var answer2 = prompt("Now, enter a value for "+answer1+":",(currentPropValue||undefined)); - if (!answer2) { return } - var valueL = answer2.toLowerCase(); - if (valueL === "true") { answer2 = true } - else if (valueL === "false") { answer2 = false } - else if (valueL === "null") { answer2 = null } - else if (valueL === "undefined") { answer2 = undefined } - else if (answer1 === "color" && valueL[0] === "#") { - var rgb = hexToRGB(valueL); - answer2 = "rgb("+rgb.r+","+rgb.g+","+rgb.b+")"; - } - currentProp = answer1; - currentPropValue = answer2; - console.log(answer1); - var num = parseFloat(answer2); - if (!isNaN(num)) { answer2 = num } - currentPropValue = answer2; - logMessage("Prop: "+currentProp); - logMessage("Value: "+currentPropValue); -}, + if(!answer2){ + var answer2 = prompt("Now, enter a value for "+answer1+":",(currentPropValue||undefined)); + if (!answer2) { return } + var valueL = answer2.toLowerCase(); + if (valueL === "true") { answer2 = true } + else if (valueL === "false") { answer2 = false } + else if (valueL === "null") { answer2 = null } + else if (valueL === "undefined") { answer2 = undefined } + else if (answer1 === "color" && valueL[0] === "#") { + var rgb = hexToRGB(valueL); + answer2 = "rgb("+rgb.r+","+rgb.g+","+rgb.b+")"; + } + currentProp = answer1; + currentPropValue = answer2; + console.log(answer1); + var num = parseFloat(answer2); + if (!isNaN(num)) { answer2 = num } + currentPropValue = answer2; + logMessage("Prop: "+currentProp); + logMessage("Value: "+currentPropValue); + } + }, tick: function(pixel) { if(pixel.start == pixelTicks) { pixel.range = num4; pixel.condition = ifCondition; pixel.prop = currentProp; pixel.val = currentPropValue; + pixel.func = Func; } let range = mouseRange(pixel.x, pixel.y, pixel.range); - prop({ property: pixel.prop, value: pixel.val },range, exclude2, pixel.condition); - } + prop({ property: pixel.prop, value: pixel.val },range, exclude2, pixel.condition, pixel.func); + } } -function prop(obj, range, exclude = [], condition = ""){ +function prop(obj, range, exclude = [], condition = "", func = undefined){ let list = []; for (var i = 0; i < range.length; i++) { var x = range[i][0]; @@ -1233,6 +1242,9 @@ function prop(obj, range, exclude = [], condition = ""){ for (var i = 0; i < list.length; i++) { if (!isEmpty(list[i].x, list[i].y, true)) { var pixel = list[i]; + if(func){ + eval(func); + } if (!exclude.includes(pixel.element) && conditionTrue(condition, pixel)){ if(/^\d+$/.test(obj.value)){ obj.value = parseInt(obj.value); @@ -1386,6 +1398,197 @@ elements.sign = { } } } +let attrElem = ""; +let magnetRange = 0; +let magnetElems = []; +elements.magnet = { + category: "machines", + tick:function(pixel){ + if(pixelTicks == pixel.start){ + if(attrElem.includes(" ")){attrElem.replace(/s/g, "")} + pixel.elem = (attrElem.includes(",")) ? attrElem.split(",") : attrElem; + pixel.range = magnetRange; + } + let range = mouseRange(pixel.x, pixel.y, pixel.range) + for (var i = 0; i < currentPixels.length; i++){ + if(pixelInRange(currentPixels[i], range)){ + let pixel2 = currentPixels[i] + if(!pixel2.drag && pixel.elem.includes(pixel2.element)){pixel2.drag = true} + if(pixel2.drag && !pixel.elem.includes(pixel2.element) && !beamPixels.includes(pixel2) && ((draggingPixels && draggingPixels.includes(pixel2)) || !draggingPixels)){pixel2.drag = false;} + if(!magnetElems.includes(pixel2) && pixel.elem.includes(pixel2.element)){magnetElems.push(pixel2)} + if(pixel.elem.includes(pixel2.element)){ + (pixel2.x > pixel.x) ? tryMove(pixel2, pixel2.x - 1, pixel2.y, undefined, true) : tryMove(pixel2, pixel2.x + 1, pixel2.y, undefined, true); + (pixel2.y > pixel.y) ? tryMove(pixel2, pixel2.x, pixel2.y - 1, undefined, true) : tryMove(pixel2, pixel2.x, pixel2.y + 1, undefined, true); + } + } else if (draggingPixels && !draggingPixels.includes(currentPixels[i])){ + currentPixels[i].drag = false; + } + } + }, + onSelect: function(){ + attrElem = prompt("Enter the element you want to attract.", (attrElem || undefined)); + magnetRange = parseInt(prompt("Enter the range you want to attract " + attrElem + " to.", (magnetRange || undefined))); + } +} +let move = false; +let moves = { + a: [-1,0], + d: [1,0], + s: [0,1], + w: [0,-1] +} +let UFOs = []; +let beamPixels = []; +let a = adjacentCoords; +function randomString(length){ + let str = ""; + let chars = "abcdefghijklmnopqrstuvwxyz"; + let charArr = chars.split(""); + for(var i = 0; i < length; i++){ + str += charrArr[Math.floor(Math.random() * charArr.length)]; + } + return str; +} +elements.ufo = { + category: "machines", + behavior: behaviors.WALL, + properties: { + cooldown: 0, + }, + tick: function(pixel){ + if(!UFOs.includes(pixel)){ UFOs = []; UFOs.push(pixel); } + if(move){ + tryMove(pixel, pixel.x + move[0], pixel.y + move[1]) + } + }, + hardness: 1, + insulate: true, +} +let keysDown = {}; +document.addEventListener("keydown", function(event){ + if(moves[event.key.toLowerCase()]){ + move = moves[event.key.toLowerCase()]; + } + keysDown[event.key.toLowerCase()] = true; + if(event.key.toLowerCase() == "b"){ + for(var i = 0; i < UFOs.length; i++){ + if(isEmpty(UFOs[i].x, UFOs[i].y+1) && !outOfBounds(UFOs[i].x, UFOs[i].y+1)){ + createPixel("heat_ray", UFOs[i].x, UFOs[i].y+1); + } + } + } + if(event.key.toLowerCase() == "q"){ + for(var i = 0; i < UFOs.length; i++){ + if(isEmpty(UFOs[i].x, UFOs[i].y+1) && !outOfBounds(UFOs[i].x, UFOs[i].y+1)){ + for(var ii = 0; ii < adjacentCoords.length; ii++){ + let x = UFOs[i].x + adjacentCoords[ii][0]; + let y = UFOs[i].y + adjacentCoords[ii][1]; + if(event.shiftKey){ + explodeAt(x, y, 10) + } else { + explodeAt(x, y, 4); + } + } + } + } + } + if(event.key.toLowerCase() == "x"){ + for(var i = 0; i < UFOs.length; i++){ + for(var ii = 0; ii < currentPixels.length; ii++){ + if([UFOs[i].x].includes(currentPixels[ii].x) && currentPixels[ii].y > UFOs[i].y){ + if(isEmpty(currentPixels[ii].x, currentPixels[ii].y - 1) && !outOfBounds(currentPixels[ii].x, currentPixels[ii].y - 1)){ + beamPixels.push(currentPixels[ii]); + currentPixels[ii].drag = true; + movePixel(currentPixels[ii], currentPixels[ii].x, currentPixels[ii].y - 1); + } + } + + } + } + } + if(event.key.toLowerCase() == "g"){ + for(var i = 0; i < UFOs.length; i++){ + pixel = UFOs[i]; + for (var ii = 0; i < adjacentCoords.length; ii++){ + let x = pixel.x + a[ii][0]; + let y = pixel.y + a[ii][1]; + if(!isEmpty(x, y) && !outOfBounds(x, y)){ + let pixel2 = pixelMap[x][y]; + if(elements[pixel2.element].breakInto){ + if(typeof elements[pixel2.element].breakInto == "object"){ + changePixel(pixel2, elements[pixel2.element].breakInto[Math.floor(Math.random() * elements[pixel2.element].breakInto.length)]); + } else { + changePixel(pixel2, elements[pixel2.element].breakInto); + } + } + } + } + } + } + if(event.key.toLowerCase() == "j"){ + for(var i = 0; i < UFOs.length; i++){ + pixel = UFOs[i]; + for (var ii = 0; i < adjacentCoords.length; ii++){ + let x = pixel.x + a[ii][0]; + let y = pixel.y + a[ii][1]; + if(!isEmpty(x, y) && !outOfBounds(x, y) && elements[pixelMap[x][y].element].conduct > 0){ + pixelMap[x][y].charge = 1; + } + } + } + } +}) +function isArray(item) { + return Object.prototype.toString.call(item) === '[object Array]'; +} + +document.addEventListener("keyup", function(event){ + keysDown[event.key.toLowerCase()] = false; + if(moves[event.key.toLowerCase()] && move){ + move = false; + } + if(event.key.toLowerCase() == "x"){ + for(var i = 0; i < beamPixels.length; i++){ + beamPixels[i].drag = false; + } + beamPixels = []; + } +}) +function deletePixel(x,y) { + // remove pixelMap[x][y] from currentPixels + currentPixels.splice(currentPixels.indexOf(pixelMap[x][y]),1); + if(UFOs.includes(pixelMap[x][y])){ + UFOs.splice(UFOs.indexOf(pixelMap[x][y]),1) + } + if (pixelMap[x][y]) {pixelMap[x][y].del = true;} + delete pixelMap[x][y]; +} +setInterval(function(){ + for(var i = 0; i < currentPixels.length; i++){ + for(var ii = 0; ii < UFOs.length; ii++){ + if(beamPixels.includes(currentPixels[i]) && currentPixels[i].x != UFOs[ii].x && !keysDown.x){ + beamPixels.splice(beamPixels.indexOf(currentPixels[i]), 1); + currentPixels[i].drag = false; + } + else if (currentPixels[i].x != UFOs[ii].x && beamPixels.includes(currentPixels[i])){ + (currentPixels[i].x > UFOs[ii].x) ? null : null; + } + } + if(currentPixels[i].drag && !beamPixels.includes(currentPixels[i])){ + if(draggingPixels && !draggingPixels.includes(currentPixels[i])){ + if(!magnetElems.includes(currentPixels[i])){ + currentPixels.drag = false; + } + } else if(!draggingPixels){ + if(!magnetElems.includes(currentPixels[i])){ + currentPixels[i].drag = false; + } + } else if (draggingPixels && draggingPixels.includes(currentPixels[i])){ + continue; + } + } + } +}, 1000/tps) runAfterLoad(function(){ document.body.insertAdjacentHTML("beforeend",` these are all properties of the pixel. another way to find pixel properties is using debug on a pixel, it will tell you the property and the value, like x and y, or, in plants.js, fruit. @@ -1450,15 +1653,15 @@ runAfterLoad(function(){ - p.tick + p.tick the amount of ticks that have happened so far in the game. - `) - // document.getElementById("extraInfo").innerHTML = ` - // Changelog(NEW)FeedbackWikiRedditDiscord • Install OfflineVariables

v1.9.3 • 559 elements, with 0 hidden.

©2021-2024. All Rights Reserved.

- // ` +

Paste function code for the prop machine in the text area below, typing doesnt work well.

+ + + `); }); diff --git a/mods/purple_guys_mod.js b/mods/purple_guys_mod.js index 78f4257f..d9550cc1 100644 --- a/mods/purple_guys_mod.js +++ b/mods/purple_guys_mod.js @@ -40,6 +40,55 @@ elements.ultra_bomb = { cooldown: defaultCooldown } +elements.bomb_of_despair = { + color: ["#000000", "#ff0000"], + behavior: [ + "XX|EX:501>plasma3|XX", + "XX|XX|XX", + "M2|M1 AND EX:501>plasma3|M2", + ], + category: "Purple Guy's Mod", + state: "solid", + density: 1300, + excludeRandom: true, + cooldown: defaultCooldown +} + +elements.galaxy_level_bomb = { + color: ["#dfadff", "#699ddb", "#4f76a6", "#8a6b9d", "#94a7bd", "#a47fbb"], + behavior: [ + "XX|EX:600>plasma4|XX", + "XX|XX|XX", + "M2|M1 AND EX:600>plasma4|M2", + ], + category: "Purple Guy's Mod", + state: "solid", + density: 1300, + excludeRandom: true, + cooldown: defaultCooldown +} + +elements.RDX = { + color: "#c92a2a", + behavior: behaviors.WALL, + behaviorOn: [ + "XX|XX|XX", + "XX|EX:15|XX", + "XX|XX|XX", + ], + conduct: 1, + category: "Purple Guy's Mod", + burn: 100, + burnTime: 1, + burnInto: "explosion", + tempHigh: 600, + stateHigh: "explosion", + state: "solid", + density: 1630, + excludeRandom: true, + alias: "Cyclotrimethylenetrinitramine" +}, + elements.ice_cream_bomb = { color: "#ffffff", behavior: [ @@ -71,6 +120,22 @@ elements.wet_dirty_sand = { density: 2822 } +elements.rocky_dirty_sand = { + color: ["#a35222", "#a15122", "#7e3f1a", "#f4ba9a", "#fed3ba", "#f2b796", "#939393", "#c4c4c4", "#777777"], + behavior: behaviors.POWDER, + category: "Purple Guy's Mod", + state: "solid", + density: 4502 +} + +elements.wet_rocky_dirty_sand = { + color: ["#a35222", "#a15122", "#7e3f1a", "#f4ba9a", "#fed3ba", "#f2b796", "#939393", "#c4c4c4", "#777777"], + behavior: behaviors.POWDER, + category: "Purple Guy's Mod", + state: "liquid", + density: 4502 +} + elements.reverse_gravity_liquid = { color: "#cdd7e2", behavior: behaviors.AGLIQUID , @@ -92,6 +157,88 @@ elements.reverse_soda = { density: 1030 } +elements.really_really_fizzy_soda = { + color: ["#5f2706", "#48230d", "#52250a"], + behavior: behaviors.LIQUID , behavior: [ + "XX|CR:foam%500|XX", + "M2|M1|M2", + "M2|XX|M2" + ], + + category: "Purple Guy's Mod", + state: "liquid", + density: 1030 +} + +elements.orange_soda = { + color: ["#ff8f49", "#ff721b", "#e06519"], + behavior: behaviors.LIQUID , behavior: [ + "XX|CR:foam%2.5|XX", + "M2|M1|M2", + "M2|XX|M2" + ], + + category: "Purple Guy's Mod", + state: "liquid", + density: 1030 +} + +elements.gasoline = { + color: ["#734216", "#964600", "#735032"], + behavior: behaviors.LIQUID, + tick: function(pixel) { + if (!pixel.burning && pixel.temp > 90 && Math.random() < 0.001) { + if (pixel.temp < 150) { changePixel(pixel,"propane") } + else if (pixel.temp < 300) { changePixel(pixel,"molten_plastic") } + else { changePixel(pixel,"lamp_oil") } + } + }, + reactions: { + "dirt": { elem1:null, elem2:"mud" }, + "sand": { elem1:null, elem2:"wet_sand" }, + "sulfur": { elem1:null, elem2:"greek_fire" }, + "molten_sulfur": { elem1:"greek_fire", elem2:"greek_fire" }, + }, + category: "Purple Guy's Mod", + tempHigh: 280, + stateHigh: "fire", + burn: 70, + burnTime: 300, + burnInto: ["carbon_dioxide","fire"], + viscosity: 250, + state: "liquid", + density: 720, + stain: 0.05, + alias: "Oil/Petrolium" +}, + +elements.dark_soda = { + color: "#56589f", + behavior: behaviors.LIQUID , behavior: [ + "XX|CR:foam%20|XX", + "M2|M1|M2", + "M2|XX|M2" + ], + + category: "Purple Guy's Mod", + state: "liquid", + density: 1030 +} + +elements.sb_soda = { + color: ["#000000", "#ffff00", "#3a3a3a", "#ff0000"], + behavior: behaviors.LIQUID , behavior: [ + "XX|CR:foam%0.56|XX", + "M2|M1|M2", + "M2|XX|M2" + ], + + category: "Purple Guy's Mod", + state: "liquid", + density: 1030 +} + + elements.negatively_dense_liquid = { color: "#94ffd1", behavior: behaviors.LIQUID , @@ -109,6 +256,24 @@ elements.plasma2 = { temp:500000 } +elements.plasma3 = { + color: "#9dc6e3", + behavior: behaviors.DGAS , + category: "Purple Guy's Mod", + state: "gas", + density: 50010, + temp:200000000 +} + +elements.plasma4 = { + color: "#9de4e3", + behavior: behaviors.DGAS , + category: "Purple Guy's Mod", + state: "gas", + density: 50050, + temp:50000000000 +} + elements.negative_fire = { color: ["#a6bfc4", "#6bd2e4", "#b8dee4", "#32cae4"], behavior: behaviors.DGAS , @@ -152,13 +317,585 @@ elements.unreinforced_wall = { elements.reinforced_liquid_wall = { color: "#ffff01", - behavior: behaviors.WALL, + behavior: behaviors.LIQUID, category: "Purple Guy's Mod", state: "liquid", density: 1300, hardness:10^81 } +elements.how_did_we_get_here = { + color: "#ffffff", + behavior: [behaviors.LIQUID, behaviors.AGLIQUID], + category: "Purple Guy's Mod", + state: "liquid", + density: 1300, + hardness:10^83 +} + +elements.gullibullium = { + color: ["#70bc7a", "#70bb79", "#7cac81"], + behavior: behaviors.WALL, + category: "Purple Guy's Mod", + state: "solid", + density: 1300, + hardness:0.8, + tempHigh: 12500 + +} + +elements.reinforced_gullibullium = { + color: ["#f0bc7a", "#f0bb79", "#fcac81"], + behavior: behaviors.WALL, + category: "Purple Guy's Mod", + state: "solid", + density: 1300, + hardness:0.95 +} + +elements.boba_pearls = { + color: "#3b0a57", + behavior: behaviors.POWDER, + category: "Purple Guy's Boba", + state: "solid", + density: 54678900, + hardness:0.95 +} + +elements.vanilla_boba = { + color: "#fff0dd", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.mango_boba = { + color: "#ffc77d", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.matcha_boba = { + color: "#58d168", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.banana_boba = { + color: "#ffe1a1", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.satans_boba = { + color: "#852d2d", + behavior: behaviors.MOLTEN, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.peach_boba = { + color: "#ffbe73", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.strawberry_boba = { + color: "#e27c7c", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.mint_boba = { + color: "#8cff9b", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.mint_vanilla_boba = { + color: "#c8ffcf", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.classic_boba = { + color: "#ffffff", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.taro_boba = { + color: "#f1c8ff", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.thai_tea_boba = { + color: "#ffc98c", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.jasmine_green_tea_boba = { + color: "#d8ffc7", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.honeydew_boba = { + color: "#9eff98", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.rose_boba = { + color: "#ffe6e6", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.lavender_boba = { + color: "#efbfff", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.lychee_boba = { + color: "#fff1bf", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.passion_fruit_boba = { + color: "#ffb942", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.pineapple_boba = { + color: "#ffe742", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.blueberry_boba = { + color: "#272a98", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.raspberry_boba = { + color: "#ff3333", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.coconut_boba = { + color: "#f1f1f1", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.almond_boba = { + color: "#e4daa9", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.hazelnut_boba = { + color: "#fbf4d4", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.caramel_boba = { + color: "#e4ab32", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.chocolate_boba = { + color: "#6f4b00", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.coffee_boba = { + color: "#866625", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.guava_boba = { + color: "#ff390a", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.kiwi_boba = { + color: "#09de0f", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.papaya_boba = { + color: "#c4ce37", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.black_sesame_boba = { + color: "#6e89a9", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.pandan_boba = { + color: "#33d460", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 1300, + hardness:0.25 +} + +elements.wasters_personal_boba = { + color: ["#5ee082", "#4eb96c", "#5bda7f", "#79c38e", "#e9eeea"], + behavior: behaviors.LIQUID , behavior: [ + "XX|CR:radiation%4|XX", + "M2|M1|M2", + "M2|XX|M2" + ], + category: "Purple Guy's Boba", + state: "liquid", + density: 1500, + hardness:0.25 +} + +elements.when_yous_personal_boba = { + color: ["#5ee082", "#4eb96c", "#5bda7f", "#79c38e", "#00d03a"], + behavior: behaviors.LIQUID , behavior: [ + "XX|CR:radiation%12|XX", + "M2|M1|M2", + "M2|XX|M2" + ], + category: "Purple Guy's Boba", + state: "liquid", + density: 1600, + hardness:0.25 +} + +elements.nousernamefounds_gallium_boba = { + color: ["#b1b1b1", "#bfbfbf", "#9e9e9e"], + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 5100, + hardness:0.25 +} + +elements.bartender_twix_hartwell_whites_bday_cake_boba = { + color: "#e6dbe4", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 2000, + hardness:0.25 +} + +elements.sb_boba = { + color: ["#000000", "#ffff00", "#3a3a3a", "#ff0000"], + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 2000, + hardness:0.25 +} + +elements.sethies_red_boba = { + color: "#ff8282", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 2000, + hardness:0.25 +} + +elements.sethies_blue_boba = { + color: "#82c0ff", + behavior: behaviors.LIQUID, + category: "Purple Guy's Boba", + state: "liquid", + density: 2010, + hardness:0.25 +} + +elements.when_you_bomb = { + color: "#ff0000", + behavior: [ + "XX|EX:40>when_you_particles|XX", + "XX|XX|XX", + "M2|M1 AND EX:40>when_you_particles|M2", + ], + category: "Purple Guy's Mod", + state: "solid", + density: 1300, + excludeRandom: true, + cooldown: defaultCooldown +} + +elements.nuclear_firework = { + color: "#62b06c", + tick: function(pixel) { + if ((pixel.temp > 1000 || pixel.charge) && !pixel.burning) { + pixel.burning = true; + pixel.burnStart = pixelTicks; + } + if (pixel.burning) { + if (!tryMove(pixel, pixel.x, pixel.y-1)) { + tryMove(pixel, pixel.x+(Math.random() < 0.5 ? -1 : 1), pixel.y-1); + } + if (pixelTicks-pixel.burnStart > 50 && Math.random() < 0.1) { + explodeAt(pixel.x, pixel.y, 10, ["radiation", "fw_ember"]); + } + } + else { + if (!tryMove(pixel, pixel.x, pixel.y+1)) { + tryMove(pixel, pixel.x+(Math.random() < 0.5 ? -1 : 1), pixel.y+1); + } + } + doDefaults(pixel); + }, + burn: 90, + burnTime: 100, + density: 2000, + conduct: 1, + state: "solid", + category: "Purple Guy's Mod" +}, + +elements.whenyouium = { + color: ["#ff0000", "#dc0000", "#b60000", "#ec2c2c"], + behavior: behaviors.WALL, + category: "Purple Guy's Mod", + state: "solid", + density: 2000, + hardness:1.01 +} + +elements.when_you_particles = { + color: ["#ff0000", "#dc0000", "#b60000", "#ec2c2c"], + behavior: behaviors.DGAS, + category: "Purple Guy's Mod", + state: "gas", + density: 2000, + hardness:0.98, + hidden: true, + temp: 500000000000000 +} + +elements.wekk = { color: ["#927659","#81644B","#685843","#685135","#644F3A"], + behavior: behaviors.SUPPORTPOWDER, + reactions: { + "fly": { elem2:"dead_bug", chance:0.25, oneway:true }, + "firefly": { elem2:"dead_bug", chance:0.2, oneway:true }, + "stink_bug": { elem2:"dead_bug", chance:0.15, oneway:true }, + "bee": { elem2:"dead_bug", chance:0.1, oneway:true }, + "bird": { elem2:"feather", chance:0.025, oneway:true }, + "egg": { elem2:"yolk", oneway:true }, + "bone": { elem2:"oil", tempMin:300, chance:0.005, oneway:true }, + "dead_plant": { elem2:"charcoal", tempMin:200, chance:0.005, oneway:true }, + "charcoal": { elem2:"diamond", tempMin:800, tempMax:900, chance:0.005, oneway:true }, +}, + tempHigh: 540, + stateHigh: "magma", + category: "Purple Guy's Mod", + state: "solid", + density: 1302.5, + hardness: 0.2, + breakInto: "gravel" +} + +elements.water_but_it_stays_liquid = { + color: "#2167ff", + behavior: behaviors.LIQUID, + category: "Purple Guy's Mod", + heatCapacity: 1234213423423423, + reactions: { + "dirt": { + elem1: null, + elem2: "mud", + }, + "sand": { elem1: null, elem2: "wet_sand" }, + "clay_soil": { elem1: null, elem2: "clay" }, + "salt": { elem1: "salt_water", elem2: null, temp1:-20 }, + "sugar": { elem1: "sugar_water", elem2: null }, + "honey": { elem1: "sugar_water" }, + "caramel": { elem1: "sugar_water" }, + "molasses": { elem1: "sugar_water" }, + "dust": { elem1: "dirty_water", elem2: null }, + "ash": { elem1: "dirty_water", elem2: null }, + "cyanide": { elem1: "dirty_water", elem2: null }, + "cyanide_gas": { elem1: "dirty_water", elem2: null }, + "carbon_dioxide": { elem1: "seltzer", elem2: null, oneway:true }, + "sulfur": { elem1: "dirty_water", elem2: null }, + "rat": { elem1: "dirty_water", chance:0.005 }, + "plague": { elem1: "dirty_water", elem2: null }, + "rust": { elem1: "dirty_water", chance:0.005 }, + "lead": { elem1: "dirty_water", chance:0.005 }, + "solder": { elem1: "dirty_water", chance:0.005 }, + "fallout": { elem1: "dirty_water", chance:0.25 }, + "radiation": { elem1: "dirty_water", chance:0.25 }, + "uranium": { elem1: "dirty_water", chance:0.25 }, + "rotten_meat": { elem1: "dirty_water", chance:0.25 }, + "rotten_cheese": { elem1: "dirty_water", chance:0.25 }, + "cancer": { elem1: "dirty_water", chance:0.25 }, + "oil": { elem1: "dirty_water", chance:0.005 }, + "dioxin": { elem1: "dirty_water", chance:0.1 }, + "quicklime": { elem1: "slaked_lime", elem2: "slaked_lime", temp2:100, temp1:100, chance:0.05 }, + "rock": { elem2: "wet_sand", chance: 0.00035 }, + "limestone": { elem2: "wet_sand", chance: 0.00035 }, + "tuff": { elem2: "wet_sand", color2:"#7a6b5c", chance: 0.00035 }, + "ruins": { elem2: "rock", chance: 0.00035 }, + "mudstone": { elem2: "mud", chance: 0.00035 }, + "methane": { elem1:"primordial_soup", elem2:"primordial_soup", tempMin:60, charged:true }, + "ammonia": { elem1:"primordial_soup", elem2:"primordial_soup", tempMin:60, charged:true }, + "fly": { elem2:"dead_bug", chance:0.1, oneway:true }, + "firefly": { elem2:"dead_bug", chance:0.1, oneway:true }, + "bee": { elem2:"dead_bug", chance:0.05, oneway:true }, + "stink_bug": { elem2:"dead_bug", chance:0.1, oneway:true }, + "cured_meat": { elem1:"salt_water", elem2:"meat" }, + // electrolysis: + "aluminum": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.0025 }, + "zinc": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.015 }, + "steel": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.0125 }, + "iron": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.0125 }, + "tin": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.01 }, + "brass": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.001 }, + "bronze": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.001 }, + "copper": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.0075 }, + "silver": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.0075 }, + "gold": { elem1:["hydrogen","hydrogen","oxygen"], charged:true, chance:0.0075 }, + }, + state: "liquid", + density: 997, + conduct: 0.02, + stain: -0.5, + extinguish: true +} + +elements.blue_uranium = { + color: ["#4ba5ff","#71a8de","#b4c7da","#3e6892","#6da4da","#9dc1e6"], + behavior: [ + "XX|CR:radiation%20|XX", + "CR:radiation%1|CH:lead%0.001|CR:radiation%20", + "M2|M1|M2", + ], + reactions: { + "neutron": { elem1:"n_explosion", tempMin:500, chance:0.1 } + }, + tempHigh: 1132.2, + category: "Purple Guy's Mod", + state: "solid", + density: 19100, + hardness: 0.6, + conduct: 0.235, + excludeRandom: true +} + + + if (!elements.sand.reactions) { elements.sand.reactions = {} } elements.sand.reactions.dirt = { elem1:"dirty_sand", elem2:"dirty_sand" } @@ -170,4 +907,33 @@ if (!elements.soda.reactions) { elements.soda.reactions = {} } elements.soda.reactions.reverse_gravity_liquid = { elem1:"reverse_soda", elem2:"reverse_soda" } if (!elements.wall.reactions) { elements.wall.reactions = {} } -elements.wall.reactions.plasma2 = { elem1:"plasma2", elem2:"plasma2" } \ No newline at end of file +elements.wall.reactions.plasma2 = { elem1:"plasma2", elem2:"plasma2" } + +if (!elements.dirty_sand.reactions) { elements.dirty_sand.reactions = {} } +elements.dirty_sand.reactions.gravel = { elem1:"rocky_dirty_sand", elem2:"rocky_dirty_sand" } + +if (!elements.rocky_dirty_sand.reactions) { elements.rocky_dirty_sand.reactions = {} } +elements.rocky_dirty_sand.reactions.water = { elem1:"wet_rocky_dirty_sand", elem2:"wet_rocky_dirty_sand" } + +if (!elements.poison.reactions) { elements.poison.reactions = {} } +elements.poison.reactions.antidote = { elem1:"how_did_we_get_here", elem2:"how_did_we_get_here" } + +if (!elements.molten_steel.reactions) { elements.molten_steel.reactions = {} } +elements.molten_steel.reactions.gullibullium = { elem1:"reinforced_gullibullium", elem2:"reinforced_gullibullium" } + +if (!elements.wall.reactions) { elements.wall.reactions = {} } +elements.wall.reactions.plasma3 = { elem1:"plasma3", elem2:"plasma3" } + +if (!elements.wall.reactions) { elements.wall.reactions = {} } +elements.wall.reactions.plasma4 = { elem1:"plasma4", elem2:"plasma4" } + +if (!elements.reinforced_wall.reactions) { elements.reinforced_wall.reactions = {} } +elements.reinforced_wall.reactions.plasma3 = { elem1:"plasma3", elem2:"plasma3" } + +if (!elements.reinforced_wall.reactions) { elements.reinforced_wall.reactions = {} } +elements.reinforced_wall.reactions.plasma4 = { elem1:"plasma4", elem2:"plasma4" } + +if (!elements.whenyouium.reactions) { elements.whenyouium.reactions = {} } +elements.whenyouium.reactions.when_you_particles = { elem1:"when_you_particles", elem2:"when_you_particles" } + +// important colors: ["#000000", "#edff00", "#3a3a3a", "#ff0000"], ["#82c0ff", "#ff8282"], \ No newline at end of file diff --git a/mods/selective_paint.js b/mods/selective_paint.js index 5cce2a37..822ff9bc 100644 --- a/mods/selective_paint.js +++ b/mods/selective_paint.js @@ -28,3 +28,33 @@ elements.selective_paint = { excludeRandom:true, desc: "Use on selected pixels to change their color." } +selectivePaintElem2 = "" +elements.exclusive_paint = { + color: ["#c27070","#c29c70","#c2c270","#70c270","#70c2c2","#7070c2","#c270c2"], + onSelect: function() { + var answer2 = prompt("Please input the desired element not to paint. It will not work if you enter multiple elements types while paused.",(selectivePaintElem2||undefined)); + if (!answer2) { return } + selectivePaintElem2 = mostSimilarElement(answer2); + }, + tool: function(pixel) { + if (pixel.element != selectivePaintElem2) { + if (!shiftDown) { + pixel.color = pixelColorPick(pixel,currentColor) + } + else { + // convert the hex of currentColor to rgb and set it as a string + var rgb = currentColor.replace("#","").match(/.{1,2}/g); + for (var i = 0; i < rgb.length; i++) { + rgb[i] = parseInt(rgb[i],16); + } + pixel.color = "rgb(" + rgb.join(",") + ")" + } + delete pixel.origColor; + } + }, + customColor: true, + category: "tools", + canPlace: false, + excludeRandom:true, + desc: "Used to paint pixels other than the one selected." +}