studyup 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hexgl-package/HexGL-master/.htaccess +4 -0
- package/hexgl-package/HexGL-master/LICENSE +21 -0
- package/hexgl-package/HexGL-master/README.md +26 -0
- package/hexgl-package/HexGL-master/audio/LICENSE +28 -0
- package/hexgl-package/HexGL-master/audio/bg.ogg +0 -0
- package/hexgl-package/HexGL-master/audio/boost.ogg +0 -0
- package/hexgl-package/HexGL-master/audio/crash.ogg +0 -0
- package/hexgl-package/HexGL-master/audio/destroyed.ogg +0 -0
- package/hexgl-package/HexGL-master/audio/wind.ogg +0 -0
- package/hexgl-package/HexGL-master/bkcore/Audio.js +142 -0
- package/hexgl-package/HexGL-master/bkcore/hexgl/CameraChase.js +73 -0
- package/hexgl-package/HexGL-master/bkcore/hexgl/Gameplay.js +231 -0
- package/hexgl-package/HexGL-master/bkcore/hexgl/HUD.js +270 -0
- package/hexgl-package/HexGL-master/bkcore/hexgl/HexGL.js +446 -0
- package/hexgl-package/HexGL-master/bkcore/hexgl/Ladder.js +52 -0
- package/hexgl-package/HexGL-master/bkcore/hexgl/RaceData.js +99 -0
- package/hexgl-package/HexGL-master/bkcore/hexgl/ShipControls.js +806 -0
- package/hexgl-package/HexGL-master/bkcore/hexgl/ShipEffects.js +186 -0
- package/hexgl-package/HexGL-master/bkcore/hexgl/tracks/Cityscape.js +521 -0
- package/hexgl-package/HexGL-master/bkcore/threejs/Loader.js +260 -0
- package/hexgl-package/HexGL-master/bkcore/threejs/Particles.js +191 -0
- package/hexgl-package/HexGL-master/bkcore/threejs/Preloader.js +151 -0
- package/hexgl-package/HexGL-master/bkcore/threejs/RenderManager.js +132 -0
- package/hexgl-package/HexGL-master/bkcore/threejs/Shaders.js +950 -0
- package/hexgl-package/HexGL-master/bkcore.coffee/ImageData.coffee +141 -0
- package/hexgl-package/HexGL-master/bkcore.coffee/ImageData.js +156 -0
- package/hexgl-package/HexGL-master/bkcore.coffee/Timer.coffee +118 -0
- package/hexgl-package/HexGL-master/bkcore.coffee/Timer.js +159 -0
- package/hexgl-package/HexGL-master/bkcore.coffee/Utils.coffee +193 -0
- package/hexgl-package/HexGL-master/bkcore.coffee/Utils.js +250 -0
- package/hexgl-package/HexGL-master/bkcore.coffee/controllers/GamepadController.coffee +45 -0
- package/hexgl-package/HexGL-master/bkcore.coffee/controllers/GamepadController.js +73 -0
- package/hexgl-package/HexGL-master/bkcore.coffee/controllers/OrientationController.coffee +72 -0
- package/hexgl-package/HexGL-master/bkcore.coffee/controllers/OrientationController.js +130 -0
- package/hexgl-package/HexGL-master/bkcore.coffee/controllers/TouchController.coffee +109 -0
- package/hexgl-package/HexGL-master/bkcore.coffee/controllers/TouchController.js +188 -0
- package/hexgl-package/HexGL-master/bkcore.coffee/tests.html +10 -0
- package/hexgl-package/HexGL-master/bkcore.coffee/threejs/Particles.coffee +199 -0
- package/hexgl-package/HexGL-master/bkcore.coffee/threejs/Particles.js +210 -0
- package/hexgl-package/HexGL-master/cache.appcache +74 -0
- package/hexgl-package/HexGL-master/css/BebasNeue-webfont.eot +0 -0
- package/hexgl-package/HexGL-master/css/BebasNeue-webfont.svg +245 -0
- package/hexgl-package/HexGL-master/css/BebasNeue-webfont.ttf +0 -0
- package/hexgl-package/HexGL-master/css/BebasNeue-webfont.woff +0 -0
- package/hexgl-package/HexGL-master/css/bg.jpg +0 -0
- package/hexgl-package/HexGL-master/css/fonts.css +16 -0
- package/hexgl-package/HexGL-master/css/help-0.png +0 -0
- package/hexgl-package/HexGL-master/css/help-1.png +0 -0
- package/hexgl-package/HexGL-master/css/help-2.png +0 -0
- package/hexgl-package/HexGL-master/css/help-3.png +0 -0
- package/hexgl-package/HexGL-master/css/mobile-controls-1.jpg +0 -0
- package/hexgl-package/HexGL-master/css/mobile-controls-2.jpg +0 -0
- package/hexgl-package/HexGL-master/css/mobile-over.jpg +0 -0
- package/hexgl-package/HexGL-master/css/mobile.jpg +0 -0
- package/hexgl-package/HexGL-master/css/multi.css +264 -0
- package/hexgl-package/HexGL-master/css/title.png +0 -0
- package/hexgl-package/HexGL-master/css/touchcontroller.css +8 -0
- package/hexgl-package/HexGL-master/favicon.png +0 -0
- package/hexgl-package/HexGL-master/geometries/bonus/base/base.js +45 -0
- package/hexgl-package/HexGL-master/geometries/booster/booster.js +45 -0
- package/hexgl-package/HexGL-master/geometries/ships/feisar/feisar.js +45 -0
- package/hexgl-package/HexGL-master/geometries/tracks/cityscape/bonus/speed.js +45 -0
- package/hexgl-package/HexGL-master/geometries/tracks/cityscape/scrapers1.js +45 -0
- package/hexgl-package/HexGL-master/geometries/tracks/cityscape/scrapers2.js +45 -0
- package/hexgl-package/HexGL-master/geometries/tracks/cityscape/start.js +45 -0
- package/hexgl-package/HexGL-master/geometries/tracks/cityscape/startbanner.js +45 -0
- package/hexgl-package/HexGL-master/geometries/tracks/cityscape/track.js +45 -0
- package/hexgl-package/HexGL-master/geometries/tracks/edge/track.js +38 -0
- package/hexgl-package/HexGL-master/icon_128.png +0 -0
- package/hexgl-package/HexGL-master/icon_256.png +0 -0
- package/hexgl-package/HexGL-master/icon_32.png +0 -0
- package/hexgl-package/HexGL-master/icon_64.png +0 -0
- package/hexgl-package/HexGL-master/index.html +129 -0
- package/hexgl-package/HexGL-master/launch.coffee +85 -0
- package/hexgl-package/HexGL-master/launch.js +116 -0
- package/hexgl-package/HexGL-master/libs/DAT.GUI.min.js +53 -0
- package/hexgl-package/HexGL-master/libs/Detector.js +59 -0
- package/hexgl-package/HexGL-master/libs/Editor.html +717 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/App.js +212 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/CanvasRenderer.js +389 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/Diagram.js +148 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/Iterator.js +92 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/Links.js +56 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/ModuleList.js +47 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/Node.js +122 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/Parser.js +140 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/Project.js +162 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/Timer.js +166 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/ace.js +11 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/class.js +989 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/editor.css +16 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/font.css +24 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/gamecore.js +133 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/hashlist.js +41 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/jhashtable.js +468 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/jquery-1.8.js +2 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/kinetic.js +30 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/main.css +204 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/mode-json.js +1 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/pooled.js +542 -0
- package/hexgl-package/HexGL-master/libs/Editor_files/theme-monokai.js +1 -0
- package/hexgl-package/HexGL-master/libs/ShaderExtras.js +1788 -0
- package/hexgl-package/HexGL-master/libs/Stats.js +6 -0
- package/hexgl-package/HexGL-master/libs/Three.dev.js +758 -0
- package/hexgl-package/HexGL-master/libs/Three.r53.js +767 -0
- package/hexgl-package/HexGL-master/libs/leap-0.4.1.min.js +3 -0
- package/hexgl-package/HexGL-master/libs/postprocessing/BloomPass.js +100 -0
- package/hexgl-package/HexGL-master/libs/postprocessing/DotScreenPass.js +52 -0
- package/hexgl-package/HexGL-master/libs/postprocessing/EffectComposer.js +143 -0
- package/hexgl-package/HexGL-master/libs/postprocessing/FilmPass.js +51 -0
- package/hexgl-package/HexGL-master/libs/postprocessing/MaskPass.js +86 -0
- package/hexgl-package/HexGL-master/libs/postprocessing/RenderPass.js +63 -0
- package/hexgl-package/HexGL-master/libs/postprocessing/SavePass.js +52 -0
- package/hexgl-package/HexGL-master/libs/postprocessing/ShaderPass.js +51 -0
- package/hexgl-package/HexGL-master/libs/postprocessing/TexturePass.js +37 -0
- package/hexgl-package/HexGL-master/manifest.webapp +18 -0
- package/hexgl-package/HexGL-master/package.webapp +10 -0
- package/hexgl-package/HexGL-master/package.zip +0 -0
- package/hexgl-package/HexGL-master/replays/cityscape-casual/bkcore.replay.json +1 -0
- package/hexgl-package/HexGL-master/textures/bonus/base/diffuse.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/bonus/base/normal.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/bonus/base/specular.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/checker.png +0 -0
- package/hexgl-package/HexGL-master/textures/hud/hex.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/hud/hud-bg.png +0 -0
- package/hexgl-package/HexGL-master/textures/hud/hud-fg-shield.png +0 -0
- package/hexgl-package/HexGL-master/textures/hud/hud-fg-speed.png +0 -0
- package/hexgl-package/HexGL-master/textures/particles/cloud - Copie.png +0 -0
- package/hexgl-package/HexGL-master/textures/particles/cloud.png +0 -0
- package/hexgl-package/HexGL-master/textures/particles/damage.png +0 -0
- package/hexgl-package/HexGL-master/textures/particles/spark - Copie.png +0 -0
- package/hexgl-package/HexGL-master/textures/particles/spark.png +0 -0
- package/hexgl-package/HexGL-master/textures/ships/feisar/booster/booster.png +0 -0
- package/hexgl-package/HexGL-master/textures/ships/feisar/booster/boostersprite.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/ships/feisar/diffuse.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/ships/feisar/normal.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/ships/feisar/specular.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/skybox/dawnclouds/nx.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/skybox/dawnclouds/ny.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/skybox/dawnclouds/nz.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/skybox/dawnclouds/px.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/skybox/dawnclouds/py.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/skybox/dawnclouds/pz.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/tracks/cityscape/collision.png +0 -0
- package/hexgl-package/HexGL-master/textures/tracks/cityscape/diffuse.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/tracks/cityscape/height.png +0 -0
- package/hexgl-package/HexGL-master/textures/tracks/cityscape/normal.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/tracks/cityscape/scrapers1/diffuse.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/tracks/cityscape/scrapers1/normal.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/tracks/cityscape/scrapers1/specular.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/tracks/cityscape/scrapers2/diffuse.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/tracks/cityscape/scrapers2/normal.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/tracks/cityscape/scrapers2/specular.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/tracks/cityscape/specular.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/tracks/cityscape/start/diffuse.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/tracks/cityscape/start/normal.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/tracks/cityscape/start/specular.jpg +0 -0
- package/hexgl-package/HexGL-master/textures/tracks/cityscape/start/start.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/bonus/base/diffuse.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/bonus/base/normal.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/bonus/base/specular.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/checker.png +0 -0
- package/hexgl-package/HexGL-master/textures.full/hud/hex.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/hud/hud-bg.png +0 -0
- package/hexgl-package/HexGL-master/textures.full/hud/hud-fg-shield.png +0 -0
- package/hexgl-package/HexGL-master/textures.full/hud/hud-fg-speed.png +0 -0
- package/hexgl-package/HexGL-master/textures.full/particles/cloud - Copie.png +0 -0
- package/hexgl-package/HexGL-master/textures.full/particles/cloud.png +0 -0
- package/hexgl-package/HexGL-master/textures.full/particles/damage.png +0 -0
- package/hexgl-package/HexGL-master/textures.full/particles/spark - Copie.png +0 -0
- package/hexgl-package/HexGL-master/textures.full/particles/spark.png +0 -0
- package/hexgl-package/HexGL-master/textures.full/ships/feisar/booster/booster.png +0 -0
- package/hexgl-package/HexGL-master/textures.full/ships/feisar/booster/boostersprite.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/ships/feisar/diffuse.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/ships/feisar/normal.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/ships/feisar/specular.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/skybox/dawnclouds/nx.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/skybox/dawnclouds/ny.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/skybox/dawnclouds/nz.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/skybox/dawnclouds/px.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/skybox/dawnclouds/py.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/skybox/dawnclouds/pz.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/collision.png +0 -0
- package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/diffuse.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/height.png +0 -0
- package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/normal.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/scrapers1/diffuse.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/scrapers1/normal.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/scrapers1/specular.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/scrapers2/diffuse.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/scrapers2/normal.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/scrapers2/specular.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/specular.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/start/diffuse.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/start/normal.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/start/specular.jpg +0 -0
- package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/start/start.jpg +0 -0
- package/index.html +291 -0
- package/package.json +12 -3
- package/sandboxels-package/sandboxels-1.13.2/.github/CONTRIBUTING.md +10 -0
- package/sandboxels-package/sandboxels-1.13.2/.github/FUNDING.yml +13 -0
- package/sandboxels-package/sandboxels-1.13.2/.github/SUPPORT.md +9 -0
- package/sandboxels-package/sandboxels-1.13.2/404.html +74 -0
- package/sandboxels-package/sandboxels-1.13.2/CITATION.cff +42 -0
- package/sandboxels-package/sandboxels-1.13.2/CNAME +1 -0
- package/sandboxels-package/sandboxels-1.13.2/README.md +47 -0
- package/sandboxels-package/sandboxels-1.13.2/SECURITY.md +9 -0
- package/sandboxels-package/sandboxels-1.13.2/ad.html +73 -0
- package/sandboxels-package/sandboxels-1.13.2/aff.json +3 -0
- package/sandboxels-package/sandboxels-1.13.2/archive/first-version.html +234 -0
- package/sandboxels-package/sandboxels-1.13.2/archive/second-version.html +1293 -0
- package/sandboxels-package/sandboxels-1.13.2/archive/third-version.html +2242 -0
- package/sandboxels-package/sandboxels-1.13.2/archive.txt +231 -0
- package/sandboxels-package/sandboxels-1.13.2/backgrounds/License.txt +1 -0
- package/sandboxels-package/sandboxels-1.13.2/backgrounds/sky.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/backgrounds/sky_dark.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/backgrounds/sky_grass.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/backgrounds/sky_pink.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/backgrounds/sky_purple.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/backgrounds/sky_warm.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/changelog.html +3362 -0
- package/sandboxels-package/sandboxels-1.13.2/changelog.txt +3096 -0
- package/sandboxels-package/sandboxels-1.13.2/controls.html +191 -0
- package/sandboxels-package/sandboxels-1.13.2/controls.txt +65 -0
- package/sandboxels-package/sandboxels-1.13.2/education-use.html +109 -0
- package/sandboxels-package/sandboxels-1.13.2/feed.rss +30 -0
- package/sandboxels-package/sandboxels-1.13.2/feedback.html +89 -0
- package/sandboxels-package/sandboxels-1.13.2/fonts/PressStart2P-License-OFL.txt +93 -0
- package/sandboxels-package/sandboxels-1.13.2/fonts/PressStart2P-Regular.ttf +0 -0
- package/sandboxels-package/sandboxels-1.13.2/fonts/VT323-License-OFL.txt +93 -0
- package/sandboxels-package/sandboxels-1.13.2/fonts/VT323-Regular.ttf +0 -0
- package/sandboxels-package/sandboxels-1.13.2/fonts/Vietnamese_Pixel.ttf +0 -0
- package/sandboxels-package/sandboxels-1.13.2/fonts/fusion-pixel-12px-monospaced-ja.ttf +0 -0
- package/sandboxels-package/sandboxels-1.13.2/fonts/fusion-pixel-12px-monospaced-ko.ttf +0 -0
- package/sandboxels-package/sandboxels-1.13.2/fonts/fusion-pixel-12px-monospaced-latin.ttf +0 -0
- package/sandboxels-package/sandboxels-1.13.2/fonts/fusion-pixel-12px-monospaced-zh_hans.ttf +0 -0
- package/sandboxels-package/sandboxels-1.13.2/fonts/fusion-pixel-12px-monospaced-zh_hant.ttf +0 -0
- package/sandboxels-package/sandboxels-1.13.2/help.html +122 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/80x15.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/88x31.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/android-chrome-192x192.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/android-chrome-384x384.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-114x114-precomposed.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-114x114.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-120x120-precomposed.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-120x120.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-144x144-precomposed.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-144x144.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-152x152-precomposed.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-152x152.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-180x180-precomposed.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-180x180.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-57x57-precomposed.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-57x57.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-60x60-precomposed.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-60x60.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-72x72-precomposed.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-72x72.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-76x76-precomposed.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-76x76.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-precomposed.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/browserconfig.xml +9 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/card.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/cover-3840x1240px-text.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/cover-3840x1240px.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/cover-3840x1240px.webp +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/cover.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/favicon-16x16.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/favicon-32x32.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/favicon.ico +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/icon-hd.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/icon.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/index.html +196 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/modulator.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/mstile-150x150.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/original-logo-recreated-pixel.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/promo1.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/promo2.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/promo3.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/promo4.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/safari-pinned-tab.svg +107 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/site.webmanifest +20 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/tall.webp +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/wallpaper-old.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/wallpaper.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/wallpaper.webp +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/wordmark-black.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/icons/wordmark-white.png +0 -0
- package/sandboxels-package/sandboxels-1.13.2/index.html +21523 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/README.txt +5 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/af.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/ar.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/ar_sy.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/bn.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/ca.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/cs.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/da.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/de.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/el.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/en.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/en_au.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/en_ca.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/en_gb.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/es.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/et.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/fi.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/fil.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/fr.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/gen.js +21 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/he.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/hu.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/id.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/it.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/ja.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/ko.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/la.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/ne.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/nl.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/no.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/pl.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/pt.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/pt_br.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/qha.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/qvp.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/ro.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/ru.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/sr.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/sv.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/template.json +677 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/th.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/tok.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/tok_old.json +543 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/tr.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/uk.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/vi.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/xem.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/zh_cn.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/lang/zh_hant.json +1 -0
- package/sandboxels-package/sandboxels-1.13.2/license.txt +48 -0
- package/sandboxels-package/sandboxels-1.13.2/lite.html +1599 -0
- package/sandboxels-package/sandboxels-1.13.2/manifest.json +33 -0
- package/sandboxels-package/sandboxels-1.13.2/media.html +134 -0
- package/sandboxels-package/sandboxels-1.13.2/mobile-use.html +110 -0
- package/sandboxels-package/sandboxels-1.13.2/mod-list.html +535 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/1.10example.js +118 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/10kelements.js +172 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/3pms_mod.js +144 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/AnonymousWorldgenLibrary.js +55 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/Batteries.js +288 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/BlueStuff.js +681 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/CandyCanes.js +15 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/CandyCorn.js +8 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/CherrySoda.js +77 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/EasterEggs.js +1 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/ExtraMachines.js +2338 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/FoodFoodFood.js +114 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/Gemstones.js +80 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/GrapeSoda.js +141 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/Humanitize.js +959 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/Inators.js +108 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/IreThings.js +169 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/Lab.js +397 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/LimesAdditions.js +401 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/MarkusFoodMod.js +334 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/Mucho_frio_y_Calor.js +16 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/Natural_disasters.js +207 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/Neutronium Mod.js +1228 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/PRNGworldgenlib.js +526 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/Quicksand_one.js +1355 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/RF_transmitter_receiver.js +62 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/Random_quicksands.js +932 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/Science_mod.js +1791 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/Shroomboxels.js +71 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/SuperASAX_Funny_Mod.js +297 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/Temperature+.js +47 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/Thread.js +180 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/UAMM.js +502 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/Ultra_Steel.js +61 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/UwUify.js +87 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/VCR_OSD_MONO.ttf +0 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/Vegan.js +255 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/WhisperingTheory.js +213 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/aChefsDream.js +8159 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/aChefsDream2.js +815 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/aChefsDream_beta.js +12 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/aScientistsWish.js +1195 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/a_bundle_of_tests.js +417 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/a_mod_by_alice.js +46043 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/acid_and_shapes.js +1 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/adaceythings.js +343 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/adjustablepixelsize.js +28 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/advanced_colonies.js +146 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/advancedbugs.js +37 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/aircrafts.js +260 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/alchem.js +372 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/alchemy.js +69 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/alcohol.js +113 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/alkahest.js +33 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/alkali_metal.js +308 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/all_around_fillers.js +73 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/all_stain.js +7 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/allliquids.js +24 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/amogus.js +69 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/anmm.js +566 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/ants.js +137 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/apioforms_pre.js +238 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/applestuff.js +80 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/asciiboxels.js +231 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/aussieAdditions.js +123 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/baby.js +65 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/background_changer.js +59 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/bacteria_mod.js +121 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/bananas.js +543 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/barf_mod.js +42 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/barista.js +209 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/bere.js +85 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/betterMenuScreens.js +279 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/betterModManager.js +174 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/betterSettings.js +304 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/betterStats.js +55 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/better_smooth_water.js +6 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/betterelec.js +51 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/bettergraygoo.js +1 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/bettermetalscrap.js +37 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/bf.js +394 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/bfdi.js +145 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/bigger_star_spawners.js +198 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/biology.js +8694 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/bioooze_and_pyrogens.js +264 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/black_hole.js +43 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/blocks.js +164 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/boiling_things.js +540 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/bojithekings_mod.js +377 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/boompaste.js +76 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/borders.js +76 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/bouncing_balls.js +703 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/broken_mod_test.js +1 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/building.js +154 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/buildingreplicator.js +210 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/c_fighter_jet.js +449 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cannibal_cooking.js +620 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cash_n_more.js +58 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cat.js +100 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cells.js +376 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/chalcopyrite.js +124 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/chalk.js +499 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/change.js +58 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/changePixelDebug.js +9 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/changeTempReactionParameter.js +73 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/chaos.js +32 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/charsonsmodbeta.js +494 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/charsonsmoduno.js +2116 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/chem.js +7877 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/chemFormula.js +44 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/chemFormulas.json +549 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cherries.js +543 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/chess.js +1463 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/children.js +14 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/circuitcore.js +1914 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/circuitcore_displays.js +157 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/citybuilding.js +193 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/classic_explosives.js +62 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/classic_textures.js +196 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/clf3.js +86 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/clone_liquid.js +22 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/clouds.js +103 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cmur.js +5195 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/code_library.js +1827 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/coffee.js +228 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cold_liquid_explosion.js +20 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cold_opposites.js +66 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/coldblooded.js +729 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/collab_mod.js +253 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/colonies.js +574 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/colorLED.js +38 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/color_everything.js +3 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/color_tools.js +297 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/colored_lightbulbs.js +44 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/combustion.js +416 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/community_desserts.js +829 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/content.js +131 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/controllable_pixel.js +75 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/controllable_pixel_test.js +161 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/conveyance.js +95 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cooked_apple.js +26 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cookie_clicker.js +943 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cookingnstuff.js +1 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cool_tools.js +35 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/copy_canvas.js +9 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/copypaste.js +100 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/coresbyp.js +90 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cpt_alt.js +241 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/crimson.js +424 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cs_expanded.js +31 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cubesstuff.js +3329 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/currency.js +246 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cursed_shader_by_jayd.js +90 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cursor.js +3 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/cursor_shapes.js +149 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/customBackground.js +45 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/customexplosion.js +110 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/customtemptools.js +50 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/dalgonacandy.js +41 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/datawire.js +238 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/date_test.js +268 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/death_count.js +35 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/debris.js +75 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/debrisable.js +1136 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/debugRework.js +169 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/delete_all_of_element.js +17 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/deneme.js +70 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/dependency_test.js +13 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/descriptions.js +17 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/devsnacks.js +193 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/devtests.js +278 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/discord_port.js +36 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/doElectricity changes.js +55 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/dogs.js +85 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/doom.js +935 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/doomsday.js +56 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/drawPixels_change_test.js +39 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/dried_food.js +38 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/drill.js +261 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/drills.js +760 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/easysurvival.js +917 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/edible_everything.js +7 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/editTools.js +608 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/eklegems.js +1313 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/electricityTest.js +42 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/elem3.js +352316 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/elementEraser.js +40 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/element_UI.js +140 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/elementreplacer.js +12 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/elementsManager.js +1212 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/empty.js +7 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/evenmoretemptools.js +42 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/example_mod.js +89 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/example_mod_old.js +84 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/exoplanet.js +220 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/explodeAtPlus.js +138 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/explosionsound.js +19 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/extra_element_info.js +79 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/extrasaveslots.js +42 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fans.js +204 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fantastic_creatures.js +198 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fantasy_elements.js +800 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fast_lightmap.js +339 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fey_and_more.js +1678 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fill_script.js +42 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/find.js +115 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fine_tuned_cloner.js +121 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fire_extinguisher.js +128 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fire_mod.js +565 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fire_slime.js +68 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fishin.js +519 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fission.js +68 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fission_physics.js +86 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fiveys_stuff.js +119 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/flesh_infection.js +645 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/flipflop.js +36 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/flowers_and_forests.js +468 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/flying_fish.js +49 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/food_mods.js +15 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/foodgalore +100 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fools+.js +299 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fools.js +99 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fools24.js +842 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fools25.js +350 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fossils.js +676 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fractals.js +156 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/franklin.js +44 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/freeTPS.js +19 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fueled_generators.js +131 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/funny elements 2022-11-15.js +84 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/funny_liquid.js +618 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/funny_liquid_2.js +322 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/funny_liquid_3.js +254 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/funny_solid.js +163 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/funnynames.js +320 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/fwibblen.js +69 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/gambling.js +94 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/gameOfLife.js +83 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/garn47.js +325 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/gasdecay.js +31 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/generative_mods.js +2479 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/generator_prompt.js +166 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/genetics.js +4038 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/glenn_gases.js +411 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/glow.js +130 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/gradient_background_support.js +21 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/graphite.js +460 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/grav_mudstones.js +382 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/gravity.js +40 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/gravity_test.js +51 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/greenitemsandmore.js +183 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/guided_rocket.js +106 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/halogen.js +384 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/haseulite.js +1673 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/heatglow.js +74 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/heatshield.js +30 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/hexagon.js +45 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/hidden_ground.js +42 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/hideandshowtools.js +18 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/human_edit.js +725 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/human_friendly_design.js +899 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/humans.js +203 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/hydroid.js +224 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/icb.js +32 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/iean.js +135 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/immune.js +199 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/incinerators.js +29 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/industry.js +308 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/infLiqLight.js +8 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/injector.js +450 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/insane_random_events.js +123 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/invertscroll.js +8 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/invisible_things.js +83 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/iocalfaeus_clones.js +100 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/jaydsfunctions.js +187 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/jaydsmods.js +89 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/jaydstuff.js +783 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/junction.js +50 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/ketchup_mod.js +526 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/kopalsBar.js +175 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/kopalstuff.js +541 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/lactose_intolerance_and_celiac.js +18 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/laetium.js +328 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/lattice_filler.js +29 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/lemonade.js +71 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/libhooktick.js +49 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/libpacman-v1.js +61 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/libpixeltracking.js +29 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/library_test.js +5 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/life_eater.js +169 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/light.js +218 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/lighting_test.js +79 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/lightmap.js +382 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/limewater.js +75 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/liquid_energy.js +294 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/liquid_mixing.js +184 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/liquid_void.js +29 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/littlejohnny.js +72 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/lizard_mod.js +91 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/logicgates.js +482 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/lone_urea.js +69 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/lost_souls.js +177 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/lye.js +34 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/machines.js +293 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/manyMoreThemes.js +67 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/mars.js +473 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/maxColorOffset.js +54 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/maze.js +71 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/meat_rockets.js +70 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/memelists.js +17 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/metals.js +791 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/minecraft.js +818 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/minesweeper.js +100 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/miscellaneous_elements.js +278 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/miscible_psoup_and_birthpool.js +7 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/mix.js +65 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/mixture.js +714 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/mixtureII.js +440 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/mjsstuff.js +233 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/mobile_keybinds.js +33 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/mobile_shift.js +336 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/mobs.js +5147 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/mod_for_mnem.js +1 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/modlangs.js +53 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/moreViews.js +473 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/more_art_states.js +89 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/more_breaking.js +189 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/more_disasters.js +497 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/more_gold.js +115 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/morebombs.js +1143 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/morechemistry.js +1764 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/morefoodsmod.js +154 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/moreliquids.js +138 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/morepowders.js +335 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/moretools.js +68 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/moretrees.js +490 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/mossstuff.js +2301 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/mouthwash.js +23 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/move_tools.js +71 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/moveable_cubes.js +258 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/moving_pixels.js +179 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/mush_infection.js +321 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/musicalfruit.js +4 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/mustard.js +48 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/mystic.js +274 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/nastystuff.js +57 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/nature_Mod.js +1384 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/nekonicos_stuff.js +1651 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/nested_for_reaction_example.js +19 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/nettysaddon.js +48 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/neutronium_compressor.js +416 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/nicer_flame.js +48 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/nirmod.js +296 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/nitroglycerin.js +54 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/no_blood.js +23 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/no_radiation_events.js +3 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/no_random_grbs.js +9 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/no_scroll.js +5 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/noblegas.js +215 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/nocancer.js +9 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/nocancer2.js +1 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/noconfirm.js +1 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/nograssgrow.js +6 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/noita.js +4895 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/noita_demake.js +430 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/nopixellimit.js +2 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/note_block.js +97 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/note_block_advanced.js +628 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/nousersthings.js +4081 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/nuclear.js +300 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/nv7.js +35013 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/obsidian.js +51 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/occlusion.js +149 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/ocean.js +130 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/ochem_prerelease.js +774 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/oldTooltip.js +23 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/oldleds.js +20 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/onTryMoveInto.js +85 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/onecolor.js +146 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/orchidslibrary.js +70 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/ores.js +232 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/organism.js +915 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/oxide.theme.js +46 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/page_color.js +35 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/paint_event.js +17 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/periodic_and_more.js +64 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/peta.js +214 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/petal_dye.js +40 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/pixelResizeTool.js +18 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/pizzasstuff.js +2338 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/place_all_elements.js +30 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/placuchtestthing.js +17 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/planet.js +270 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/planet_cracker.js +81 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/plants.js +1616 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/plastic.js +93 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/portal.js +120 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/potato_chips.js +44 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/prairie.js +200 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/precisionDrawing.js +58 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/pressure.js +223 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/pressure_sensitive.js +20 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/prideflags.js +307 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/primordial_birthpool.js +38 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/prompt.js +1215 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/prop and prompt variables.js +16 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/prop.js +466 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/pullers.js +479 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/purple_guys_mod.js +3635 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/pushers.js +287 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/radioactive.js +135 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/rainbow_cursor.js +12 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/rainbow_tests.js +348 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/rainsmod.js +412 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/random_elems.js +463 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/random_everything.js +7 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/random_fixes.js +42 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/random_liquids.js +220 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/random_rocks.js +164 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/random_things.js +69 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/randomelements.js +200 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/randomness.js +730 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/randomness_but_tick.js +1257 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/randomness_but_tool.js +26 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/ray_cloner.js +150 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/rays++.js +60 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/rays.js +464 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/reactor_supplies_and_others.js +88 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/real_light.js +754 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/replace.js +79 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/replace_all.js +45 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/reverse_time.js +421 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/rich_grain.js +54 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/rising_powders.js +3 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/rock_paper_scissors.js +32 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/roseyiede.js +363 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/rpg.js +1342 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/ru_expanded.js +25 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/runAfterAutogen and onload restructure.js +1 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/runAfterAutogen2.js +56 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/sandboxels.js +2501 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/saturnsstuff.js +729 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/save_loading.js +520 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/sbmixup.js +1439 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/sbstuff.js +1865 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/scenexe.js +770 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/schematics.js +214 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/scp.js +7831 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/selective_paint.js +60 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/sensitive.js +20 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/shade.js +46 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/shader_by_jayd.js +168 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/shipstuff.js +198 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/singleColor.js +1 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/single_humans.js +147 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/sky.js +141 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/slag_fix.js +25 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/smooth_water.js +6 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/solid_rock.js +74 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/solidcolor.js +146 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/solubility.js +287 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/some_tf_liquids.js +358 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/souls.js +163 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/soups.js +104 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/spaceship.js +138 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/special_property_library.js +155 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/sponge_edit.js +76 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/sports_beta.js +69 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/spouts.js +715 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/spring.js +283 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/stainless_steel.js +126 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/star_wars.js +70 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/state_voids.js +347 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/static.js +182 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/stickyslime.js +3 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/stickystuff.js +59 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/stormlib.js +99 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/stripe_paint.js +110 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/structure_test.js +755 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/sturdierpowders.js +595 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/subspace.js +46 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/survival.js +499 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/survivalhack.js +500 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/sus.js +92 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/switches.js +53 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/talismanadditions.js +124 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/tech.js +282 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/test.js +8 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/test_2.js +399 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/testmod.js +7 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/text.js +681 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/texture_pack_by_jayd.js +116 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/texturepack.js +94 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/the_ground.js +3 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/the_ground_og.js +2570 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/the_snail.js +63 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/themostrandomstuff.js +523 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/thermal_conduit.js +157 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/thiquovite.js +1745 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/ticking_temp_stuff.js +494 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/time.js +7 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/toms_stuff.js +308 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/tool_pixel_behavior.js +792 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/tooltip.js +32 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/toothpaste.js +154 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/tpt.js +89 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/triggerable_random_powders.js +68 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/troll.js +170 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/true_flashbang.js +520 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/ultimadrink.js +3191 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/uncook.js +51 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/unhide.js +10 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/variety_mod.js +727 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/velocity.js +139 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/velocity2.js +209 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/video.js +125 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/vinegar.js +17 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/volcanic_expansion.js +94 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/war.js +51 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/war_crimes.js +131 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/waterspout.js +26 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/weAllScreamFor.js +218 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/weapons.js +1286 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/wheel_fix.js +19 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/wifi.js +162 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/wifi_draw.js +87 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/wine.js +8 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/wirelike_test.js +681 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/worldEdit.js +441 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/worldEdit.ts +569 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/world_gen_test.js +315 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/worldgen_test.js +173 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/worldgenlibrary.js +164 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/x_dependent_change_test.js +34 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/yumcherries.js +543 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/zonneschijn7.js +6 -0
- package/sandboxels-package/sandboxels-1.13.2/mods/zoom.js +322 -0
- package/sandboxels-package/sandboxels-1.13.2/offline-use.html +103 -0
- package/sandboxels-package/sandboxels-1.13.2/offline.html +1 -0
- package/sandboxels-package/sandboxels-1.13.2/presskit.html +165 -0
- package/sandboxels-package/sandboxels-1.13.2/promo.html +13 -0
- package/sandboxels-package/sandboxels-1.13.2/scripts/im2elements/code.go +116 -0
- package/sandboxels-package/sandboxels-1.13.2/scripts/im2elements/go.mod +5 -0
- package/sandboxels-package/sandboxels-1.13.2/scripts/im2elements/go.sum +2 -0
- package/sandboxels-package/sandboxels-1.13.2/scripts/im2elements/main.go +58 -0
- package/sandboxels-package/sandboxels-1.13.2/scripts/perlin.js +165 -0
- package/sandboxels-package/sandboxels-1.13.2/service-worker.js +16 -0
- package/sandboxels-package/sandboxels-1.13.2/sitemap.txt +13 -0
- package/sandboxels-package/sandboxels-1.13.2/style.css +1105 -0
- package/sandboxels-package/sandboxels-1.13.2/template.html +86 -0
- package/sandboxels-package/sandboxels-1.13.2/tips.html +147 -0
- package/sandboxels-package/sandboxels-1.13.2/translate.html +105 -0
- package/README.md +0 -3
|
@@ -0,0 +1,4081 @@
|
|
|
1
|
+
// Gallium is the best element
|
|
2
|
+
async function _nousersthingsprompt(message, defaultValue = "") { // thanks to ggod for updated prompt function
|
|
3
|
+
return new Promise(resolve => {
|
|
4
|
+
promptInput(message, (result) => {
|
|
5
|
+
resolve(result);
|
|
6
|
+
}, "nousersthings.js is asking you...", defaultValue);
|
|
7
|
+
})
|
|
8
|
+
}
|
|
9
|
+
behaviors.RADSOLID = [
|
|
10
|
+
"XX|CR:radiation%1|XX",
|
|
11
|
+
"CR:radiation%1|XX|CR:radiation%1",
|
|
12
|
+
"XX|CR:radiation%1|XX"
|
|
13
|
+
]
|
|
14
|
+
elements.caesium = {
|
|
15
|
+
color: ["#917921", "#ebcb59", "#a48b2d", "#d6b84c"],
|
|
16
|
+
behavior: behaviors.WALL,
|
|
17
|
+
category: "solids",
|
|
18
|
+
state: "solid",
|
|
19
|
+
tempHigh: 28.44,
|
|
20
|
+
stateHigh: "molten_caesium",
|
|
21
|
+
density: 1873,
|
|
22
|
+
conduct: 0.90,
|
|
23
|
+
reactions: {
|
|
24
|
+
"water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
25
|
+
"sugar_water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
26
|
+
"dirty_water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
27
|
+
"pool_water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
28
|
+
"salt_water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
29
|
+
"seltzer": { "elem1":"pop", "elem2":"hydrogen" },
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
elements.molten_caesium = {
|
|
33
|
+
color: ["#735c0a", "#a68e37", "#7e6715", "#9b832e"],
|
|
34
|
+
behavior: behaviors.LIQUID,
|
|
35
|
+
category: "states",
|
|
36
|
+
state: "liquid",
|
|
37
|
+
tempLow: 27.44,
|
|
38
|
+
stateLow: "caesium",
|
|
39
|
+
hidden: true,
|
|
40
|
+
tempHigh: 671,
|
|
41
|
+
stateHigh: "caesium_vapor",
|
|
42
|
+
density: 1842,
|
|
43
|
+
temp: 29,
|
|
44
|
+
conduct: 0.90,
|
|
45
|
+
reactions: {
|
|
46
|
+
"water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
47
|
+
"sugar_water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
48
|
+
"dirty_water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
49
|
+
"pool_water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
50
|
+
"salt_water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
51
|
+
"seltzer": { "elem1":"pop", "elem2":"hydrogen" },
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
elements.caesium_vapor = {
|
|
55
|
+
color: ["#d89e77", "#cd9064", "#af6f34", "#a26320"],
|
|
56
|
+
behavior: behaviors.GAS,
|
|
57
|
+
category: "states",
|
|
58
|
+
state: "gas",
|
|
59
|
+
tempLow: 660,
|
|
60
|
+
hidden: true,
|
|
61
|
+
stateLow: "molten_caesium",
|
|
62
|
+
density: 1.7,
|
|
63
|
+
temp: 700
|
|
64
|
+
}
|
|
65
|
+
elements.caesium_137 = {
|
|
66
|
+
color: ["#917921", "#ebcb59", "#a48b2d", "#d6b84c"],
|
|
67
|
+
behavior: behaviors.RADSOLID,
|
|
68
|
+
category: "solids",
|
|
69
|
+
state: "solid",
|
|
70
|
+
tempHigh: 28.44,
|
|
71
|
+
stateHigh: "molten_caesium_137",
|
|
72
|
+
density: 1873,
|
|
73
|
+
conduct: 0.90,
|
|
74
|
+
reactions: {
|
|
75
|
+
"water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
76
|
+
"sugar_water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
77
|
+
"dirty_water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
78
|
+
"pool_water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
79
|
+
"salt_water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
80
|
+
"seltzer": { "elem1":"pop", "elem2":"hydrogen" },
|
|
81
|
+
},
|
|
82
|
+
tick: function(pixel){
|
|
83
|
+
if (Math.random()<0.0002){
|
|
84
|
+
changePixel(pixel, "barium", false)
|
|
85
|
+
if (Math.random() >= 0.946){
|
|
86
|
+
pixelMap[pixel.x][pixel.y].excited = true
|
|
87
|
+
}
|
|
88
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
89
|
+
var coord = squareCoords[i];
|
|
90
|
+
var x = pixel.x+coord[0];
|
|
91
|
+
var y = pixel.y+coord[1];
|
|
92
|
+
if (isEmpty(x, y)){
|
|
93
|
+
createPixel("electric", x, y)
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
elements.molten_caesium_137 = {
|
|
101
|
+
color: ["#735c0a", "#a68e37", "#7e6715", "#9b832e"],
|
|
102
|
+
behavior: behaviors.RADLIQUID,
|
|
103
|
+
category: "states",
|
|
104
|
+
state: "liquid",
|
|
105
|
+
tempLow: 27.44,
|
|
106
|
+
stateLow: "caesium_137",
|
|
107
|
+
tempHigh: 671,
|
|
108
|
+
hidden: true,
|
|
109
|
+
stateHigh: "caesium_137_vapor",
|
|
110
|
+
density: 1842,
|
|
111
|
+
temp: 29,
|
|
112
|
+
conduct: 0.90,
|
|
113
|
+
reactions: {
|
|
114
|
+
"water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
115
|
+
"sugar_water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
116
|
+
"dirty_water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
117
|
+
"pool_water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
118
|
+
"salt_water": { "elem1":"pop", "elem2":"hydrogen" },
|
|
119
|
+
"seltzer": { "elem1":"pop", "elem2":"hydrogen" },
|
|
120
|
+
},
|
|
121
|
+
tick: function(pixel){
|
|
122
|
+
if (Math.random()<0.0002){
|
|
123
|
+
changePixel(pixel, "barium", false)
|
|
124
|
+
if (Math.random() >= 0.946){
|
|
125
|
+
pixelMap[pixel.x][pixel.y].excited = true
|
|
126
|
+
}
|
|
127
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
128
|
+
var coord = squareCoords[i];
|
|
129
|
+
var x = pixel.x+coord[0];
|
|
130
|
+
var y = pixel.y+coord[1];
|
|
131
|
+
if (isEmpty(x, y)){
|
|
132
|
+
createPixel("electric", x, y)
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
elements.caesium_137_vapor = {
|
|
140
|
+
color: ["#d89e77", "#cd9064", "#af6f34", "#a26320"],
|
|
141
|
+
behavior: behaviors.RADSOLID,
|
|
142
|
+
category: "states",
|
|
143
|
+
state: "gas",
|
|
144
|
+
tempLow: 660,
|
|
145
|
+
stateLow: "molten_caesium_137",
|
|
146
|
+
density: 1.7,
|
|
147
|
+
temp: 700,
|
|
148
|
+
hidden: true,
|
|
149
|
+
tick: function(pixel){
|
|
150
|
+
behaviors.GAS(pixel)
|
|
151
|
+
if (Math.random()<0.0002){
|
|
152
|
+
changePixel(pixel, "barium", false)
|
|
153
|
+
if (Math.random() >= 0.946){
|
|
154
|
+
pixelMap[pixel.x][pixel.y].excited = true
|
|
155
|
+
}
|
|
156
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
157
|
+
var coord = squareCoords[i];
|
|
158
|
+
var x = pixel.x+coord[0];
|
|
159
|
+
var y = pixel.y+coord[1];
|
|
160
|
+
if (isEmpty(x, y)){
|
|
161
|
+
createPixel("electric", x, y)
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
elements.barium = {
|
|
169
|
+
color: ["#191f19", "#2c332c", "#3f483f", "#545e54", "#6a756a"],
|
|
170
|
+
behavior: behaviors.STURDYPOWDER,
|
|
171
|
+
reactions: elements.caesium.reactions,
|
|
172
|
+
category: "powders",
|
|
173
|
+
state: "solid",
|
|
174
|
+
tempHigh: 730,
|
|
175
|
+
stateHigh: "molten_barium",
|
|
176
|
+
density: 3594,
|
|
177
|
+
tick: function(pixel){
|
|
178
|
+
if(pixel.excited && Math.random() < 0.005){
|
|
179
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
180
|
+
var coord = squareCoords[i];
|
|
181
|
+
var x = pixel.x+coord[0];
|
|
182
|
+
var y = pixel.y+coord[1];
|
|
183
|
+
if (isEmpty(x, y)){
|
|
184
|
+
createPixel("laser", x, y)
|
|
185
|
+
pixelMap[x][y].temp = pixel.temp + 120
|
|
186
|
+
delete pixel.excited
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
elements.molten_barium = {
|
|
194
|
+
color: ["#c26d24", "#cf8225", "#da9727", "#e4ad2b", "#ecc432"],
|
|
195
|
+
behavior: behaviors.MOLTEN,
|
|
196
|
+
reactions: elements.caesium.reactions,
|
|
197
|
+
category: "states",
|
|
198
|
+
state: "liquid",
|
|
199
|
+
tempLow: 728,
|
|
200
|
+
hidden: true,
|
|
201
|
+
stateLow: "barium",
|
|
202
|
+
density: 3338,
|
|
203
|
+
tick: function(pixel){
|
|
204
|
+
if(pixel.excited && Math.random() < 0.005){
|
|
205
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
206
|
+
var coord = squareCoords[i];
|
|
207
|
+
var x = pixel.x+coord[0];
|
|
208
|
+
var y = pixel.y+coord[1];
|
|
209
|
+
if (isEmpty(x, y)){
|
|
210
|
+
createPixel("laser", x, y)
|
|
211
|
+
pixelMap[x][y].temp = pixel.temp + 120
|
|
212
|
+
delete pixel.excited
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
elements.subzero_grass_seed = {
|
|
220
|
+
color: ["#022c14", "#032911", "#032205", "#021f00"],
|
|
221
|
+
behavior: [
|
|
222
|
+
"XX|M2%0.1|XX",
|
|
223
|
+
"XX|L2:subzero_grass AND C2:subzero_grass%15|XX",
|
|
224
|
+
"XX|M1|XX",
|
|
225
|
+
],
|
|
226
|
+
category: "life",
|
|
227
|
+
state: "solid",
|
|
228
|
+
tempHigh: 10,
|
|
229
|
+
temp: 0,
|
|
230
|
+
stateHigh: "dead_plant",
|
|
231
|
+
density: 1400
|
|
232
|
+
},
|
|
233
|
+
elements.subzero_grass = {
|
|
234
|
+
color: ["#003220", "#022a1a", "#032314", "#001c0d"],
|
|
235
|
+
behavior: behaviors.STURDYPOWDER,
|
|
236
|
+
category: "life",
|
|
237
|
+
state: "solid",
|
|
238
|
+
tempHigh: 13,
|
|
239
|
+
temp: 0,
|
|
240
|
+
stateHigh: "dead_plant",
|
|
241
|
+
density:1400
|
|
242
|
+
},
|
|
243
|
+
elements.ruthenium = {
|
|
244
|
+
color: ["#ffffff","#c9c9c9","#b1b1b1","#9e9e9e","#888888"],
|
|
245
|
+
behavior: behaviors.STURDYPOWDER,
|
|
246
|
+
category: "powders",
|
|
247
|
+
state: "liquid",
|
|
248
|
+
tempHigh: 2334,
|
|
249
|
+
stateHigh: "molten_ruthenium",
|
|
250
|
+
density: 12370,
|
|
251
|
+
}
|
|
252
|
+
elements.molten_ruthenium = {
|
|
253
|
+
color: ["#ffc251", "#dd562c", "#e9a423", "#d8722e"],
|
|
254
|
+
behavior: behaviors.MOLTEN,
|
|
255
|
+
category: "states",
|
|
256
|
+
state: "liquid",
|
|
257
|
+
hidden: true,
|
|
258
|
+
density: 10650,
|
|
259
|
+
tempLow: 2330,
|
|
260
|
+
stateLow: "ruthenium"
|
|
261
|
+
}
|
|
262
|
+
elements.acid.ignore.push("ruthenium"),
|
|
263
|
+
elements.acid.ignore.push("molten_ruthenium"),
|
|
264
|
+
elements.acid_gas.ignore.push("ruthenium"),
|
|
265
|
+
elements.acid_gas.ignore.push("molten_ruthenium")
|
|
266
|
+
elements.technetium = {
|
|
267
|
+
color: ["#e7d9bb", "#bab195", "#8f8a70", "#66654e"],
|
|
268
|
+
behavior: behaviors.RADSOLID,
|
|
269
|
+
tick: function(pixel){
|
|
270
|
+
if(Math.random() < 0.0007){
|
|
271
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
272
|
+
var coord = squareCoords[i];
|
|
273
|
+
var x = pixel.x+coord[0];
|
|
274
|
+
var y = pixel.y+coord[1];
|
|
275
|
+
if (isEmpty(x, y)){
|
|
276
|
+
createPixel("positron", x, y)
|
|
277
|
+
break;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
changePixel(pixel, "ruthenium", false);
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
category: "solids",
|
|
284
|
+
state: "solid",
|
|
285
|
+
tempHigh: 2157,
|
|
286
|
+
stateHigh: "molten_technetium",
|
|
287
|
+
density: 11500,
|
|
288
|
+
conduct: 0.9
|
|
289
|
+
},
|
|
290
|
+
elements.molten_technetium = {
|
|
291
|
+
color: ["#d16b42", "#da904c", "#dfb360", "#e2d57f"],
|
|
292
|
+
behavior: behaviors.RADMOLTEN,
|
|
293
|
+
tick: function(pixel){
|
|
294
|
+
if(Math.random() < 0.0007){
|
|
295
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
296
|
+
var coord = squareCoords[i];
|
|
297
|
+
var x = pixel.x+coord[0];
|
|
298
|
+
var y = pixel.y+coord[1];
|
|
299
|
+
if (isEmpty(x, y)){
|
|
300
|
+
createPixel("positron", x, y)
|
|
301
|
+
break;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
changePixel(pixel, "ruthenium", false);
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
category: "states",
|
|
308
|
+
state: "liquid",
|
|
309
|
+
hidden: true,
|
|
310
|
+
tempLow: 2140,
|
|
311
|
+
temp: 2200,
|
|
312
|
+
stateLow: "technetium",
|
|
313
|
+
density: 11400
|
|
314
|
+
},
|
|
315
|
+
elements.destroyable_pipe = {
|
|
316
|
+
color: "#414c4f",
|
|
317
|
+
tick: function(pixel) {
|
|
318
|
+
if (!pixel.stage && pixelTicks-pixel.start > 60) {
|
|
319
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
320
|
+
var coord = squareCoords[i];
|
|
321
|
+
var x = pixel.x+coord[0];
|
|
322
|
+
var y = pixel.y+coord[1];
|
|
323
|
+
if (!isEmpty(x,y,true) && elements[pixelMap[x][y].element].movable) {
|
|
324
|
+
deletePixel(x,y)
|
|
325
|
+
}
|
|
326
|
+
if (isEmpty(x,y)) {
|
|
327
|
+
createPixel("pipe_wall",x,y);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
pixel.stage = 1;
|
|
331
|
+
}
|
|
332
|
+
else if (pixel.stage === 1 && pixelTicks-pixel.start > 70) { //uninitialized
|
|
333
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
334
|
+
var coord = adjacentCoords[i];
|
|
335
|
+
var x = pixel.x+coord[0];
|
|
336
|
+
var y = pixel.y+coord[1];
|
|
337
|
+
if (isEmpty(x,y)) {
|
|
338
|
+
pixel.stage = 2; //blue
|
|
339
|
+
pixel.color = pixelColorPick(pixel,"#000036");
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
else if (pixel.stage > 1 && pixelTicks % 3 === pixel.stage-2) { //initialized
|
|
345
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
346
|
+
var coord = squareCoords[i];
|
|
347
|
+
var x = pixel.x+coord[0];
|
|
348
|
+
var y = pixel.y+coord[1];
|
|
349
|
+
if (!isEmpty(x,y,true) && (pixelMap[x][y].element === "destroyable_pipe" || pixelMap[x][y].element === "bridge_pipe")) {
|
|
350
|
+
var newPixel = pixelMap[x][y];
|
|
351
|
+
if (newPixel.stage === 1) {
|
|
352
|
+
var newColor;
|
|
353
|
+
switch (pixel.stage) {
|
|
354
|
+
case 2: newPixel.stage = 3; newColor = "#003600"; break; //green
|
|
355
|
+
case 3: newPixel.stage = 4; newColor = "#360000"; break; //red
|
|
356
|
+
case 4: newPixel.stage = 2; newColor = "#000036"; break; //blue
|
|
357
|
+
}
|
|
358
|
+
newPixel.color = pixelColorPick(newPixel,newColor);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
var moved = false;
|
|
363
|
+
shuffleArray(squareCoordsShuffle);
|
|
364
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
365
|
+
var coord = squareCoordsShuffle[i];
|
|
366
|
+
var x = pixel.x+coord[0];
|
|
367
|
+
var y = pixel.y+coord[1];
|
|
368
|
+
if (!isEmpty(x,y,true)) {
|
|
369
|
+
var newPixel = pixelMap[x][y];
|
|
370
|
+
if (newPixel.element === "destroyable_pipe" || newPixel.element === "bridge_pipe" || newPixel.element === "pipe_transmitter") {
|
|
371
|
+
var nextStage;
|
|
372
|
+
switch (pixel.stage) {
|
|
373
|
+
case 2: nextStage = 4; break; //green
|
|
374
|
+
case 3: nextStage = 2; break; //red
|
|
375
|
+
case 4: nextStage = 3; break; //blue
|
|
376
|
+
}
|
|
377
|
+
if (pixel.con && !newPixel.con && (newPixel.stage === nextStage || newPixel.element === "pipe_transmitter")) { //transfer to adjacent pipe
|
|
378
|
+
newPixel.con = pixel.con;
|
|
379
|
+
newPixel.con.x = newPixel.x;
|
|
380
|
+
newPixel.con.y = newPixel.y;
|
|
381
|
+
pixel.con = null;
|
|
382
|
+
moved = true;
|
|
383
|
+
break;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
else if (!pixel.con && elements[newPixel.element].movable && newPixel.element != "ray") { //suck up pixel
|
|
387
|
+
pixel.con = newPixel;
|
|
388
|
+
deletePixel(newPixel.x,newPixel.y);
|
|
389
|
+
pixel.con.x = pixel.x;
|
|
390
|
+
pixel.con.y = pixel.y;
|
|
391
|
+
pixel.con.del;
|
|
392
|
+
moved = true;
|
|
393
|
+
break;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
if (pixel.con && !moved) { // move to same stage if none other
|
|
398
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
399
|
+
var coord = squareCoordsShuffle[i];
|
|
400
|
+
var x = pixel.x+coord[0];
|
|
401
|
+
var y = pixel.y+coord[1];
|
|
402
|
+
if (isEmpty(x,y)) {
|
|
403
|
+
delete pixel.con.del;
|
|
404
|
+
pixel.con.x = x;
|
|
405
|
+
pixel.con.y = y;
|
|
406
|
+
pixelMap[x][y] = pixel.con;
|
|
407
|
+
currentPixels.push(pixel.con);
|
|
408
|
+
pixel.con = null;
|
|
409
|
+
break;
|
|
410
|
+
}
|
|
411
|
+
if (!isEmpty(x,y,true) && (pixelMap[x][y].element === "destroyable_pipe" || pixelMap[x][y].element === "bridge_pipe")) {
|
|
412
|
+
var newPixel = pixelMap[x][y];
|
|
413
|
+
if (pixel.con && !newPixel.con && newPixel.stage === pixel.stage) {
|
|
414
|
+
newPixel.con = pixel.con;
|
|
415
|
+
newPixel.con.x = newPixel.x;
|
|
416
|
+
newPixel.con.y = newPixel.y;
|
|
417
|
+
pixel.con = null;
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
doDefaults(pixel);
|
|
425
|
+
},
|
|
426
|
+
category: "machines",
|
|
427
|
+
movable: false,
|
|
428
|
+
canContain: true,
|
|
429
|
+
tempHigh: 1538,
|
|
430
|
+
stateHigh: "molten_iron",
|
|
431
|
+
breakInto: "metal_scrap",
|
|
432
|
+
},
|
|
433
|
+
elements.destroyable_superheater = {
|
|
434
|
+
color: "#dd1111",
|
|
435
|
+
behavior: [
|
|
436
|
+
"XX|HT:10|XX",
|
|
437
|
+
"HT:10|XX|HT:10",
|
|
438
|
+
"XX|HT:10|XX",
|
|
439
|
+
],
|
|
440
|
+
category:"machines",
|
|
441
|
+
stateLow:["iron","copper"],
|
|
442
|
+
tempLow: -7,
|
|
443
|
+
breakInto:["metal_scrap","oxidized_copper"],
|
|
444
|
+
},
|
|
445
|
+
elements.destroyable_heater = {
|
|
446
|
+
color: "#881111",
|
|
447
|
+
behavior: [
|
|
448
|
+
"XX|HT:2|XX",
|
|
449
|
+
"HT:2|XX|HT:2",
|
|
450
|
+
"XX|HT:2|XX",
|
|
451
|
+
],
|
|
452
|
+
category:"machines",
|
|
453
|
+
stateLow:["iron","copper"],
|
|
454
|
+
tempLow: -7,
|
|
455
|
+
breakInto:["metal_scrap","oxidized_copper"],
|
|
456
|
+
},
|
|
457
|
+
elements.destroyable_cooler = {
|
|
458
|
+
color: "#111188",
|
|
459
|
+
behavior: [
|
|
460
|
+
"XX|CO:2|XX",
|
|
461
|
+
"CO:2|XX|CO:2",
|
|
462
|
+
"XX|CO:2|XX",
|
|
463
|
+
],
|
|
464
|
+
category:"machines",
|
|
465
|
+
stateHigh:["iron","copper"],
|
|
466
|
+
tempHigh: 49,
|
|
467
|
+
breakInto:["metal_scrap","oxidized_copper"],
|
|
468
|
+
},
|
|
469
|
+
elements.destroyable_freezer = {
|
|
470
|
+
color: "#1111dd",
|
|
471
|
+
behavior: [
|
|
472
|
+
"XX|CO:10|XX",
|
|
473
|
+
"CO:10|XX|CO:10",
|
|
474
|
+
"XX|CO:10|XX",
|
|
475
|
+
],
|
|
476
|
+
category:"machines",
|
|
477
|
+
stateHigh:["iron","copper"],
|
|
478
|
+
tempHigh: 49,
|
|
479
|
+
breakInto:["metal_scrap","oxidized_copper"],
|
|
480
|
+
},
|
|
481
|
+
elements.destroyable_cloner = {
|
|
482
|
+
color: "#dddd00",
|
|
483
|
+
behavior: behaviors.CLONER,
|
|
484
|
+
ignore: ["ecloner","slow_cloner","clone_powder","floating_cloner","wall","ewall","destroyable_cloner","destroyable_clone_powder","cloner"],
|
|
485
|
+
category:"machines",
|
|
486
|
+
darkText: true,
|
|
487
|
+
breakInto: "destroyable_clone_powder",
|
|
488
|
+
tempHigh: 1538,
|
|
489
|
+
stateHigh: "molten_iron",
|
|
490
|
+
},
|
|
491
|
+
elements.destroyable_clone_powder = {
|
|
492
|
+
color: "#f0f000",
|
|
493
|
+
behavior: [
|
|
494
|
+
"XX|CF|XX",
|
|
495
|
+
"CF|XX|CF",
|
|
496
|
+
"M2|CF AND M1|M2",
|
|
497
|
+
],
|
|
498
|
+
ignore: ["ecloner","slow_cloner","clone_powder","floating_cloner","wall","ewall","destroyable_cloner","destroyable_clone_powder","cloner"],
|
|
499
|
+
category:"machines",
|
|
500
|
+
state:"solid",
|
|
501
|
+
density:2710,
|
|
502
|
+
darkText: true,
|
|
503
|
+
breakInto: "destroyable_clone_powder",
|
|
504
|
+
tempHigh: 1538,
|
|
505
|
+
stateHigh: "molten_iron",
|
|
506
|
+
},
|
|
507
|
+
eLists.CLONERS = ["ecloner","slow_cloner","clone_powder","floating_cloner","wall","ewall","destroyable_cloner","destroyable_clone_powder","cloner"];
|
|
508
|
+
elements.cloner.ignore = eLists.CLONERS;
|
|
509
|
+
elements.slow_cloner.ignore = eLists.CLONERS;
|
|
510
|
+
elements.clone_powder.ignore = eLists.CLONERS;
|
|
511
|
+
elements.floating_cloner.ignore = eLists.CLONERS;
|
|
512
|
+
elements.roomtemper = {
|
|
513
|
+
color: "#29632f",
|
|
514
|
+
behavior: behaviors.WALL,
|
|
515
|
+
tick: function(pixel) {
|
|
516
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
517
|
+
var coord = squareCoords[i];
|
|
518
|
+
var x = pixel.x+coord[0];
|
|
519
|
+
var y = pixel.y+coord[1];
|
|
520
|
+
if (!isEmpty(x,y, true)) {
|
|
521
|
+
if(pixelMap[x][y].temp < -230) {
|
|
522
|
+
pixelMap[x][y].temp = (pixelMap[x][y].temp + 7)
|
|
523
|
+
} else if(pixelMap[x][y].temp > 270) {
|
|
524
|
+
pixelMap[x][y].temp = (pixelMap[x][y].temp - 7)
|
|
525
|
+
} else if (pixelMap[x][y].temp < 20) {
|
|
526
|
+
pixelMap[x][y].temp = (pixelMap[x][y].temp + 2)
|
|
527
|
+
} else if (pixelMap[x][y].temp > 20) {
|
|
528
|
+
pixelMap[x][y].temp = (pixelMap[x][y].temp - 2)
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
category:"machines",
|
|
534
|
+
state:"solid",
|
|
535
|
+
insulate: true,
|
|
536
|
+
noMix: true,
|
|
537
|
+
movable: false,
|
|
538
|
+
},
|
|
539
|
+
elements.destroyable_roomtemper = {
|
|
540
|
+
color: "#18401a",
|
|
541
|
+
behavior: behaviors.WALL,
|
|
542
|
+
tick: function(pixel) {
|
|
543
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
544
|
+
var coord = squareCoords[i];
|
|
545
|
+
var x = pixel.x+coord[0];
|
|
546
|
+
var y = pixel.y+coord[1];
|
|
547
|
+
if (!isEmpty(x,y, true)) {
|
|
548
|
+
if(pixelMap[x][y].temp < -230) {
|
|
549
|
+
pixelMap[x][y].temp = (pixelMap[x][y].temp + 7)
|
|
550
|
+
} else if(pixelMap[x][y].temp > 270) {
|
|
551
|
+
pixelMap[x][y].temp = (pixelMap[x][y].temp - 7)
|
|
552
|
+
} else if (pixelMap[x][y].temp < 20) {
|
|
553
|
+
pixelMap[x][y].temp = (pixelMap[x][y].temp + 2)
|
|
554
|
+
} else if (pixelMap[x][y].temp > 20) {
|
|
555
|
+
pixelMap[x][y].temp = (pixelMap[x][y].temp - 2)
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
category:"machines",
|
|
561
|
+
state:"solid",
|
|
562
|
+
tempHigh: 1538,
|
|
563
|
+
stateHigh: ["steam","molten_iron"],
|
|
564
|
+
tempLow: -200,
|
|
565
|
+
stateLow: ["ice", "iron"],
|
|
566
|
+
breakInto: ["snow","metal_scrap"],
|
|
567
|
+
noMix: true,
|
|
568
|
+
movable: false,
|
|
569
|
+
},
|
|
570
|
+
elements.customtemper = {
|
|
571
|
+
color: "#421b6b",
|
|
572
|
+
behavior: behaviors.WALL,
|
|
573
|
+
tick: function(pixel) {
|
|
574
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
575
|
+
var coord = squareCoords[i];
|
|
576
|
+
var x = pixel.x+coord[0];
|
|
577
|
+
var y = pixel.y+coord[1];
|
|
578
|
+
if (!isEmpty(x,y, true)) {
|
|
579
|
+
if(pixelMap[x][y].temp < (pixel.temp - 250)) {
|
|
580
|
+
pixelMap[x][y].temp = (pixelMap[x][y].temp + 7)
|
|
581
|
+
} else if(pixelMap[x][y].temp > (pixel.temp + 250)) {
|
|
582
|
+
pixelMap[x][y].temp = (pixelMap[x][y].temp - 7)
|
|
583
|
+
} else if (pixelMap[x][y].temp < pixel.temp) {
|
|
584
|
+
pixelMap[x][y].temp = (pixelMap[x][y].temp + 2)
|
|
585
|
+
} else if (pixelMap[x][y].temp > pixel.temp) {
|
|
586
|
+
pixelMap[x][y].temp = (pixelMap[x][y].temp - 2)
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
category:"machines",
|
|
592
|
+
state:"solid",
|
|
593
|
+
insulate: true,
|
|
594
|
+
noMix: true,
|
|
595
|
+
movable: false,
|
|
596
|
+
},
|
|
597
|
+
elements.destroyable_customtemper = {
|
|
598
|
+
color: "#261047",
|
|
599
|
+
behavior: behaviors.WALL,
|
|
600
|
+
tick: function(pixel) {
|
|
601
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
602
|
+
var coord = squareCoords[i];
|
|
603
|
+
var x = pixel.x+coord[0];
|
|
604
|
+
var y = pixel.y+coord[1];
|
|
605
|
+
if (!isEmpty(x,y, true)) {
|
|
606
|
+
if(pixelMap[x][y].temp < (pixel.temp - 250)) {
|
|
607
|
+
pixelMap[x][y].temp = (pixelMap[x][y].temp + 7)
|
|
608
|
+
} else if(pixelMap[x][y].temp > (pixel.temp + 250)) {
|
|
609
|
+
pixelMap[x][y].temp = (pixelMap[x][y].temp - 7)
|
|
610
|
+
} else if (pixelMap[x][y].temp < pixel.temp) {
|
|
611
|
+
pixelMap[x][y].temp = (pixelMap[x][y].temp + 2)
|
|
612
|
+
} else if (pixelMap[x][y].temp > pixel.temp) {
|
|
613
|
+
pixelMap[x][y].temp = (pixelMap[x][y].temp - 2)
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
category:"machines",
|
|
619
|
+
state:"solid",
|
|
620
|
+
insulate: true,
|
|
621
|
+
breakInto: ["snow","metal_scrap","oxidized_copper","wire"],
|
|
622
|
+
noMix: true,
|
|
623
|
+
movable: false,
|
|
624
|
+
},
|
|
625
|
+
elements.e_pipe = {
|
|
626
|
+
color: "#414c4f",
|
|
627
|
+
onSelect: function() {
|
|
628
|
+
logMessage("Draw a pipe, wait for walls to appear, then erase the exit hole.");
|
|
629
|
+
},
|
|
630
|
+
tick: function(pixel) {
|
|
631
|
+
if (!pixel.stage && pixelTicks-pixel.start > 60) {
|
|
632
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
633
|
+
var coord = squareCoords[i];
|
|
634
|
+
var x = pixel.x+coord[0];
|
|
635
|
+
var y = pixel.y+coord[1];
|
|
636
|
+
if (!isEmpty(x,y,true) && elements[pixelMap[x][y].element].movable) {
|
|
637
|
+
deletePixel(x,y)
|
|
638
|
+
}
|
|
639
|
+
if (isEmpty(x,y)) {
|
|
640
|
+
createPixel("pipe_wall",x,y);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
pixel.stage = 1;
|
|
644
|
+
}
|
|
645
|
+
else if (pixel.stage === 1 && pixelTicks-pixel.start > 70) { //uninitialized
|
|
646
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
647
|
+
var coord = adjacentCoords[i];
|
|
648
|
+
var x = pixel.x+coord[0];
|
|
649
|
+
var y = pixel.y+coord[1];
|
|
650
|
+
if (isEmpty(x,y)) {
|
|
651
|
+
pixel.stage = 2; //blue
|
|
652
|
+
pixel.color = pixelColorPick(pixel,"#000036");
|
|
653
|
+
break;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
else if (pixel.stage > 1 && pixelTicks % 3 === pixel.stage-2) { //initialized
|
|
658
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
659
|
+
var coord = squareCoords[i];
|
|
660
|
+
var x = pixel.x+coord[0];
|
|
661
|
+
var y = pixel.y+coord[1];
|
|
662
|
+
if (!isEmpty(x,y,true) && (pixelMap[x][y].element === "e_pipe" || pixelMap[x][y].element === "bridge_pipe")) {
|
|
663
|
+
var newPixel = pixelMap[x][y];
|
|
664
|
+
if (newPixel.stage === 1) {
|
|
665
|
+
var newColor;
|
|
666
|
+
switch (pixel.stage) {
|
|
667
|
+
case 2: newPixel.stage = 3; newColor = "#003600"; break; //green
|
|
668
|
+
case 3: newPixel.stage = 4; newColor = "#360000"; break; //red
|
|
669
|
+
case 4: newPixel.stage = 2; newColor = "#000036"; break; //blue
|
|
670
|
+
}
|
|
671
|
+
newPixel.color = pixelColorPick(newPixel,newColor);
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
var moved = false;
|
|
676
|
+
shuffleArray(squareCoordsShuffle);
|
|
677
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
678
|
+
var coord = squareCoordsShuffle[i];
|
|
679
|
+
var x = pixel.x+coord[0];
|
|
680
|
+
var y = pixel.y+coord[1];
|
|
681
|
+
if (!isEmpty(x,y,true)) {
|
|
682
|
+
var newPixel = pixelMap[x][y];
|
|
683
|
+
if (newPixel.element === "e_pipe" || newPixel.element === "bridge_pipe" || newPixel.element === "pipe_transmitter") {
|
|
684
|
+
var nextStage;
|
|
685
|
+
switch (pixel.stage) {
|
|
686
|
+
case 2: nextStage = 4; break; //green
|
|
687
|
+
case 3: nextStage = 2; break; //red
|
|
688
|
+
case 4: nextStage = 3; break; //blue
|
|
689
|
+
}
|
|
690
|
+
if (pixel.con && !newPixel.con && (newPixel.stage === nextStage || newPixel.element === "pipe_transmitter") && (pixel.charge || pixel.chargeCD)) { //transfer to adjacent pipe
|
|
691
|
+
newPixel.con = pixel.con;
|
|
692
|
+
newPixel.con.x = newPixel.x;
|
|
693
|
+
newPixel.con.y = newPixel.y;
|
|
694
|
+
pixel.con = null;
|
|
695
|
+
moved = true;
|
|
696
|
+
break;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
else if (!pixel.con && elements[newPixel.element].movable && (pixel.charge || pixel.chargeCD) && newPixel.element != "ray") { //suck up pixel
|
|
700
|
+
pixel.con = newPixel;
|
|
701
|
+
deletePixel(newPixel.x,newPixel.y);
|
|
702
|
+
pixel.con.x = pixel.x;
|
|
703
|
+
pixel.con.y = pixel.y;
|
|
704
|
+
pixel.con.del;
|
|
705
|
+
moved = true;
|
|
706
|
+
break;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
if (pixel.con && !moved && (pixel.charge || pixel.chargeCD)) { // move to same stage if none other
|
|
711
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
712
|
+
var coord = squareCoordsShuffle[i];
|
|
713
|
+
var x = pixel.x+coord[0];
|
|
714
|
+
var y = pixel.y+coord[1];
|
|
715
|
+
if (isEmpty(x,y)) {
|
|
716
|
+
delete pixel.con.del;
|
|
717
|
+
pixel.con.x = x;
|
|
718
|
+
pixel.con.y = y;
|
|
719
|
+
pixelMap[x][y] = pixel.con;
|
|
720
|
+
currentPixels.push(pixel.con);
|
|
721
|
+
pixel.con = null;
|
|
722
|
+
break;
|
|
723
|
+
}
|
|
724
|
+
if (!isEmpty(x,y,true) && (pixelMap[x][y].element === "e_pipe" || pixelMap[x][y].element === "bridge_pipe")) {
|
|
725
|
+
var newPixel = pixelMap[x][y];
|
|
726
|
+
if (pixel.con && !newPixel.con && newPixel.stage === pixel.stage) {
|
|
727
|
+
newPixel.con = pixel.con;
|
|
728
|
+
newPixel.con.x = newPixel.x;
|
|
729
|
+
newPixel.con.y = newPixel.y;
|
|
730
|
+
pixel.con = null;
|
|
731
|
+
break;
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
doDefaults(pixel);
|
|
738
|
+
},
|
|
739
|
+
category: "machines",
|
|
740
|
+
movable: false,
|
|
741
|
+
canContain: true,
|
|
742
|
+
conduct: 1,
|
|
743
|
+
insulate: true,
|
|
744
|
+
},
|
|
745
|
+
elements.destroyable_e_pipe = {
|
|
746
|
+
color: "#414c4f",
|
|
747
|
+
onSelect: function() {
|
|
748
|
+
logMessage("Draw a pipe, wait for walls to appear, then erase the exit hole.");
|
|
749
|
+
},
|
|
750
|
+
tick: function(pixel) {
|
|
751
|
+
if (!pixel.stage && pixelTicks-pixel.start > 60) {
|
|
752
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
753
|
+
var coord = squareCoords[i];
|
|
754
|
+
var x = pixel.x+coord[0];
|
|
755
|
+
var y = pixel.y+coord[1];
|
|
756
|
+
if (!isEmpty(x,y,true) && elements[pixelMap[x][y].element].movable) {
|
|
757
|
+
deletePixel(x,y)
|
|
758
|
+
}
|
|
759
|
+
if (isEmpty(x,y)) {
|
|
760
|
+
createPixel("pipe_wall",x,y);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
pixel.stage = 1;
|
|
764
|
+
}
|
|
765
|
+
else if (pixel.stage === 1 && pixelTicks-pixel.start > 70) { //uninitialized
|
|
766
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
767
|
+
var coord = adjacentCoords[i];
|
|
768
|
+
var x = pixel.x+coord[0];
|
|
769
|
+
var y = pixel.y+coord[1];
|
|
770
|
+
if (isEmpty(x,y)) {
|
|
771
|
+
pixel.stage = 2; //blue
|
|
772
|
+
pixel.color = pixelColorPick(pixel,"#000036");
|
|
773
|
+
break;
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
else if (pixel.stage > 1 && pixelTicks % 3 === pixel.stage-2) { //initialized
|
|
778
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
779
|
+
var coord = squareCoords[i];
|
|
780
|
+
var x = pixel.x+coord[0];
|
|
781
|
+
var y = pixel.y+coord[1];
|
|
782
|
+
if (!isEmpty(x,y,true) && (pixelMap[x][y].element === "destroyable_e_pipe" || pixelMap[x][y].element === "bridge_pipe")) {
|
|
783
|
+
var newPixel = pixelMap[x][y];
|
|
784
|
+
if (newPixel.stage === 1) {
|
|
785
|
+
var newColor;
|
|
786
|
+
switch (pixel.stage) {
|
|
787
|
+
case 2: newPixel.stage = 3; newColor = "#003600"; break; //green
|
|
788
|
+
case 3: newPixel.stage = 4; newColor = "#360000"; break; //red
|
|
789
|
+
case 4: newPixel.stage = 2; newColor = "#000036"; break; //blue
|
|
790
|
+
}
|
|
791
|
+
newPixel.color = pixelColorPick(newPixel,newColor);
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
var moved = false;
|
|
796
|
+
shuffleArray(squareCoordsShuffle);
|
|
797
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
798
|
+
var coord = squareCoordsShuffle[i];
|
|
799
|
+
var x = pixel.x+coord[0];
|
|
800
|
+
var y = pixel.y+coord[1];
|
|
801
|
+
if (!isEmpty(x,y,true)) {
|
|
802
|
+
var newPixel = pixelMap[x][y];
|
|
803
|
+
if (newPixel.element === "destroyable_e_pipe" || newPixel.element === "bridge_pipe" || newPixel.element === "pipe_transmitter") {
|
|
804
|
+
var nextStage;
|
|
805
|
+
switch (pixel.stage) {
|
|
806
|
+
case 2: nextStage = 4; break; //green
|
|
807
|
+
case 3: nextStage = 2; break; //red
|
|
808
|
+
case 4: nextStage = 3; break; //blue
|
|
809
|
+
}
|
|
810
|
+
if (pixel.con && !newPixel.con && (newPixel.stage === nextStage || newPixel.element === "pipe_transmitter") && (pixel.charge || pixel.chargeCD)) { //transfer to adjacent pipe
|
|
811
|
+
newPixel.con = pixel.con;
|
|
812
|
+
newPixel.con.x = newPixel.x;
|
|
813
|
+
newPixel.con.y = newPixel.y;
|
|
814
|
+
pixel.con = null;
|
|
815
|
+
moved = true;
|
|
816
|
+
break;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
else if (!pixel.con && elements[newPixel.element].movable && (pixel.charge || pixel.chargeCD) && newPixel.element != "ray" ) { //suck up pixel
|
|
820
|
+
pixel.con = newPixel;
|
|
821
|
+
deletePixel(newPixel.x,newPixel.y);
|
|
822
|
+
pixel.con.x = pixel.x;
|
|
823
|
+
pixel.con.y = pixel.y;
|
|
824
|
+
pixel.con.del;
|
|
825
|
+
moved = true;
|
|
826
|
+
break;
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
if (pixel.con && !moved && (pixel.charge || pixel.chargeCD)) { // move to same stage if none other
|
|
831
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
832
|
+
var coord = squareCoordsShuffle[i];
|
|
833
|
+
var x = pixel.x+coord[0];
|
|
834
|
+
var y = pixel.y+coord[1];
|
|
835
|
+
if (isEmpty(x,y)) {
|
|
836
|
+
delete pixel.con.del;
|
|
837
|
+
pixel.con.x = x;
|
|
838
|
+
pixel.con.y = y;
|
|
839
|
+
pixelMap[x][y] = pixel.con;
|
|
840
|
+
currentPixels.push(pixel.con);
|
|
841
|
+
pixel.con = null;
|
|
842
|
+
break;
|
|
843
|
+
}
|
|
844
|
+
if (!isEmpty(x,y,true) && (pixelMap[x][y].element === "destroyable_e_pipe" || pixelMap[x][y].element === "bridge_pipe")) {
|
|
845
|
+
var newPixel = pixelMap[x][y];
|
|
846
|
+
if (pixel.con && !newPixel.con && newPixel.stage === pixel.stage) {
|
|
847
|
+
newPixel.con = pixel.con;
|
|
848
|
+
newPixel.con.x = newPixel.x;
|
|
849
|
+
newPixel.con.y = newPixel.y;
|
|
850
|
+
pixel.con = null;
|
|
851
|
+
break;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
doDefaults(pixel);
|
|
858
|
+
},
|
|
859
|
+
category: "machines",
|
|
860
|
+
movable: false,
|
|
861
|
+
canContain: true,
|
|
862
|
+
conduct: 1,
|
|
863
|
+
tempHigh: 1538,
|
|
864
|
+
stateHigh: "molten_iron",
|
|
865
|
+
breakInto: ["metal_scrap", "wire"]
|
|
866
|
+
},
|
|
867
|
+
currentChannel = 0;
|
|
868
|
+
elements.channel_pipe = {
|
|
869
|
+
color: "#414c4f",
|
|
870
|
+
onSelect: async function() {
|
|
871
|
+
currentChannel = await _nousersthingsprompt("Please input the desired channel of this pipe strand. Warning: It wont work if you do multiple strand types while paused.", (currentChannel||undefined))
|
|
872
|
+
logMessage("Draw a pipe, wait for walls to appear, then erase the exit hole. Channel pipes only give pixels to channel pipes with the same channel.");
|
|
873
|
+
},
|
|
874
|
+
tick: function(pixel) {
|
|
875
|
+
if (pixel.start===pixelTicks){
|
|
876
|
+
pixel.channel = currentChannel;
|
|
877
|
+
}
|
|
878
|
+
if (!pixel.stage && pixelTicks-pixel.start > 60) {
|
|
879
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
880
|
+
var coord = squareCoords[i];
|
|
881
|
+
var x = pixel.x+coord[0];
|
|
882
|
+
var y = pixel.y+coord[1];
|
|
883
|
+
if (!isEmpty(x,y,true) && elements[pixelMap[x][y].element].movable) {
|
|
884
|
+
deletePixel(x,y)
|
|
885
|
+
}
|
|
886
|
+
if (isEmpty(x,y)) {
|
|
887
|
+
createPixel("pipe_wall",x,y);
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
pixel.stage = 1;
|
|
891
|
+
}
|
|
892
|
+
else if (pixel.stage === 1 && pixelTicks-pixel.start > 70) { //uninitialized
|
|
893
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
894
|
+
var coord = adjacentCoords[i];
|
|
895
|
+
var x = pixel.x+coord[0];
|
|
896
|
+
var y = pixel.y+coord[1];
|
|
897
|
+
if (isEmpty(x,y)) {
|
|
898
|
+
pixel.stage = 2; //blue
|
|
899
|
+
pixel.color = pixelColorPick(pixel,"#000036");
|
|
900
|
+
break;
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
else if (pixel.stage > 1 && pixelTicks % 3 === pixel.stage-2) { //initialized
|
|
905
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
906
|
+
var coord = squareCoords[i];
|
|
907
|
+
var x = pixel.x+coord[0];
|
|
908
|
+
var y = pixel.y+coord[1];
|
|
909
|
+
if (!isEmpty(x,y,true) && ((pixelMap[x][y].element === "channel_pipe" && pixelMap[x][y].channel == pixel.channel) || pixelMap[x][y].element === "bridge_pipe")) {
|
|
910
|
+
var newPixel = pixelMap[x][y];
|
|
911
|
+
if (newPixel.stage === 1) {
|
|
912
|
+
var newColor;
|
|
913
|
+
switch (pixel.stage) {
|
|
914
|
+
case 2: newPixel.stage = 3; newColor = "#003600"; break; //green
|
|
915
|
+
case 3: newPixel.stage = 4; newColor = "#360000"; break; //red
|
|
916
|
+
case 4: newPixel.stage = 2; newColor = "#000036"; break; //blue
|
|
917
|
+
}
|
|
918
|
+
newPixel.color = pixelColorPick(newPixel,newColor);
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
var moved = false;
|
|
923
|
+
shuffleArray(squareCoordsShuffle);
|
|
924
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
925
|
+
var coord = squareCoordsShuffle[i];
|
|
926
|
+
var x = pixel.x+coord[0];
|
|
927
|
+
var y = pixel.y+coord[1];
|
|
928
|
+
if (!isEmpty(x,y,true)) {
|
|
929
|
+
var newPixel = pixelMap[x][y];
|
|
930
|
+
if ((newPixel.element === "channel_pipe" && pixelMap[x][y].channel == pixel.channel || newPixel.element === "bridge_pipe" || (newPixel.element === "pipe_transmitter" && pixelMap[x][y].channel == pixel.channel))) {
|
|
931
|
+
var nextStage;
|
|
932
|
+
switch (pixel.stage) {
|
|
933
|
+
case 2: nextStage = 4; break; //green
|
|
934
|
+
case 3: nextStage = 2; break; //red
|
|
935
|
+
case 4: nextStage = 3; break; //blue
|
|
936
|
+
}
|
|
937
|
+
if (pixel.con && !newPixel.con && (newPixel.stage === nextStage || newPixel.element === "pipe_transmitter")) { //transfer to adjacent pipe
|
|
938
|
+
newPixel.con = pixel.con;
|
|
939
|
+
newPixel.con.x = newPixel.x;
|
|
940
|
+
newPixel.con.y = newPixel.y;
|
|
941
|
+
pixel.con = null;
|
|
942
|
+
moved = true;
|
|
943
|
+
break;
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
else if (!pixel.con && elements[newPixel.element].movable && newPixel.element != "ray") { //suck up pixel
|
|
947
|
+
pixel.con = newPixel;
|
|
948
|
+
deletePixel(newPixel.x,newPixel.y);
|
|
949
|
+
pixel.con.x = pixel.x;
|
|
950
|
+
pixel.con.y = pixel.y;
|
|
951
|
+
pixel.con.del;
|
|
952
|
+
moved = true;
|
|
953
|
+
break;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
if (pixel.con && !moved) { // move to same stage if none other
|
|
958
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
959
|
+
var coord = squareCoordsShuffle[i];
|
|
960
|
+
var x = pixel.x+coord[0];
|
|
961
|
+
var y = pixel.y+coord[1];
|
|
962
|
+
if (isEmpty(x,y)) {
|
|
963
|
+
delete pixel.con.del;
|
|
964
|
+
pixel.con.x = x;
|
|
965
|
+
pixel.con.y = y;
|
|
966
|
+
pixelMap[x][y] = pixel.con;
|
|
967
|
+
currentPixels.push(pixel.con);
|
|
968
|
+
pixel.con = null;
|
|
969
|
+
break;
|
|
970
|
+
}
|
|
971
|
+
if (!isEmpty(x,y,true) && ((pixelMap[x][y].element === "channel_pipe" && pixelMap[x][y].channel == pixel.channel) || pixelMap[x][y].element === "bridge_pipe")) {
|
|
972
|
+
var newPixel = pixelMap[x][y];
|
|
973
|
+
if (pixel.con && !newPixel.con && newPixel.stage === pixel.stage) {
|
|
974
|
+
newPixel.con = pixel.con;
|
|
975
|
+
newPixel.con.x = newPixel.x;
|
|
976
|
+
newPixel.con.y = newPixel.y;
|
|
977
|
+
pixel.con = null;
|
|
978
|
+
break;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
doDefaults(pixel);
|
|
985
|
+
},
|
|
986
|
+
category: "machines",
|
|
987
|
+
movable: false,
|
|
988
|
+
canContain: true,
|
|
989
|
+
insulate: true,
|
|
990
|
+
},
|
|
991
|
+
elements.destroyable_channel_pipe = {
|
|
992
|
+
color: "#414c4f",
|
|
993
|
+
onSelect: async function() {
|
|
994
|
+
currentChannel = await _nousersthingsprompt("Please input the desired channel of this pipe strand. Warning: It wont work if you do multiple strand types while paused.", (currentChannel||undefined))
|
|
995
|
+
logMessage("Draw a pipe, wait for walls to appear, then erase the exit hole. Use the prop tool to set channel to a number before erasing the holes.");
|
|
996
|
+
},
|
|
997
|
+
tick: function(pixel) {
|
|
998
|
+
if (pixel.start === pixelTicks){
|
|
999
|
+
pixel.channel = currentChannel;
|
|
1000
|
+
}
|
|
1001
|
+
if (!pixel.stage && pixelTicks-pixel.start > 60) {
|
|
1002
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1003
|
+
var coord = squareCoords[i];
|
|
1004
|
+
var x = pixel.x+coord[0];
|
|
1005
|
+
var y = pixel.y+coord[1];
|
|
1006
|
+
if (!isEmpty(x,y,true) && elements[pixelMap[x][y].element].movable) {
|
|
1007
|
+
deletePixel(x,y)
|
|
1008
|
+
}
|
|
1009
|
+
if (isEmpty(x,y)) {
|
|
1010
|
+
createPixel("pipe_wall",x,y);
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
pixel.stage = 1;
|
|
1014
|
+
}
|
|
1015
|
+
else if (pixel.stage === 1 && pixelTicks-pixel.start > 70) { //uninitialized
|
|
1016
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
1017
|
+
var coord = adjacentCoords[i];
|
|
1018
|
+
var x = pixel.x+coord[0];
|
|
1019
|
+
var y = pixel.y+coord[1];
|
|
1020
|
+
if (isEmpty(x,y)) {
|
|
1021
|
+
pixel.stage = 2; //blue
|
|
1022
|
+
pixel.color = pixelColorPick(pixel,"#000036");
|
|
1023
|
+
break;
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
else if (pixel.stage > 1 && pixelTicks % 3 === pixel.stage-2) { //initialized
|
|
1028
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1029
|
+
var coord = squareCoords[i];
|
|
1030
|
+
var x = pixel.x+coord[0];
|
|
1031
|
+
var y = pixel.y+coord[1];
|
|
1032
|
+
if (!isEmpty(x,y,true) && (pixelMap[x][y].element === "destroyable_channel_pipe" && pixelMap[x][y].channel == pixel.channel || pixelMap[x][y].element === "bridge_pipe")) {
|
|
1033
|
+
var newPixel = pixelMap[x][y];
|
|
1034
|
+
if (newPixel.stage === 1) {
|
|
1035
|
+
var newColor;
|
|
1036
|
+
switch (pixel.stage) {
|
|
1037
|
+
case 2: newPixel.stage = 3; newColor = "#003600"; break; //green
|
|
1038
|
+
case 3: newPixel.stage = 4; newColor = "#360000"; break; //red
|
|
1039
|
+
case 4: newPixel.stage = 2; newColor = "#000036"; break; //blue
|
|
1040
|
+
}
|
|
1041
|
+
newPixel.color = pixelColorPick(newPixel,newColor);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
var moved = false;
|
|
1046
|
+
shuffleArray(squareCoordsShuffle);
|
|
1047
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
1048
|
+
var coord = squareCoordsShuffle[i];
|
|
1049
|
+
var x = pixel.x+coord[0];
|
|
1050
|
+
var y = pixel.y+coord[1];
|
|
1051
|
+
if (!isEmpty(x,y,true)) {
|
|
1052
|
+
var newPixel = pixelMap[x][y];
|
|
1053
|
+
if ((newPixel.element === "destroyable_channel_pipe" && pixelMap[x][y].channel == pixel.channel) || newPixel.element === "bridge_pipe" || (newPixel.element === "pipe_transmitter" && pixelMap[x][y].channel == pixel.channel)) {
|
|
1054
|
+
var nextStage;
|
|
1055
|
+
switch (pixel.stage) {
|
|
1056
|
+
case 2: nextStage = 4; break; //green
|
|
1057
|
+
case 3: nextStage = 2; break; //red
|
|
1058
|
+
case 4: nextStage = 3; break; //blue
|
|
1059
|
+
}
|
|
1060
|
+
if (pixel.con && !newPixel.con && (newPixel.stage === nextStage || newPixel.element === "pipe_transmitter")) { //transfer to adjacent pipe
|
|
1061
|
+
newPixel.con = pixel.con;
|
|
1062
|
+
newPixel.con.x = newPixel.x;
|
|
1063
|
+
newPixel.con.y = newPixel.y;
|
|
1064
|
+
pixel.con = null;
|
|
1065
|
+
moved = true;
|
|
1066
|
+
break;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
else if (!pixel.con && elements[newPixel.element].movable && newPixel.element != "ray") { //suck up pixel
|
|
1070
|
+
pixel.con = newPixel;
|
|
1071
|
+
deletePixel(newPixel.x,newPixel.y);
|
|
1072
|
+
pixel.con.x = pixel.x;
|
|
1073
|
+
pixel.con.y = pixel.y;
|
|
1074
|
+
pixel.con.del;
|
|
1075
|
+
moved = true;
|
|
1076
|
+
break;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
if (pixel.con && !moved) { // move to same stage if none other
|
|
1081
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
1082
|
+
var coord = squareCoordsShuffle[i];
|
|
1083
|
+
var x = pixel.x+coord[0];
|
|
1084
|
+
var y = pixel.y+coord[1];
|
|
1085
|
+
if (isEmpty(x,y)) {
|
|
1086
|
+
delete pixel.con.del;
|
|
1087
|
+
pixel.con.x = x;
|
|
1088
|
+
pixel.con.y = y;
|
|
1089
|
+
pixelMap[x][y] = pixel.con;
|
|
1090
|
+
currentPixels.push(pixel.con);
|
|
1091
|
+
pixel.con = null;
|
|
1092
|
+
break;
|
|
1093
|
+
}
|
|
1094
|
+
if (!isEmpty(x,y,true) && ((pixelMap[x][y].element === "destroyable_channel_pipe" && pixelMap[x][y].channel == pixel.channel) || pixelMap[x][y].element === "bridge_pipe")) {
|
|
1095
|
+
var newPixel = pixelMap[x][y];
|
|
1096
|
+
if (pixel.con && !newPixel.con && newPixel.stage === pixel.stage) {
|
|
1097
|
+
newPixel.con = pixel.con;
|
|
1098
|
+
newPixel.con.x = newPixel.x;
|
|
1099
|
+
newPixel.con.y = newPixel.y;
|
|
1100
|
+
pixel.con = null;
|
|
1101
|
+
break;
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
doDefaults(pixel);
|
|
1108
|
+
},
|
|
1109
|
+
category: "machines",
|
|
1110
|
+
movable: false,
|
|
1111
|
+
canContain: true,
|
|
1112
|
+
},
|
|
1113
|
+
listPipes = ["pipe", "destroyable_pipe", "destroyable_e_pipe","channel_pipe","destroyable_channel_pipe","bridge_pipe","e_pipe","pipe_transmitter"];
|
|
1114
|
+
elements.bridge_pipe = {
|
|
1115
|
+
color: "#414c4f",
|
|
1116
|
+
onSelect: function() {
|
|
1117
|
+
logMessage("Draw a pipe, wait for walls to appear, then erase the exit hole.");
|
|
1118
|
+
},
|
|
1119
|
+
tick: function(pixel) {
|
|
1120
|
+
if (!pixel.stage && pixelTicks-pixel.start > 60) {
|
|
1121
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1122
|
+
var coord = squareCoords[i];
|
|
1123
|
+
var x = pixel.x+coord[0];
|
|
1124
|
+
var y = pixel.y+coord[1];
|
|
1125
|
+
if (!isEmpty(x,y,true) && elements[pixelMap[x][y].element].movable) {
|
|
1126
|
+
deletePixel(x,y)
|
|
1127
|
+
}
|
|
1128
|
+
if (isEmpty(x,y)) {
|
|
1129
|
+
createPixel("pipe_wall",x,y);
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
pixel.stage = 1;
|
|
1133
|
+
}
|
|
1134
|
+
else if (pixel.stage === 1 && pixelTicks-pixel.start > 70) { //uninitialized
|
|
1135
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
1136
|
+
var coord = adjacentCoords[i];
|
|
1137
|
+
var x = pixel.x+coord[0];
|
|
1138
|
+
var y = pixel.y+coord[1];
|
|
1139
|
+
if (isEmpty(x,y)) {
|
|
1140
|
+
pixel.stage = 2; //blue
|
|
1141
|
+
pixel.color = pixelColorPick(pixel,"#000036");
|
|
1142
|
+
break;
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
else if (pixel.stage > 1 && pixelTicks % 3 === pixel.stage-2) { //initialized
|
|
1147
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1148
|
+
var coord = squareCoords[i];
|
|
1149
|
+
var x = pixel.x+coord[0];
|
|
1150
|
+
var y = pixel.y+coord[1];
|
|
1151
|
+
if (!isEmpty(x,y,true) && listPipes.includes(pixelMap[x][y].element)) {
|
|
1152
|
+
var newPixel = pixelMap[x][y];
|
|
1153
|
+
if (newPixel.stage === 1) {
|
|
1154
|
+
var newColor;
|
|
1155
|
+
switch (pixel.stage) {
|
|
1156
|
+
case 2: newPixel.stage = 3; newColor = "#003600"; break; //green
|
|
1157
|
+
case 3: newPixel.stage = 4; newColor = "#360000"; break; //red
|
|
1158
|
+
case 4: newPixel.stage = 2; newColor = "#000036"; break; //blue
|
|
1159
|
+
}
|
|
1160
|
+
newPixel.color = pixelColorPick(newPixel,newColor);
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
var moved = false;
|
|
1165
|
+
shuffleArray(squareCoordsShuffle);
|
|
1166
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
1167
|
+
var coord = squareCoordsShuffle[i];
|
|
1168
|
+
var x = pixel.x+coord[0];
|
|
1169
|
+
var y = pixel.y+coord[1];
|
|
1170
|
+
if (!isEmpty(x,y,true)) {
|
|
1171
|
+
var newPixel = pixelMap[x][y];
|
|
1172
|
+
if (listPipes.includes(newPixel.element)) {
|
|
1173
|
+
var nextStage;
|
|
1174
|
+
switch (pixel.stage) {
|
|
1175
|
+
case 2: nextStage = 4; break; //green
|
|
1176
|
+
case 3: nextStage = 2; break; //red
|
|
1177
|
+
case 4: nextStage = 3; break; //blue
|
|
1178
|
+
}
|
|
1179
|
+
if (pixel.con && !newPixel.con && (newPixel.stage === nextStage || newPixel.element === "pipe_transmitter")) { //transfer to adjacent pipe
|
|
1180
|
+
newPixel.con = pixel.con;
|
|
1181
|
+
newPixel.con.x = newPixel.x;
|
|
1182
|
+
newPixel.con.y = newPixel.y;
|
|
1183
|
+
pixel.con = null;
|
|
1184
|
+
moved = true;
|
|
1185
|
+
break;
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
else if (!pixel.con && elements[newPixel.element].movable && newPixel.element != "ray") { //suck up pixel
|
|
1189
|
+
pixel.con = newPixel;
|
|
1190
|
+
deletePixel(newPixel.x,newPixel.y);
|
|
1191
|
+
pixel.con.x = pixel.x;
|
|
1192
|
+
pixel.con.y = pixel.y;
|
|
1193
|
+
pixel.con.del;
|
|
1194
|
+
moved = true;
|
|
1195
|
+
break;
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
if (pixel.con && !moved) { // move to same stage if none other
|
|
1200
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
1201
|
+
var coord = squareCoordsShuffle[i];
|
|
1202
|
+
var x = pixel.x+coord[0];
|
|
1203
|
+
var y = pixel.y+coord[1];
|
|
1204
|
+
if (isEmpty(x,y)) {
|
|
1205
|
+
delete pixel.con.del;
|
|
1206
|
+
pixel.con.x = x;
|
|
1207
|
+
pixel.con.y = y;
|
|
1208
|
+
pixelMap[x][y] = pixel.con;
|
|
1209
|
+
currentPixels.push(pixel.con);
|
|
1210
|
+
pixel.con = null;
|
|
1211
|
+
break;
|
|
1212
|
+
}
|
|
1213
|
+
if (!isEmpty(x,y,true) && listPipes.includes(pixelMap[x][y].element)) {
|
|
1214
|
+
var newPixel = pixelMap[x][y];
|
|
1215
|
+
if (pixel.con && !newPixel.con && newPixel.stage === pixel.stage) {
|
|
1216
|
+
newPixel.con = pixel.con;
|
|
1217
|
+
newPixel.con.x = newPixel.x;
|
|
1218
|
+
newPixel.con.y = newPixel.y;
|
|
1219
|
+
pixel.con = null;
|
|
1220
|
+
break;
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
doDefaults(pixel);
|
|
1227
|
+
},
|
|
1228
|
+
category: "machines",
|
|
1229
|
+
movable: false,
|
|
1230
|
+
canContain: true,
|
|
1231
|
+
insulate: true,
|
|
1232
|
+
},
|
|
1233
|
+
elements.pipe.tick = function(pixel) {
|
|
1234
|
+
if (!pixel.stage && pixelTicks-pixel.start > 60) {
|
|
1235
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1236
|
+
var coord = squareCoords[i];
|
|
1237
|
+
var x = pixel.x+coord[0];
|
|
1238
|
+
var y = pixel.y+coord[1];
|
|
1239
|
+
if (!isEmpty(x,y,true) && elements[pixelMap[x][y].element].movable) {
|
|
1240
|
+
deletePixel(x,y)
|
|
1241
|
+
}
|
|
1242
|
+
if (isEmpty(x,y)) {
|
|
1243
|
+
createPixel("pipe_wall",x,y);
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
pixel.stage = 1;
|
|
1247
|
+
}
|
|
1248
|
+
else if (pixel.stage === 1 && pixelTicks-pixel.start > 70) { //uninitialized
|
|
1249
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
1250
|
+
var coord = adjacentCoords[i];
|
|
1251
|
+
var x = pixel.x+coord[0];
|
|
1252
|
+
var y = pixel.y+coord[1];
|
|
1253
|
+
if (isEmpty(x,y)) {
|
|
1254
|
+
pixel.stage = 2; //blue
|
|
1255
|
+
pixel.color = pixelColorPick(pixel,"#000036");
|
|
1256
|
+
break;
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
else if (pixel.stage > 1 && pixelTicks % 3 === pixel.stage-2) { //initialized
|
|
1261
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1262
|
+
var coord = squareCoords[i];
|
|
1263
|
+
var x = pixel.x+coord[0];
|
|
1264
|
+
var y = pixel.y+coord[1];
|
|
1265
|
+
if (!isEmpty(x,y,true) && (pixelMap[x][y].element === "pipe" || pixelMap[x][y].element === "bridge_pipe")) {
|
|
1266
|
+
var newPixel = pixelMap[x][y];
|
|
1267
|
+
if (newPixel.stage === 1) {
|
|
1268
|
+
var newColor;
|
|
1269
|
+
switch (pixel.stage) {
|
|
1270
|
+
case 2: newPixel.stage = 3; newColor = "#003600"; break; //green
|
|
1271
|
+
case 3: newPixel.stage = 4; newColor = "#360000"; break; //red
|
|
1272
|
+
case 4: newPixel.stage = 2; newColor = "#000036"; break; //blue
|
|
1273
|
+
}
|
|
1274
|
+
newPixel.color = pixelColorPick(newPixel,newColor);
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
var moved = false;
|
|
1279
|
+
shuffleArray(squareCoordsShuffle);
|
|
1280
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
1281
|
+
var coord = squareCoordsShuffle[i];
|
|
1282
|
+
var x = pixel.x+coord[0];
|
|
1283
|
+
var y = pixel.y+coord[1];
|
|
1284
|
+
if (!isEmpty(x,y,true)) {
|
|
1285
|
+
var newPixel = pixelMap[x][y];
|
|
1286
|
+
if (newPixel.element === "pipe" || newPixel.element === "bridge_pipe" || newPixel.element === "pipe_transmitter") {
|
|
1287
|
+
var nextStage;
|
|
1288
|
+
switch (pixel.stage) {
|
|
1289
|
+
case 2: nextStage = 4; break; //green
|
|
1290
|
+
case 3: nextStage = 2; break; //red
|
|
1291
|
+
case 4: nextStage = 3; break; //blue
|
|
1292
|
+
}
|
|
1293
|
+
if (pixel.con && !newPixel.con && (newPixel.stage === nextStage || newPixel.element === "pipe_transmitter")) { //transfer to adjacent pipe
|
|
1294
|
+
newPixel.con = pixel.con;
|
|
1295
|
+
newPixel.con.x = newPixel.x;
|
|
1296
|
+
newPixel.con.y = newPixel.y;
|
|
1297
|
+
pixel.con = null;
|
|
1298
|
+
moved = true;
|
|
1299
|
+
break;
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
else if (!pixel.con && elements[newPixel.element].movable && newPixel.element != "ray") { //suck up pixel
|
|
1303
|
+
pixel.con = newPixel;
|
|
1304
|
+
deletePixel(newPixel.x,newPixel.y);
|
|
1305
|
+
pixel.con.x = pixel.x;
|
|
1306
|
+
pixel.con.y = pixel.y;
|
|
1307
|
+
pixel.con.del;
|
|
1308
|
+
moved = true;
|
|
1309
|
+
break;
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
if (pixel.con && !moved) { // move to same stage if none other
|
|
1314
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
1315
|
+
var coord = squareCoordsShuffle[i];
|
|
1316
|
+
var x = pixel.x+coord[0];
|
|
1317
|
+
var y = pixel.y+coord[1];
|
|
1318
|
+
if (isEmpty(x,y)) {
|
|
1319
|
+
delete pixel.con.del;
|
|
1320
|
+
pixel.con.x = x;
|
|
1321
|
+
pixel.con.y = y;
|
|
1322
|
+
pixelMap[x][y] = pixel.con;
|
|
1323
|
+
currentPixels.push(pixel.con);
|
|
1324
|
+
pixel.con = null;
|
|
1325
|
+
break;
|
|
1326
|
+
}
|
|
1327
|
+
if (!isEmpty(x,y,true) && (pixelMap[x][y].element === "pipe" || pixelMap[x][y].element === "bridge_pipe")) {
|
|
1328
|
+
var newPixel = pixelMap[x][y];
|
|
1329
|
+
if (pixel.con && !newPixel.con && newPixel.stage === pixel.stage) {
|
|
1330
|
+
newPixel.con = pixel.con;
|
|
1331
|
+
newPixel.con.x = newPixel.x;
|
|
1332
|
+
newPixel.con.y = newPixel.y;
|
|
1333
|
+
pixel.con = null;
|
|
1334
|
+
break;
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
doDefaults(pixel);
|
|
1341
|
+
}
|
|
1342
|
+
elements.pipe.insulate = true,
|
|
1343
|
+
filterTypeVar = 0;
|
|
1344
|
+
elements.filter = {
|
|
1345
|
+
color: "#599fc2",
|
|
1346
|
+
onSelect: async function() {
|
|
1347
|
+
var answer4 = await _nousersthingsprompt("Please input the desired element of this filter. It will not work if you do multiple filter types while paused.",(filterTypeVar||undefined));
|
|
1348
|
+
if (!answer4) { return }
|
|
1349
|
+
filterTypeVar = answer4;
|
|
1350
|
+
},
|
|
1351
|
+
tick: function(pixel) {
|
|
1352
|
+
if (pixel.start === pixelTicks) {
|
|
1353
|
+
pixel.filterType = filterTypeVar
|
|
1354
|
+
}
|
|
1355
|
+
if (1 === 2) {
|
|
1356
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1357
|
+
var coord = squareCoords[i];
|
|
1358
|
+
var x = pixel.x+coord[0];
|
|
1359
|
+
var y = pixel.y+coord[1];
|
|
1360
|
+
if (isEmpty(x,y)) {
|
|
1361
|
+
// createPixel("brick",x,y);
|
|
1362
|
+
// pixelMap[x][y].color = pixelColorPick(pixel,"#808080");
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
// pixel.stage = 1;
|
|
1366
|
+
}
|
|
1367
|
+
else if (1 === 2) { //uninitialized
|
|
1368
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
1369
|
+
var coord = adjacentCoords[i];
|
|
1370
|
+
var x = pixel.x+coord[0];
|
|
1371
|
+
var y = pixel.y+coord[1];
|
|
1372
|
+
if (isEmpty(x,y)) {
|
|
1373
|
+
// pixel.stage = 2; //blue
|
|
1374
|
+
// pixel.color = pixelColorPick(pixel,"#000036");
|
|
1375
|
+
break;
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
else if (1 === 1) { //initialized
|
|
1380
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1381
|
+
var coord = squareCoords[i];
|
|
1382
|
+
var x = pixel.x+coord[0];
|
|
1383
|
+
var y = pixel.y+coord[1];
|
|
1384
|
+
if (!isEmpty(x,y,true) && listPipes.includes(pixelMap[x][y].element)) {
|
|
1385
|
+
var newPixel = pixelMap[x][y];
|
|
1386
|
+
if (newPixel.stage === 1) {
|
|
1387
|
+
var newColor;
|
|
1388
|
+
switch (pixel.stage) {
|
|
1389
|
+
// case 2: newPixel.stage = 3; newColor = "#003600"; break; //green
|
|
1390
|
+
// case 3: newPixel.stage = 4; newColor = "#360000"; break; //red
|
|
1391
|
+
// case 4: newPixel.stage = 2; newColor = "#000036"; break; //blue
|
|
1392
|
+
}
|
|
1393
|
+
// newPixel.color = pixelColorPick(newPixel,newColor);
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
var moved = false;
|
|
1398
|
+
shuffleArray(squareCoordsShuffle);
|
|
1399
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
1400
|
+
var coord = squareCoordsShuffle[i];
|
|
1401
|
+
var x = pixel.x+coord[0];
|
|
1402
|
+
var y = pixel.y+coord[1];
|
|
1403
|
+
if (!isEmpty(x,y,true)) {
|
|
1404
|
+
var newPixel = pixelMap[x][y];
|
|
1405
|
+
if (listPipes.includes(newPixel.element)) {
|
|
1406
|
+
var nextStage;
|
|
1407
|
+
switch (pixel.stage) {
|
|
1408
|
+
// case 2: nextStage = 4; break; //green
|
|
1409
|
+
// case 3: nextStage = 2; break; //red
|
|
1410
|
+
// case 4: nextStage = 3; break; //blue
|
|
1411
|
+
}
|
|
1412
|
+
if (pixel.con && !newPixel.con) { //transfer to adjacent pipe
|
|
1413
|
+
newPixel.con = pixel.con;
|
|
1414
|
+
newPixel.con.x = newPixel.x;
|
|
1415
|
+
newPixel.con.y = newPixel.y;
|
|
1416
|
+
pixel.con = null;
|
|
1417
|
+
moved = true;
|
|
1418
|
+
break;
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
else if (!pixel.con && (newPixel.element == pixel.filterType) ) { //suck up pixel
|
|
1422
|
+
pixel.con = newPixel;
|
|
1423
|
+
deletePixel(newPixel.x,newPixel.y);
|
|
1424
|
+
pixel.con.x = pixel.x;
|
|
1425
|
+
pixel.con.y = pixel.y;
|
|
1426
|
+
pixel.con.del;
|
|
1427
|
+
moved = true;
|
|
1428
|
+
break;
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
if (pixel.con && !moved) { // move to same stage if none other
|
|
1433
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
1434
|
+
var coord = squareCoordsShuffle[i];
|
|
1435
|
+
var x = pixel.x+coord[0];
|
|
1436
|
+
var y = pixel.y+coord[1];
|
|
1437
|
+
if (isEmpty(x,y)) {
|
|
1438
|
+
delete pixel.con.del;
|
|
1439
|
+
pixel.con.x = x;
|
|
1440
|
+
pixel.con.y = y;
|
|
1441
|
+
pixelMap[x][y] = pixel.con;
|
|
1442
|
+
currentPixels.push(pixel.con);
|
|
1443
|
+
pixel.con = null;
|
|
1444
|
+
break;
|
|
1445
|
+
}
|
|
1446
|
+
if (!isEmpty(x,y,true) && listPipes.includes(pixelMap[x][y].element)) {
|
|
1447
|
+
var newPixel = pixelMap[x][y];
|
|
1448
|
+
if (pixel.con && !newPixel.con) {
|
|
1449
|
+
newPixel.con = pixel.con;
|
|
1450
|
+
newPixel.con.x = newPixel.x;
|
|
1451
|
+
newPixel.con.y = newPixel.y;
|
|
1452
|
+
pixel.con = null;
|
|
1453
|
+
break;
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
doDefaults(pixel);
|
|
1460
|
+
},
|
|
1461
|
+
category: "machines",
|
|
1462
|
+
movable: false,
|
|
1463
|
+
canContain: true,
|
|
1464
|
+
noMix: true,
|
|
1465
|
+
insulate: true,
|
|
1466
|
+
},
|
|
1467
|
+
elements.heat_test = {
|
|
1468
|
+
onSelect: function() {
|
|
1469
|
+
logMessage("Use heatglow.js for more elements to glow when they are hot.");
|
|
1470
|
+
},
|
|
1471
|
+
color: "#787878",
|
|
1472
|
+
behavior: behaviors.WALL,
|
|
1473
|
+
category: "solids",
|
|
1474
|
+
state: "solid",
|
|
1475
|
+
tempHigh: 1538,
|
|
1476
|
+
stateHigh: "molten_iron",
|
|
1477
|
+
movable: false,
|
|
1478
|
+
tick: function(pixel){
|
|
1479
|
+
if (pixel.start == pixelTicks){
|
|
1480
|
+
pixel.ogR = parseInt(pixel.color.slice(4, pixel.color.indexOf(',')), 10)
|
|
1481
|
+
pixel.ogG = parseInt(pixel.color.slice(pixel.color.indexOf(',') + 1, pixel.color.lastIndexOf(',')), 10)
|
|
1482
|
+
pixel.ogB = parseInt(pixel.color.slice(pixel.color.lastIndexOf(',') + 1, -1), 10)
|
|
1483
|
+
}else if (pixelTicks > pixel.start){
|
|
1484
|
+
if (pixel.temp <= (elements.heat_test.tempHigh) - 700){ // replace 700 with lower limit of range
|
|
1485
|
+
pixel.ctemp = 0;
|
|
1486
|
+
} else if (pixel.temp > (elements.heat_test.tempHigh)-700 && pixel.temp <= elements.heat_test.tempHigh){ // replace 700 with lower limit of range
|
|
1487
|
+
pixel.ctemp = ((1/700)*pixel.temp)-(((elements.heat_test.tempHigh)-700)/700) // replace 700 with lower limit of range
|
|
1488
|
+
}
|
|
1489
|
+
if (pixel.ctemp <= 0.5){
|
|
1490
|
+
pixel.newR = (((510-(2*pixel.ogR))*pixel.ctemp)+pixel.ogR);
|
|
1491
|
+
pixel.newG = ((0-((2*pixel.ogG)*pixel.ctemp))+pixel.ogG);
|
|
1492
|
+
pixel.newB = ((0-((2*pixel.ogB)*pixel.ctemp))+pixel.ogB);
|
|
1493
|
+
}else if (pixel.ctemp > 0.5){
|
|
1494
|
+
pixel.newR = 255;
|
|
1495
|
+
pixel.newG = ((510*pixel.ctemp)-256);
|
|
1496
|
+
pixel.newB= ((280*pixel.ctemp)-140);
|
|
1497
|
+
}
|
|
1498
|
+
pixel.color = "rgb(" + pixel.newR + "," + pixel.newG + "," + pixel.newB + ")";
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
},
|
|
1502
|
+
/*
|
|
1503
|
+
elements.soup = {
|
|
1504
|
+
color: "#3d2812",
|
|
1505
|
+
behavior: behaviors.LIQUID,
|
|
1506
|
+
category: "food",
|
|
1507
|
+
onMix: function(soup,ingredient) {
|
|
1508
|
+
if (elements[ingredient.element].isFood && elements[ingredient.element].id !== elements.soup.id && elements[ingredient.element].id !== elements.broth.id) {
|
|
1509
|
+
var rgb1 = soup.color.match(/\d+/g);
|
|
1510
|
+
var rgb2 = ingredient.color.match(/\d+/g);
|
|
1511
|
+
// average the colors
|
|
1512
|
+
var rgb = [
|
|
1513
|
+
Math.round((parseInt(rgb1[0])+parseInt(rgb2[0]))/2),
|
|
1514
|
+
Math.round((parseInt(rgb1[1])+parseInt(rgb2[1]))/2),
|
|
1515
|
+
Math.round((parseInt(rgb1[2])+parseInt(rgb2[2]))/2)
|
|
1516
|
+
];
|
|
1517
|
+
if (!soup.elemlist){
|
|
1518
|
+
soup.elemlist = [];
|
|
1519
|
+
}
|
|
1520
|
+
soup.decidedHigh = soup.elemlist[Math.floor(Math.random()*soup.elemlist.length)];
|
|
1521
|
+
soup.elemlist.push(ingredient.element)
|
|
1522
|
+
soup.stateHigh = soup.elemlist;
|
|
1523
|
+
changePixel(ingredient, "soup");
|
|
1524
|
+
// convert rgb to hex
|
|
1525
|
+
var hex = RGBToHex(rgb);
|
|
1526
|
+
soup.color = pixelColorPick(soup, hex);
|
|
1527
|
+
// 50% change to delete ingredient
|
|
1528
|
+
if (Math.random() < 0.5) { deletePixel(ingredient.x, ingredient.y); }
|
|
1529
|
+
else {
|
|
1530
|
+
ingredient.color = pixelColorPick(ingredient, hex);
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
},
|
|
1534
|
+
tick: function(pixel) {
|
|
1535
|
+
if (!pixel.decidedHigh){
|
|
1536
|
+
pixel.decidedHigh = "steam";
|
|
1537
|
+
}
|
|
1538
|
+
if (pixel.temp > 100){
|
|
1539
|
+
if (Math.random() < 0.5) {
|
|
1540
|
+
changePixel(pixel, "steam");
|
|
1541
|
+
} else {
|
|
1542
|
+
changePixel(pixel, pixel.decidedHigh)
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
},
|
|
1546
|
+
density: 1100,
|
|
1547
|
+
stain: 0.02,
|
|
1548
|
+
state: "liquid",
|
|
1549
|
+
},
|
|
1550
|
+
elements.broth.onMix = function(pixel){
|
|
1551
|
+
changePixel(pixel, "soup")
|
|
1552
|
+
},
|
|
1553
|
+
*/
|
|
1554
|
+
converter1Var = 0;
|
|
1555
|
+
converter2Var = 0;
|
|
1556
|
+
elements.converter = {
|
|
1557
|
+
color: "#296127",
|
|
1558
|
+
behavior: behaviors.WALL,
|
|
1559
|
+
category: "machines",
|
|
1560
|
+
tick: function(pixel) {
|
|
1561
|
+
if (pixel.start === pixelTicks){
|
|
1562
|
+
pixel.contype = converter2Var;
|
|
1563
|
+
pixel.specialturn = converter1Var;
|
|
1564
|
+
}
|
|
1565
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1566
|
+
var coord = squareCoords[i];
|
|
1567
|
+
var x = pixel.x+coord[0];
|
|
1568
|
+
var y = pixel.y+coord[1];
|
|
1569
|
+
if (!isEmpty(x,y, true)) {
|
|
1570
|
+
var otherPixel = pixelMap[x][y];
|
|
1571
|
+
if ((otherPixel.element == pixel.specialturn || pixel.specialturn == "all") && !elements.converter.ignore.includes(otherPixel.element)){
|
|
1572
|
+
changePixel(otherPixel, pixel.contype)
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
},
|
|
1577
|
+
onSelect: async function() {
|
|
1578
|
+
var answer5 = await _nousersthingsprompt("Please input what type of element should be converted. Write \"all\" to include everything.",(converter1Var||undefined));
|
|
1579
|
+
if (!answer5) { return }
|
|
1580
|
+
converter1Var = answer5;
|
|
1581
|
+
var answer6 = await _nousersthingsprompt("Please input what it should turn into.",(converter2Var||undefined));
|
|
1582
|
+
if (!answer6) { return }
|
|
1583
|
+
converter2Var = answer6;
|
|
1584
|
+
},
|
|
1585
|
+
ignore: ["converter", "wall", "ewall", "border"],
|
|
1586
|
+
movable: false,
|
|
1587
|
+
},
|
|
1588
|
+
elements.blackhole_storage = {
|
|
1589
|
+
color: "#171717",
|
|
1590
|
+
behavior: behaviors.WALL,
|
|
1591
|
+
category: "machines",
|
|
1592
|
+
tick: function(pixel) {
|
|
1593
|
+
if (!pixel.bhcontents){
|
|
1594
|
+
pixel.bhcontents = [];
|
|
1595
|
+
}
|
|
1596
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1597
|
+
var coord = squareCoords[i];
|
|
1598
|
+
var x = pixel.x+coord[0];
|
|
1599
|
+
var y = pixel.y+coord[1];
|
|
1600
|
+
if (!isEmpty(x,y, true) && (!pixel.charge && !pixel.chargeCD)) {
|
|
1601
|
+
var otherPixel = pixelMap[x][y];
|
|
1602
|
+
if (elements[otherPixel.element].movable == true){
|
|
1603
|
+
pixel.bhcontents.push(otherPixel);
|
|
1604
|
+
deletePixel(otherPixel.x, otherPixel.y);
|
|
1605
|
+
}
|
|
1606
|
+
} else if (pixel.charge && isEmpty(x,y) && pixel.bhcontents.length){
|
|
1607
|
+
let randomindex = Math.floor(Math.random()*pixel.bhcontents.length);
|
|
1608
|
+
let releasedPixel = pixel.bhcontents[randomindex]
|
|
1609
|
+
pixel.bhcontents.splice(randomindex, 1)
|
|
1610
|
+
delete releasedPixel.del
|
|
1611
|
+
releasedPixel.x = x
|
|
1612
|
+
releasedPixel.y = y
|
|
1613
|
+
pixelMap[x][y] = releasedPixel
|
|
1614
|
+
currentPixels.push(releasedPixel)
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
},
|
|
1618
|
+
movable: false,
|
|
1619
|
+
conduct: 1,
|
|
1620
|
+
},
|
|
1621
|
+
elements.plutonium = {
|
|
1622
|
+
color: ["#212121", "#2b1c1c", "#371616", "#430e0e", "#510606", "#212121", "#1e1e1e", "#1b1b1b", "#171717", "#141414", "#212121", "#1e1e1e", "#1b1b1b", "#171717", "#141414"],
|
|
1623
|
+
behavior: behaviors.STURDYPOWDER,
|
|
1624
|
+
category: "powders",
|
|
1625
|
+
tempHigh: 640,
|
|
1626
|
+
stateHigh: "molten_plutonium",
|
|
1627
|
+
state: "solid",
|
|
1628
|
+
tick: function(pixel){
|
|
1629
|
+
if(Math.random() < 0.0007){
|
|
1630
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1631
|
+
var coord = squareCoords[i];
|
|
1632
|
+
var x = pixel.x+coord[0];
|
|
1633
|
+
var y = pixel.y+coord[1];
|
|
1634
|
+
if (isEmpty(x, y)){
|
|
1635
|
+
createPixel("helium", x, y)
|
|
1636
|
+
pixelMap[x][y].temp = pixel.temp + 200
|
|
1637
|
+
break;
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
if(Math.random() < 0.5){
|
|
1641
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1642
|
+
var coord = squareCoords[i];
|
|
1643
|
+
var x = pixel.x+coord[0];
|
|
1644
|
+
var y = pixel.y+coord[1];
|
|
1645
|
+
if (isEmpty(x, y)){
|
|
1646
|
+
createPixel("neutron", x, y)
|
|
1647
|
+
pixelMap[x][y].temp = pixel.temp + 200
|
|
1648
|
+
break;
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
changePixel(pixel, "uranium", false);
|
|
1653
|
+
pixelMap[x][y].temp += 200
|
|
1654
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
1655
|
+
var coord = adjacentCoords[i];
|
|
1656
|
+
var x = pixel.x+coord[0];
|
|
1657
|
+
var y = pixel.y+coord[1];
|
|
1658
|
+
if (!isEmpty(x, y, true)){
|
|
1659
|
+
pixelMap[x][y].temp += 175
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
behaviors.RADSOLID
|
|
1664
|
+
},
|
|
1665
|
+
reactions: {
|
|
1666
|
+
"neutron": { elem1:"pn_explosion", tempMin:400, chance:0.1 },
|
|
1667
|
+
},
|
|
1668
|
+
density: 19186,
|
|
1669
|
+
}
|
|
1670
|
+
elements.molten_plutonium = {
|
|
1671
|
+
color: ["#6b5133", "#743f26", "#7c2727"],
|
|
1672
|
+
behavior: behaviors.RADMOLTEN,
|
|
1673
|
+
category: "states",
|
|
1674
|
+
state: "liquid",
|
|
1675
|
+
tempLow: 620,
|
|
1676
|
+
hidden: true,
|
|
1677
|
+
stateLow: "plutonium",
|
|
1678
|
+
tick: function(pixel){
|
|
1679
|
+
if(Math.random() < 0.0007){
|
|
1680
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1681
|
+
var coord = squareCoords[i];
|
|
1682
|
+
var x = pixel.x+coord[0];
|
|
1683
|
+
var y = pixel.y+coord[1];
|
|
1684
|
+
if (isEmpty(x, y)){
|
|
1685
|
+
createPixel("helium", x, y)
|
|
1686
|
+
pixelMap[x][y].temp = pixel.temp + 200
|
|
1687
|
+
break;
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
if(Math.random() < 0.5){
|
|
1691
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1692
|
+
var coord = squareCoords[i];
|
|
1693
|
+
var x = pixel.x+coord[0];
|
|
1694
|
+
var y = pixel.y+coord[1];
|
|
1695
|
+
if (isEmpty(x, y)){
|
|
1696
|
+
createPixel("neutron", x, y)
|
|
1697
|
+
pixelMap[x][y].temp = pixel.temp + 200
|
|
1698
|
+
break;
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
changePixel(pixel, "uranium", false);
|
|
1703
|
+
pixelMap[x][y].temp += 200
|
|
1704
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
1705
|
+
var coord = adjacentCoords[i];
|
|
1706
|
+
var x = pixel.x+coord[0];
|
|
1707
|
+
var y = pixel.y+coord[1];
|
|
1708
|
+
if (!isEmpty(x, y, true)){
|
|
1709
|
+
pixelMap[x][y].temp += 175
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
},
|
|
1714
|
+
reactions: {
|
|
1715
|
+
"neutron": { elem1:"pn_explosion", tempMin:400, chance:0.1 },
|
|
1716
|
+
},
|
|
1717
|
+
density: 16629,
|
|
1718
|
+
},
|
|
1719
|
+
elements.neutron.reactions.plutonium = { temp2:200 };
|
|
1720
|
+
elements.neutron.reactions.molten_plutonium = { temp2:200 }
|
|
1721
|
+
elements.pn_explosion = {
|
|
1722
|
+
color: ["#ffb48f","#ffd991","#ffad91"],
|
|
1723
|
+
behavior: [
|
|
1724
|
+
"XX|XX|XX",
|
|
1725
|
+
"XX|EX:80>plasma,plasma,plasma,plasma,radiation,rad_steam,neutron|XX",
|
|
1726
|
+
"XX|XX|XX",
|
|
1727
|
+
],
|
|
1728
|
+
temp: 100000000,
|
|
1729
|
+
category: "energy",
|
|
1730
|
+
state: "gas",
|
|
1731
|
+
density: 1000,
|
|
1732
|
+
excludeRandom: true,
|
|
1733
|
+
hidden: true,
|
|
1734
|
+
alias: "plutonium nuclear explosion",
|
|
1735
|
+
noMix: true
|
|
1736
|
+
},
|
|
1737
|
+
elements.smasher = {
|
|
1738
|
+
color: "#606060",
|
|
1739
|
+
behavior: behaviors.WALL,
|
|
1740
|
+
category: "deprecated",
|
|
1741
|
+
tick: function(pixel){
|
|
1742
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1743
|
+
var coord = squareCoords[i];
|
|
1744
|
+
var x = pixel.x+coord[0];
|
|
1745
|
+
var y = pixel.y+coord[1];
|
|
1746
|
+
if (!isEmpty(x,y, true)) {
|
|
1747
|
+
var otherPixel = pixelMap[x][y];
|
|
1748
|
+
breakPixel(otherPixel);
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
},
|
|
1752
|
+
movable: false,
|
|
1753
|
+
hidden: true
|
|
1754
|
+
},
|
|
1755
|
+
/*
|
|
1756
|
+
elements.mixer = {
|
|
1757
|
+
color: "#F0F0F0",
|
|
1758
|
+
behavior: behaviors.WALL,
|
|
1759
|
+
category: "deprecated",
|
|
1760
|
+
tick: function(pixel){
|
|
1761
|
+
pixel.mixList = [];
|
|
1762
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1763
|
+
var coord = squareCoords[i];
|
|
1764
|
+
var x = pixel.x+coord[0];
|
|
1765
|
+
var y = pixel.y+coord[1];
|
|
1766
|
+
if (!isEmpty(x,y, true) && !elements[pixelMap[x][y].element].noMix) {
|
|
1767
|
+
var otherPixel = pixelMap[x][y];
|
|
1768
|
+
pixel.mixList.push(otherPixel);
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
for (var i = 0; i < pixel.mixList.length; i++) {
|
|
1772
|
+
var pixel1 = pixel.mixList[Math.floor(Math.random()*pixel.mixList.length)];
|
|
1773
|
+
var pixel2 = pixel.mixList[Math.floor(Math.random()*pixel.mixList.length)];
|
|
1774
|
+
swapPixels(pixel1,pixel2);
|
|
1775
|
+
pixel.mixList.splice(pixel.mixList.indexOf(pixel1),1);
|
|
1776
|
+
pixel.mixList.splice(pixel.mixList.indexOf(pixel2),1);
|
|
1777
|
+
if (elements[pixel1.element].onMix) {
|
|
1778
|
+
elements[pixel1.element].onMix(pixel1,pixel2);
|
|
1779
|
+
}
|
|
1780
|
+
if (elements[pixel2.element].onMix) {
|
|
1781
|
+
elements[pixel2.element].onMix(pixel2,pixel1);
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
},
|
|
1785
|
+
movable: false,
|
|
1786
|
+
noMix: true,
|
|
1787
|
+
hidden: true,
|
|
1788
|
+
},
|
|
1789
|
+
*/
|
|
1790
|
+
elements.invisiblesupport = {
|
|
1791
|
+
color: "#000000",
|
|
1792
|
+
behavior: behaviors.WALL,
|
|
1793
|
+
tick: function(pixel){
|
|
1794
|
+
var x = pixel.x
|
|
1795
|
+
var y = pixel.y
|
|
1796
|
+
if (currentElement == "invisiblesupport"){
|
|
1797
|
+
pixel.color = "rgb(15, 15, 15)";
|
|
1798
|
+
} else {
|
|
1799
|
+
pixel.color = "rgba(0, 0, 0, -1)";
|
|
1800
|
+
}
|
|
1801
|
+
if ((isEmpty(x-1, y) || isEmpty(x+1,y)) && isEmpty(x,y+1)){
|
|
1802
|
+
deletePixel(pixel.x, pixel.y);
|
|
1803
|
+
}
|
|
1804
|
+
},
|
|
1805
|
+
category: "powders",
|
|
1806
|
+
},
|
|
1807
|
+
elements.invisiblewall = {
|
|
1808
|
+
color: "#000000",
|
|
1809
|
+
behavior: behaviors.WALL,
|
|
1810
|
+
tick: function(pixel){
|
|
1811
|
+
if (currentElement == "invisiblewall"){
|
|
1812
|
+
pixel.color = "rgb(15, 15, 15)";
|
|
1813
|
+
} else {
|
|
1814
|
+
pixel.color = "rgba(0, 0, 0, -1)";
|
|
1815
|
+
}
|
|
1816
|
+
},
|
|
1817
|
+
category: "solids",
|
|
1818
|
+
movable: false,
|
|
1819
|
+
noMix: true,
|
|
1820
|
+
hardness: 1,
|
|
1821
|
+
},
|
|
1822
|
+
elements.bismuth = {
|
|
1823
|
+
color: ["#818181","#989898","#b0b0b0","#c9c9c9"],
|
|
1824
|
+
behavior: behaviors.WALL,
|
|
1825
|
+
category: "solids",
|
|
1826
|
+
tempHigh: 271.4,
|
|
1827
|
+
stateHigh: "molten_bismuth",
|
|
1828
|
+
density: 9780,
|
|
1829
|
+
state: "solid"
|
|
1830
|
+
}
|
|
1831
|
+
function RGBtoHSV(r, g, b) {
|
|
1832
|
+
if (arguments.length === 1) {
|
|
1833
|
+
g = r.g, b = r.b, r = r.r;
|
|
1834
|
+
}
|
|
1835
|
+
var max = Math.max(r, g, b), min = Math.min(r, g, b),
|
|
1836
|
+
d = max - min,
|
|
1837
|
+
h,
|
|
1838
|
+
s = (max === 0 ? 0 : d / max),
|
|
1839
|
+
v = max / 255;
|
|
1840
|
+
|
|
1841
|
+
switch (max) {
|
|
1842
|
+
case min: h = 0; break;
|
|
1843
|
+
case r: h = (g - b) + d * (g < b ? 6: 0); h /= 6 * d; break;
|
|
1844
|
+
case g: h = (b - r) + d * 2; h /= 6 * d; break;
|
|
1845
|
+
case b: h = (r - g) + d * 4; h /= 6 * d; break;
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
return {
|
|
1849
|
+
h: h,
|
|
1850
|
+
s: s,
|
|
1851
|
+
v: v
|
|
1852
|
+
};
|
|
1853
|
+
}
|
|
1854
|
+
function HSVtoRGB(h, s, v) {
|
|
1855
|
+
var r, g, b, i, f, p, q, t;
|
|
1856
|
+
if (arguments.length === 1) {
|
|
1857
|
+
s = h.s, v = h.v, h = h.h;
|
|
1858
|
+
}
|
|
1859
|
+
i = Math.floor(h * 6);
|
|
1860
|
+
f = h * 6 - i;
|
|
1861
|
+
p = v * (1 - s);
|
|
1862
|
+
q = v * (1 - f * s);
|
|
1863
|
+
t = v * (1 - (1 - f) * s);
|
|
1864
|
+
switch (i % 6) {
|
|
1865
|
+
case 0: r = v, g = t, b = p; break;
|
|
1866
|
+
case 1: r = q, g = v, b = p; break;
|
|
1867
|
+
case 2: r = p, g = v, b = t; break;
|
|
1868
|
+
case 3: r = p, g = q, b = v; break;
|
|
1869
|
+
case 4: r = t, g = p, b = v; break;
|
|
1870
|
+
case 5: r = v, g = p, b = q; break;
|
|
1871
|
+
}
|
|
1872
|
+
return {
|
|
1873
|
+
r: Math.round(r * 255),
|
|
1874
|
+
g: Math.round(g * 255),
|
|
1875
|
+
b: Math.round(b * 255)
|
|
1876
|
+
};
|
|
1877
|
+
}
|
|
1878
|
+
elements.molten_bismuth = {
|
|
1879
|
+
color: ["#ee8d63", "#ef7e5e", "#f06e5c", "#f05c5c"],
|
|
1880
|
+
behavior: behaviors.MOLTEN,
|
|
1881
|
+
hidden: true,
|
|
1882
|
+
category: "states",
|
|
1883
|
+
state: "liquid",
|
|
1884
|
+
temp: 280,
|
|
1885
|
+
tick: function(pixel){
|
|
1886
|
+
if (pixel.temp <= 261.4){
|
|
1887
|
+
pixel.tHue = ((pixelTicks*1.5)%360)/360;
|
|
1888
|
+
let bismuthsum = 0;
|
|
1889
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1890
|
+
var coord = squareCoords[i];
|
|
1891
|
+
var x = pixel.x+coord[0];
|
|
1892
|
+
var y = pixel.y+coord[1];
|
|
1893
|
+
if (!isEmpty(x, y, true)){
|
|
1894
|
+
if (pixelMap[x][y].element == "bismuth"){
|
|
1895
|
+
bismuthsum += 1;
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
if (pixel.temp <= 210){
|
|
1900
|
+
changePixel(pixel, "bismuth");
|
|
1901
|
+
return;
|
|
1902
|
+
}
|
|
1903
|
+
if (Math.random() < [0.003, 0.8,0.3,0.2,0.003,0.002,0.002,0.4,0.4][bismuthsum]){
|
|
1904
|
+
changePixel(pixel, "bismuth")
|
|
1905
|
+
var rgbResult = HSVtoRGB(pixel.tHue, 0.5-(Math.random()/3), 0.9-((8-bismuthsum)/20));
|
|
1906
|
+
const hexR = rgbResult.r.toString(16).padStart(2, '0');
|
|
1907
|
+
const hexG = rgbResult.g.toString(16).padStart(2, '0');
|
|
1908
|
+
const hexB = rgbResult.b.toString(16).padStart(2, '0');
|
|
1909
|
+
const hexCode = `#${hexR}${hexG}${hexB}`;
|
|
1910
|
+
pixel.color = pixelColorPick(pixel, hexCode)
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
},
|
|
1914
|
+
density: 10049,
|
|
1915
|
+
}
|
|
1916
|
+
const powderList = [behaviors.POWDER, behaviors.STURDYPOWDER, behaviors.POWDER_OLD, behaviors.AGPOWDER, behaviors.LIGHTWEIGHT, behaviors.SUPPORT, behaviors.SUPPORTPOWDER, behaviors.RADPOWDER]
|
|
1917
|
+
const liquidList = [behaviors.LIQUID, behaviors.LIQUID_OLD, behaviors.SUPERFLUID_OLD, behaviors.SUPERFLUID, behaviors.AGLIQUID, behaviors.FOAM, behaviors.BUBBLE, behaviors.MOLTEN, behaviors.RADMOLTEN, behaviors.RADLIQUID]
|
|
1918
|
+
const gasList = [behaviors.UL_UR, behaviors.UL_UR_OPTIMIZED, behaviors.GAS_OLD, behaviors.GAS, behaviors.DGAS]
|
|
1919
|
+
elements.powder_filter = {
|
|
1920
|
+
color: "#599fc2",
|
|
1921
|
+
tick: function(pixel) {
|
|
1922
|
+
if (1 === 2) {
|
|
1923
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1924
|
+
var coord = squareCoords[i];
|
|
1925
|
+
var x = pixel.x+coord[0];
|
|
1926
|
+
var y = pixel.y+coord[1];
|
|
1927
|
+
if (isEmpty(x,y)) {
|
|
1928
|
+
// createPixel("brick",x,y);
|
|
1929
|
+
// pixelMap[x][y].color = pixelColorPick(pixel,"#808080");
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
// pixel.stage = 1;
|
|
1933
|
+
}
|
|
1934
|
+
else if (1 === 2) { //uninitialized
|
|
1935
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
1936
|
+
var coord = adjacentCoords[i];
|
|
1937
|
+
var x = pixel.x+coord[0];
|
|
1938
|
+
var y = pixel.y+coord[1];
|
|
1939
|
+
if (isEmpty(x,y)) {
|
|
1940
|
+
// pixel.stage = 2; //blue
|
|
1941
|
+
// pixel.color = pixelColorPick(pixel,"#000036");
|
|
1942
|
+
break;
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
else if (1 === 1) { //initialized
|
|
1947
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
1948
|
+
var coord = squareCoords[i];
|
|
1949
|
+
var x = pixel.x+coord[0];
|
|
1950
|
+
var y = pixel.y+coord[1];
|
|
1951
|
+
if (!isEmpty(x,y,true) && listPipes.includes(pixelMap[x][y].element)) {
|
|
1952
|
+
var newPixel = pixelMap[x][y];
|
|
1953
|
+
if (newPixel.stage === 1) {
|
|
1954
|
+
var newColor;
|
|
1955
|
+
switch (pixel.stage) {
|
|
1956
|
+
// case 2: newPixel.stage = 3; newColor = "#003600"; break; //green
|
|
1957
|
+
// case 3: newPixel.stage = 4; newColor = "#360000"; break; //red
|
|
1958
|
+
// case 4: newPixel.stage = 2; newColor = "#000036"; break; //blue
|
|
1959
|
+
}
|
|
1960
|
+
// newPixel.color = pixelColorPick(newPixel,newColor);
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
var moved = false;
|
|
1965
|
+
shuffleArray(squareCoordsShuffle);
|
|
1966
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
1967
|
+
var coord = squareCoordsShuffle[i];
|
|
1968
|
+
var x = pixel.x+coord[0];
|
|
1969
|
+
var y = pixel.y+coord[1];
|
|
1970
|
+
if (!isEmpty(x,y,true)) {
|
|
1971
|
+
var newPixel = pixelMap[x][y];
|
|
1972
|
+
if (listPipes.includes(newPixel.element)) {
|
|
1973
|
+
var nextStage;
|
|
1974
|
+
switch (pixel.stage) {
|
|
1975
|
+
// case 2: nextStage = 4; break; //green
|
|
1976
|
+
// case 3: nextStage = 2; break; //red
|
|
1977
|
+
// case 4: nextStage = 3; break; //blue
|
|
1978
|
+
}
|
|
1979
|
+
if (pixel.con && !newPixel.con) { //transfer to adjacent pipe
|
|
1980
|
+
newPixel.con = pixel.con;
|
|
1981
|
+
newPixel.con.x = newPixel.x;
|
|
1982
|
+
newPixel.con.y = newPixel.y;
|
|
1983
|
+
pixel.con = null;
|
|
1984
|
+
moved = true;
|
|
1985
|
+
break;
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
else if (!pixel.con && elements[newPixel.element].movable && (elements[newPixel.element].state == "solid") ) { //suck up pixel
|
|
1989
|
+
pixel.con = newPixel;
|
|
1990
|
+
deletePixel(newPixel.x,newPixel.y);
|
|
1991
|
+
pixel.con.x = pixel.x;
|
|
1992
|
+
pixel.con.y = pixel.y;
|
|
1993
|
+
pixel.con.del;
|
|
1994
|
+
moved = true;
|
|
1995
|
+
break;
|
|
1996
|
+
}
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
if (pixel.con && !moved) { // move to same stage if none other
|
|
2000
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
2001
|
+
var coord = squareCoordsShuffle[i];
|
|
2002
|
+
var x = pixel.x+coord[0];
|
|
2003
|
+
var y = pixel.y+coord[1];
|
|
2004
|
+
if (isEmpty(x,y)) {
|
|
2005
|
+
delete pixel.con.del;
|
|
2006
|
+
pixel.con.x = x;
|
|
2007
|
+
pixel.con.y = y;
|
|
2008
|
+
pixelMap[x][y] = pixel.con;
|
|
2009
|
+
currentPixels.push(pixel.con);
|
|
2010
|
+
pixel.con = null;
|
|
2011
|
+
break;
|
|
2012
|
+
}
|
|
2013
|
+
if (!isEmpty(x,y,true) && listPipes.includes(pixelMap[x][y].element)) {
|
|
2014
|
+
var newPixel = pixelMap[x][y];
|
|
2015
|
+
if (pixel.con && !newPixel.con) {
|
|
2016
|
+
newPixel.con = pixel.con;
|
|
2017
|
+
newPixel.con.x = newPixel.x;
|
|
2018
|
+
newPixel.con.y = newPixel.y;
|
|
2019
|
+
pixel.con = null;
|
|
2020
|
+
break;
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
doDefaults(pixel);
|
|
2027
|
+
},
|
|
2028
|
+
category: "machines",
|
|
2029
|
+
movable: false,
|
|
2030
|
+
canContain: true,
|
|
2031
|
+
noMix: true,
|
|
2032
|
+
insulate: true,
|
|
2033
|
+
}
|
|
2034
|
+
elements.liquid_filter = {
|
|
2035
|
+
color: "#599fc2",
|
|
2036
|
+
tick: function(pixel) {
|
|
2037
|
+
if (1 === 2) {
|
|
2038
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
2039
|
+
var coord = squareCoords[i];
|
|
2040
|
+
var x = pixel.x+coord[0];
|
|
2041
|
+
var y = pixel.y+coord[1];
|
|
2042
|
+
if (isEmpty(x,y)) {
|
|
2043
|
+
// createPixel("brick",x,y);
|
|
2044
|
+
// pixelMap[x][y].color = pixelColorPick(pixel,"#808080");
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
// pixel.stage = 1;
|
|
2048
|
+
}
|
|
2049
|
+
else if (1 === 2) { //uninitialized
|
|
2050
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
2051
|
+
var coord = adjacentCoords[i];
|
|
2052
|
+
var x = pixel.x+coord[0];
|
|
2053
|
+
var y = pixel.y+coord[1];
|
|
2054
|
+
if (isEmpty(x,y)) {
|
|
2055
|
+
// pixel.stage = 2; //blue
|
|
2056
|
+
// pixel.color = pixelColorPick(pixel,"#000036");
|
|
2057
|
+
break;
|
|
2058
|
+
}
|
|
2059
|
+
}
|
|
2060
|
+
}
|
|
2061
|
+
else if (1 === 1) { //initialized
|
|
2062
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
2063
|
+
var coord = squareCoords[i];
|
|
2064
|
+
var x = pixel.x+coord[0];
|
|
2065
|
+
var y = pixel.y+coord[1];
|
|
2066
|
+
if (!isEmpty(x,y,true) && listPipes.includes(pixelMap[x][y].element)) {
|
|
2067
|
+
var newPixel = pixelMap[x][y];
|
|
2068
|
+
if (newPixel.stage === 1) {
|
|
2069
|
+
var newColor;
|
|
2070
|
+
switch (pixel.stage) {
|
|
2071
|
+
// case 2: newPixel.stage = 3; newColor = "#003600"; break; //green
|
|
2072
|
+
// case 3: newPixel.stage = 4; newColor = "#360000"; break; //red
|
|
2073
|
+
// case 4: newPixel.stage = 2; newColor = "#000036"; break; //blue
|
|
2074
|
+
}
|
|
2075
|
+
// newPixel.color = pixelColorPick(newPixel,newColor);
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
var moved = false;
|
|
2080
|
+
shuffleArray(squareCoordsShuffle);
|
|
2081
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
2082
|
+
var coord = squareCoordsShuffle[i];
|
|
2083
|
+
var x = pixel.x+coord[0];
|
|
2084
|
+
var y = pixel.y+coord[1];
|
|
2085
|
+
if (!isEmpty(x,y,true)) {
|
|
2086
|
+
var newPixel = pixelMap[x][y];
|
|
2087
|
+
if (listPipes.includes(newPixel.element)) {
|
|
2088
|
+
var nextStage;
|
|
2089
|
+
switch (pixel.stage) {
|
|
2090
|
+
// case 2: nextStage = 4; break; //green
|
|
2091
|
+
// case 3: nextStage = 2; break; //red
|
|
2092
|
+
// case 4: nextStage = 3; break; //blue
|
|
2093
|
+
}
|
|
2094
|
+
if (pixel.con && !newPixel.con) { //transfer to adjacent pipe
|
|
2095
|
+
newPixel.con = pixel.con;
|
|
2096
|
+
newPixel.con.x = newPixel.x;
|
|
2097
|
+
newPixel.con.y = newPixel.y;
|
|
2098
|
+
pixel.con = null;
|
|
2099
|
+
moved = true;
|
|
2100
|
+
break;
|
|
2101
|
+
}
|
|
2102
|
+
}
|
|
2103
|
+
else if (!pixel.con && elements[newPixel.element].movable && (elements[newPixel.element].state == "liquid") ) { //suck up pixel
|
|
2104
|
+
pixel.con = newPixel;
|
|
2105
|
+
deletePixel(newPixel.x,newPixel.y);
|
|
2106
|
+
pixel.con.x = pixel.x;
|
|
2107
|
+
pixel.con.y = pixel.y;
|
|
2108
|
+
pixel.con.del;
|
|
2109
|
+
moved = true;
|
|
2110
|
+
break;
|
|
2111
|
+
}
|
|
2112
|
+
}
|
|
2113
|
+
}
|
|
2114
|
+
if (pixel.con && !moved) { // move to same stage if none other
|
|
2115
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
2116
|
+
var coord = squareCoordsShuffle[i];
|
|
2117
|
+
var x = pixel.x+coord[0];
|
|
2118
|
+
var y = pixel.y+coord[1];
|
|
2119
|
+
if (isEmpty(x,y)) {
|
|
2120
|
+
delete pixel.con.del;
|
|
2121
|
+
pixel.con.x = x;
|
|
2122
|
+
pixel.con.y = y;
|
|
2123
|
+
pixelMap[x][y] = pixel.con;
|
|
2124
|
+
currentPixels.push(pixel.con);
|
|
2125
|
+
pixel.con = null;
|
|
2126
|
+
break;
|
|
2127
|
+
}
|
|
2128
|
+
if (!isEmpty(x,y,true) && listPipes.includes(pixelMap[x][y].element)) {
|
|
2129
|
+
var newPixel = pixelMap[x][y];
|
|
2130
|
+
if (pixel.con && !newPixel.con) {
|
|
2131
|
+
newPixel.con = pixel.con;
|
|
2132
|
+
newPixel.con.x = newPixel.x;
|
|
2133
|
+
newPixel.con.y = newPixel.y;
|
|
2134
|
+
pixel.con = null;
|
|
2135
|
+
break;
|
|
2136
|
+
}
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
doDefaults(pixel);
|
|
2142
|
+
},
|
|
2143
|
+
category: "machines",
|
|
2144
|
+
movable: false,
|
|
2145
|
+
canContain: true,
|
|
2146
|
+
noMix: true,
|
|
2147
|
+
insulate: true,
|
|
2148
|
+
}
|
|
2149
|
+
elements.gas_filter = {
|
|
2150
|
+
color: "#599fc2",
|
|
2151
|
+
tick: function(pixel) {
|
|
2152
|
+
if (1 === 2) {
|
|
2153
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
2154
|
+
var coord = squareCoords[i];
|
|
2155
|
+
var x = pixel.x+coord[0];
|
|
2156
|
+
var y = pixel.y+coord[1];
|
|
2157
|
+
if (isEmpty(x,y)) {
|
|
2158
|
+
// createPixel("brick",x,y);
|
|
2159
|
+
// pixelMap[x][y].color = pixelColorPick(pixel,"#808080");
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
// pixel.stage = 1;
|
|
2163
|
+
}
|
|
2164
|
+
else if (1 === 2) { //uninitialized
|
|
2165
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
2166
|
+
var coord = adjacentCoords[i];
|
|
2167
|
+
var x = pixel.x+coord[0];
|
|
2168
|
+
var y = pixel.y+coord[1];
|
|
2169
|
+
if (isEmpty(x,y)) {
|
|
2170
|
+
// pixel.stage = 2; //blue
|
|
2171
|
+
// pixel.color = pixelColorPick(pixel,"#000036");
|
|
2172
|
+
break;
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
else if (1 === 1) { //initialized
|
|
2177
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
2178
|
+
var coord = squareCoords[i];
|
|
2179
|
+
var x = pixel.x+coord[0];
|
|
2180
|
+
var y = pixel.y+coord[1];
|
|
2181
|
+
if (!isEmpty(x,y,true) && listPipes.includes(pixelMap[x][y].element)) {
|
|
2182
|
+
var newPixel = pixelMap[x][y];
|
|
2183
|
+
if (newPixel.stage === 1) {
|
|
2184
|
+
var newColor;
|
|
2185
|
+
switch (pixel.stage) {
|
|
2186
|
+
// case 2: newPixel.stage = 3; newColor = "#003600"; break; //green
|
|
2187
|
+
// case 3: newPixel.stage = 4; newColor = "#360000"; break; //red
|
|
2188
|
+
// case 4: newPixel.stage = 2; newColor = "#000036"; break; //blue
|
|
2189
|
+
}
|
|
2190
|
+
// newPixel.color = pixelColorPick(newPixel,newColor);
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
var moved = false;
|
|
2195
|
+
shuffleArray(squareCoordsShuffle);
|
|
2196
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
2197
|
+
var coord = squareCoordsShuffle[i];
|
|
2198
|
+
var x = pixel.x+coord[0];
|
|
2199
|
+
var y = pixel.y+coord[1];
|
|
2200
|
+
if (!isEmpty(x,y,true)) {
|
|
2201
|
+
var newPixel = pixelMap[x][y];
|
|
2202
|
+
if (listPipes.includes(newPixel.element)) {
|
|
2203
|
+
var nextStage;
|
|
2204
|
+
switch (pixel.stage) {
|
|
2205
|
+
// case 2: nextStage = 4; break; //green
|
|
2206
|
+
// case 3: nextStage = 2; break; //red
|
|
2207
|
+
// case 4: nextStage = 3; break; //blue
|
|
2208
|
+
}
|
|
2209
|
+
if (pixel.con && !newPixel.con) { //transfer to adjacent pipe
|
|
2210
|
+
newPixel.con = pixel.con;
|
|
2211
|
+
newPixel.con.x = newPixel.x;
|
|
2212
|
+
newPixel.con.y = newPixel.y;
|
|
2213
|
+
pixel.con = null;
|
|
2214
|
+
moved = true;
|
|
2215
|
+
break;
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
else if (!pixel.con && elements[newPixel.element].movable && (elements[newPixel.element].state == "gas")) { //suck up pixel
|
|
2219
|
+
pixel.con = newPixel;
|
|
2220
|
+
deletePixel(newPixel.x,newPixel.y);
|
|
2221
|
+
pixel.con.x = pixel.x;
|
|
2222
|
+
pixel.con.y = pixel.y;
|
|
2223
|
+
pixel.con.del;
|
|
2224
|
+
moved = true;
|
|
2225
|
+
break;
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
}
|
|
2229
|
+
if (pixel.con && !moved) { // move to same stage if none other
|
|
2230
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
2231
|
+
var coord = squareCoordsShuffle[i];
|
|
2232
|
+
var x = pixel.x+coord[0];
|
|
2233
|
+
var y = pixel.y+coord[1];
|
|
2234
|
+
if (isEmpty(x,y)) {
|
|
2235
|
+
delete pixel.con.del;
|
|
2236
|
+
pixel.con.x = x;
|
|
2237
|
+
pixel.con.y = y;
|
|
2238
|
+
pixelMap[x][y] = pixel.con;
|
|
2239
|
+
currentPixels.push(pixel.con);
|
|
2240
|
+
pixel.con = null;
|
|
2241
|
+
break;
|
|
2242
|
+
}
|
|
2243
|
+
if (!isEmpty(x,y,true) && listPipes.includes(pixelMap[x][y].element)) {
|
|
2244
|
+
var newPixel = pixelMap[x][y];
|
|
2245
|
+
if (pixel.con && !newPixel.con) {
|
|
2246
|
+
newPixel.con = pixel.con;
|
|
2247
|
+
newPixel.con.x = newPixel.x;
|
|
2248
|
+
newPixel.con.y = newPixel.y;
|
|
2249
|
+
pixel.con = null;
|
|
2250
|
+
break;
|
|
2251
|
+
}
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
}
|
|
2256
|
+
doDefaults(pixel);
|
|
2257
|
+
},
|
|
2258
|
+
category: "machines",
|
|
2259
|
+
movable: false,
|
|
2260
|
+
canContain: true,
|
|
2261
|
+
noMix: true,
|
|
2262
|
+
insulate: true,
|
|
2263
|
+
}
|
|
2264
|
+
function weightedAverage(num1, num2, weight){
|
|
2265
|
+
return ((weight * num1)+((1-weight)*num2))
|
|
2266
|
+
}
|
|
2267
|
+
function getPixelColor(color){
|
|
2268
|
+
let rgb2;
|
|
2269
|
+
if(color.startsWith("#")) {
|
|
2270
|
+
rgb2 = color.match(/[0-9A-F]{2}/ig).map(x => parseInt(x,16));
|
|
2271
|
+
} else if(color.startsWith("hsl")) {
|
|
2272
|
+
var hsl = color.match(/[\d.]+/g);
|
|
2273
|
+
hsl[0] = (hsl[0] % 360) / 360; if(hsl[0] < 0) { hsl[0]++ };
|
|
2274
|
+
hsl[1] = Math.max(Math.min(hsl[1] / 100,1),0);
|
|
2275
|
+
hsl[2] = Math.max(Math.min(hsl[2] / 100,1),0);
|
|
2276
|
+
rgb2 = HSLtoRGB(hsl)
|
|
2277
|
+
} else {
|
|
2278
|
+
rgb2 = color.match(/[\d.]+/g);
|
|
2279
|
+
}
|
|
2280
|
+
return rgb2
|
|
2281
|
+
}
|
|
2282
|
+
elements.dyer = {
|
|
2283
|
+
customColor: true,
|
|
2284
|
+
color: ["#ff0000","#ff8800","#ffff00","#00ff00","#00ffff","#0000ff","#ff00ff"],
|
|
2285
|
+
behavior: behaviors.wall,
|
|
2286
|
+
movable: false,
|
|
2287
|
+
state: "solid",
|
|
2288
|
+
category: "machines",
|
|
2289
|
+
tick: function(pixel){
|
|
2290
|
+
for (var i = 0; i < squareCoordsShuffle.length; i++) {
|
|
2291
|
+
var coord = squareCoordsShuffle[i];
|
|
2292
|
+
var x = pixel.x+coord[0];
|
|
2293
|
+
var y = pixel.y+coord[1];
|
|
2294
|
+
if (!isEmpty(x,y,true)) {
|
|
2295
|
+
if (!(pixelMap[x][y].element == "dyer")){
|
|
2296
|
+
var newPixel = pixelMap[x][y];
|
|
2297
|
+
var rgb1 = pixel.color.match(/\d+/g);
|
|
2298
|
+
var rgb2 = getPixelColor(newPixel.color)
|
|
2299
|
+
// average the colors
|
|
2300
|
+
var rgb = [
|
|
2301
|
+
weightedAverage(parseInt(rgb1[0]), parseInt(rgb2[0]), 0.2),
|
|
2302
|
+
weightedAverage(parseInt(rgb1[1]), parseInt(rgb2[1]), 0.2),
|
|
2303
|
+
weightedAverage(parseInt(rgb1[2]), parseInt(rgb2[2]), 0.2),
|
|
2304
|
+
];
|
|
2305
|
+
// convert rgb to hex
|
|
2306
|
+
var hex = RGBToHex(rgb);
|
|
2307
|
+
newPixel.color = pixelColorPick(newPixel, hex);
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
}
|
|
2312
|
+
}
|
|
2313
|
+
elemfillerVar = 0;
|
|
2314
|
+
elements.element_filler = {
|
|
2315
|
+
category: "special",
|
|
2316
|
+
color: elements.filler.color,
|
|
2317
|
+
excludeRandom: true,
|
|
2318
|
+
state: "solid",
|
|
2319
|
+
movable: "false",
|
|
2320
|
+
onSelect: async function() {
|
|
2321
|
+
var answer6 = await _nousersthingsprompt("Please input the desired element of this filler. It will not work if you do multiple filler types while paused.",(elemfillerVar||undefined));
|
|
2322
|
+
if (!answer6) { return }
|
|
2323
|
+
elemfillerVar = mostSimilarElement(answer6);
|
|
2324
|
+
},
|
|
2325
|
+
tick: function(pixel){
|
|
2326
|
+
var neighbors = 0;
|
|
2327
|
+
if(!pixel.changeElem){
|
|
2328
|
+
pixel.changeElem = elemfillerVar;
|
|
2329
|
+
}
|
|
2330
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
2331
|
+
var coord = squareCoords[i];
|
|
2332
|
+
var x = pixel.x+coord[0];
|
|
2333
|
+
var y = pixel.y+coord[1];
|
|
2334
|
+
if (!isEmpty(x,y, true)) {
|
|
2335
|
+
neighbors = neighbors + 1;
|
|
2336
|
+
} else if (isEmpty(x, y)){
|
|
2337
|
+
createPixel("element_filler", x, y)
|
|
2338
|
+
pixelMap[x][y].changeElem = pixel.changeElem;
|
|
2339
|
+
} else (
|
|
2340
|
+
changePixel(pixel, pixel.changeElem)
|
|
2341
|
+
)
|
|
2342
|
+
}
|
|
2343
|
+
if (neighbors >= 8){
|
|
2344
|
+
changePixel(pixel, pixel.changeElem)
|
|
2345
|
+
}
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2348
|
+
var outlinerVar = 0
|
|
2349
|
+
elements.inner_outliner = {
|
|
2350
|
+
color: elements.filler.color,
|
|
2351
|
+
category: elements.filler.category,
|
|
2352
|
+
excludeRandom: true,
|
|
2353
|
+
onSelect: async function() {
|
|
2354
|
+
var answerot = await _nousersthingsprompt("Please input the desired element of this outliner. It will not work if you do multiple outliner types while paused.",(outlinerVar||undefined));
|
|
2355
|
+
if (!answerot) { return }
|
|
2356
|
+
outlinerVar = mostSimilarElement(answerot);
|
|
2357
|
+
},
|
|
2358
|
+
tick: function(pixel){
|
|
2359
|
+
var neighbors = 0;
|
|
2360
|
+
if(!pixel.changeElem){
|
|
2361
|
+
pixel.changeElem = outlinerVar;
|
|
2362
|
+
if (pixel.nDelete == undefined){
|
|
2363
|
+
pixel.nDelete = false
|
|
2364
|
+
}
|
|
2365
|
+
}
|
|
2366
|
+
if (pixel.nDelete){
|
|
2367
|
+
deletePixel(pixel.x, pixel.y)
|
|
2368
|
+
}
|
|
2369
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
2370
|
+
var coord = squareCoords[i];
|
|
2371
|
+
var x = pixel.x+coord[0];
|
|
2372
|
+
var y = pixel.y+coord[1];
|
|
2373
|
+
if (!isEmpty(x,y, true)) {
|
|
2374
|
+
neighbors = neighbors + 1;
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
if (neighbors >= 8){
|
|
2378
|
+
pixel.nDelete = true
|
|
2379
|
+
} else {
|
|
2380
|
+
changePixel(pixel, pixel.changeElem)
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
textures.transparency = [
|
|
2385
|
+
"wwwggg",
|
|
2386
|
+
"wwwggg",
|
|
2387
|
+
"wwwggg",
|
|
2388
|
+
"gggwww",
|
|
2389
|
+
"gggwww",
|
|
2390
|
+
"gggwww"
|
|
2391
|
+
]
|
|
2392
|
+
textures.steel = [
|
|
2393
|
+
"hHhhd",
|
|
2394
|
+
"Hnnnd",
|
|
2395
|
+
"hnnnd",
|
|
2396
|
+
"hnnnD",
|
|
2397
|
+
"dddDD"
|
|
2398
|
+
]
|
|
2399
|
+
textures.sponge = [
|
|
2400
|
+
"hddddnnddd",
|
|
2401
|
+
"Ddhddhnhdd",
|
|
2402
|
+
"ddDdnNnNdd",
|
|
2403
|
+
"dddhnnnnnh",
|
|
2404
|
+
"dhdNnhnnnN",
|
|
2405
|
+
"nNnhnNnddd",
|
|
2406
|
+
"dhnNnnddhd",
|
|
2407
|
+
"dDnnnhddDd",
|
|
2408
|
+
"dhnnnNdhdd",
|
|
2409
|
+
"ddddnddDdd"
|
|
2410
|
+
]
|
|
2411
|
+
textures.copper = [
|
|
2412
|
+
"uuuuum",
|
|
2413
|
+
"unhhnd",
|
|
2414
|
+
"uhhnnD",
|
|
2415
|
+
"uhnnHd",
|
|
2416
|
+
"unnHnD",
|
|
2417
|
+
"mdDdDD"
|
|
2418
|
+
]
|
|
2419
|
+
textures.gold = [
|
|
2420
|
+
"hnnndbHHHhhnbHHHh",
|
|
2421
|
+
"nnndbhnnnnndDbnnn",
|
|
2422
|
+
"nnddbnnnnnddDbnnn",
|
|
2423
|
+
"dddbnnnddddDDDbnd",
|
|
2424
|
+
"DDDbDDDDDDDDDDbDD",
|
|
2425
|
+
"BBBBBBBBBBBBBBBBB"
|
|
2426
|
+
]
|
|
2427
|
+
textures.diamond = [
|
|
2428
|
+
"llcccLbLl",
|
|
2429
|
+
"lcccccbbC",
|
|
2430
|
+
"CScccBbCC",
|
|
2431
|
+
"SSScBBBLC",
|
|
2432
|
+
"SSSSLBbLS",
|
|
2433
|
+
"SSSCLbbbL",
|
|
2434
|
+
"BSCCCnbBL",
|
|
2435
|
+
"BBBCnnBBB",
|
|
2436
|
+
"lBBcLnLbL"
|
|
2437
|
+
]
|
|
2438
|
+
elements.transparency = {
|
|
2439
|
+
color: ["#d4d4d4", "#ffffff"],
|
|
2440
|
+
colorPattern: textures.transparency,
|
|
2441
|
+
colorKey: {
|
|
2442
|
+
"g": "#D4D4D4",
|
|
2443
|
+
"w": "#ffffff"
|
|
2444
|
+
},
|
|
2445
|
+
behavior: behaviors.WALL,
|
|
2446
|
+
category: "special",
|
|
2447
|
+
state: "solid",
|
|
2448
|
+
grain: 0
|
|
2449
|
+
}
|
|
2450
|
+
elements.textured_steel = {
|
|
2451
|
+
color: ["#708196", "#8895ad", "#596B77", "#525D6B", "#404954"],
|
|
2452
|
+
colorPattern: textures.steel,
|
|
2453
|
+
colorKey: {
|
|
2454
|
+
"h": "#708196",
|
|
2455
|
+
"H": "#8895ad",
|
|
2456
|
+
"n": "#596B77",
|
|
2457
|
+
"d": "#525D6B",
|
|
2458
|
+
"D": "#404954"
|
|
2459
|
+
},
|
|
2460
|
+
behavior: behaviors.WALL,
|
|
2461
|
+
category: "solids",
|
|
2462
|
+
state: "solid",
|
|
2463
|
+
tick: function(pixel){
|
|
2464
|
+
if (pixelTicks - pixel.start == 1){
|
|
2465
|
+
pixel.element = "steel"
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
}
|
|
2469
|
+
elements.textured_sponge = {
|
|
2470
|
+
color: ["#ccaa00", "#c1a100", "#967d00", "#b89a00", "#ae9100"],
|
|
2471
|
+
colorPattern: textures.sponge,
|
|
2472
|
+
colorKey: {
|
|
2473
|
+
"n": "#ccaa00",
|
|
2474
|
+
"N": "#c1a100",
|
|
2475
|
+
"h": "#967d00",
|
|
2476
|
+
"d": "#b89a00",
|
|
2477
|
+
"D": "#ae9100"
|
|
2478
|
+
},
|
|
2479
|
+
behavior: behaviors.WALL,
|
|
2480
|
+
category: "solids",
|
|
2481
|
+
state: "solid",
|
|
2482
|
+
tick: function(pixel){
|
|
2483
|
+
if (pixelTicks - pixel.start == 1){
|
|
2484
|
+
pixel.element = "sponge"
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
elements.textured_copper = {
|
|
2489
|
+
color: ["#772F22", "#AB533F", "#9E3F2D", "#9E3F2D", "#4C1C11"],
|
|
2490
|
+
colorPattern: textures.copper,
|
|
2491
|
+
colorKey: {
|
|
2492
|
+
"u": "#772F22",
|
|
2493
|
+
"H": "#AB533F",
|
|
2494
|
+
"h": "#C0725A",
|
|
2495
|
+
"n": "#9E3F2D",
|
|
2496
|
+
"D": "#4C1C11",
|
|
2497
|
+
"d": "#622516",
|
|
2498
|
+
"m": "#712C1E"
|
|
2499
|
+
},
|
|
2500
|
+
behavior: behaviors.WALL,
|
|
2501
|
+
category: "solids",
|
|
2502
|
+
state: "solid",
|
|
2503
|
+
tick: function(pixel){
|
|
2504
|
+
if (pixelTicks - pixel.start == 1){
|
|
2505
|
+
pixel.element = "copper"
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2508
|
+
}
|
|
2509
|
+
elements.textured_gold = {
|
|
2510
|
+
color: ["#E4B038", "#FFCA59", "#BF8A18", "#7F5A10", "#674611"],
|
|
2511
|
+
colorPattern: textures.gold,
|
|
2512
|
+
colorKey: {
|
|
2513
|
+
"h": "#FFCA59",
|
|
2514
|
+
"H": "#FFFFCC",
|
|
2515
|
+
"n": "#E4B038",
|
|
2516
|
+
"B": "#513412",
|
|
2517
|
+
"b": "#674611",
|
|
2518
|
+
"d": "#BF8A18",
|
|
2519
|
+
"D": "#7F5A10"
|
|
2520
|
+
},
|
|
2521
|
+
behavior: behaviors.WALL,
|
|
2522
|
+
category: "solids",
|
|
2523
|
+
state: "solid",
|
|
2524
|
+
tick: function(pixel){
|
|
2525
|
+
if (pixelTicks - pixel.start == 1){
|
|
2526
|
+
pixel.element = "gold"
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
elements.solid_diamond = {
|
|
2531
|
+
color: elements.diamond.color,
|
|
2532
|
+
category: "solids",
|
|
2533
|
+
colorPattern: textures.diamond,
|
|
2534
|
+
colorKey: {
|
|
2535
|
+
"c":"#36BDF3",
|
|
2536
|
+
"C": "#7DD1F2",
|
|
2537
|
+
"B": "#4B94ED",
|
|
2538
|
+
"b": "#97BEED",
|
|
2539
|
+
"L":"#C2D5ED",
|
|
2540
|
+
"n": "#7BAEED",
|
|
2541
|
+
"l": "#A2DBF2",
|
|
2542
|
+
"S": "#BDF8FF"
|
|
2543
|
+
},
|
|
2544
|
+
reactions: elements.diamond.reactions,
|
|
2545
|
+
state: "solid",
|
|
2546
|
+
density: elements.diamond.density,
|
|
2547
|
+
hardness: elements.diamond.hardness,
|
|
2548
|
+
behavior: behaviors.WALL,
|
|
2549
|
+
}
|
|
2550
|
+
elements.textured_rose_gold = {
|
|
2551
|
+
color: ["#FF5991", "#E4386F", "#7F1037", "#FFCCCD", "#671133"],
|
|
2552
|
+
colorPattern: textures.gold,
|
|
2553
|
+
colorKey: {
|
|
2554
|
+
"h": "#FF5991",
|
|
2555
|
+
"H": "#FFCCCD",
|
|
2556
|
+
"n": "#E4386F",
|
|
2557
|
+
"B": "#511230",
|
|
2558
|
+
"b": "#671133",
|
|
2559
|
+
"d": "#BF1850",
|
|
2560
|
+
"D": "#7F1037"
|
|
2561
|
+
},
|
|
2562
|
+
behavior: behaviors.WALL,
|
|
2563
|
+
category: "solids",
|
|
2564
|
+
state: "solid",
|
|
2565
|
+
tick: function(pixel){
|
|
2566
|
+
if (pixelTicks - pixel.start == 1){
|
|
2567
|
+
pixel.element = "rose_gold"
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2570
|
+
}
|
|
2571
|
+
elements.insulating_filler = {
|
|
2572
|
+
color: elements.filler.color,
|
|
2573
|
+
behavior: behaviors.FILL,
|
|
2574
|
+
category: elements.filler.category,
|
|
2575
|
+
state: elements.filler.state,
|
|
2576
|
+
insulate: true
|
|
2577
|
+
}
|
|
2578
|
+
selvoid = 0;
|
|
2579
|
+
elements.selective_void = {
|
|
2580
|
+
category: "special",
|
|
2581
|
+
color: elements.void.color,
|
|
2582
|
+
excludeRandom: true,
|
|
2583
|
+
state: "solid",
|
|
2584
|
+
movable: "false",
|
|
2585
|
+
onSelect: async function() {
|
|
2586
|
+
var selvoidans = await _nousersthingsprompt("Please input the desired element of this void. It will not work if you do multiple void types while paused.",(selvoid||undefined));
|
|
2587
|
+
if (!selvoidans) { return }
|
|
2588
|
+
selvoid = mostSimilarElement(selvoidans);
|
|
2589
|
+
},
|
|
2590
|
+
tick: function(pixel){
|
|
2591
|
+
if(!pixel.changeElem){
|
|
2592
|
+
pixel.changeElem = selvoid;
|
|
2593
|
+
}
|
|
2594
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
2595
|
+
var coord = squareCoords[i];
|
|
2596
|
+
var x = pixel.x+coord[0];
|
|
2597
|
+
var y = pixel.y+coord[1];
|
|
2598
|
+
if (!isEmpty(x,y, true)) {
|
|
2599
|
+
var otherPixel = pixelMap[x][y]
|
|
2600
|
+
if (otherPixel.element == pixel.changeElem)
|
|
2601
|
+
deletePixel(x, y)
|
|
2602
|
+
}
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2605
|
+
}
|
|
2606
|
+
let circleElem = "wood"
|
|
2607
|
+
elements.scuffed_circle_brush = {
|
|
2608
|
+
category: "special",
|
|
2609
|
+
color: elements.drag.color,
|
|
2610
|
+
excludeRandom: true,
|
|
2611
|
+
state: "solid",
|
|
2612
|
+
movable: false,
|
|
2613
|
+
onSelect: async function(){
|
|
2614
|
+
var answerE = await _nousersthingsprompt("Element of the brush.",(circleElem||undefined));
|
|
2615
|
+
if (!answerE) { return }
|
|
2616
|
+
circleElem = mostSimilarElement(answerE);
|
|
2617
|
+
},
|
|
2618
|
+
tick: function(pixel){
|
|
2619
|
+
let radius = mouseSize/2
|
|
2620
|
+
//pyhtagoreas time
|
|
2621
|
+
if (Math.sqrt(Math.pow(pixel.x-mousePos.x,2)+Math.pow(pixel.y-mousePos.y,2)) < radius) {
|
|
2622
|
+
deletePixel(pixel.x, pixel.y)
|
|
2623
|
+
createPixel(circleElem, pixel.x, pixel.y)
|
|
2624
|
+
} else {
|
|
2625
|
+
deletePixel(pixel.x, pixel.y)
|
|
2626
|
+
}
|
|
2627
|
+
}
|
|
2628
|
+
}
|
|
2629
|
+
elements.scuffed_triangle_brush = {
|
|
2630
|
+
category: "special",
|
|
2631
|
+
color: elements.drag.color,
|
|
2632
|
+
excludeRandom: true,
|
|
2633
|
+
state: "solid",
|
|
2634
|
+
movable: false,
|
|
2635
|
+
onSelect: async function(){
|
|
2636
|
+
var answerE = await _nousersthingsprompt("Element of the brush.",(circleElem||undefined));
|
|
2637
|
+
if (!answerE) { return }
|
|
2638
|
+
circleElem = mostSimilarElement(answerE);
|
|
2639
|
+
},
|
|
2640
|
+
tick: function(pixel){
|
|
2641
|
+
let radius = mouseSize/2
|
|
2642
|
+
if ((pixel.y - mousePos.y + mouseSize > 2 * (pixel.x - mousePos.x) + 0.5 * mouseSize) && (pixel.y - mousePos.y + mouseSize > -2 * (pixel.x - mousePos.x) + 0.5 * mouseSize)) {
|
|
2643
|
+
deletePixel(pixel.x, pixel.y)
|
|
2644
|
+
createPixel(circleElem, pixel.x, pixel.y)
|
|
2645
|
+
} else {
|
|
2646
|
+
deletePixel(pixel.x, pixel.y)
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2649
|
+
}
|
|
2650
|
+
function randomIntFromInterval(min, max) { // min and max included
|
|
2651
|
+
return Math.floor(Math.random() * (max - min + 1) + min)
|
|
2652
|
+
}
|
|
2653
|
+
elements.spacedust_cola = {
|
|
2654
|
+
color: ["#090033", "#0a0027", "#0a001b", "#0b000f"],
|
|
2655
|
+
behavior: elements.soda.behavior,
|
|
2656
|
+
tempHigh: 104,
|
|
2657
|
+
stateHigh: ["steam", "carbon_dioxide", "spacedust", "spacedust"],
|
|
2658
|
+
category: "liquids",
|
|
2659
|
+
state: "liquid",
|
|
2660
|
+
reactions: {head: {elem1: null, chance: 0.02}},
|
|
2661
|
+
density: elements.tungsten.density,
|
|
2662
|
+
isFood: true,
|
|
2663
|
+
}
|
|
2664
|
+
elements.spacedust = {
|
|
2665
|
+
color: ["#090033", "#0a0027", "#0a001b", "#0b000f", "#090033", "#0a0027", "#0a001b", "#0b000f", "#090033", "#0a0027", "#0a001b", "#0b000f", "#090033", "#0a0027", "#0a001b", "#0b000f", "#090033", "#0a0027", "#0a001b", "#0b000f", "#090033", "#0a0027", "#0a001b", "#0b000f", "#ffffff"],
|
|
2666
|
+
behavior: behaviors.POWDER,
|
|
2667
|
+
category: "special",
|
|
2668
|
+
state: "solid",
|
|
2669
|
+
reactions: {
|
|
2670
|
+
"acid": {elem1: null, elem2: ["hydrogen", "helium", "hydrogen", "helium", "hydrogen", "helium", "hydrogen", "hydrogen", "hydrogen", "hydrogen", "metal_scrap"], chance: 0.02},
|
|
2671
|
+
"seltzer": {elem1: null, elem2: "spacedust_cola"},
|
|
2672
|
+
"soda": {elem1: null, elem2: "spacedust_cola"},
|
|
2673
|
+
},
|
|
2674
|
+
density: elements.tungsten.density,
|
|
2675
|
+
}
|
|
2676
|
+
elements.acid.ignore.push("spacedust")
|
|
2677
|
+
elements.acid.ignore.push("spacedust_cola")
|
|
2678
|
+
elements.sun.breakInto = "spacedust"
|
|
2679
|
+
var gridElem = 0
|
|
2680
|
+
elements.grid_brush = {
|
|
2681
|
+
color: elements.lattice.color,
|
|
2682
|
+
behavior: behaviors.WALL,
|
|
2683
|
+
category: "special",
|
|
2684
|
+
movable: false,
|
|
2685
|
+
onSelect: async function() {
|
|
2686
|
+
var gridans = await _nousersthingsprompt("Please input the desired element of this grid brush",(gridElem||undefined));
|
|
2687
|
+
if (!gridans) { return }
|
|
2688
|
+
gridElem = mostSimilarElement(gridans);
|
|
2689
|
+
},
|
|
2690
|
+
tick: function(pixel){
|
|
2691
|
+
if (pixel.x%2 || pixel.y%2){
|
|
2692
|
+
deletePixel(pixel.x, pixel.y)
|
|
2693
|
+
createPixel(gridElem, pixel.x, pixel.y)
|
|
2694
|
+
} else {
|
|
2695
|
+
deletePixel(pixel.x, pixel.y)
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
2699
|
+
elements.healing_serum = {
|
|
2700
|
+
color: ["#79d2c5", "#77d8c0", "#78ddb9", "#7de1b0", "#85e6a6", "#91e99a", "#9fec8e"],
|
|
2701
|
+
behavior: behaviors.LIQUID,
|
|
2702
|
+
category: "liquids",
|
|
2703
|
+
state: "liquid",
|
|
2704
|
+
properties: {
|
|
2705
|
+
wait: 15,
|
|
2706
|
+
waitReduce: false,
|
|
2707
|
+
},
|
|
2708
|
+
tick: function(pixel){
|
|
2709
|
+
if (pixel.waitReduce){pixel.wait -= 1}
|
|
2710
|
+
if (!pixel.decidedPixel){
|
|
2711
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
2712
|
+
var coord = squareCoords[i];
|
|
2713
|
+
var x = pixel.x+coord[0];
|
|
2714
|
+
var y = pixel.y+coord[1];
|
|
2715
|
+
if (!isEmpty(x, y, true)){
|
|
2716
|
+
let otherPixel = pixelMap[x][y]
|
|
2717
|
+
if (otherPixel.element != "healing_serum" && !(elements.healing_serum.ignore.includes(otherPixel.element))){
|
|
2718
|
+
pixel.decidedPixel = otherPixel
|
|
2719
|
+
pixel.waitReduce = true
|
|
2720
|
+
break;
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
}
|
|
2724
|
+
}
|
|
2725
|
+
if (pixel.wait <= 0){
|
|
2726
|
+
const { x, y, ...remainingProperties } = pixel.decidedPixel;
|
|
2727
|
+
Object.assign(pixel, remainingProperties);
|
|
2728
|
+
delete pixel.decidedPixel
|
|
2729
|
+
return;
|
|
2730
|
+
}
|
|
2731
|
+
},
|
|
2732
|
+
renderer: function(pixel, ctx){
|
|
2733
|
+
// interpolate pixel color and decidedpixel's color (if it has one!)
|
|
2734
|
+
if (pixel.decidedPixel){
|
|
2735
|
+
var color1 = pixel.color.match(/\d+/g);
|
|
2736
|
+
var color2 = getPixelColor(pixel.decidedPixel.color)
|
|
2737
|
+
var ratio = pixel.wait/15
|
|
2738
|
+
drawSquare(ctx, `rgb(${color1[0]*ratio+color2[0]*(1-ratio)},${color1[1]*ratio+color2[1]*(1-ratio)},${color1[2]*ratio+color2[2]*(1-ratio)})`, pixel.x, pixel.y)
|
|
2739
|
+
}
|
|
2740
|
+
else{
|
|
2741
|
+
drawSquare(ctx, pixel.color, pixel.x, pixel.y)
|
|
2742
|
+
}
|
|
2743
|
+
},
|
|
2744
|
+
ignore: ["wall", "cloner", "e_cloner", "border"]
|
|
2745
|
+
}
|
|
2746
|
+
var rayElement = "ray"
|
|
2747
|
+
var rayStoppedByWalls = false
|
|
2748
|
+
elements.ray_emitter = {
|
|
2749
|
+
color: "#ff9c07",
|
|
2750
|
+
behavior: behaviors.WALL,
|
|
2751
|
+
category: "machines",
|
|
2752
|
+
movable: false,
|
|
2753
|
+
onSelect: async function(pixel){
|
|
2754
|
+
var rayans = await _nousersthingsprompt("Please input the desired element of this ray emitter",(rayElement||undefined));
|
|
2755
|
+
if (!rayans) { return }
|
|
2756
|
+
rayElement = mostSimilarElement(rayans);
|
|
2757
|
+
var rayans2 = await _nousersthingsprompt("Should the ray be stopped by walls? Write true or false.",(rayStoppedByWalls||false));
|
|
2758
|
+
if (rayans2 == "false"){rayStoppedByWalls = false} else {rayStoppedByWalls = true}
|
|
2759
|
+
},
|
|
2760
|
+
hoverStat: function(pixel){
|
|
2761
|
+
return (pixel.rayElement|| "unset").toUpperCase() + ", " + (pixel.rayStoppedByWalls || "unset").toString().toUpperCase()
|
|
2762
|
+
},
|
|
2763
|
+
tick: function(pixel){
|
|
2764
|
+
if (pixelTicks == pixel.start){
|
|
2765
|
+
pixel.rayElement = rayElement
|
|
2766
|
+
pixel.rayStoppedByWalls = rayStoppedByWalls
|
|
2767
|
+
}
|
|
2768
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
2769
|
+
var coord = squareCoords[i];
|
|
2770
|
+
var x = pixel.x+coord[0];
|
|
2771
|
+
var y = pixel.y+coord[1];
|
|
2772
|
+
if (!isEmpty(x,y, true)){
|
|
2773
|
+
if (pixelMap[x][y].charge && (pixelMap[x][y].element == "wire" || pixelMap[x][y].element == "insulated_wire")){
|
|
2774
|
+
if ((Math.abs(coord[0]) + Math.abs(coord[1]) == 2) && pixelMap[x][y].element == "insulated_wire"){return}
|
|
2775
|
+
var dir = [0-squareCoords[i][0], 0-squareCoords[i][1]]
|
|
2776
|
+
var startx = pixel.x+dir[0]
|
|
2777
|
+
var starty = pixel.y+dir[1]
|
|
2778
|
+
var magnitude = 0
|
|
2779
|
+
if (width > height){magnitude = width} else {magnitude = height}
|
|
2780
|
+
var endx = startx+(magnitude*dir[0])
|
|
2781
|
+
var endy = starty+(magnitude*dir[1])
|
|
2782
|
+
// console.log("Direction seems to be " + dir)
|
|
2783
|
+
var jcoords = lineCoords(startx, starty, endx, endy, 1)
|
|
2784
|
+
// console.log(startx + " is the starting x, " + starty + " is the starting y, " + endx + " is the ending x, " + endy + " is the ending y. Result is " + jcoords)
|
|
2785
|
+
for (var j = 0; j < jcoords.length; j++) {
|
|
2786
|
+
var lcoord = jcoords[j];
|
|
2787
|
+
var lx = lcoord[0];
|
|
2788
|
+
var ly = lcoord[1];
|
|
2789
|
+
// console.log(lcoord)
|
|
2790
|
+
if (isEmpty(lx,ly)){
|
|
2791
|
+
createPixel(pixel.rayElement, lx, ly)
|
|
2792
|
+
pixelMap[lx][ly].temp = pixel.temp
|
|
2793
|
+
if (pixel.rayElement == "ray"){
|
|
2794
|
+
pixelMap[lx][ly].rColor = pixel.color
|
|
2795
|
+
pixelMap[lx][ly].color = pixel.color
|
|
2796
|
+
}
|
|
2797
|
+
} else if (!isEmpty(lx, ly, true)){
|
|
2798
|
+
if (pixelMap[lx][ly].element != pixel.rayElement && pixel.rayStoppedByWalls){
|
|
2799
|
+
break;
|
|
2800
|
+
} else if (pixelMap[lx][ly].element == "ray" && pixel.rayElement == "ray"){
|
|
2801
|
+
pixelMap[lx][ly].rColor = pixel.color
|
|
2802
|
+
pixelMap[lx][ly].life = 10
|
|
2803
|
+
pixelMap[lx][ly].color = pixel.color
|
|
2804
|
+
}
|
|
2805
|
+
}
|
|
2806
|
+
}
|
|
2807
|
+
}
|
|
2808
|
+
}
|
|
2809
|
+
}
|
|
2810
|
+
},
|
|
2811
|
+
insulate: true,
|
|
2812
|
+
}
|
|
2813
|
+
elements.indestructible_battery = {
|
|
2814
|
+
color: elements.battery.color,
|
|
2815
|
+
behavior: elements.battery.behavior,
|
|
2816
|
+
category: elements.battery.category
|
|
2817
|
+
}
|
|
2818
|
+
elements.ray = {
|
|
2819
|
+
color: "#ffffff",
|
|
2820
|
+
behavior: behaviors.WALL,
|
|
2821
|
+
movable: true,
|
|
2822
|
+
category: "special",
|
|
2823
|
+
hoverStat: function(pixel){
|
|
2824
|
+
return (pixel.life || "unset").toString()
|
|
2825
|
+
},
|
|
2826
|
+
properties: {
|
|
2827
|
+
life: 10,
|
|
2828
|
+
maxLife: 10,
|
|
2829
|
+
},
|
|
2830
|
+
tick: function(pixel){
|
|
2831
|
+
if (pixel.rColor){
|
|
2832
|
+
pixel.rgb = pixel.rColor.match(/\d+/g);
|
|
2833
|
+
} else {
|
|
2834
|
+
pixel.rgb = [255,255,255]
|
|
2835
|
+
}
|
|
2836
|
+
pixel.life -= 1
|
|
2837
|
+
if (pixel.life < pixel.maxLife){
|
|
2838
|
+
pixel.color = "rgba("+pixel.rgb[0]+","+pixel.rgb[1]+","+pixel.rgb[2]+","+(pixel.life/pixel.maxLife)+")"
|
|
2839
|
+
} else {pixel.color = "rgba("+pixel.rgb[0]+","+pixel.rgb[1]+","+pixel.rgb[2]+",1)"}
|
|
2840
|
+
// lightmap.js integration
|
|
2841
|
+
if (enabledMods.includes("mods/lightmap.js")){
|
|
2842
|
+
let x = Math.floor(pixel.x / lightmapScale);
|
|
2843
|
+
let y = Math.floor(pixel.y / lightmapScale);
|
|
2844
|
+
lightmap[y][x] = { color: [parseInt(pixel.rgb[0])*((pixel.life/pixel.maxLife)), parseInt(pixel.rgb[1])*((pixel.life/pixel.maxLife)), parseInt(pixel.rgb[2])*((pixel.life/pixel.maxLife))]};
|
|
2845
|
+
}
|
|
2846
|
+
if (pixel.life <= 0){
|
|
2847
|
+
deletePixel(pixel.x, pixel.y)
|
|
2848
|
+
}
|
|
2849
|
+
},
|
|
2850
|
+
canPlace: true,
|
|
2851
|
+
tool: function(pixel){
|
|
2852
|
+
if (pixel.element == "ray"){
|
|
2853
|
+
pixel.life = 10
|
|
2854
|
+
pixel.color = pixel.rColor
|
|
2855
|
+
}
|
|
2856
|
+
}
|
|
2857
|
+
}
|
|
2858
|
+
var specificRayStart = 0
|
|
2859
|
+
var specificRayEnd = 20
|
|
2860
|
+
var specificRayAngle = 0
|
|
2861
|
+
var stopAtElement = "wall"
|
|
2862
|
+
var rayLife = 10
|
|
2863
|
+
var rainbowMode = "no"
|
|
2864
|
+
elements.specific_ray_emitter = {
|
|
2865
|
+
color: "#e73e63",
|
|
2866
|
+
behavior: behaviors.WALL,
|
|
2867
|
+
category: "machines",
|
|
2868
|
+
movable: false,
|
|
2869
|
+
onSelect: async function(pixel){
|
|
2870
|
+
var rayans = await _nousersthingsprompt("Please input the desired element of this ray emitter",(rayElement||undefined));
|
|
2871
|
+
if (!rayans) { return }
|
|
2872
|
+
rayElement = mostSimilarElement(rayans);
|
|
2873
|
+
if (rayElement != "ray"){rainbowMode = false}
|
|
2874
|
+
var rayans2 = await _nousersthingsprompt("Should the ray be stopped by walls? Write true or false.",(rayStoppedByWalls||false));
|
|
2875
|
+
if (rayans2 == "false"){rayStoppedByWalls = false} else {rayStoppedByWalls = true}
|
|
2876
|
+
var rayans3 = await _nousersthingsprompt("How much should the beginning of the ray be offset from the emitter?", (specificRayStart||0));
|
|
2877
|
+
if (!rayans3) { return }
|
|
2878
|
+
specificRayStart = rayans3
|
|
2879
|
+
var rayans4 = await _nousersthingsprompt("How much should the end of the ray be offset from the emitter?", (specificRayEnd||0));
|
|
2880
|
+
if (!rayans4) { return }
|
|
2881
|
+
specificRayEnd = rayans4
|
|
2882
|
+
var rayans5 = await _nousersthingsprompt("What angle should the ray be emitted at? Type anything that isnt a number to use default angle logic.", (specificRayAngle||0));
|
|
2883
|
+
if (!rayans5) { return }
|
|
2884
|
+
specificRayAngle = rayans5
|
|
2885
|
+
if (isNaN(parseFloat(specificRayAngle))){
|
|
2886
|
+
specificRayAngle = "nah"
|
|
2887
|
+
}
|
|
2888
|
+
var rayans6 = await _nousersthingsprompt("What element should the ray stop at?", (stopAtElement||"wall"));
|
|
2889
|
+
if (!rayans6) { return }
|
|
2890
|
+
stopAtElement = mostSimilarElement(rayans6)
|
|
2891
|
+
let rayans7
|
|
2892
|
+
if (rayans == "ray"){ rayans7 = await _nousersthingsprompt("How long should the ray stay on screen in ticks?", (rayLife||10));
|
|
2893
|
+
if (!rayans7) { return }
|
|
2894
|
+
if (isNaN(parseFloat(rayans7))){
|
|
2895
|
+
rayLife = 10
|
|
2896
|
+
} else {
|
|
2897
|
+
rayLife = rayans7
|
|
2898
|
+
}
|
|
2899
|
+
var rayans8 = await _nousersthingsprompt("Would you like rainbow mode to be enabled? Type yes or no.", (rainbowMode||"no"));
|
|
2900
|
+
if (rayans8 == "yes"){rainbowMode = true} else {rainbowMode = false}
|
|
2901
|
+
}
|
|
2902
|
+
},
|
|
2903
|
+
hoverStat: function(pixel){
|
|
2904
|
+
return (pixel.rayElement.toUpperCase() || "unset") + ", " + (pixel.rayStoppedByWalls.toString().toUpperCase() || "unset") + ", " + (pixel.specificRayStart || "unset") + ", " + (pixel.specificRayEnd || "unset") + ", " + (pixel.specificRayAngle || "unset")
|
|
2905
|
+
},
|
|
2906
|
+
tick: function(pixel){
|
|
2907
|
+
if (pixelTicks == pixel.start){
|
|
2908
|
+
pixel.rayElement = rayElement
|
|
2909
|
+
pixel.rayStoppedByWalls = rayStoppedByWalls
|
|
2910
|
+
pixel.specificRayStart = specificRayStart
|
|
2911
|
+
pixel.specificRayEnd = specificRayEnd
|
|
2912
|
+
pixel.specificRayAngle = specificRayAngle
|
|
2913
|
+
pixel.stopAtElement = stopAtElement
|
|
2914
|
+
pixel.life = rayLife
|
|
2915
|
+
pixel.rainbowMode = rainbowMode
|
|
2916
|
+
}
|
|
2917
|
+
if (pixel.rainbowMode){
|
|
2918
|
+
pixel.specificRayAngle ++
|
|
2919
|
+
pixel.rgb = pixel.color.match(/\d+/g);
|
|
2920
|
+
pixel.rgb[0] = parseInt(pixel.rgb[0])
|
|
2921
|
+
pixel.rgb[1] = parseInt(pixel.rgb[1])
|
|
2922
|
+
pixel.rgb[2] = parseInt(pixel.rgb[2])
|
|
2923
|
+
//console.log(pixel.rgb)
|
|
2924
|
+
var hsvResult = RGBtoHSV(pixel.rgb[0], pixel.rgb[1], pixel.rgb[2]);
|
|
2925
|
+
pixel.tHue = hsvResult.h;
|
|
2926
|
+
var rgbResult = HSVtoRGB(pixel.tHue + (1/360), 1, 1);
|
|
2927
|
+
//console.log(rgbResult)
|
|
2928
|
+
const hexR = rgbResult.r.toString(16).padStart(2, '0');
|
|
2929
|
+
const hexG = rgbResult.g.toString(16).padStart(2, '0');
|
|
2930
|
+
const hexB = rgbResult.b.toString(16).padStart(2, '0');
|
|
2931
|
+
const hexCode = `#${hexR}${hexG}${hexB}`;
|
|
2932
|
+
//console.log(hexCode)
|
|
2933
|
+
pixel.color = pixelColorPick(pixel, hexCode)}
|
|
2934
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
2935
|
+
var coord = squareCoords[i];
|
|
2936
|
+
var x = pixel.x+coord[0];
|
|
2937
|
+
var y = pixel.y+coord[1];
|
|
2938
|
+
if (!isEmpty(x,y, true)){
|
|
2939
|
+
if (pixelMap[x][y].charge && (pixelMap[x][y].element == "wire" || pixelMap[x][y].element == "insulated_wire")){
|
|
2940
|
+
if ((Math.abs(coord[0]) + Math.abs(coord[1]) == 2) && pixelMap[x][y].element == "insulated_wire"){return}
|
|
2941
|
+
var dir = [0-squareCoords[i][0], 0-squareCoords[i][1]]
|
|
2942
|
+
let startx, starty, endx, endy, magnitude
|
|
2943
|
+
if (pixel.specificRayAngle == "nah"){
|
|
2944
|
+
startx = pixel.x+(dir[0]*pixel.specificRayStart)
|
|
2945
|
+
starty = pixel.y+(dir[1]*pixel.specificRayStart)
|
|
2946
|
+
magnitude = pixel.specificRayEnd
|
|
2947
|
+
endx = startx+(magnitude*dir[0])
|
|
2948
|
+
endy = starty+(magnitude*dir[1])
|
|
2949
|
+
} else {
|
|
2950
|
+
let angleInRadians = pixel.specificRayAngle * Math.PI / 180;
|
|
2951
|
+
//console.log("Angle in radians is " + angleInRadians)
|
|
2952
|
+
dir = [(Math.cos(angleInRadians)), (Math.sin(angleInRadians))]
|
|
2953
|
+
startx = pixel.x+Math.round((dir[0]*pixel.specificRayStart))
|
|
2954
|
+
starty = pixel.y+Math.round((dir[1]*pixel.specificRayStart))
|
|
2955
|
+
magnitude = pixel.specificRayEnd
|
|
2956
|
+
endx = startx+Math.round((magnitude*dir[0]))
|
|
2957
|
+
endy = starty+Math.round((magnitude*dir[1]))
|
|
2958
|
+
}
|
|
2959
|
+
//console.log("Direction seems to be " + dir)
|
|
2960
|
+
var jcoords = lineCoords(startx, starty, endx, endy, 1)
|
|
2961
|
+
//console.log(startx + " is the starting x, " + starty + " is the starting y, " + endx + " is the ending x, " + endy + " is the ending y. Result is " + jcoords)
|
|
2962
|
+
for (var j = 0; j < jcoords.length; j++) {
|
|
2963
|
+
var lcoord = jcoords[j];
|
|
2964
|
+
var lx = lcoord[0];
|
|
2965
|
+
var ly = lcoord[1];
|
|
2966
|
+
// console.log(lcoord)
|
|
2967
|
+
if (isEmpty(lx,ly)){
|
|
2968
|
+
createPixel(pixel.rayElement, lx, ly)
|
|
2969
|
+
pixelMap[lx][ly].temp = pixel.temp
|
|
2970
|
+
if (pixel.rayElement == "ray"){
|
|
2971
|
+
pixelMap[lx][ly].rColor = pixel.color
|
|
2972
|
+
pixelMap[lx][ly].color = pixel.color
|
|
2973
|
+
pixelMap[lx][ly].life = pixel.life
|
|
2974
|
+
pixelMap[lx][ly].maxLife = pixel.life
|
|
2975
|
+
}
|
|
2976
|
+
} else if (!isEmpty(lx, ly, true)){
|
|
2977
|
+
if ((pixelMap[lx][ly].element != pixel.rayElement && pixel.rayStoppedByWalls) || pixelMap[lx][ly].element == pixel.stopAtElement){
|
|
2978
|
+
break;
|
|
2979
|
+
} else if (pixelMap[lx][ly].element == "ray" && pixel.rayElement == "ray"){
|
|
2980
|
+
pixelMap[lx][ly].rColor = pixel.color
|
|
2981
|
+
pixelMap[lx][ly].life = pixel.life
|
|
2982
|
+
pixelMap[lx][ly].maxLife = pixel.life
|
|
2983
|
+
pixelMap[lx][ly].color = pixel.color
|
|
2984
|
+
}
|
|
2985
|
+
}
|
|
2986
|
+
}
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
}
|
|
2990
|
+
},
|
|
2991
|
+
insulate: true,
|
|
2992
|
+
}
|
|
2993
|
+
elements.run_some_code = {
|
|
2994
|
+
color: "#68b2cf",
|
|
2995
|
+
category: "tools",
|
|
2996
|
+
canPlace: false,
|
|
2997
|
+
tool: function(){},
|
|
2998
|
+
onSelect: async function(){
|
|
2999
|
+
let code = await _nousersthingsprompt("Enter code to run")
|
|
3000
|
+
if (code){
|
|
3001
|
+
eval(code)
|
|
3002
|
+
}
|
|
3003
|
+
}
|
|
3004
|
+
}
|
|
3005
|
+
elements.insulated_wire = {
|
|
3006
|
+
color: "#5e2d2c",
|
|
3007
|
+
category: "machines",
|
|
3008
|
+
conduct: 1,
|
|
3009
|
+
tick: function(pixel){
|
|
3010
|
+
{
|
|
3011
|
+
if (pixel.charge) {
|
|
3012
|
+
// Check each adjacent pixel, if that pixel's charge is false, set it to the same charge
|
|
3013
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
3014
|
+
var x = pixel.x+adjacentCoords[i][0];
|
|
3015
|
+
var y = pixel.y+adjacentCoords[i][1];
|
|
3016
|
+
if (!isEmpty(x,y,true)) {
|
|
3017
|
+
var newPixel = pixelMap[x][y];
|
|
3018
|
+
var con = newPixel.element;
|
|
3019
|
+
if (con == "insulated_wire" || con == "wire_bridge") {
|
|
3020
|
+
if (1 == 1) { // If random number is less than conductivity
|
|
3021
|
+
if (!newPixel.charge && !newPixel.chargeCD) {
|
|
3022
|
+
newPixel.charge = 1;
|
|
3023
|
+
}
|
|
3024
|
+
}
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
pixel.charge -= 0.25;
|
|
3029
|
+
if (pixel.charge <= 0) {
|
|
3030
|
+
delete pixel.charge;
|
|
3031
|
+
// pixel.chargeCD = 4;
|
|
3032
|
+
pixel.chargeCD = Math.round(4 + (4*(1-elements[pixel.element].conduct))) || 4;
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
3035
|
+
// Lower charge cooldown
|
|
3036
|
+
else if (pixel.chargeCD) {
|
|
3037
|
+
pixel.chargeCD -= 1;
|
|
3038
|
+
if (pixel.chargeCD <= 0) {
|
|
3039
|
+
delete pixel.chargeCD;
|
|
3040
|
+
if (elements[pixel.element].colorOn) {
|
|
3041
|
+
pixel.color = pixelColorPick(pixel);
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
3046
|
+
doHeat(pixel)
|
|
3047
|
+
}
|
|
3048
|
+
}
|
|
3049
|
+
elements.wire_bridge = {
|
|
3050
|
+
color: "#461716",
|
|
3051
|
+
category: "machines",
|
|
3052
|
+
conduct: 1,
|
|
3053
|
+
tick: function(pixel){
|
|
3054
|
+
{
|
|
3055
|
+
if (pixel.charge) {
|
|
3056
|
+
// Check each adjacent pixel, if that pixel's charge is false, set it to the same charge
|
|
3057
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
3058
|
+
var x = pixel.x+adjacentCoords[i][0];
|
|
3059
|
+
var y = pixel.y+adjacentCoords[i][1];
|
|
3060
|
+
if (!isEmpty(x,y,true)) {
|
|
3061
|
+
var newPixel = pixelMap[x][y];
|
|
3062
|
+
var con = newPixel.element;
|
|
3063
|
+
if (con == "insulated_wire" || con == "wire" || con == "wire_bridge") {
|
|
3064
|
+
if (1 == 1) { // If random number is less than conductivity
|
|
3065
|
+
if (!newPixel.charge && !newPixel.chargeCD) {
|
|
3066
|
+
newPixel.charge = 1;
|
|
3067
|
+
}
|
|
3068
|
+
}
|
|
3069
|
+
}
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
pixel.charge -= 0.25;
|
|
3073
|
+
if (pixel.charge <= 0) {
|
|
3074
|
+
delete pixel.charge;
|
|
3075
|
+
// pixel.chargeCD = 4;
|
|
3076
|
+
pixel.chargeCD = Math.round(4 + (4*(1-elements[pixel.element].conduct))) || 4;
|
|
3077
|
+
}
|
|
3078
|
+
}
|
|
3079
|
+
// Lower charge cooldown
|
|
3080
|
+
else if (pixel.chargeCD) {
|
|
3081
|
+
pixel.chargeCD -= 1;
|
|
3082
|
+
if (pixel.chargeCD <= 0) {
|
|
3083
|
+
delete pixel.chargeCD;
|
|
3084
|
+
if (elements[pixel.element].colorOn) {
|
|
3085
|
+
pixel.color = pixelColorPick(pixel);
|
|
3086
|
+
}
|
|
3087
|
+
}
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
doHeat(pixel)
|
|
3091
|
+
}
|
|
3092
|
+
}
|
|
3093
|
+
elements.insulated_wire.desc = "Insulated wire. Only conducts to other insulated wires. Pairs with ray emitters to not make diagonal rays."
|
|
3094
|
+
elements.e_pipe.desc = "Electric pipe. Only passes elements while charged."
|
|
3095
|
+
elements.destroyable_e_pipe.desc = elements.e_pipe.desc
|
|
3096
|
+
elements.channel_pipe.desc = "Channel pipe. Only passes elements to pipes of the same channel."
|
|
3097
|
+
elements.bridge_pipe.desc = "Bridge pipe. Can pass and receive from any other type of pipe."
|
|
3098
|
+
elements.ray_emitter.desc = "Emits a ray of the specified element in the opposite direction it was shocked from."
|
|
3099
|
+
elements.specific_ray_emitter.desc = "Emits a ray of the specified element in a specific direction and a specific length."
|
|
3100
|
+
elements.blackhole_storage.desc = "Stores elements inside of itself. Can be released by shocking it."
|
|
3101
|
+
let pullOrPush = 1
|
|
3102
|
+
elements.anchor = {
|
|
3103
|
+
color: "#020c20",
|
|
3104
|
+
category: "machines",
|
|
3105
|
+
behavior: behaviors.WALL,
|
|
3106
|
+
desc: "Anchor; unpushable and unpullable by pistons.",
|
|
3107
|
+
onSelect: function(){
|
|
3108
|
+
logMessage("Unpushable and unpullable by pistons.")
|
|
3109
|
+
}
|
|
3110
|
+
}
|
|
3111
|
+
elements.piston_ray_emitter = {
|
|
3112
|
+
color: "#143b5f",
|
|
3113
|
+
behavior: behaviors.WALL,
|
|
3114
|
+
category: "machines",
|
|
3115
|
+
movable: false,
|
|
3116
|
+
onSelect: async function(){
|
|
3117
|
+
var ans1 = await _nousersthingsprompt("Would you like this piston to pull or push?", "pull")
|
|
3118
|
+
ans1 = ans1.toLowerCase()
|
|
3119
|
+
if (ans1 == "pull"){pullOrPush = 1}
|
|
3120
|
+
else if (ans1 == "push"){pullOrPush = 2}
|
|
3121
|
+
},
|
|
3122
|
+
tick: function(pixel){
|
|
3123
|
+
if (pixelTicks == pixel.start){
|
|
3124
|
+
pixel.pullOrPush = pullOrPush
|
|
3125
|
+
}
|
|
3126
|
+
if (!pixel.cooldown){pixel.cooldown = 0}
|
|
3127
|
+
if (pixel.cooldown < 1){
|
|
3128
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
3129
|
+
var coord = squareCoords[i];
|
|
3130
|
+
var x = pixel.x+coord[0];
|
|
3131
|
+
var y = pixel.y+coord[1];
|
|
3132
|
+
if (!isEmpty(x,y, true)){
|
|
3133
|
+
if (pixelMap[x][y].charge && (pixelMap[x][y].element == "wire" || pixelMap[x][y].element == "insulated_wire")){
|
|
3134
|
+
pixel.cooldown = 6
|
|
3135
|
+
var dir = [0-squareCoords[i][0], 0-squareCoords[i][1]]
|
|
3136
|
+
var startx = pixel.x+dir[0]
|
|
3137
|
+
var starty = pixel.y+dir[1]
|
|
3138
|
+
var magnitude = 0
|
|
3139
|
+
if (width > height){magnitude = width} else {magnitude = height}
|
|
3140
|
+
var endx = startx+(magnitude*dir[0])
|
|
3141
|
+
var endy = starty+(magnitude*dir[1])
|
|
3142
|
+
// console.log("Direction seems to be " + dir)
|
|
3143
|
+
var jcoords
|
|
3144
|
+
if (pixel.pullOrPush == 1){jcoords = lineCoords(startx, starty, endx, endy, 1)}
|
|
3145
|
+
else {jcoords = lineCoords(endx, endy, startx, starty, 1)}
|
|
3146
|
+
|
|
3147
|
+
// console.log(startx + " is the starting x, " + starty + " is the starting y, " + endx + " is the ending x, " + endy + " is the ending y. Result is " + jcoords)
|
|
3148
|
+
let pCoord = jcoords[0]
|
|
3149
|
+
for (var j = 0; j < jcoords.length; j++) {
|
|
3150
|
+
var lcoord = jcoords[j];
|
|
3151
|
+
var lx = lcoord[0];
|
|
3152
|
+
var ly = lcoord[1];
|
|
3153
|
+
if (!isEmpty(lx, ly, true)){
|
|
3154
|
+
if (!(pixelMap[lx][ly].element == "anchor")){
|
|
3155
|
+
tryMove(pixelMap[lx][ly], pCoord[0], pCoord[1], null, true)
|
|
3156
|
+
}
|
|
3157
|
+
}
|
|
3158
|
+
pCoord[0] = lx;
|
|
3159
|
+
pCoord[1] = ly;
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3162
|
+
}
|
|
3163
|
+
}} else {pixel.cooldown -= 1}
|
|
3164
|
+
},
|
|
3165
|
+
insulate: true,
|
|
3166
|
+
}
|
|
3167
|
+
let pistonStart = 0
|
|
3168
|
+
let pistonEnd = 0
|
|
3169
|
+
let pistonDistance = 1
|
|
3170
|
+
let pistonCooldown = 10
|
|
3171
|
+
let pistonRepeat = 1
|
|
3172
|
+
let pistonRepeatCooldown = 1
|
|
3173
|
+
function pistonEmit(pixel, i){
|
|
3174
|
+
pixel.cooldown = pixel.pistonCooldown
|
|
3175
|
+
pixel.rcooldown = pixel.pistonRepeatCooldown
|
|
3176
|
+
var dir = [0-squareCoords[i][0], 0-squareCoords[i][1]]
|
|
3177
|
+
var startx = pixel.x+(dir[0]*(pixel.pistonStart+1))
|
|
3178
|
+
var starty = pixel.y+(dir[1]*(pixel.pistonStart+1))
|
|
3179
|
+
var magnitude = pixel.pistonEnd
|
|
3180
|
+
var endx = startx+(magnitude*dir[0])
|
|
3181
|
+
var endy = starty+(magnitude*dir[1])
|
|
3182
|
+
// console.log("Direction seems to be " + dir)
|
|
3183
|
+
var jcoords
|
|
3184
|
+
if (pixel.pullOrPush == 1){jcoords = lineCoords(startx, starty, endx, endy, 1)}
|
|
3185
|
+
else {jcoords = lineCoords(endx, endy, startx, starty, 1)}
|
|
3186
|
+
|
|
3187
|
+
|
|
3188
|
+
// console.log(startx + " is the starting x, " + starty + " is the starting y, " + endx + " is the ending x, " + endy + " is the ending y. Result is " + jcoords)
|
|
3189
|
+
let pCoord = jcoords[0]
|
|
3190
|
+
for (var j = 0; j < jcoords.length; j++) {
|
|
3191
|
+
var lcoord = jcoords[j];
|
|
3192
|
+
var lx = lcoord[0];
|
|
3193
|
+
var ly = lcoord[1];
|
|
3194
|
+
if (!isEmpty(lx, ly, true)){
|
|
3195
|
+
if (!(pixelMap[lx][ly].element == "anchor")){
|
|
3196
|
+
tryMove(pixelMap[lx][ly], pCoord[0], pCoord[1], null, true)
|
|
3197
|
+
}
|
|
3198
|
+
}
|
|
3199
|
+
pCoord[0] = lx;
|
|
3200
|
+
pCoord[1] = ly;
|
|
3201
|
+
}
|
|
3202
|
+
}
|
|
3203
|
+
elements.specific_piston_ray_emitter = {
|
|
3204
|
+
color: "#517597",
|
|
3205
|
+
behavior: behaviors.WALL,
|
|
3206
|
+
category: "machines",
|
|
3207
|
+
movable: false,
|
|
3208
|
+
onSelect: async function(){
|
|
3209
|
+
var ans1 = await _nousersthingsprompt("Would you like this piston to pull or push?", "pull")
|
|
3210
|
+
ans1 = ans1.toLowerCase();
|
|
3211
|
+
if (ans1 == "pull"){pullOrPush = 1}
|
|
3212
|
+
else if (ans1 == "push"){pullOrPush = 2}
|
|
3213
|
+
var ans2 = parseInt(await _nousersthingsprompt("How offset should the start of the push/pulling be?", "0"))
|
|
3214
|
+
pistonStart = ans2
|
|
3215
|
+
var ans3 = parseInt(await _nousersthingsprompt("How offset should the end of the push/pulling be?", "20"))
|
|
3216
|
+
pistonEnd = ans3
|
|
3217
|
+
var ans4 = parseInt(await _nousersthingsprompt("How far should it push the pixels each charge?", "1"))
|
|
3218
|
+
pistonDistance = ans4
|
|
3219
|
+
var ans5 = parseInt(await _nousersthingsprompt("How many ticks should it wait to be charged again?", "6"))
|
|
3220
|
+
pistonCooldown = ans5
|
|
3221
|
+
var ans6 = parseInt(await _nousersthingsprompt("How many times should it repeat the push/pulling?", "1"))
|
|
3222
|
+
pistonRepeat = ans6
|
|
3223
|
+
if (pistonRepeat != 1){
|
|
3224
|
+
var ans7 = parseInt(await _nousersthingsprompt("How many ticks should it wait between repeats?", "1"))
|
|
3225
|
+
pistonRepeatCooldown = ans7
|
|
3226
|
+
}
|
|
3227
|
+
},
|
|
3228
|
+
tick: function(pixel){
|
|
3229
|
+
if (pixelTicks == pixel.start){
|
|
3230
|
+
pixel.pullOrPush = pullOrPush
|
|
3231
|
+
pixel.pistonStart = pistonStart
|
|
3232
|
+
pixel.pistonEnd = pistonEnd
|
|
3233
|
+
pixel.pistonDistance = pistonDistance
|
|
3234
|
+
pixel.pistonCooldown = pistonCooldown
|
|
3235
|
+
pixel.pistonRepeat = pistonRepeat
|
|
3236
|
+
pixel.pistonRepeatCooldown = pistonRepeatCooldown
|
|
3237
|
+
}
|
|
3238
|
+
if (!pixel.pistonRepeat){
|
|
3239
|
+
pixel.pistonRepeat = pistonRepeat
|
|
3240
|
+
pixel.pistonRepeatCooldown = pistonRepeatCooldown
|
|
3241
|
+
}
|
|
3242
|
+
if (!pixel.cooldown){pixel.cooldown = 0}
|
|
3243
|
+
if (!pixel.rcooldown){pixel.rcooldown = 0}
|
|
3244
|
+
if (!pixel.repeatAmounts){pixel.repeatAmounts = 0}
|
|
3245
|
+
if (!pixel.fakei){pixel.fakei = 0}
|
|
3246
|
+
if (pixel.cooldown < 1){
|
|
3247
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
3248
|
+
var coord = squareCoords[i];
|
|
3249
|
+
var x = pixel.x+coord[0];
|
|
3250
|
+
var y = pixel.y+coord[1];
|
|
3251
|
+
if (!isEmpty(x,y, true)){
|
|
3252
|
+
if (pixelMap[x][y].charge && (pixelMap[x][y].element == "wire" || pixelMap[x][y].element == "insulated_wire")){
|
|
3253
|
+
pixel.repeatAmounts = pixel.pistonRepeat
|
|
3254
|
+
pixel.fakei = i
|
|
3255
|
+
for (let r = 0; r < pixel.pistonDistance; r++){
|
|
3256
|
+
pistonEmit(pixel, i);
|
|
3257
|
+
}
|
|
3258
|
+
pixel.repeatAmounts--
|
|
3259
|
+
}
|
|
3260
|
+
}
|
|
3261
|
+
}} else {pixel.cooldown --}
|
|
3262
|
+
if (pixel.rcooldown < 1 && pixel.repeatAmounts > 0){
|
|
3263
|
+
for (let r = 0; r < pixel.pistonDistance; r++){
|
|
3264
|
+
pistonEmit(pixel, pixel.fakei);
|
|
3265
|
+
}
|
|
3266
|
+
pixel.repeatAmounts--
|
|
3267
|
+
} else {pixel.rcooldown --}
|
|
3268
|
+
},
|
|
3269
|
+
insulate: true,
|
|
3270
|
+
}
|
|
3271
|
+
if (!elements.molten_gallium.reactions){elements.gallium.reactions = {}}
|
|
3272
|
+
elements.molten_gallium.reactions.nitrogen = {elem1: "gallium_nitride", elem2: null, chance: 0.02, tempMin: 1200}
|
|
3273
|
+
elements.gallium_nitride = {
|
|
3274
|
+
color: "#dedf9d",
|
|
3275
|
+
behavior: behaviors.WALL,
|
|
3276
|
+
colorOn: "#493ee9",
|
|
3277
|
+
category: "solids",
|
|
3278
|
+
tempHigh: 1650,
|
|
3279
|
+
density: 6100,
|
|
3280
|
+
stateHigh: "molten_gallium_nitride",
|
|
3281
|
+
state: "solid",
|
|
3282
|
+
conduct: 0.84,
|
|
3283
|
+
tick: function(pixel){
|
|
3284
|
+
if (pixel.charge){
|
|
3285
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
3286
|
+
var coord = squareCoords[i];
|
|
3287
|
+
var x = pixel.x+coord[0];
|
|
3288
|
+
var y = pixel.y+coord[1];
|
|
3289
|
+
if (isEmpty(x,y, true)){
|
|
3290
|
+
if (Math.random() < 0.3){
|
|
3291
|
+
createPixel("light", x, y)
|
|
3292
|
+
pixelMap[x][y].color = pixelColorPick(pixelMap[x][y], "#493ee9")
|
|
3293
|
+
}
|
|
3294
|
+
}
|
|
3295
|
+
}
|
|
3296
|
+
}
|
|
3297
|
+
},
|
|
3298
|
+
movable: false,
|
|
3299
|
+
}
|
|
3300
|
+
elements.molten_gallium_nitride = {
|
|
3301
|
+
color: ["#d29d70", "#cf8e5e", "#cd7e4e", "#ca6d40", "#c75b33"],
|
|
3302
|
+
behavior: behaviors.MOLTEN,
|
|
3303
|
+
category: "states",
|
|
3304
|
+
hidden: true,
|
|
3305
|
+
state: "liquid",
|
|
3306
|
+
tempLow: 1640,
|
|
3307
|
+
stateLow: "gallium_nitride",
|
|
3308
|
+
density: 6050,
|
|
3309
|
+
}
|
|
3310
|
+
elements.gallium_phosphide = {
|
|
3311
|
+
color: "#be6008",
|
|
3312
|
+
behavior: behaviors.WALL,
|
|
3313
|
+
colorOn: "#00ff15",
|
|
3314
|
+
category: "solids",
|
|
3315
|
+
tempHigh: 1457,
|
|
3316
|
+
density: 4138,
|
|
3317
|
+
stateHigh: "molten_gallium_phosphide",
|
|
3318
|
+
state: "solid",
|
|
3319
|
+
conduct: 0.84,
|
|
3320
|
+
tick: function(pixel){
|
|
3321
|
+
if (pixel.charge){
|
|
3322
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
3323
|
+
var coord = squareCoords[i];
|
|
3324
|
+
var x = pixel.x+coord[0];
|
|
3325
|
+
var y = pixel.y+coord[1];
|
|
3326
|
+
if (isEmpty(x,y, true)){
|
|
3327
|
+
if (Math.random() < 0.3){
|
|
3328
|
+
createPixel("light", x, y)
|
|
3329
|
+
pixelMap[x][y].color = pixelColorPick(pixelMap[x][y], "#00ff15")
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
}
|
|
3333
|
+
}
|
|
3334
|
+
},
|
|
3335
|
+
movable: false,
|
|
3336
|
+
}
|
|
3337
|
+
elements.molten_gallium_phosphide = {
|
|
3338
|
+
color: ["#a36936", "#cf8e5e", "#9b4c1c", "#ca6d40", "#a13d19"],
|
|
3339
|
+
behavior: behaviors.MOLTEN,
|
|
3340
|
+
category: "states",
|
|
3341
|
+
hidden: true,
|
|
3342
|
+
state: "liquid",
|
|
3343
|
+
tempLow: 1447,
|
|
3344
|
+
stateLow: "gallium_phosphide",
|
|
3345
|
+
density: 4100,
|
|
3346
|
+
}
|
|
3347
|
+
/*
|
|
3348
|
+
let funcRadius = 10
|
|
3349
|
+
let functionScope = "pixel"
|
|
3350
|
+
let funcFunction = "function(){console.log('Hello World')}"
|
|
3351
|
+
let functionStorage = function(){}
|
|
3352
|
+
elements.function_machine = {
|
|
3353
|
+
color: "#56999e",
|
|
3354
|
+
behavior: behaviors.WALL,
|
|
3355
|
+
category: "machines",
|
|
3356
|
+
state: "solid",
|
|
3357
|
+
onSelect: function(){
|
|
3358
|
+
let ans1 = prompt("What radius should the function be executed at? (Ignore if you plan on making it a global one.", funcRadius||10)
|
|
3359
|
+
funcRadius = parseInt(ans1)
|
|
3360
|
+
let ans2 = prompt("What scope should the function be executed in? Type \"global\" or \"pixel\" (without the quotes of course.)", functionScope||"pixel")
|
|
3361
|
+
if (ans2 == "global"){functionScope = "global"} else {functionScope = "pixel"}
|
|
3362
|
+
let ans3 = prompt("Type the entire function. Example: function(pixel){pixel.temp = 1000}}", funcFunction||"function(){console.log('Hello World')}")
|
|
3363
|
+
funcFunction = ans3
|
|
3364
|
+
},
|
|
3365
|
+
tick: function(pixel){
|
|
3366
|
+
if (pixelTicks == pixel.start){
|
|
3367
|
+
pixel.radius = funcRadius
|
|
3368
|
+
pixel.scope = functionScope
|
|
3369
|
+
pixel.function = funcFunction
|
|
3370
|
+
}
|
|
3371
|
+
if (pixel.scope == "global"){
|
|
3372
|
+
eval("functionStorage = "+pixel.function)
|
|
3373
|
+
functionStorage()
|
|
3374
|
+
} else {
|
|
3375
|
+
var circlec = circleCoords(pixel.x, pixel.y, pixel.radius)
|
|
3376
|
+
for (var i = 0; i < circlec.length; i++){
|
|
3377
|
+
var coord = circlec[i]
|
|
3378
|
+
var x = coord.x
|
|
3379
|
+
var y = coord.y
|
|
3380
|
+
if (!isEmpty(x,y,true)){
|
|
3381
|
+
eval("functionStorage = "+pixel.function)
|
|
3382
|
+
functionStorage(pixelMap[x][y])
|
|
3383
|
+
}
|
|
3384
|
+
}
|
|
3385
|
+
}
|
|
3386
|
+
},
|
|
3387
|
+
excludeRandom: true,
|
|
3388
|
+
}
|
|
3389
|
+
*/
|
|
3390
|
+
/*
|
|
3391
|
+
elements.galvanized_steel = {
|
|
3392
|
+
color: "#4c585f",
|
|
3393
|
+
behavior: behaviors.WALL,
|
|
3394
|
+
tempHigh: 1455.5,
|
|
3395
|
+
category: "solids",
|
|
3396
|
+
density: 7850,
|
|
3397
|
+
conduct: 0.42,
|
|
3398
|
+
hardness: 0.8,
|
|
3399
|
+
tick: function(pixel){
|
|
3400
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
3401
|
+
var coord = squareCoords[i];
|
|
3402
|
+
var x = pixel.x+coord[0];
|
|
3403
|
+
var y = pixel.y+coord[1];
|
|
3404
|
+
if (!isEmpty(x,y, true)){
|
|
3405
|
+
let otherPixel = pixelMap[x][y]
|
|
3406
|
+
if (otherPixel.element == "molten_zinc"){
|
|
3407
|
+
if (Math.random() < 0.005){
|
|
3408
|
+
deletePixel(x, y)
|
|
3409
|
+
if (!pixel.absorbedZinc){pixel.absorbedZinc = 0}
|
|
3410
|
+
pixel.absorbedZinc ++
|
|
3411
|
+
}
|
|
3412
|
+
} else if (otherPixel.element == "steel"){
|
|
3413
|
+
if (pixel.absorbedZinc && Math.random() < 0.02){
|
|
3414
|
+
changePixel(otherPixel, "galvanized_steel")
|
|
3415
|
+
pixel.absorbedZinc --
|
|
3416
|
+
}
|
|
3417
|
+
}
|
|
3418
|
+
else if (otherPixel.element == "galvanized_steel"){
|
|
3419
|
+
if (!otherPixel.absorbedZinc){otherPixel.absorbedZinc = 0}
|
|
3420
|
+
if (pixel.absorbedZinc > otherPixel.absorbedZinc && Math.random() < 0.1){
|
|
3421
|
+
otherPixel.absorbedZinc ++
|
|
3422
|
+
pixel.absorbedZinc --
|
|
3423
|
+
}
|
|
3424
|
+
}
|
|
3425
|
+
}
|
|
3426
|
+
}
|
|
3427
|
+
},
|
|
3428
|
+
movable: false
|
|
3429
|
+
}
|
|
3430
|
+
if (!eLists.metals) { eLists.metals = [] }
|
|
3431
|
+
eLists.metals = eLists.metals.concat(["galvanized_steel"])
|
|
3432
|
+
if (!elements.steel.reactions){elements.steel.reactions = {}}
|
|
3433
|
+
elements.steel.reactions.molten_zinc = {elem1: "galvanized_steel", chance: 0.035}
|
|
3434
|
+
if (!elements.molten_zinc.reactions){elements.zinc.reactions = {}}
|
|
3435
|
+
elements.molten_zinc.reactions.steel = {elem1: "null", chance: 0.2}
|
|
3436
|
+
*/
|
|
3437
|
+
elements.super_heat_conductor = {
|
|
3438
|
+
color: "#b66b61",
|
|
3439
|
+
behavior: behaviors.WALL,
|
|
3440
|
+
category: "solids",
|
|
3441
|
+
density: 10000,
|
|
3442
|
+
tick: function(pixel){
|
|
3443
|
+
for (let j = 0; j <= 10; j++){
|
|
3444
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
3445
|
+
var x = pixel.x+adjacentCoords[i][0];
|
|
3446
|
+
var y = pixel.y+adjacentCoords[i][1];
|
|
3447
|
+
if (!isEmpty(x,y,true)) {
|
|
3448
|
+
var newPixel = pixelMap[x][y];
|
|
3449
|
+
// Skip if both temperatures are the same
|
|
3450
|
+
if (pixel.temp == newPixel.temp || elements[newPixel.element].insulate == true) {
|
|
3451
|
+
continue;
|
|
3452
|
+
}
|
|
3453
|
+
// Set both pixel temperatures to their average
|
|
3454
|
+
var avg = (pixel.temp + newPixel.temp)/2;
|
|
3455
|
+
pixel.temp = avg;
|
|
3456
|
+
newPixel.temp = avg;
|
|
3457
|
+
pixelTempCheck(pixel);
|
|
3458
|
+
pixelTempCheck(newPixel);
|
|
3459
|
+
}
|
|
3460
|
+
}
|
|
3461
|
+
}
|
|
3462
|
+
}
|
|
3463
|
+
}
|
|
3464
|
+
runEveryTick(function() {
|
|
3465
|
+
// run any code after pixels are simulated per tick
|
|
3466
|
+
var heatpixels = currentPixels.filter(function(pixelToCheck) {
|
|
3467
|
+
if (pixelToCheck.element == "global_heat_conductor"){
|
|
3468
|
+
return true;
|
|
3469
|
+
}
|
|
3470
|
+
})
|
|
3471
|
+
for (var i = 0; i < heatpixels.length; i++) {
|
|
3472
|
+
var newPixel = heatpixels[i];
|
|
3473
|
+
var randomPixel = heatpixels[Math.floor(Math.random()*heatpixels.length)];
|
|
3474
|
+
var avg = (randomPixel.temp + newPixel.temp)/2;
|
|
3475
|
+
randomPixel.temp = avg;
|
|
3476
|
+
newPixel.temp = avg;
|
|
3477
|
+
}
|
|
3478
|
+
})
|
|
3479
|
+
elements.global_heat_conductor = {
|
|
3480
|
+
color: "#55251e",
|
|
3481
|
+
behavior: behaviors.WALL,
|
|
3482
|
+
category: "solids",
|
|
3483
|
+
density: 10000,
|
|
3484
|
+
}
|
|
3485
|
+
let latticeElem = "wood"
|
|
3486
|
+
elements.lattice_brush = {
|
|
3487
|
+
color: elements.grid_brush.color,
|
|
3488
|
+
behavior: behaviors.WALL,
|
|
3489
|
+
category: "special",
|
|
3490
|
+
onSelect: async function(){
|
|
3491
|
+
let ans1 = await _nousersthingsprompt("Enter the element you want to use for the lattice", latticeElem||"wood")
|
|
3492
|
+
latticeElem = mostSimilarElement(ans1)
|
|
3493
|
+
},
|
|
3494
|
+
tick: function(pixel){
|
|
3495
|
+
let modx = pixel.x%2
|
|
3496
|
+
let mody = pixel.y%2
|
|
3497
|
+
let valid = {
|
|
3498
|
+
1: 0,
|
|
3499
|
+
0: 1
|
|
3500
|
+
}
|
|
3501
|
+
if (valid[modx] == mody){
|
|
3502
|
+
changePixel(pixel, latticeElem)
|
|
3503
|
+
}else {
|
|
3504
|
+
deletePixel(pixel.x, pixel.y)
|
|
3505
|
+
}
|
|
3506
|
+
}
|
|
3507
|
+
}
|
|
3508
|
+
elements.spaced_lattice_brush = {
|
|
3509
|
+
color: elements.grid_brush.color,
|
|
3510
|
+
behavior: behaviors.WALL,
|
|
3511
|
+
category: "special",
|
|
3512
|
+
onSelect: async function(){
|
|
3513
|
+
let ans1 = await _nousersthingsprompt("Enter the element you want to use for the lattice", latticeElem||"wood")
|
|
3514
|
+
latticeElem = mostSimilarElement(ans1)
|
|
3515
|
+
},
|
|
3516
|
+
tick: function(pixel){
|
|
3517
|
+
let modx = pixel.x%5
|
|
3518
|
+
let mody = pixel.y%5
|
|
3519
|
+
let valid = {
|
|
3520
|
+
1: 3,
|
|
3521
|
+
2: 0,
|
|
3522
|
+
3: 2,
|
|
3523
|
+
4: 4,
|
|
3524
|
+
0: 1
|
|
3525
|
+
}
|
|
3526
|
+
if (valid[modx] == mody){
|
|
3527
|
+
changePixel(pixel, latticeElem)
|
|
3528
|
+
}else {
|
|
3529
|
+
deletePixel(pixel.x, pixel.y)
|
|
3530
|
+
}
|
|
3531
|
+
}
|
|
3532
|
+
}
|
|
3533
|
+
let outlinerElem = "wood"
|
|
3534
|
+
elements.outer_outliner = {
|
|
3535
|
+
color: elements.inner_outliner.color,
|
|
3536
|
+
behavior: behaviors.WALL,
|
|
3537
|
+
category: "special",
|
|
3538
|
+
onSelect: async function(){
|
|
3539
|
+
let ans1 = await _nousersthingsprompt("Enter the element you want to use for the outliner. The outliner will ignore pixels of this type.", outlinerElem||"wood")
|
|
3540
|
+
outlinerElem = mostSimilarElement(ans1)
|
|
3541
|
+
},
|
|
3542
|
+
tick: function(pixel){
|
|
3543
|
+
// this just checks if theres any neighboring coord non-outliner elem pixels. yuh that simple
|
|
3544
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
3545
|
+
var x = pixel.x+squareCoords[i][0];
|
|
3546
|
+
var y = pixel.y+squareCoords[i][1];
|
|
3547
|
+
if (!isEmpty(x,y,true)) {
|
|
3548
|
+
var newPixel = pixelMap[x][y];
|
|
3549
|
+
if (newPixel.element != outlinerElem && newPixel.element!= "outer_outliner") {
|
|
3550
|
+
deletePixel(pixel.x, pixel.y)
|
|
3551
|
+
createPixel(outlinerElem, pixel.x, pixel.y)
|
|
3552
|
+
return;
|
|
3553
|
+
}
|
|
3554
|
+
}
|
|
3555
|
+
}
|
|
3556
|
+
deletePixel(pixel.x, pixel.y)
|
|
3557
|
+
}
|
|
3558
|
+
}
|
|
3559
|
+
function highestValueObjectKey(object){
|
|
3560
|
+
let max = -Infinity
|
|
3561
|
+
for (var key in object){
|
|
3562
|
+
if (object[key] > (object[max]||-Infinity)){
|
|
3563
|
+
max = key
|
|
3564
|
+
}
|
|
3565
|
+
}
|
|
3566
|
+
return max
|
|
3567
|
+
}
|
|
3568
|
+
function sumOfObjectValues(object){
|
|
3569
|
+
let sum = 0
|
|
3570
|
+
for (var key in object){
|
|
3571
|
+
sum += object[key]
|
|
3572
|
+
}
|
|
3573
|
+
return sum
|
|
3574
|
+
}
|
|
3575
|
+
neighborRandomChance = {
|
|
3576
|
+
1: 0.015,
|
|
3577
|
+
2: 0.03,
|
|
3578
|
+
3: 0.06,
|
|
3579
|
+
4: 0.12,
|
|
3580
|
+
5: 0.2,
|
|
3581
|
+
6: 0.5,
|
|
3582
|
+
7: 0.8,
|
|
3583
|
+
8: 1
|
|
3584
|
+
}
|
|
3585
|
+
elements.colored_filler = {
|
|
3586
|
+
color: elements.rainbow.color,
|
|
3587
|
+
behavior: behaviors.WALL,
|
|
3588
|
+
category: "special",
|
|
3589
|
+
customColor: true,
|
|
3590
|
+
properties: {
|
|
3591
|
+
"initalized": false,
|
|
3592
|
+
},
|
|
3593
|
+
tick: function(pixel){
|
|
3594
|
+
let fillerNeighbors = {}
|
|
3595
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
3596
|
+
var x = pixel.x+adjacentCoords[i][0];
|
|
3597
|
+
var y = pixel.y+adjacentCoords[i][1];
|
|
3598
|
+
if (isEmpty(x,y) && pixel.initalized) {
|
|
3599
|
+
createPixel("colored_filler", x, y)
|
|
3600
|
+
pixelMap[x][y].color = pixel.color;
|
|
3601
|
+
pixelMap[x][y].initalized = true
|
|
3602
|
+
}
|
|
3603
|
+
}
|
|
3604
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
3605
|
+
var x = pixel.x+squareCoords[i][0];
|
|
3606
|
+
var y = pixel.y+squareCoords[i][1];
|
|
3607
|
+
if (!isEmpty(x, y, true)){
|
|
3608
|
+
var otherPixel = pixelMap[x][y];
|
|
3609
|
+
if (otherPixel.element == "colored_filler" && otherPixel.color != pixel.color){
|
|
3610
|
+
fillerNeighbors[otherPixel.color] = (fillerNeighbors[otherPixel.color]||0)+1;
|
|
3611
|
+
}
|
|
3612
|
+
}
|
|
3613
|
+
}
|
|
3614
|
+
if(Object.keys(fillerNeighbors).length > 0){
|
|
3615
|
+
let mostSeenColor = highestValueObjectKey(fillerNeighbors)
|
|
3616
|
+
let opposingCount = sumOfObjectValues(fillerNeighbors)
|
|
3617
|
+
if (Math.random() < neighborRandomChance[opposingCount]){
|
|
3618
|
+
pixel.color = mostSeenColor;
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
},
|
|
3622
|
+
renderer: function(pixel, ctx){
|
|
3623
|
+
if (!pixel.initalized){
|
|
3624
|
+
var rgb = hexToRGB(currentColor);
|
|
3625
|
+
pixel.color = "rgb("+rgb.r+","+rgb.g+","+rgb.b+")";
|
|
3626
|
+
pixel.initalized = true;
|
|
3627
|
+
}
|
|
3628
|
+
if (pixel.color != "monochrome" && pixel.color != "rainbow"){
|
|
3629
|
+
drawSquare(ctx, pixel.color, pixel.x, pixel.y);
|
|
3630
|
+
} else {
|
|
3631
|
+
if (pixel.color == "monochrome"){
|
|
3632
|
+
drawSquare(ctx, "hsl(0, 0%, " + 100*Math.abs(Math.asin(Math.sin(pixelTicks/30)))/(0.5*Math.PI) + "%)", pixel.x, pixel.y);
|
|
3633
|
+
} else if (pixel.color == "rainbow"){
|
|
3634
|
+
drawSquare(ctx, "hsl(" + ((pixelTicks%60)/60)*360 + ", 100%, 50%)", pixel.x, pixel.y);
|
|
3635
|
+
}
|
|
3636
|
+
}
|
|
3637
|
+
}
|
|
3638
|
+
}
|
|
3639
|
+
let copycatfillerElem = "sand"
|
|
3640
|
+
elements.copycat_filler = {
|
|
3641
|
+
color: elements.random.color,
|
|
3642
|
+
behavior:behaviors.WALL,
|
|
3643
|
+
category: "special",
|
|
3644
|
+
onSelect: async function(){
|
|
3645
|
+
let ans1 = await _nousersthingsprompt("Enter the element you want to use for the copycat filler", copycatfillerElem||"sand")
|
|
3646
|
+
copycatfillerElem = mostSimilarElement(ans1)
|
|
3647
|
+
},
|
|
3648
|
+
tick: function(pixel){
|
|
3649
|
+
let fillerNeighbors = {}
|
|
3650
|
+
if (!pixel.copycatElement){
|
|
3651
|
+
pixel.copycatElement = copycatfillerElem
|
|
3652
|
+
}
|
|
3653
|
+
if (!pixel.rSeed){
|
|
3654
|
+
pixel.rSeed = [Math.random(), Math.random(), Math.random(), Math.random()]
|
|
3655
|
+
}
|
|
3656
|
+
for (var i = 0; i < adjacentCoords.length; i++) {
|
|
3657
|
+
var x = pixel.x+adjacentCoords[i][0];
|
|
3658
|
+
var y = pixel.y+adjacentCoords[i][1];
|
|
3659
|
+
if (isEmpty(x,y)) {
|
|
3660
|
+
createPixel("copycat_filler", x, y)
|
|
3661
|
+
pixelMap[x][y].copycatElement = pixel.copycatElement
|
|
3662
|
+
}
|
|
3663
|
+
}
|
|
3664
|
+
for (var i = 0; i < squareCoords.length; i++) {
|
|
3665
|
+
var x = pixel.x+squareCoords[i][0];
|
|
3666
|
+
var y = pixel.y+squareCoords[i][1];
|
|
3667
|
+
if (!isEmpty(x, y, true)){
|
|
3668
|
+
var otherPixel = pixelMap[x][y];
|
|
3669
|
+
if (otherPixel.element == "copycat_filler" && otherPixel.copycatElement != pixel.copycatElement){
|
|
3670
|
+
fillerNeighbors[otherPixel.copycatElement] = (fillerNeighbors[otherPixel.copycatElement]||0)+1;
|
|
3671
|
+
}
|
|
3672
|
+
}
|
|
3673
|
+
}
|
|
3674
|
+
if(Object.keys(fillerNeighbors).length > 0){
|
|
3675
|
+
let mostSeenColor = highestValueObjectKey(fillerNeighbors)
|
|
3676
|
+
let opposingCount = sumOfObjectValues(fillerNeighbors)
|
|
3677
|
+
if (Math.random() < neighborRandomChance[opposingCount]){
|
|
3678
|
+
pixel.copycatElement = mostSeenColor;
|
|
3679
|
+
}
|
|
3680
|
+
}
|
|
3681
|
+
},
|
|
3682
|
+
renderer: function(pixel, ctx){
|
|
3683
|
+
if (!pixel.copycatElement){pixel.copycatElement = copycatfillerElem}
|
|
3684
|
+
if (!pixel.rSeed){pixel.rSeed = [Math.random(), Math.random(), Math.random(), Math.random()]}
|
|
3685
|
+
if (typeof elements[pixel.copycatElement].color == "object"){
|
|
3686
|
+
let selectedColor = elements[pixel.copycatElement].color[Math.floor(pixel.rSeed[1]*elements[pixel.copycatElement].color.length)]
|
|
3687
|
+
let rgb = {
|
|
3688
|
+
r: parseInt(selectedColor.match(/\d+/g)[0]),
|
|
3689
|
+
g: parseInt(selectedColor.match(/\d+/g)[1]),
|
|
3690
|
+
b: parseInt(selectedColor.match(/\d+/g)[2])
|
|
3691
|
+
}
|
|
3692
|
+
for (let c in rgb){
|
|
3693
|
+
rgb[c] += Math.floor(pixel.rSeed[0] * (pixel.rSeed[2] > 0.5 ? -1 : 1) * pixel.rSeed[3] * 15);
|
|
3694
|
+
rgb[c] = Math.max(0, Math.min(255, rgb[c]));
|
|
3695
|
+
}
|
|
3696
|
+
if (elements[pixel.copycatElement].glow || elements[pixel.copycatElement].isGas){
|
|
3697
|
+
drawPlus(ctx, "rgb("+rgb.r+","+rgb.g+","+rgb.b+")", pixel.x, pixel.y, 1);
|
|
3698
|
+
} else {
|
|
3699
|
+
drawSquare(ctx, "rgb("+rgb.r+","+rgb.g+","+rgb.b+")", pixel.x, pixel.y);
|
|
3700
|
+
}
|
|
3701
|
+
} else {
|
|
3702
|
+
let rgb = {
|
|
3703
|
+
r: parseInt(elements[pixel.copycatElement].color.match(/\d+/g)[0]),
|
|
3704
|
+
g: parseInt(elements[pixel.copycatElement].color.match(/\d+/g)[1]),
|
|
3705
|
+
b: parseInt(elements[pixel.copycatElement].color.match(/\d+/g)[2])
|
|
3706
|
+
}
|
|
3707
|
+
for (let c in rgb){
|
|
3708
|
+
rgb[c] += Math.floor(pixel.rSeed[0] * (pixel.rSeed[2] > 0.5 ? -1 : 1) * pixel.rSeed[3] * 15);
|
|
3709
|
+
rgb[c] = Math.max(0, Math.min(255, rgb[c]));
|
|
3710
|
+
}
|
|
3711
|
+
if (elements[pixel.copycatElement].glow || elements[pixel.copycatElement].isGas){
|
|
3712
|
+
drawPlus(ctx, "rgb("+rgb.r+","+rgb.g+","+rgb.b+")", pixel.x, pixel.y, 1);
|
|
3713
|
+
} else {
|
|
3714
|
+
drawSquare(ctx, "rgb("+rgb.r+","+rgb.g+","+rgb.b+")", pixel.x, pixel.y);
|
|
3715
|
+
}
|
|
3716
|
+
}
|
|
3717
|
+
}
|
|
3718
|
+
}
|
|
3719
|
+
/*
|
|
3720
|
+
top left: canvasCoord(x), canvasCoord(y)
|
|
3721
|
+
top right: canvasCoord(x)+pixelSize, canvasCoord(y)
|
|
3722
|
+
bottom left: canvasCoord(x), canvasCoord(y)+pixelSize
|
|
3723
|
+
bottom right: canvasCoord(x)+pixelSize, canvasCoord(y)+pixelSize
|
|
3724
|
+
*/
|
|
3725
|
+
adjacentSidesToCanvas = function(x, y, px, py){
|
|
3726
|
+
if (x == 0 && y == -1){
|
|
3727
|
+
return [canvasCoord(px)+(0.5*pixelSize), canvasCoord(py)]
|
|
3728
|
+
}
|
|
3729
|
+
else if (x == 0 && y == 1){
|
|
3730
|
+
return [canvasCoord(px)+(0.5*pixelSize), canvasCoord(py)+pixelSize]
|
|
3731
|
+
}
|
|
3732
|
+
else if (x == -1 && y == 0){
|
|
3733
|
+
return [canvasCoord(px), canvasCoord(py)+(0.5*pixelSize)]
|
|
3734
|
+
}
|
|
3735
|
+
else if (x == 1 && y == 0){
|
|
3736
|
+
return [canvasCoord(px)+pixelSize, canvasCoord(py)+(0.5*pixelSize)]
|
|
3737
|
+
}
|
|
3738
|
+
}
|
|
3739
|
+
drawRectangle = function(ctx, color, x, y, width, height, xoffset, yoffset){
|
|
3740
|
+
ctx.fillStyle = color;
|
|
3741
|
+
ctx.fillRect(canvasCoord(x+xoffset), canvasCoord(y+yoffset), pixelSize*width, pixelSize*height)
|
|
3742
|
+
}
|
|
3743
|
+
elements.thin_pixel = {
|
|
3744
|
+
color: "#747474",
|
|
3745
|
+
behavior: behaviors.WALL,
|
|
3746
|
+
category: "special",
|
|
3747
|
+
renderer: function(pixel, ctx){
|
|
3748
|
+
let differentAdjacent = [];
|
|
3749
|
+
for (let i = 0; i < adjacentCoords.length; i++) {
|
|
3750
|
+
let x = adjacentCoords[i][0] + pixel.x;
|
|
3751
|
+
let y = adjacentCoords[i][1] + pixel.y;
|
|
3752
|
+
if (!isEmpty(x, y, true) && pixelMap[x][y].element == "thin_pixel") {
|
|
3753
|
+
differentAdjacent.push(adjacentCoords[i]);
|
|
3754
|
+
}
|
|
3755
|
+
}
|
|
3756
|
+
ctx.globalAlpha = 1
|
|
3757
|
+
differentAdjacent.forEach(adj => {
|
|
3758
|
+
let canvasadjacentCoords = adjacentSidesToCanvas(adj[0], adj[1], pixel.x, pixel.y);
|
|
3759
|
+
// if (!canvasadjacentCoords){
|
|
3760
|
+
// console.log(adj)
|
|
3761
|
+
// return;
|
|
3762
|
+
// }
|
|
3763
|
+
//console.log(canvasadjacentCoords);
|
|
3764
|
+
ctx.beginPath();
|
|
3765
|
+
ctx.moveTo(canvasCoord(pixel.x)+(0.5*pixelSize), canvasCoord(pixel.y)+(0.5*pixelSize));
|
|
3766
|
+
ctx.lineTo(canvasadjacentCoords[0], canvasadjacentCoords[1]);
|
|
3767
|
+
ctx.strokeStyle = pixel.color;
|
|
3768
|
+
if (pixelSize*0.24>=2){ctx.lineWidth = pixelSize*0.24}else{ctx.lineWidth = 2}
|
|
3769
|
+
ctx.stroke();
|
|
3770
|
+
//console.log("line")
|
|
3771
|
+
});
|
|
3772
|
+
ctx.fillStyle = pixel.color;
|
|
3773
|
+
ctx.fillRect(canvasCoord(pixel.x+0.38), canvasCoord(pixel.y+0.38), pixelSize*0.24, pixelSize*0.24);
|
|
3774
|
+
}
|
|
3775
|
+
}
|
|
3776
|
+
elements.cooler_sensor = {
|
|
3777
|
+
color: "#5499e7",
|
|
3778
|
+
behavior: behaviors.WALL,
|
|
3779
|
+
category: "machines",
|
|
3780
|
+
insulate: true,
|
|
3781
|
+
conduct: 1,
|
|
3782
|
+
tick: function(pixel){
|
|
3783
|
+
let temp = pixel.temp
|
|
3784
|
+
for (i = 0; i < adjacentCoords.length; i++){
|
|
3785
|
+
let x = adjacentCoords[i][0] + pixel.x;
|
|
3786
|
+
let y = adjacentCoords[i][1] + pixel.y;
|
|
3787
|
+
if (!isEmpty(x, y, true)){
|
|
3788
|
+
if (pixelMap[x][y].temp < temp){
|
|
3789
|
+
pixel.charge = 1
|
|
3790
|
+
}
|
|
3791
|
+
}
|
|
3792
|
+
}
|
|
3793
|
+
}
|
|
3794
|
+
}
|
|
3795
|
+
elements.hotter_sensor = {
|
|
3796
|
+
color: "#e75454",
|
|
3797
|
+
behavior: behaviors.WALL,
|
|
3798
|
+
category: "machines",
|
|
3799
|
+
insulate: true,
|
|
3800
|
+
conduct: 1,
|
|
3801
|
+
tick: function(pixel){
|
|
3802
|
+
let temp = pixel.temp
|
|
3803
|
+
for (i = 0; i < adjacentCoords.length; i++){
|
|
3804
|
+
let x = adjacentCoords[i][0] + pixel.x;
|
|
3805
|
+
let y = adjacentCoords[i][1] + pixel.y;
|
|
3806
|
+
if (!isEmpty(x, y, true)){
|
|
3807
|
+
if (pixelMap[x][y].temp > temp){
|
|
3808
|
+
pixel.charge = 1
|
|
3809
|
+
}
|
|
3810
|
+
}
|
|
3811
|
+
}
|
|
3812
|
+
}
|
|
3813
|
+
}
|
|
3814
|
+
let pipe_transmitter_channelVar = 0;
|
|
3815
|
+
elements.pipe_transmitter = {
|
|
3816
|
+
color: "#6e6250",
|
|
3817
|
+
category: "deprecated",
|
|
3818
|
+
movable: false,
|
|
3819
|
+
canContain: true,
|
|
3820
|
+
insulate: true,
|
|
3821
|
+
onSelect: async () => {
|
|
3822
|
+
let newChannel = await _nousersthingsprompt("Enter the channel of this pipe transmitter. It will not work if you do multiple while paused.", pipe_transmitter_channelVar);
|
|
3823
|
+
pipe_transmitter_channelVar = newChannel;
|
|
3824
|
+
},
|
|
3825
|
+
tick: (pixel) => {
|
|
3826
|
+
if (!pixel.channel){
|
|
3827
|
+
pixel.channel = pipe_transmitter_channelVar;
|
|
3828
|
+
}
|
|
3829
|
+
if (pixel.channel && pixel.con){
|
|
3830
|
+
let valid = currentPixels.filter(pixel2 =>
|
|
3831
|
+
pixel2.element == "pipe_receiver" && pixel2.channel === pixel.channel && !(pixel2.con)
|
|
3832
|
+
)
|
|
3833
|
+
if (valid.length){
|
|
3834
|
+
console.log(valid)
|
|
3835
|
+
shuffleArray(valid);
|
|
3836
|
+
console.log(valid)
|
|
3837
|
+
pixel.con.x = valid[0].x
|
|
3838
|
+
pixel.con.y = valid[0].y
|
|
3839
|
+
pixelMap[valid[0].x][valid[0].y].con = pixel.con
|
|
3840
|
+
delete pixel.con
|
|
3841
|
+
}
|
|
3842
|
+
}
|
|
3843
|
+
}
|
|
3844
|
+
}
|
|
3845
|
+
let pipe_receiver_channelVar = 0;
|
|
3846
|
+
elements.pipe_receiver = {
|
|
3847
|
+
color: "#4d4b63",
|
|
3848
|
+
category: "deprecated",
|
|
3849
|
+
movable: false,
|
|
3850
|
+
canContain: true,
|
|
3851
|
+
insulate: true,
|
|
3852
|
+
onSelect: async () => {
|
|
3853
|
+
let newChannel = await _nousersthingsprompt("Enter the channel of this pipe receiver. It will not work if you do multiple while paused.", pipe_receiver_channelVar);
|
|
3854
|
+
pipe_receiver_channelVar = newChannel;
|
|
3855
|
+
},
|
|
3856
|
+
tick: (pixel) => {
|
|
3857
|
+
if (!pixel.channel){
|
|
3858
|
+
pixel.channel = pipe_receiver_channelVar;
|
|
3859
|
+
}
|
|
3860
|
+
if (pixel.channel && pixel.con){
|
|
3861
|
+
// just scan neighbors for elements on the pipe list; transfer con to them. if its a type of channel pipe, also check if channel matches
|
|
3862
|
+
for (i = 0; i < squareCoords.length; i++){
|
|
3863
|
+
let x = squareCoords[i][0] + pixel.x;
|
|
3864
|
+
let y = squareCoords[i][1] + pixel.y;
|
|
3865
|
+
if (!isEmpty(x, y, true)){
|
|
3866
|
+
if (listPipes.includes(pixelMap[x][y].element)){
|
|
3867
|
+
if (["channel_pipe", "destroyable_channel_pipe"].includes(pixelMap[x][y].element)){
|
|
3868
|
+
if (pixelMap[x][y].channel == pixel.channel && !pixelMap[x][y].con){
|
|
3869
|
+
pixelMap[x][y].con = pixel.con;
|
|
3870
|
+
delete pixel.con;
|
|
3871
|
+
break;
|
|
3872
|
+
}
|
|
3873
|
+
} else {
|
|
3874
|
+
pixel.con.x = x;
|
|
3875
|
+
pixel.con.y = y;
|
|
3876
|
+
pixelMap[x][y].con = pixel.con;
|
|
3877
|
+
delete pixel.con;
|
|
3878
|
+
break;
|
|
3879
|
+
}
|
|
3880
|
+
}
|
|
3881
|
+
}
|
|
3882
|
+
}
|
|
3883
|
+
}
|
|
3884
|
+
}
|
|
3885
|
+
}
|
|
3886
|
+
elements.false_vacuum_decay_bomb = {
|
|
3887
|
+
color: "#3f0b0b",
|
|
3888
|
+
category: "weapons",
|
|
3889
|
+
behavior: behaviors.STURDYPOWDER,
|
|
3890
|
+
tick: function(pixel){
|
|
3891
|
+
if (!isEmpty(pixel.x, pixel.y+1, true)){
|
|
3892
|
+
changePixel(pixel, "false_vacuum")
|
|
3893
|
+
}
|
|
3894
|
+
}
|
|
3895
|
+
}
|
|
3896
|
+
elements.false_vacuum = {
|
|
3897
|
+
color: "#b41b1b",
|
|
3898
|
+
category: "special",
|
|
3899
|
+
hidden: true,
|
|
3900
|
+
tick: function(pixel){
|
|
3901
|
+
if (!pixel.timeAlive){
|
|
3902
|
+
pixel.timeAlive = 0
|
|
3903
|
+
}
|
|
3904
|
+
if (!pixel.generations){
|
|
3905
|
+
pixel.generations = 0
|
|
3906
|
+
}
|
|
3907
|
+
if (pixel.generations > Math.max(width, height)){
|
|
3908
|
+
deletePixel(pixel.x, pixel.y)
|
|
3909
|
+
return
|
|
3910
|
+
}
|
|
3911
|
+
pixel.color = `rgb(${180/(pixel.timeAlive+2)}, ${27/(pixel.timeAlive+2)}, ${27/(pixel.timeAlive+2)})`
|
|
3912
|
+
if (pixel.timeAlive === 0){
|
|
3913
|
+
for (i = 0; i < squareCoords.length; i++){
|
|
3914
|
+
let x = squareCoords[i][0] + pixel.x;
|
|
3915
|
+
let y = squareCoords[i][1] + pixel.y;
|
|
3916
|
+
if (!isEmpty(x, y, true)){
|
|
3917
|
+
if (pixelMap[x][y].element !== "false_vacuum"){
|
|
3918
|
+
deletePixel(x, y)
|
|
3919
|
+
createPixel("false_vacuum", x, y)
|
|
3920
|
+
pixelMap[x][y].generations = pixel.generations + 1
|
|
3921
|
+
}
|
|
3922
|
+
} else if (isEmpty(x, y)){
|
|
3923
|
+
createPixel("false_vacuum", x, y)
|
|
3924
|
+
pixelMap[x][y].generations = pixel.generations + 1
|
|
3925
|
+
}
|
|
3926
|
+
}
|
|
3927
|
+
}
|
|
3928
|
+
pixel.timeAlive ++;
|
|
3929
|
+
if (pixel.timeAlive > 20){
|
|
3930
|
+
deletePixel(pixel.x, pixel.y)
|
|
3931
|
+
return
|
|
3932
|
+
}
|
|
3933
|
+
},
|
|
3934
|
+
movable: false,
|
|
3935
|
+
hardness: 1
|
|
3936
|
+
}
|
|
3937
|
+
let signInput = "Hello World!";
|
|
3938
|
+
elements.sign = {
|
|
3939
|
+
color: "#FFFFFF",
|
|
3940
|
+
darkText: true,
|
|
3941
|
+
category: "special",
|
|
3942
|
+
onSelect: async function(){
|
|
3943
|
+
let signi = await _nousersthingsprompt("What text should the sign display?", signInput||"Hello World!")
|
|
3944
|
+
signInput = signi;
|
|
3945
|
+
},
|
|
3946
|
+
renderer: function(pixel, ctx){
|
|
3947
|
+
if (!pixel.sign){pixel.sign = signInput}
|
|
3948
|
+
},
|
|
3949
|
+
movable: false
|
|
3950
|
+
}
|
|
3951
|
+
elements.e_sign = {
|
|
3952
|
+
color: "#f3ff88",
|
|
3953
|
+
darkText: true,
|
|
3954
|
+
category: "special",
|
|
3955
|
+
movable: false,
|
|
3956
|
+
onSelect: async () => {
|
|
3957
|
+
let signi = await _nousersthingsprompt("What text should the sign display?", signInput||"Hello World!")
|
|
3958
|
+
signInput = signi;
|
|
3959
|
+
},
|
|
3960
|
+
renderer: function(pixel, ctx){
|
|
3961
|
+
if (!pixel.sign){pixel.sign=signInput}
|
|
3962
|
+
},
|
|
3963
|
+
conduct: 1
|
|
3964
|
+
}
|
|
3965
|
+
renderPostPixel(function(ctx){
|
|
3966
|
+
for (pixel of currentPixels){
|
|
3967
|
+
if ((pixel.element == "sign") && pixel.sign){
|
|
3968
|
+
ctx.font = `12pt Arial`
|
|
3969
|
+
ctx.fillStyle = pixel.color;
|
|
3970
|
+
ctx.fillText(pixel.sign.replace(/\$\{([\w.\[\]]+)\}/g, (_, path) => {
|
|
3971
|
+
try {
|
|
3972
|
+
const value = new Function('return globalThis.' + path)();
|
|
3973
|
+
return typeof value === 'object' ? JSON.stringify(value) : value ?? '';
|
|
3974
|
+
} catch {
|
|
3975
|
+
return '';
|
|
3976
|
+
}
|
|
3977
|
+
}), canvasCoord(pixel.x), canvasCoord(pixel.y))
|
|
3978
|
+
} else if (pixel.element == "e_sign" && pixel.sign){
|
|
3979
|
+
if (pixel.charge || pixel.chargeCD){
|
|
3980
|
+
ctx.font = `12pt Arial`
|
|
3981
|
+
ctx.fillStyle = pixel.color;
|
|
3982
|
+
ctx.fillText(pixel.sign.replace(/\$\{([\w.\[\]]+)\}/g, (_, path) => {
|
|
3983
|
+
try {
|
|
3984
|
+
const value = new Function('return globalThis.' + path)();
|
|
3985
|
+
return typeof value === 'object' ? JSON.stringify(value) : value ?? '';
|
|
3986
|
+
} catch {
|
|
3987
|
+
return '';
|
|
3988
|
+
}
|
|
3989
|
+
}), canvasCoord(pixel.x), canvasCoord(pixel.y))
|
|
3990
|
+
} else {
|
|
3991
|
+
drawSquare(ctx, pixel.color, pixel.x, pixel.y)
|
|
3992
|
+
}
|
|
3993
|
+
}
|
|
3994
|
+
}
|
|
3995
|
+
})
|
|
3996
|
+
let machinemodName = "nousersthings.js"
|
|
3997
|
+
elements.mod_dectector = {
|
|
3998
|
+
color: "#54681d",
|
|
3999
|
+
behavior: behaviors.WALL,
|
|
4000
|
+
category: "machines",
|
|
4001
|
+
movable: false,
|
|
4002
|
+
excludeRandom: true,
|
|
4003
|
+
onSelect: async () => {
|
|
4004
|
+
let newMod = await _nousersthingsprompt("What mod should this machine detect?", "nousersthings.js"||modName)
|
|
4005
|
+
machinemodName = newMod
|
|
4006
|
+
},
|
|
4007
|
+
tick: (pixel) => {
|
|
4008
|
+
if (!pixel.mod){pixel.mod = machinemodName}
|
|
4009
|
+
if (loadedMods.includes(pixel.mod)){
|
|
4010
|
+
for (let i = 0; i < adjacentCoords.length; i++){
|
|
4011
|
+
let x = adjacentCoords[i][0] + pixel.x;
|
|
4012
|
+
let y = adjacentCoords[i][1] + pixel.y;
|
|
4013
|
+
if (!isEmpty(x, y, true) && elements[pixelMap[x][y].element].conduct){
|
|
4014
|
+
pixelMap[x][y].charge = 1
|
|
4015
|
+
}
|
|
4016
|
+
}
|
|
4017
|
+
}
|
|
4018
|
+
}
|
|
4019
|
+
}
|
|
4020
|
+
smoothColor = function(color1, color2, amount){
|
|
4021
|
+
let rgb1 = getPixelColor(color1)
|
|
4022
|
+
let rgb2 = getPixelColor(color2)
|
|
4023
|
+
return {r:((1-amount)*rgb1[0])+(amount*rgb2[0]),g:((1-amount)*rgb1[1])+(amount*rgb2[1]),b:((1-amount)*rgb1[2])+(amount*rgb2[2])}
|
|
4024
|
+
}
|
|
4025
|
+
objectColorToString = function(object){
|
|
4026
|
+
if (typeof object == "object"){return `rgb(${Math.round(object.r)}, ${Math.round(object.g)}, ${Math.round(object.b)})`}
|
|
4027
|
+
else {return `rgb(${Math.round(object[0])}, ${Math.round(object[1])}, ${Math.round(object[2])})`}
|
|
4028
|
+
}
|
|
4029
|
+
let delayVariable = 0
|
|
4030
|
+
elements.delay = {
|
|
4031
|
+
color: "#df3b3b",
|
|
4032
|
+
behavior: behaviors.WALL,
|
|
4033
|
+
category: "machines",
|
|
4034
|
+
movable: false,
|
|
4035
|
+
insulate: true,
|
|
4036
|
+
onSelect: async () => {
|
|
4037
|
+
let ansdelay = await _nousersthingsprompt("How long should the delay be in ticks?", 30)
|
|
4038
|
+
delayVariable = parseInt(ansdelay);
|
|
4039
|
+
logMessage("Will delay incoming signals. This element also acts as a one-way wire and will configure its direction when first shocked.")
|
|
4040
|
+
},
|
|
4041
|
+
tick: function(pixel){
|
|
4042
|
+
if (typeof pixel.delay == "undefined"){pixel.delay = delayVariable}
|
|
4043
|
+
if (typeof pixel.wait == "undefined"){pixel.wait = 0}
|
|
4044
|
+
if (!pixel.coord){pixel.coord = [0, 0]}
|
|
4045
|
+
if (typeof pixel.cMode == "undefined"){pixel.cMode = true}
|
|
4046
|
+
if (pixel.cMode == true){
|
|
4047
|
+
if (pixel.coord[0] == 0 && pixel.coord[1] == 0){
|
|
4048
|
+
for (i = 0; i < squareCoords.length; i++){
|
|
4049
|
+
let coord = squareCoords[i]
|
|
4050
|
+
let x = pixel.x+coord[0]
|
|
4051
|
+
let y = pixel.y+coord[1]
|
|
4052
|
+
if (!isEmpty(x, y, true) && pixelMap[x][y].charge){
|
|
4053
|
+
pixel.coord = coord
|
|
4054
|
+
pixel.cMode = false
|
|
4055
|
+
pixel.wait = pixel.delay
|
|
4056
|
+
}
|
|
4057
|
+
}
|
|
4058
|
+
}
|
|
4059
|
+
else {
|
|
4060
|
+
if (!isEmpty(pixel.x+pixel.coord[0],pixel.y+pixel.coord[1], true) && pixelMap[pixel.x+pixel.coord[0]][pixel.y+pixel.coord[1]].charge){
|
|
4061
|
+
pixel.cMode = false
|
|
4062
|
+
pixel.wait = pixel.delay
|
|
4063
|
+
}
|
|
4064
|
+
}
|
|
4065
|
+
} else {
|
|
4066
|
+
if (pixel.wait == 0){
|
|
4067
|
+
if (!isEmpty(pixel.x-pixel.coord[0],pixel.y-pixel.coord[1]) && elements[pixelMap[pixel.x-pixel.coord[0]][pixel.y-pixel.coord[1]].element].conduct){
|
|
4068
|
+
pixelMap[pixel.x-pixel.coord[0]][pixel.y-pixel.coord[1]].charge = 1
|
|
4069
|
+
}
|
|
4070
|
+
pixel.cMode = true
|
|
4071
|
+
}
|
|
4072
|
+
}
|
|
4073
|
+
if (pixel.wait > 0){pixel.wait --}
|
|
4074
|
+
},
|
|
4075
|
+
renderer: function(pixel, ctx){
|
|
4076
|
+
if (typeof pixel.wait != "undefined"){
|
|
4077
|
+
let color = smoothColor(pixel.color, objectColorToString(smoothColor(pixel.color, "#000000", 0.85)), 1-(pixel.wait/pixel.delay))
|
|
4078
|
+
drawSquare(ctx, objectColorToString(color), pixel.x, pixel.y)
|
|
4079
|
+
} else {drawSquare(ctx, pixel.color, pixel.x, pixel.y)}
|
|
4080
|
+
}
|
|
4081
|
+
}
|