diff --git a/mods/nekonicos_stuff.js b/mods/nekonicos_stuff.js index 4b28ec1f..70169cd6 100644 --- a/mods/nekonicos_stuff.js +++ b/mods/nekonicos_stuff.js @@ -5,38 +5,6 @@ behaviors.SOLIDIFY = function(pixel) { var colorOne = "#ffffff" var colorTwo = "#000000" -viewInfo[8] = { // Neon View - name: "neon", - pixel: function(pixel,ctx) { - if (elements[pixel.element].isColor === true) { - var color = pixel.gradient; - if (color < 0) {color = 0} - if (color > 60) {color = 60} - // logarithmic scale, with coldest being 225 (-50 degrees) and hottest being 0 (6000 degrees) - var hue = Math.round(225 - (Math.log(color)/Math.log(60))*225); - if (hue < 0) {hue = 0} - if (hue > 225) {hue = 225} - drawSquare(ctx,"hsl("+hue+",50%,50%)",pixel.x,pixel.y) - } - } -} - -elements.red = { - color: "#AD1300", - behavior: [ - "XX|XX|XX", - "XX|XX|XX", - "XX|XX|XX", - ], - tool: function(pixel) { - if (elements[pixel.element].isColor == true) { - pixel.gradient += 1 - } - }, - canPlace: false, - category: "tools", -} - elements.colorOne = { tick: function(pixel) { if (pixel.color != colorOne) { @@ -281,6 +249,16 @@ elements.red_ice = { "XX|M1|XX", ], reactions: { + "rain_cloud": { elem2: "red_rain", chance:0.4 }, + "cloud": { elem2: "red_cloud", chance:0.4, chance:0.4 }, + "snow_cloud": { elem2: "red_snow_cloud", chance:0.4 }, + "frozen_plant":{elem2:"red_ice_plant", chance:0.025}, + "dead_plant":{elem2:"red_plant", chance:0.025}, + "salt_ice":{elem2:"red_ice", chance:0.25}, + "sugar_ice":{elem2:"red_ice", chance:0.25}, + "juice_ice":{elem2:"red_ice", chance:0.25}, + "dirty_ice":{elem2:"red_ice", chance:0.25}, + "ice":{elem2:"red_ice", chance:0.25}, "water":{elem2:"red_ice", chance:0.25}, "steam":{elem2:"red_ice", chance:0.15}, "blood":{elem2:"red_ice", chance:0.25}, @@ -310,6 +288,7 @@ elements.red_ice = { "frog":{elem2:"red_ice_meat", chance:0.15}, "tadpole":{elem2:"red_ice_meat", chance:0.15}, }, + breakInto: "red_snow", tempLow: 0, stateLow: "red_water", category: "solids", @@ -317,14 +296,132 @@ elements.red_ice = { density: 917, } +elements.red_snow = { + color: "#D64765", + behavior: behaviors.POWDER, + reactions: { + "rain_cloud": { elem2: "red_rain", chance:0.4 }, + "cloud": { elem2: "red_cloud", chance:0.4, chance:0.4 }, + "snow_cloud": { elem2: "red_snow_cloud", chance:0.4 }, + "frozen_plant":{elem2:"red_ice_plant", chance:0.025}, + "dead_plant":{elem2:"red_plant", chance:0.025}, + "salt_ice":{elem2:"red_ice", chance:0.25}, + "sugar_ice":{elem2:"red_ice", chance:0.25}, + "juice_ice":{elem2:"red_ice", chance:0.25}, + "dirty_ice":{elem2:"red_ice", chance:0.25}, + "ice":{elem2:"red_ice", chance:0.25}, + "water":{elem2:"red_ice", chance:0.25}, + "steam":{elem2:"red_ice", chance:0.15}, + "blood":{elem2:"red_ice", chance:0.25}, + "blood_ice":{elem2:"red_ice", chance:0.25}, + "antibody":{elem2:"red_ice", chance:0.25}, + "salt_water":{elem2:"red_ice", chance:0.25}, + "sugar_water":{elem2:"red_ice", chance:0.25}, + "dirty_water":{elem2:"red_ice", chance:0.25}, + "pool_water":{elem2:"red_ice", chance:0.25}, + "slush":{elem2:"red_ice", chance:0.25}, + "seltzer":{elem2:"red_ice", chance:0.25}, + "juice":{elem2:"red_ice", chance:0.25}, + "soda":{elem2:"red_ice", chance:0.25}, + "milk":{elem2:"red_ice", chance:0.25}, + "slime":{elem2:"red_ice", chance:0.25}, + "tea":{elem2:"red_ice", chance:0.25}, + "coffee":{elem2:"red_ice", chance:0.25}, + "neutral_acid":{elem2:"red_ice", chance:0.25}, + "infection":{elem2:"red_ice", chance:0.25}, + "meat":{elem2:"red_ice_meat", chance:0.15}, + "skin":{elem2:"red_ice_meat", chance:0.075}, + "body":{elem2:"red_ice_meat", chance:0.04}, + "head":{elem2:"red_ice_meat", chance:0.05}, + "frozen_meat":{elem2:"red_ice_meat", chance:0.15}, + "fish":{elem2:"red_ice_meat", chance:0.15}, + "bird":{elem2:"red_ice_meat", chance:0.15}, + "frog":{elem2:"red_ice_meat", chance:0.15}, + "tadpole":{elem2:"red_ice_meat", chance:0.15}, + }, + temp: 5, + tempLow: -18, + tempHigh: 100, + stateHigh: "packed_red_snow", + stateLow: "red_water", + category: "land", + state: "solid", + density: 100 +} + +elements.packed_red_snow = { + color: "#CC3F5F", + behavior: behaviors.SUPPORTPOWDER, + reactions: { + "rain_cloud": { elem2: "red_rain", chance:0.4 }, + "cloud": { elem2: "red_cloud", chance:0.4, chance:0.4 }, + "snow_cloud": { elem2: "red_snow_cloud", chance:0.4 }, + "frozen_plant":{elem2:"red_ice_plant", chance:0.025}, + "dead_plant":{elem2:"red_plant", chance:0.025}, + "salt_ice":{elem2:"red_ice", chance:0.25}, + "sugar_ice":{elem2:"red_ice", chance:0.25}, + "juice_ice":{elem2:"red_ice", chance:0.25}, + "dirty_ice":{elem2:"red_ice", chance:0.25}, + "ice":{elem2:"red_ice", chance:0.25}, + "water":{elem2:"red_ice", chance:0.25}, + "steam":{elem2:"red_ice", chance:0.15}, + "blood":{elem2:"red_ice", chance:0.25}, + "blood_ice":{elem2:"red_ice", chance:0.25}, + "antibody":{elem2:"red_ice", chance:0.25}, + "salt_water":{elem2:"red_ice", chance:0.25}, + "sugar_water":{elem2:"red_ice", chance:0.25}, + "dirty_water":{elem2:"red_ice", chance:0.25}, + "pool_water":{elem2:"red_ice", chance:0.25}, + "slush":{elem2:"red_ice", chance:0.25}, + "seltzer":{elem2:"red_ice", chance:0.25}, + "juice":{elem2:"red_ice", chance:0.25}, + "soda":{elem2:"red_ice", chance:0.25}, + "milk":{elem2:"red_ice", chance:0.25}, + "slime":{elem2:"red_ice", chance:0.25}, + "tea":{elem2:"red_ice", chance:0.25}, + "coffee":{elem2:"red_ice", chance:0.25}, + "neutral_acid":{elem2:"red_ice", chance:0.25}, + "infection":{elem2:"red_ice", chance:0.25}, + "meat":{elem2:"red_ice_meat", chance:0.15}, + "skin":{elem2:"red_ice_meat", chance:0.075}, + "body":{elem2:"red_ice_meat", chance:0.04}, + "head":{elem2:"red_ice_meat", chance:0.05}, + "frozen_meat":{elem2:"red_ice_meat", chance:0.15}, + "fish":{elem2:"red_ice_meat", chance:0.15}, + "bird":{elem2:"red_ice_meat", chance:0.15}, + "frog":{elem2:"red_ice_meat", chance:0.15}, + "tadpole":{elem2:"red_ice_meat", chance:0.15}, + }, + temp: 5, + tempLow: -20, + tempHigh: 200, + stateHigh: "red_ice", + stateLow: "red_water", + breakInto: "red_snow", + category: "land", + state: "solid", + density: 400, + hidden: true +} + elements.red_ice_meat = { color: "#AC3536", behavior: [ - "XX|XX|XX", - "XX|XX|XX", - "XX|M1|XX", + "XX|CH:frozen_meat,meat>red_ice_meat%1|XX", + "CH:frozen_meat,meat>red_ice_meat%1|XX|CH:frozen_meat,meat>red_ice_meat%1", + "XX|M1 AND CH:frozen_meat,meat>red_ice_meat%1|XX", ], reactions: { + "rain_cloud": { elem2: "red_rain", chance:0.4 }, + "cloud": { elem2: "red_cloud", chance:0.4, chance:0.4 }, + "snow_cloud": { elem2: "red_snow_cloud", chance:0.4 }, + "frozen_plant":{elem2:"red_ice_plant", chance:0.025}, + "dead_plant":{elem2:"red_plant", chance:0.025}, + "salt_ice":{elem2:"red_ice", chance:0.25}, + "sugar_ice":{elem2:"red_ice", chance:0.25}, + "juice_ice":{elem2:"red_ice", chance:0.25}, + "dirty_ice":{elem2:"red_ice", chance:0.25}, + "ice":{elem2:"red_ice", chance:0.25}, "water":{elem2:"red_ice", chance:0.025}, "steam":{elem2:"red_ice", chance:0.015}, "blood":{elem2:"red_ice", chance:0.025}, @@ -354,8 +451,8 @@ elements.red_ice_meat = { "frog":{elem2:"red_ice_meat", chance:0.015}, "tadpole":{elem2:"red_ice_meat", chance:0.015}, }, - tempHigh: 0, - stateHigh: "meat", + tempLow: -100, + stateLow: "meat", category:"food", hidden:true, state: "solid", @@ -363,10 +460,131 @@ elements.red_ice_meat = { isFood: true } +elements.red_ice_plant = { + color: "#735958", + reactions: { + "rain_cloud": { elem2: "red_rain", chance:0.4 }, + "cloud": { elem2: "red_cloud", chance:0.4, chance:0.4 }, + "snow_cloud": { elem2: "red_snow_cloud", chance:0.4 }, + "frozen_plant":{elem2:"red_ice_plant", chance:0.025}, + "dead_plant":{elem2:"red_plant", chance:0.025}, + "salt_ice":{elem2:"red_ice", chance:0.25}, + "sugar_ice":{elem2:"red_ice", chance:0.25}, + "juice_ice":{elem2:"red_ice", chance:0.25}, + "dirty_ice":{elem2:"red_ice", chance:0.25}, + "ice":{elem2:"red_ice", chance:0.25}, + "water":{elem2:"red_ice", chance:0.025}, + "steam":{elem2:"red_ice", chance:0.015}, + "blood":{elem2:"red_ice", chance:0.025}, + "blood_ice":{elem2:"red_ice", chance:0.25}, + "antibody":{elem2:"red_ice", chance:0.025}, + "salt_water":{elem2:"red_ice", chance:0.025}, + "sugar_water":{elem2:"red_ice", chance:0.025}, + "dirty_water":{elem2:"red_ice", chance:0.025}, + "pool_water":{elem2:"red_ice", chance:0.025}, + "slush":{elem2:"red_ice", chance:0.025}, + "seltzer":{elem2:"red_ice", chance:0.025}, + "juice":{elem2:"red_ice", chance:0.025}, + "soda":{elem2:"red_ice", chance:0.025}, + "milk":{elem2:"red_ice", chance:0.025}, + "slime":{elem2:"red_ice", chance:0.025}, + "tea":{elem2:"red_ice", chance:0.025}, + "coffee":{elem2:"red_ice", chance:0.025}, + "neutral_acid":{elem2:"red_ice", chance:0.025}, + "infection":{elem2:"red_ice", chance:0.025}, + "meat":{elem2:"red_ice_meat", chance:0.015}, + "skin":{elem2:"red_ice_meat", chance:0.0075}, + "body":{elem2:"red_ice_meat", chance:0.004}, + "head":{elem2:"red_ice_meat", chance:0.005}, + "frozen_meat":{elem2:"red_ice_meat", chance:0.015}, + "fish":{elem2:"red_ice_meat", chance:0.015}, + "bird":{elem2:"red_ice_meat", chance:0.015}, + "frog":{elem2:"red_ice_meat", chance:0.015}, + "tadpole":{elem2:"red_ice_meat", chance:0.015}, + }, + behavior: behaviors.WALL, + category:"life", + tempHigh: 300, + stateHigh: "fire", + burn:85, + burnTime:45, + temp: 2.66, + tempLow: -7, + stateLow: "red_plant", + state: "solid", + density: 1050, + hidden: true +} + +elements.red_plant = { + color: ["#AA3527","#AA3227","#AA2C27","#A11D1D"], + reactions: { + "rain_cloud": { elem2: "red_rain", chance:0.4 }, + "cloud": { elem2: "red_cloud", chance:0.4, chance:0.4 }, + "snow_cloud": { elem2: "red_snow_cloud", chance:0.4 }, + "frozen_plant":{elem2:"red_ice_plant", chance:0.025}, + "dead_plant":{elem2:"red_plant", chance:0.025}, + "salt_ice":{elem2:"red_ice", chance:0.25}, + "sugar_ice":{elem2:"red_ice", chance:0.25}, + "juice_ice":{elem2:"red_ice", chance:0.25}, + "dirty_ice":{elem2:"red_ice", chance:0.25}, + "ice":{elem2:"red_ice", chance:0.25}, + "water":{elem2:"red_ice", chance:0.025}, + "steam":{elem2:"red_ice", chance:0.015}, + "blood":{elem2:"red_ice", chance:0.025}, + "blood_ice":{elem2:"red_ice", chance:0.25}, + "antibody":{elem2:"red_ice", chance:0.025}, + "salt_water":{elem2:"red_ice", chance:0.025}, + "sugar_water":{elem2:"red_ice", chance:0.025}, + "dirty_water":{elem2:"red_ice", chance:0.025}, + "pool_water":{elem2:"red_ice", chance:0.025}, + "slush":{elem2:"red_ice", chance:0.025}, + "seltzer":{elem2:"red_ice", chance:0.025}, + "juice":{elem2:"red_ice", chance:0.025}, + "soda":{elem2:"red_ice", chance:0.025}, + "milk":{elem2:"red_ice", chance:0.025}, + "slime":{elem2:"red_ice", chance:0.025}, + "tea":{elem2:"red_ice", chance:0.025}, + "coffee":{elem2:"red_ice", chance:0.025}, + "neutral_acid":{elem2:"red_ice", chance:0.025}, + "infection":{elem2:"red_ice", chance:0.025}, + "meat":{elem2:"red_ice_meat", chance:0.015}, + "skin":{elem2:"red_ice_meat", chance:0.0075}, + "body":{elem2:"red_ice_meat", chance:0.004}, + "head":{elem2:"red_ice_meat", chance:0.005}, + "frozen_meat":{elem2:"red_ice_meat", chance:0.015}, + "fish":{elem2:"red_ice_meat", chance:0.015}, + "bird":{elem2:"red_ice_meat", chance:0.015}, + "frog":{elem2:"red_ice_meat", chance:0.015}, + "tadpole":{elem2:"red_ice_meat", chance:0.015}, + }, + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "M2|M1|M2", + ], + category:"life", + tempHigh: 2, + stateHigh: "red_ice_plant", + state: "solid", + density: 1050, + hidden: true +} + elements.red_water = { color: "#880808", behavior: behaviors.LIQUID, reactions: { + "rain_cloud": { elem2: "red_rain", chance:0.4 }, + "cloud": { elem2: "red_cloud", chance:0.4, chance:0.4 }, + "snow_cloud": { elem2: "red_snow_cloud", chance:0.4 }, + "frozen_plant":{elem2:"red_ice_plant", chance:0.025}, + "dead_plant":{elem2:"red_plant", chance:0.025}, + "salt_ice":{elem2:"red_ice", chance:0.25}, + "sugar_ice":{elem2:"red_ice", chance:0.25}, + "juice_ice":{elem2:"red_ice", chance:0.25}, + "dirty_ice":{elem2:"red_ice", chance:0.25}, + "ice":{elem2:"red_ice", chance:0.25}, "water":{elem2:"red_ice"}, "blood":{elem2:"red_ice"}, "blood_ice":{elem2:"red_ice", chance:0.25}, @@ -395,20 +613,37 @@ elements.red_water = { "frog":{elem2:"red_ice_meat", chance:0.015}, "tadpole":{elem2:"red_ice_meat", chance:0.015}, }, - temp: -20, - tempHigh: 0, - stateHigh: "red_ice", tempLow: -100, stateLow: "red_steam", + tempHigh: 0, + stateHigh: "red_ice", category: "liquids", state: "liquid", density: 997, + conduct: 0.02, + temp: -20, + stain: -0.5, + extinguish: true } elements.red_steam = { color: "#F88379", behavior: behaviors.GAS, reactions: { + "red_steam": { elem1: "red_cloud", elem2: "red_cloud", chance:0.05, "y":[0,15], "setting":"clouds" }, + "red_rain": { elem1: "red_rain", chance:0.4, "y":[0,12], "setting":"clouds" }, + "red_cloud": { elem1: "red_cloud", chance:0.4, "y":[0,12], "setting":"clouds" }, + "red_snow_cloud": { elem1: "red_rain_cloud", chance:0.4, "y":[0,12], "setting":"clouds" }, + "rain_cloud": { elem2: "red_rain", chance:0.4 }, + "cloud": { elem2: "red_cloud", chance:0.4, chance:0.4 }, + "snow_cloud": { elem2: "red_snow_cloud", chance:0.4 }, + "frozen_plant":{elem2:"red_ice_plant", chance:0.025}, + "dead_plant":{elem2:"red_plant", chance:0.025}, + "salt_ice":{elem2:"red_ice", chance:0.25}, + "sugar_ice":{elem2:"red_ice", chance:0.25}, + "juice_ice":{elem2:"red_ice", chance:0.25}, + "dirty_ice":{elem2:"red_ice", chance:0.25}, + "ice":{elem2:"red_ice", chance:0.25}, "water":{elem2:"red_ice"}, "blood":{elem2:"red_ice"}, "blood_ice":{elem2:"red_ice", chance:0.25}, @@ -445,6 +680,165 @@ elements.red_steam = { density: 0.6, } +elements.red_cloud = { + color: "#E8ABAB", + behavior: [ + "XX|XX|XX", + "XX|CO:1%5|M1%2.5 AND BO", + "XX|XX|XX", + ], + reactions: { + "red_rain": { elem1:"red_rain", temp1: 20 }, + "red_cloud": { elem1:"red_rain", elem2:"red_rain", temp1:20, temp2:20, charged:true }, + "rain_cloud": { elem2: "red_rain", chance:0.4 }, + "cloud": { elem2: "red_cloud", chance:0.4, chance:0.4 }, + "snow_cloud": { elem2: "red_snow_cloud", chance:0.4 }, + "frozen_plant":{elem2:"red_ice_plant", chance:0.025}, + "dead_plant":{elem2:"red_plant", chance:0.025}, + "water":{elem2:"red_ice"}, + "blood":{elem2:"red_ice"}, + "blood_ice":{elem2:"red_ice", chance:0.25}, + "antibody":{elem2:"red_ice"}, + "salt_water":{elem2:"red_ice"}, + "sugar_water":{elem2:"red_ice"}, + "dirty_water":{elem2:"red_ice"}, + "pool_water":{elem2:"red_ice"}, + "slush":{elem2:"red_ice"}, + "seltzer":{elem2:"red_ice"}, + "juice":{elem2:"red_ice"}, + "soda":{elem2:"red_ice"}, + "milk":{elem2:"red_ice"}, + "slime":{elem2:"red_ice"}, + "tea":{elem2:"red_ice"}, + "coffee":{elem2:"red_ice"}, + "neutral_acid":{elem2:"red_ice"}, + "infection":{elem2:"red_ice"}, + "meat":{elem2:"red_ice_meat", chance:0.015}, + "skin":{elem2:"red_ice_meat", chance:0.0075}, + "body":{elem2:"red_ice_meat", chance:0.004}, + "head":{elem2:"red_ice_meat", chance:0.005}, + "frozen_meat":{elem2:"red_ice_meat", chance:0.015}, + "fish":{elem2:"red_ice_meat", chance:0.015}, + "bird":{elem2:"red_ice_meat", chance:0.015}, + "frog":{elem2:"red_ice_meat", chance:0.015}, + "tadpole":{elem2:"red_ice_meat", chance:0.015}, + }, + category:"gases", + temp: -110, + tempHigh: -100, + stateHigh: "red_rain", + state: "gas", + breakInto: "red_rain", + density: 0.4, + ignoreAir: true, + conduct: 0.03 +} + +elements.red_rain = { + color: "#C27A79", + behavior: [ + "XX|XX|XX", + "XX|CH:red_water%0.05|M1%2.5 AND BO", + "CR:electric%0.05|CR:electric%0.05|CR:electric%0.05", + ], + reactions: { + "rain_cloud": { elem2: "red_rain", chance:0.4 }, + "cloud": { elem2: "red_cloud", chance:0.4, chance:0.4 }, + "snow_cloud": { elem2: "red_snow_cloud", chance:0.4 }, + "frozen_plant":{elem2:"red_ice_plant", chance:0.025}, + "dead_plant":{elem2:"red_plant", chance:0.025}, + "water":{elem2:"red_ice"}, + "blood":{elem2:"red_ice"}, + "blood_ice":{elem2:"red_ice", chance:0.25}, + "antibody":{elem2:"red_ice"}, + "salt_water":{elem2:"red_ice"}, + "sugar_water":{elem2:"red_ice"}, + "dirty_water":{elem2:"red_ice"}, + "pool_water":{elem2:"red_ice"}, + "slush":{elem2:"red_ice"}, + "seltzer":{elem2:"red_ice"}, + "juice":{elem2:"red_ice"}, + "soda":{elem2:"red_ice"}, + "milk":{elem2:"red_ice"}, + "slime":{elem2:"red_ice"}, + "tea":{elem2:"red_ice"}, + "coffee":{elem2:"red_ice"}, + "neutral_acid":{elem2:"red_ice"}, + "infection":{elem2:"red_ice"}, + "meat":{elem2:"red_ice_meat", chance:0.015}, + "skin":{elem2:"red_ice_meat", chance:0.0075}, + "body":{elem2:"red_ice_meat", chance:0.004}, + "head":{elem2:"red_ice_meat", chance:0.005}, + "frozen_meat":{elem2:"red_ice_meat", chance:0.015}, + "fish":{elem2:"red_ice_meat", chance:0.015}, + "bird":{elem2:"red_ice_meat", chance:0.015}, + "frog":{elem2:"red_ice_meat", chance:0.015}, + "tadpole":{elem2:"red_ice_meat", chance:0.015}, + }, + category:"gases", + temp: -70, + tempLow: -100, + stateLow: "red_cloud", + breakInto: "water", + tempHigh: 0, + stateHigh: "red_snow_cloud", + state: "gas", + density: 0.5, + ignoreAir: true, + conduct: 0.03 +} + +elements.red_snow_cloud = { + color: "#CC8482", + behavior: [ + "XX|XX|XX", + "XX|CH:red_snow%0.05|M1%2.5 AND BO", + "XX|XX|XX", + ], + category:"gases", + temp: 10, + tempLow: -30, + stateLow: "red_rain", + state: "gas", + density: 0.55, + ignoreAir: true, + conduct: 0.01, + reactions: { + "rain_cloud": { elem2: "red_rain", chance:0.4 }, + "cloud": { elem2: "red_cloud", chance:0.4, chance:0.4 }, + "snow_cloud": { elem2: "red_snow_cloud", chance:0.4 }, + "frozen_plant":{elem2:"red_ice_plant", chance:0.025}, + "dead_plant":{elem2:"red_plant", chance:0.025}, + "water":{elem2:"red_ice"}, + "blood":{elem2:"red_ice"}, + "blood_ice":{elem2:"red_ice", chance:0.25}, + "antibody":{elem2:"red_ice"}, + "salt_water":{elem2:"red_ice"}, + "sugar_water":{elem2:"red_ice"}, + "dirty_water":{elem2:"red_ice"}, + "pool_water":{elem2:"red_ice"}, + "slush":{elem2:"red_ice"}, + "seltzer":{elem2:"red_ice"}, + "juice":{elem2:"red_ice"}, + "soda":{elem2:"red_ice"}, + "milk":{elem2:"red_ice"}, + "slime":{elem2:"red_ice"}, + "tea":{elem2:"red_ice"}, + "coffee":{elem2:"red_ice"}, + "neutral_acid":{elem2:"red_ice"}, + "infection":{elem2:"red_ice"}, + "meat":{elem2:"red_ice_meat", chance:0.015}, + "skin":{elem2:"red_ice_meat", chance:0.0075}, + "body":{elem2:"red_ice_meat", chance:0.004}, + "head":{elem2:"red_ice_meat", chance:0.005}, + "frozen_meat":{elem2:"red_ice_meat", chance:0.015}, + "fish":{elem2:"red_ice_meat", chance:0.015}, + "bird":{elem2:"red_ice_meat", chance:0.015}, + "frog":{elem2:"red_ice_meat", chance:0.015}, + "tadpole":{elem2:"red_ice_meat", chance:0.015}, + }, +} + elements.graphite = { color: "#2F2F33", colorKey: { @@ -760,3 +1154,406 @@ elements.graphite_dust = { density: 1830, stain: 0.6 } + +scaleLimit = 0 + +elements.pixel_scale = { + color: "#89796C", + category: "machines", + behavior: behaviors.WALL, + tempHigh: 3000, + stateHigh: "molten_steel", + density: 7850, + movable: false, + onSelect: function() { + var answer1 = prompt("Input the desired pixel limit of this scale. It will not work if you place multiple limits while paused.",(scaleLimit||undefined)); + if (!answer1) { return } + scaleLimit = (answer1); + }, + tick: function(pixel){ + if (pixel.start === pixelTicks) { + pixel.scaleLimit = scaleLimit + } + if (isEmpty(pixel.x-1,pixel.y) || pixelMap[pixel.x-1][pixel.y].element !== pixel.element) { + pixel.scaleList = [] + for (let i = 1; i < width; i++){ + if (!isEmpty(pixel.x+i, pixel.y, true)) { + if (pixelMap[pixel.x+i][pixel.y].element === pixel.element){ + let distance2 = grabPixels(pixelMap[pixel.x+i][pixel.y]); + pixel.scaleList.push((distance2.top - 1)); + } + } + } + pixel.scaleSum = 0 + for (let i = 0; i < pixel.scaleList.length; i++){ + if (pixel.scaleList[i]){ + pixel.scaleSum += (pixel.scaleList[i]) + } + } + let distance = grabPixels(pixel); + pixel.scaleSum += (distance.top - 1) + if (pixel.scaleSum > (pixel.scaleLimit - 1)) { + if (!isEmpty(pixel.x, pixel.y-1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y-1] + doElectricity(hitPixel); + if (elements[hitPixel.element].conduct) { + hitPixel.charge = 0.5 + } + } + if (!isEmpty(pixel.x, pixel.y+1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y+1] + doElectricity(hitPixel); + if (elements[hitPixel.element].conduct) { + hitPixel.charge = 0.5 + } + } + if (!isEmpty(pixel.x-1, pixel.y, true)) { + var hitPixel = pixelMap[pixel.x-1][pixel.y] + doElectricity(hitPixel); + if (elements[hitPixel.element].conduct) { + hitPixel.charge = 0.5 + } + } + if (!isEmpty(pixel.x+1, pixel.y, true)) { + var hitPixel = pixelMap[pixel.x+1][pixel.y] + doElectricity(hitPixel); + if (elements[hitPixel.element].conduct) { + hitPixel.charge = 0.5 + } + } + } + } + } +} + +kiloLimit = 0 + +elements.weight_scale = { + color: "#7A7977", + category: "machines", + behavior: behaviors.WALL, + tempHigh: 3000, + stateHigh: "molten_steel", + movable: false, + onSelect: function() { + var answer1 = prompt("Input the desired kilogram limit of this scale. It will not work if you place multiple limits while paused.",(kiloLimit||1602)); + if (!answer1) { return } + kiloLimit = (answer1); + }, + tick: function(pixel){ + if (pixel.start === pixelTicks) { + pixel.scaleLimit = kiloLimit + } + if (isEmpty(pixel.x-1,pixel.y) || !outOfBounds(pixel.x-1,pixel.y) || pixelMap[pixel.x-1][pixel.y].element !== pixel.element) { + pixel.scaleList = [] + for (let i = 1; i < width; i++){ + if (!isEmpty(pixel.x+i, pixel.y, true)) { + if (pixelMap[pixel.x+i][pixel.y].element === pixel.element){ + let distance2 = grabWeights(pixelMap[pixel.x+i][pixel.y]); + pixel.scaleList.push((distance2.weight)); + } + } + } + pixel.scaleSum = 0 + for (let i = 0; i < pixel.scaleList.length; i++){ + if (pixel.scaleList[i]){ + pixel.scaleSum += (pixel.scaleList[i]) + } + } + let distance = grabWeights(pixel); + pixel.scaleSum += (distance.weight) + if (pixel.scaleSum > (pixel.scaleLimit - 1)) { + if (!isEmpty(pixel.x, pixel.y-1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y-1] + doElectricity(hitPixel); + if (elements[hitPixel.element].conduct) { + hitPixel.charge = 0.5 + } + } + if (!isEmpty(pixel.x, pixel.y+1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y+1] + doElectricity(hitPixel); + if (elements[hitPixel.element].conduct) { + hitPixel.charge = 0.5 + } + } + if (!isEmpty(pixel.x-1, pixel.y, true)) { + var hitPixel = pixelMap[pixel.x-1][pixel.y] + doElectricity(hitPixel); + if (elements[hitPixel.element].conduct) { + hitPixel.charge = 0.5 + } + } + if (!isEmpty(pixel.x+1, pixel.y, true)) { + var hitPixel = pixelMap[pixel.x+1][pixel.y] + doElectricity(hitPixel); + if (elements[hitPixel.element].conduct) { + hitPixel.charge = 0.5 + } + } + } + } + } +} + +scanLimit = 0 +scanningLimit = 0 + +elements.pixel_scanner = { + color: "#799187", + category: "machines", + behavior: behaviors.WALL, + tempHigh: 3000, + stateHigh: ["molten_steel","molten_steel","molten_steel","flash"], + density: 7850, + movable: false, + onSelect: function() { + var answer1 = prompt("Input the desired pixel limit of this scanner. It will not work if you place multiple limits while paused.",(scanLimit||5)); + if (!answer1) { return } + scanLimit = (answer1); + var answer2 = prompt("Input the desired scanning limit of this scanner. It will not work if you place multiple limits while paused.",(scanningLimit||10)); + if (!answer2) { return } + scanningLimit = (answer2); + }, + tick: function(pixel){ + if (pixel.start === pixelTicks) { + pixel.scaleLimit = scanLimit + pixel.scanningLimit = scanningLimit + } + if (isEmpty(pixel.x-1,pixel.y) || pixelMap[pixel.x-1][pixel.y].element !== pixel.element) { + pixel.scaleList = [] + for (let i = 1; i < width; i++){ + if (!isEmpty(pixel.x+i, pixel.y, true)) { + if (pixelMap[pixel.x+i][pixel.y].element === pixel.element){ + let distance2 = grabAllPixels(pixelMap[pixel.x+i][pixel.y]); + pixel.scaleList.push((distance2.pixels - 1)); + } + } + } + pixel.scaleSum = 0 + for (let i = 0; i < pixel.scaleList.length; i++){ + if (pixel.scaleList[i]){ + pixel.scaleSum += (pixel.scaleList[i]) + } + } + let distance = grabAllPixels(pixel); + pixel.scaleSum += (distance.pixels - 1) + if (pixel.scaleSum > (pixel.scaleLimit - 1)) { + if (!isEmpty(pixel.x, pixel.y-1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y-1] + doElectricity(hitPixel); + if (elements[hitPixel.element].conduct) { + hitPixel.charge = 0.5 + } + } + if (!isEmpty(pixel.x, pixel.y+1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y+1] + doElectricity(hitPixel); + if (elements[hitPixel.element].conduct) { + hitPixel.charge = 0.5 + } + } + if (!isEmpty(pixel.x-1, pixel.y, true)) { + var hitPixel = pixelMap[pixel.x-1][pixel.y] + doElectricity(hitPixel); + if (elements[hitPixel.element].conduct) { + hitPixel.charge = 0.5 + } + } + if (!isEmpty(pixel.x+1, pixel.y, true)) { + var hitPixel = pixelMap[pixel.x+1][pixel.y] + doElectricity(hitPixel); + if (elements[hitPixel.element].conduct) { + hitPixel.charge = 0.5 + } + } + } + } + } +} + +kiloScanLimit = 0 +kiloScanningLimit = 0 + +elements.weight_scanner = { + color: "#6D9190", + category: "machines", + behavior: behaviors.WALL, + tempHigh: 3000, + stateHigh: "molten_steel", + movable: false, + onSelect: function() { + var answer1 = prompt("Input the desired kilogram limit of this scanner. It will not work if you place multiple limits while paused.",(kiloScanLimit||1602)); + if (!answer1) { return } + kiloScanLimit = (answer1); + var answer2 = prompt("Input the desired scanning limit of this scanner. It will not work if you place multiple limits while paused.",(kiloScanningLimit||10)); + if (!answer2) { return } + kiloScanningLimit = (answer2); + }, + tick: function(pixel){ + if (pixel.start === pixelTicks) { + pixel.scaleLimit = kiloScanLimit + pixel.scanningLimit = kiloScanningLimit + } + if (isEmpty(pixel.x-1,pixel.y) || pixelMap[pixel.x-1][pixel.y].element !== pixel.element) { + pixel.scaleList = [] + for (let i = 1; i < width; i++){ + if (!isEmpty(pixel.x+i, pixel.y, true)) { + if (pixelMap[pixel.x+i][pixel.y].element === pixel.element){ + let distance2 = grabAllWeights(pixelMap[pixel.x+i][pixel.y]); + pixel.scaleList.push((distance2.weight)); + } + } + } + pixel.scaleSum = 0 + for (let i = 0; i < pixel.scaleList.length; i++){ + if (pixel.scaleList[i]){ + pixel.scaleSum += (pixel.scaleList[i]) + } + } + let distance = grabAllWeights(pixel); + pixel.scaleSum += (distance.weight) + if (pixel.scaleSum > (pixel.scaleLimit - 1)) { + if (!isEmpty(pixel.x, pixel.y-1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y-1] + doElectricity(hitPixel); + if (elements[hitPixel.element].conduct) { + hitPixel.charge = 0.5 + } + } + if (!isEmpty(pixel.x, pixel.y+1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y+1] + doElectricity(hitPixel); + if (elements[hitPixel.element].conduct) { + hitPixel.charge = 0.5 + } + } + if (!isEmpty(pixel.x-1, pixel.y, true)) { + var hitPixel = pixelMap[pixel.x-1][pixel.y] + doElectricity(hitPixel); + if (elements[hitPixel.element].conduct) { + hitPixel.charge = 0.5 + } + } + if (!isEmpty(pixel.x+1, pixel.y, true)) { + var hitPixel = pixelMap[pixel.x+1][pixel.y] + doElectricity(hitPixel); + if (elements[hitPixel.element].conduct) { + hitPixel.charge = 0.5 + } + } + } + } + } +} + +grabPixels = function(pixel){ + let element = pixel.element + let results = {} + for (let i = 0; i < height; i++) { + if (isEmpty(pixel.x, pixel.y-i, true)){ + results.top = i + break; + } + } + return results +} + +grabAllPixels = function(pixel){ + let element = pixel.element + let results = {} + results.pixels = 0 + for (let i = 0; i < height; i++) { + if (!isEmpty(pixel.x, pixel.y-i, true)){ + results.pixels += 1 + } + if (i > (pixel.scanningLimit - 1)){ + break; + } + } + return results +} + +grabWeights = function(pixel){ + let element = pixel.element + let results = {} + let weight = 0 + for (let i = 0; i < height; i++){ + if (!isEmpty(pixel.x, pixel.y-i, true)){ + if (elements[pixelMap[pixel.x][pixel.y-i].element].density && !weight) { + weight += elements[pixelMap[pixel.x][pixel.y-i].element].density + } + else if (elements[pixelMap[pixel.x][pixel.y-i].element].density && weight) { + weight += elements[pixelMap[pixel.x][pixel.y-i].element].density + } + else if (!elements[pixelMap[pixel.x][pixel.y-i].element].density) { + let result; + if (elements[pixelMap[pixel.x][pixel.y-i].element].breakInto !== undefined) { + if (Array.isArray(elements[pixelMap[pixel.x][pixel.y-i].element].breakInto)) { + result = elements[pixelMap[pixel.x][pixel.y-i].element].breakInto[Math.floor(Math.random() * elements[pixel.element].breakInto.length)]; + weight += elements.result.density + } + else { + result = elements[pixelMap[pixel.x][pixel.y-i].element].breakInto; + weight += elements.result.density + } + } + } + } + if (isEmpty(pixel.x, pixel.y-i, true)){ + results.top = i + if (isEmpty(pixel.x, pixel.y-i, true)){ + results.topelement = "air" + } else { + results.topelement = pixelMap[pixel.x][pixel.y-i].element + } + break; + } + } + results.weight = weight + return results +} + +grabAllWeights = function(pixel){ + let element = pixel.element + let results = {} + let weight = 0 + for (let i = 0; i < height; i++){ + if (!isEmpty(pixel.x, pixel.y-i, true)){ + if (elements[pixelMap[pixel.x][pixel.y-i].element].density && !weight) { + weight = elements[pixelMap[pixel.x][pixel.y-i].element].density + } + else if (elements[pixelMap[pixel.x][pixel.y-i].element].density && weight) { + weight += elements[pixelMap[pixel.x][pixel.y-i].element].density + } + else if (!elements[pixelMap[pixel.x][pixel.y-i].element].density) { + let result; + if (elements[pixelMap[pixel.x][pixel.y-i].element].breakInto !== undefined) { + if (Array.isArray(elements[pixelMap[pixel.x][pixel.y-i].element].breakInto)) { + result = elements[pixelMap[pixel.x][pixel.y-i].element].breakInto[Math.floor(Math.random() * elements[pixel.element].breakInto.length)]; + weight += elements.result.density + } + else { + result = elements[pixelMap[pixel.x][pixel.y-i].element].breakInto; + weight += elements.result.density + } + } + } + } + if (i > (pixel.scanningLimit - 1)){ + break; + } + } + results.weight = weight + return results +} + +/*elements.Cherries_Ceri_Moji = { + color: "#fcd1d7", + category: Student, + state: High_School, + behavior: [Shy, Introverted, Easily_Excited, Kind], + pronouns: [She,Her,Herself], + sexuality: [Panromantic, Asexual], + desc: "Ceri is a 16 year old high school student who loves cats" +}*/