Merge branch 'R74nCom:main' into main
This commit is contained in:
commit
51e0ac46ec
|
|
@ -16243,6 +16243,7 @@ Cancer, Landmine, Grenade, Smoke Grenade">?</span> <input type="button" value="O
|
||||||
<option value="zh_cn">简体中文</option>
|
<option value="zh_cn">简体中文</option>
|
||||||
</optgroup>
|
</optgroup>
|
||||||
</select></p>
|
</select></p>
|
||||||
|
<p>Try our NEW GAME: <a href="https://R74n.com/cook/" target="_blank">Infinite Chef</a></p>
|
||||||
<p>Email us at <a href="mailto:contact@R74n.com">contact@R74n.com</a> for advertising, help, or education!</p>
|
<p>Email us at <a href="mailto:contact@R74n.com">contact@R74n.com</a> for advertising, help, or education!</p>
|
||||||
<div id="newsletterFrame">Be notified when Sandboxels and other R74n projects are updated, along with ramblings from the developer!<br><br>
|
<div id="newsletterFrame">Be notified when Sandboxels and other R74n projects are updated, along with ramblings from the developer!<br><br>
|
||||||
<form action="https://news.r74n.com/api/v1/free?nojs=true" method="post" class="form _form_1mxvn_6" novalidate="" target="_blank"><input type="hidden" name="first_url" value="https://news.r74n.com/embed"><input type="hidden" name="first_referrer"><input type="hidden" name="current_url" value="https://news.r74n.com/embed"><input type="hidden" name="current_referrer"><input type="hidden" name="referral_code"><input type="hidden" name="source" value="embed"><input type="hidden" name="referring_pub_id"><input type="hidden" name="additional_referring_pub_ids">
|
<form action="https://news.r74n.com/api/v1/free?nojs=true" method="post" class="form _form_1mxvn_6" novalidate="" target="_blank"><input type="hidden" name="first_url" value="https://news.r74n.com/embed"><input type="hidden" name="first_referrer"><input type="hidden" name="current_url" value="https://news.r74n.com/embed"><input type="hidden" name="current_referrer"><input type="hidden" name="referral_code"><input type="hidden" name="source" value="embed"><input type="hidden" name="referring_pub_id"><input type="hidden" name="additional_referring_pub_ids">
|
||||||
|
|
|
||||||
20
lang/hu.json
20
lang/hu.json
|
|
@ -189,7 +189,7 @@
|
||||||
"bubble":"buborék",
|
"bubble":"buborék",
|
||||||
"acid":"sav",
|
"acid":"sav",
|
||||||
"neutral_acid":"semleges_sav",
|
"neutral_acid":"semleges_sav",
|
||||||
"acid_gas":"savgáz",
|
"acid_gas":"savgőz",
|
||||||
"glue":"ragasztó",
|
"glue":"ragasztó",
|
||||||
"soda":"szénsavas_üdítőital",
|
"soda":"szénsavas_üdítőital",
|
||||||
"gray_goo":"szürke_ragacs",
|
"gray_goo":"szürke_ragacs",
|
||||||
|
|
@ -242,7 +242,7 @@
|
||||||
"sterling":"sterling_ezüst",
|
"sterling":"sterling_ezüst",
|
||||||
"gallium":"gallium",
|
"gallium":"gallium",
|
||||||
"molten_gallium":"olvadt_gallium",
|
"molten_gallium":"olvadt_gallium",
|
||||||
"gallium_gas":"gallium_gáz",
|
"gallium_gas":"galliumgőz",
|
||||||
"rose_gold":"rózsaarany",
|
"rose_gold":"rózsaarany",
|
||||||
"purple_gold":"lila_arany",
|
"purple_gold":"lila_arany",
|
||||||
"blue_gold":"kék_arany",
|
"blue_gold":"kék_arany",
|
||||||
|
|
@ -259,7 +259,7 @@
|
||||||
"molten_solder":"olvadt_forrasztó_fém",
|
"molten_solder":"olvadt_forrasztó_fém",
|
||||||
"juice":"lé",
|
"juice":"lé",
|
||||||
"juice_ice":"fagyott_lé",
|
"juice_ice":"fagyott_lé",
|
||||||
"broth":"leves_leve",
|
"broth":"leveslé",
|
||||||
"milk":"tej",
|
"milk":"tej",
|
||||||
"chocolate_milk":"csokis_tej",
|
"chocolate_milk":"csokis_tej",
|
||||||
"fruit_milk":"gyümölcsös_tej",
|
"fruit_milk":"gyümölcsös_tej",
|
||||||
|
|
@ -357,7 +357,7 @@
|
||||||
"liquid_helium":"folyékony_hélium",
|
"liquid_helium":"folyékony_hélium",
|
||||||
"sodium":"nátrium",
|
"sodium":"nátrium",
|
||||||
"molten_sodium":"olvadt_nátrium",
|
"molten_sodium":"olvadt_nátrium",
|
||||||
"sodium_gas":"nátrium_gáz",
|
"sodium_gas":"nátriumgőz",
|
||||||
"calcium":"kalcium",
|
"calcium":"kalcium",
|
||||||
"molten_calcium":"olvadt_kalcium",
|
"molten_calcium":"olvadt_kalcium",
|
||||||
"limestone":"mészkő",
|
"limestone":"mészkő",
|
||||||
|
|
@ -377,7 +377,7 @@
|
||||||
"fragrance":"illat",
|
"fragrance":"illat",
|
||||||
"perfume":"parfüm",
|
"perfume":"parfüm",
|
||||||
"cyanide":"cián",
|
"cyanide":"cián",
|
||||||
"cyanide_gas":"cián_gáz",
|
"cyanide_gas":"ciángáz",
|
||||||
"ozone":"ózon",
|
"ozone":"ózon",
|
||||||
"cloud":"felfő",
|
"cloud":"felfő",
|
||||||
"rain_cloud":"esőfelhő",
|
"rain_cloud":"esőfelhő",
|
||||||
|
|
@ -394,7 +394,7 @@
|
||||||
"led_b":"kék_led",
|
"led_b":"kék_led",
|
||||||
"sulfur":"kén",
|
"sulfur":"kén",
|
||||||
"molten_sulfur":"olvadt_kén",
|
"molten_sulfur":"olvadt_kén",
|
||||||
"sulfur_gas":"kén_gáz",
|
"sulfur_gas":"kéngőz",
|
||||||
"copper_sulfate":"rézgálic",
|
"copper_sulfate":"rézgálic",
|
||||||
"snake":"kígyó",
|
"snake":"kígyó",
|
||||||
"loopy":"kacskaringós",
|
"loopy":"kacskaringós",
|
||||||
|
|
@ -426,7 +426,7 @@
|
||||||
"bead":"gyöngy",
|
"bead":"gyöngy",
|
||||||
"color_sand":"színes_homok",
|
"color_sand":"színes_homok",
|
||||||
"borax":"bórax",
|
"borax":"bórax",
|
||||||
"epsom_salt":"epsom_só",
|
"epsom_salt":"keserűsó",
|
||||||
"potassium_salt":"kálium_só",
|
"potassium_salt":"kálium_só",
|
||||||
"sodium_acetate":"nátrium-acetát",
|
"sodium_acetate":"nátrium-acetát",
|
||||||
"lightning":"villámcsapás",
|
"lightning":"villámcsapás",
|
||||||
|
|
@ -501,7 +501,7 @@
|
||||||
"molten_blue_gold":"olvadt_kék_arany",
|
"molten_blue_gold":"olvadt_kék_arany",
|
||||||
"molten_electrum":"olvadt_elektrum",
|
"molten_electrum":"olvadt_elektrum",
|
||||||
"molten_pyrite":"olvadt_pirit",
|
"molten_pyrite":"olvadt_pirit",
|
||||||
"broth_ice":"fagyott_leves_leve",
|
"broth_ice":"fagyott_leveslé",
|
||||||
"frozen_vinegar":"fagyott_ecet",
|
"frozen_vinegar":"fagyott_ecet",
|
||||||
"sauce_ice":"fagyott_szósz",
|
"sauce_ice":"fagyott_szósz",
|
||||||
"alcohol_ice":"fagyott_alkohol",
|
"alcohol_ice":"fagyott_alkohol",
|
||||||
|
|
@ -519,7 +519,7 @@
|
||||||
"molten_alga":"olvadt_alumínium-gallim_ötvözet",
|
"molten_alga":"olvadt_alumínium-gallim_ötvözet",
|
||||||
"molten_metal_scrap":"olvadt_fémtörmelék",
|
"molten_metal_scrap":"olvadt_fémtörmelék",
|
||||||
"molten_borax":"olvadt_borax",
|
"molten_borax":"olvadt_borax",
|
||||||
"molten_epsom_salt":"olvadt_epsom-só",
|
"molten_epsom_salt":"olvadt_keserűsó",
|
||||||
"molten_potassium_salt":"olvadt_kálium_só",
|
"molten_potassium_salt":"olvadt_kálium_só",
|
||||||
"molten_sodium_acetate":"olvadt_nátrium-acetát",
|
"molten_sodium_acetate":"olvadt_nátrium-acetát",
|
||||||
"frozen_nitro":"fagyott_nitroglicerin",
|
"frozen_nitro":"fagyott_nitroglicerin",
|
||||||
|
|
@ -539,5 +539,5 @@
|
||||||
"tsunami": "cunami",
|
"tsunami": "cunami",
|
||||||
"blaster": "plazmavető",
|
"blaster": "plazmavető",
|
||||||
"propane_ice": "fagyott_propán",
|
"propane_ice": "fagyott_propán",
|
||||||
"molten_caustic_potash": "Olvadt_kálium-hidroxid"
|
"molten_caustic_potash": "olvadt_kálium-hidroxid"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@
|
||||||
<tr><td>velocity.js</td><td>Beta for explosion velocity, and later wind, which may come to the base game in the future</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
<tr><td>velocity.js</td><td>Beta for explosion velocity, and later wind, which may come to the base game in the future</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
|
|
||||||
<!----><tr><td class="modCat" colspan="3">Tools & Settings</td></tr><!---->
|
<!----><tr><td class="modCat" colspan="3">Tools & Settings</td></tr><!---->
|
||||||
<tr><td>adjustablepixelsize.js</td><td>Allows you to set the pixelSize with a URL parameter</td><td>Alice</td></tr>
|
<!-- <tr><td>adjustablepixelsize.js</td><td>Allows you to set the pixelSize with a URL parameter</td><td>Alice</td></tr> -->
|
||||||
<tr><td>betaworldgen.js</td><td>adds a more advanced world generation to the game</td><td>Adora</td></tr>
|
<tr><td>betaworldgen.js</td><td>adds a more advanced world generation to the game</td><td>Adora</td></tr>
|
||||||
<tr><td>betterModManager.js</td><td>Improvements to the Mod Manager</td><td>ggod</td></tr>
|
<tr><td>betterModManager.js</td><td>Improvements to the Mod Manager</td><td>ggod</td></tr>
|
||||||
<tr><td>betterSettings.js</td><td>Adds additional settings and functionality</td><td>ggod</td></tr>
|
<tr><td>betterSettings.js</td><td>Adds additional settings and functionality</td><td>ggod</td></tr>
|
||||||
|
|
@ -276,6 +276,7 @@
|
||||||
<tr><td>amogus.js</td><td>Adds a small amogus structure</td><td>Alice</td></tr>
|
<tr><td>amogus.js</td><td>Adds a small amogus structure</td><td>Alice</td></tr>
|
||||||
<tr><td>citybuilding.js</td><td>Adds seeds that create miniature buildings and other city-related items</td><td>SquareScreamYT</td></tr>
|
<tr><td>citybuilding.js</td><td>Adds seeds that create miniature buildings and other city-related items</td><td>SquareScreamYT</td></tr>
|
||||||
<tr><td>collab_mod.js</td><td>Created by multiple people, adds random things</td><td>mrapple, ilikepizza, stefanblox</td></tr>
|
<tr><td>collab_mod.js</td><td>Created by multiple people, adds random things</td><td>mrapple, ilikepizza, stefanblox</td></tr>
|
||||||
|
<tr><td>Doom Mod (Unreleased)</td><td>As seen on TikTok - Not yet available!</td><td>ggod</td></tr>
|
||||||
<tr><td>elem3.js</td><td>Adds all elements and combinations from Elemental 3 [Very Large]</td><td>Sophie</td></tr>
|
<tr><td>elem3.js</td><td>Adds all elements and combinations from Elemental 3 [Very Large]</td><td>Sophie</td></tr>
|
||||||
<tr><td>fools+.js</td><td>improves and makes fools.js EXTREMELY annoying.</td><td>SquareScreamYT</td></tr>
|
<tr><td>fools+.js</td><td>improves and makes fools.js EXTREMELY annoying.</td><td>SquareScreamYT</td></tr>
|
||||||
<tr><td>funny elements 2022-11-15.js</td><td>Adds a few curated randomly-generated elements</td><td>Alice</td></tr>
|
<tr><td>funny elements 2022-11-15.js</td><td>Adds a few curated randomly-generated elements</td><td>Alice</td></tr>
|
||||||
|
|
@ -311,6 +312,7 @@
|
||||||
|
|
||||||
<!----><tr><td class="modCat" colspan="3">Compilations</td></tr><!---->
|
<!----><tr><td class="modCat" colspan="3">Compilations</td></tr><!---->
|
||||||
<tr><td>a_mod_by_alice.js</td><td>A mod combining most of Alice’s mods, and some other things</td><td>Alice</td></tr>
|
<tr><td>a_mod_by_alice.js</td><td>A mod combining most of Alice’s mods, and some other things</td><td>Alice</td></tr>
|
||||||
|
<tr><td>food_mods.js</td><td>A mod combining most food mods</td><td>stefanblox, moss, Tisquares, SquareScreamYT, Adora, pixelegend4, Alice, Nubo318, Clide4, rottenEgghead</td></tr>
|
||||||
|
|
||||||
<!----><tr><td class="modCat" colspan="3">Technical Libraries & Tests</td></tr><!---->
|
<!----><tr><td class="modCat" colspan="3">Technical Libraries & Tests</td></tr><!---->
|
||||||
<tr><td>a_bundle_of_tests.js</td><td>Several test functions</td><td>Alice</td></tr>
|
<tr><td>a_bundle_of_tests.js</td><td>Several test functions</td><td>Alice</td></tr>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
elements.potassiumpermanganate = {
|
||||||
|
color: ["#800080", "#FF00FF"],
|
||||||
|
behavior: behaviors.POWDER,
|
||||||
|
category: "powders",
|
||||||
|
state: "solid",
|
||||||
|
density: 2500,
|
||||||
|
desc: "Potassium permanganate is a dark purple, crystalline solid. It is used as a powerful oxidizing agent.",
|
||||||
|
tempHigh: 240,
|
||||||
|
stateHigh: "molten_potassiumpermanganate",
|
||||||
|
}
|
||||||
|
elements.molten_potassiumpermanganate = {
|
||||||
|
color: ["#4B0082", "#800080", "#9932CC", "#8A2BE2", "#6A5ACD", "#FF00FF"],
|
||||||
|
category: "powders",
|
||||||
|
state: "solid",
|
||||||
|
density: 2500,
|
||||||
|
desc: "Potassium permanganate is a dark purple, crystalline solid. It is used as a powerful oxidizing agent.",
|
||||||
|
tempLow: 239,
|
||||||
|
stateLow: "potassiumpermanganate",
|
||||||
|
}
|
||||||
|
elements.tolulene = {
|
||||||
|
color: "#FFFFFF",
|
||||||
|
behavior: behaviors.LIQUID,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 866,
|
||||||
|
desc: "Tolulene is used as a paint thinner and also referred to as benezene or methylbeneze",
|
||||||
|
burn: 37.5,
|
||||||
|
burnTime: 900,
|
||||||
|
burnInto: ["steam", "smoke", "fire", "fire",],
|
||||||
|
reactions: {
|
||||||
|
"potassiumpermanganate": {elem1: "benzaldehyde", elem2: "benzaldehyde"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elements.benzaldehyde = {
|
||||||
|
color: "#F5F5F5",
|
||||||
|
behavior: behaviors.LIQUID,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 1045,
|
||||||
|
desc: "Benzaldehyde is cherry flavor. It is also clear like tolulene.",
|
||||||
|
reactions: {
|
||||||
|
"seltzer": {elem1: "cherrysoda", elem2: "cherrysoda"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elements.cherrysoda = {
|
||||||
|
color: "#D2042D",
|
||||||
|
behavior: behaviors.LIQUID,
|
||||||
|
category: "food",
|
||||||
|
state: "liquid",
|
||||||
|
density: 1045,
|
||||||
|
desc: "Cherry soda."
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// Science mod for Sandboxels
|
// Science mod for Sandboxels
|
||||||
// (Inspired by survival.js)
|
// (Inspired by survival.js)
|
||||||
// Build 17
|
// Build 19
|
||||||
// By: Lucifer (@a_british_proto (Discord))
|
// By: Lucifer (@a_british_proto (Discord))
|
||||||
// If there is anything you want to suggest or there's a bug then just dm me on discord
|
// If there is anything you want to suggest or there's a bug then just dm me on discord
|
||||||
// Todo:
|
// Todo:
|
||||||
|
|
@ -1383,7 +1383,90 @@ substance.Silver_Sulfate = {
|
||||||
hidden:true
|
hidden:true
|
||||||
}
|
}
|
||||||
|
|
||||||
// I done this on my school computers :skull:
|
// I have finally gotten my motivation back! :D
|
||||||
// doing more later
|
|
||||||
|
|
||||||
// I accidentally pressed Ctrl+V instead of Ctrl+C so it deleted my work D:
|
substance.Silver_Selenide = {
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
color: "333333",
|
||||||
|
category: "lands",
|
||||||
|
state: "solid",
|
||||||
|
hidden:true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Why am listening to a random playlist? I swear I'm going fully insane
|
||||||
|
|
||||||
|
substance.Silver_Selenate = {
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
color: "FFFFFF",
|
||||||
|
category: "lands",
|
||||||
|
state: "solid",
|
||||||
|
hidden:true
|
||||||
|
}
|
||||||
|
|
||||||
|
substance.Silver_Telluride = {
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
color: "333333",
|
||||||
|
category: "lands",
|
||||||
|
state: "solid",
|
||||||
|
hidden:true
|
||||||
|
}
|
||||||
|
|
||||||
|
substance.Silver_Arsenate = {
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
color: "E3E35F",
|
||||||
|
category: "lands",
|
||||||
|
state: "solid",
|
||||||
|
hidden:true
|
||||||
|
}
|
||||||
|
|
||||||
|
substance.Silver_Phosphate = {
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
color: "FFFF00",
|
||||||
|
category: "lands",
|
||||||
|
state: "solid",
|
||||||
|
hidden:true
|
||||||
|
}
|
||||||
|
|
||||||
|
// FINALLY WE ARE OUT OF THE SILVER COMPOUNDS!!!11!!1111! :DDDDD
|
||||||
|
// Now time to go onto the aluminum compounds
|
||||||
|
|
||||||
|
substance.Aluminum_Arsenide = {
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
color: "FF6600",
|
||||||
|
category: "lands", // Might just change this after I'm done with the substances (as well as the other one(s))
|
||||||
|
state: "solid",
|
||||||
|
hidden:true
|
||||||
|
}
|
||||||
|
|
||||||
|
substance.Aluminum_Diboride = {
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
color: "CB6D51",
|
||||||
|
category: "lands",
|
||||||
|
state: "solid",
|
||||||
|
hidden:true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Doing this later as my schools blocked chatgpt and the definition is not on Ptable.com :/
|
||||||
|
// substance.Aluminum_Dodecaboride = {
|
||||||
|
// behavior: behaviors.NULL,
|
||||||
|
// color: "000000",
|
||||||
|
// category: "null",
|
||||||
|
// state: "null",
|
||||||
|
// hidden:true
|
||||||
|
// }
|
||||||
|
|
||||||
|
// substance.Aluminum_Bromate_Nonahydrate = {
|
||||||
|
// behavior: behaviors.NULL,
|
||||||
|
// color: "000000",
|
||||||
|
// category: "null",
|
||||||
|
// state: "null",
|
||||||
|
// hidden:true
|
||||||
|
// }
|
||||||
|
|
||||||
|
substance.Aluminum_Tribromide = {
|
||||||
|
behavior: behavior.NULL, // It's meant to be a powder but I'm too tired to go look plus I need to go to my next lesson now
|
||||||
|
color: "FF0000",
|
||||||
|
category: "lands",
|
||||||
|
state: "powder",
|
||||||
|
hidden:true
|
||||||
|
}
|
||||||
|
|
|
||||||
1112
mods/aChefsDream.js
1112
mods/aChefsDream.js
File diff suppressed because it is too large
Load Diff
|
|
@ -68,7 +68,7 @@ runAfterLoad(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Run if another mod is active
|
// Run if another mod is active
|
||||||
if (enabledMods.includes("test.js")) {
|
if (enabledMods.includes("mods/test.js")) {
|
||||||
runAfterLoad(function() {
|
runAfterLoad(function() {
|
||||||
// Your code here
|
// Your code here
|
||||||
console.log("Hello World!");
|
console.log("Hello World!");
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
var mods_to_include = ["mods/sbstuff.js","mods/ketchup_mod.js","mods/morefoodsmod.js","mods/weAllScreamFor.js","mods/soups.js","mods/pizzasstuff.js","mods/community_desserts.js","mods/plants.js","mods/aChefsDream.js"]
|
||||||
|
|
||||||
|
var mods_included = mods_to_include.map(mod => enabledMods.includes(mod));
|
||||||
|
var all_mods_included = mods_included.reduce(function(a,b) { return a && b });
|
||||||
|
|
||||||
|
if(!all_mods_included) {
|
||||||
|
var mods_needed = mods_to_include.filter(function(modPath) { return !(enabledMods.includes(modPath)) });
|
||||||
|
|
||||||
|
mods_needed.forEach(function(modPath) {
|
||||||
|
enabledMods.splice(enabledMods.indexOf("mods/food_mods"),0,modPath);
|
||||||
|
});
|
||||||
|
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||||
|
alert(`The following mods have been inserted: ${mods_needed.join(", ")}
|
||||||
|
Reload the page for the mods to take effect. Happy cooking!`)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,91 @@
|
||||||
|
// lizard_mod.js by @RedBirdly
|
||||||
|
|
||||||
|
function blendColors(color1, color2, ratio = 0.5) {
|
||||||
|
// Convert the colors to RGB
|
||||||
|
const rgb1 = parseColor(color1);
|
||||||
|
const rgb2 = parseColor(color2);
|
||||||
|
|
||||||
|
// Calculate the blended color
|
||||||
|
const blendedColor = [
|
||||||
|
Math.round(rgb1[0] * (1 - ratio) + rgb2[0] * ratio), // Red
|
||||||
|
Math.round(rgb1[1] * (1 - ratio) + rgb2[1] * ratio), // Green
|
||||||
|
Math.round(rgb1[2] * (1 - ratio) + rgb2[2] * ratio) // Blue
|
||||||
|
];
|
||||||
|
|
||||||
|
// Convert the blended color back to a CSS color string
|
||||||
|
return `rgb(${blendedColor[0]}, ${blendedColor[1]}, ${blendedColor[2]})`;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function parseColor(color) {
|
||||||
|
// Create a temporary div to parse the color
|
||||||
|
const div = document.createElement('div');
|
||||||
|
div.style.color = color;
|
||||||
|
document.body.appendChild(div);
|
||||||
|
|
||||||
|
// Get the computed color
|
||||||
|
const computedColor = getComputedStyle(div).color;
|
||||||
|
|
||||||
|
// Remove the temporary div
|
||||||
|
document.body.removeChild(div);
|
||||||
|
|
||||||
|
// Parse the computed color into RGB values
|
||||||
|
const match = computedColor.match(/\d+/g);
|
||||||
|
return match.map(Number);
|
||||||
|
}
|
||||||
|
|
||||||
|
// dark red, dark green, brown, dark gray, light gray, lime
|
||||||
|
let lizard_colors = ["#4d2f2a", "#356641", "#85754d", "#3c3c3c", "#A1A1A1", "#98fb98"];
|
||||||
|
|
||||||
|
// camouflage function for lizards
|
||||||
|
function camo(pixel) {
|
||||||
|
if (!paused) {
|
||||||
|
// set camouflage color to random color
|
||||||
|
if (Math.random() < 0.002) {
|
||||||
|
let n = Math.floor(Math.random() * lizard_colors.length);
|
||||||
|
pixel.color = lizard_colors[n];
|
||||||
|
}
|
||||||
|
// set camouflage color to random color but make it slightly gray because camouflage isn't perfect
|
||||||
|
if (Math.random() < 0.1) {
|
||||||
|
for (let i = 0; i < currentPixels.length; i++) {
|
||||||
|
let x = currentPixels[i].x;
|
||||||
|
let y = currentPixels[i].y;
|
||||||
|
let dx = Math.abs(x - pixel.x);
|
||||||
|
let dy = Math.abs(y - pixel.y);
|
||||||
|
if (dx <= 1 && dy <= 1 && currentPixels[i].element != "lizard") {
|
||||||
|
pixel.color = blendColors(blendColors(currentPixels[i].color, "#887766", 0.4), pixel.color);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// define element
|
||||||
|
elements.lizard = {
|
||||||
|
color: lizard_colors,
|
||||||
|
behavior: [
|
||||||
|
"ST%98|M1%6|ST%98",
|
||||||
|
"XX|XX|M2%20 AND BO",
|
||||||
|
"XX|M1%80|M2",
|
||||||
|
],
|
||||||
|
tick: camo,
|
||||||
|
tempHigh: 100,
|
||||||
|
stateHigh: "ash",
|
||||||
|
tempLow: 0,
|
||||||
|
stateLow: "dead_bug",
|
||||||
|
breakInto: "dead_bug",
|
||||||
|
category: "life",
|
||||||
|
burn: 95,
|
||||||
|
burnTime: 25,
|
||||||
|
state: "solid",
|
||||||
|
density: 500,
|
||||||
|
conduct: 0.15,
|
||||||
|
reactions: {
|
||||||
|
"bird": { elem2: null, chance: 0.1, func: behaviors.FEEDPIXEL },
|
||||||
|
"plant": { elem2: null, chance: 0.05, func: behaviors.FEEDPIXEL },
|
||||||
|
"tomato": { elem2: null, chance: 0.05, func: behaviors.FEEDPIXEL },
|
||||||
|
"fly": { elem2: null, chance: 0.15, func: behaviors.FEEDPIXEL },
|
||||||
|
"ant": { elem2: null, chance: 0.1, func: behaviors.FEEDPIXEL },
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,209 @@
|
||||||
|
elements.template = {
|
||||||
|
color: "#ffffff",
|
||||||
|
category: "more_powders",
|
||||||
|
state: "solid",
|
||||||
|
hidden: true,
|
||||||
|
behavior: behaviors.POWDER
|
||||||
|
}
|
||||||
|
elements.powder = {
|
||||||
|
color: ["#c17d17", "#f2a32e"],
|
||||||
|
behavior: behaviors.POWDER,
|
||||||
|
category: "more_powders",
|
||||||
|
state: "solid",
|
||||||
|
reactions: {
|
||||||
|
"glue": { elem1: "smoke", elem2: "sticky_powder" },
|
||||||
|
"foam": { elem1: "foam_powder", elem2: "foam_powder" },
|
||||||
|
"electric": { elem1: null, elem2: "electric_powder" },
|
||||||
|
"dust": { elem1: null, elem2: "void_powder" },
|
||||||
|
},
|
||||||
|
stateHigh: "smoke",
|
||||||
|
tempHigh: 200,
|
||||||
|
tempLow: -200,
|
||||||
|
stateLow: "cold_powder",
|
||||||
|
stateHigh: "hot_powder",
|
||||||
|
}
|
||||||
|
elements.gas_powder = {
|
||||||
|
color: "#b98ffc",
|
||||||
|
behavior: behaviors.POWDER,
|
||||||
|
category: "more_powders",
|
||||||
|
state: "gas",
|
||||||
|
stateHigh: "smoke",
|
||||||
|
tempHigh: 2000,
|
||||||
|
reactions: {
|
||||||
|
"up_powder": { elem1: null, elem2: "up_gas_powder" },
|
||||||
|
},
|
||||||
|
tempLow: -200,
|
||||||
|
stateLow: "powder",
|
||||||
|
}
|
||||||
|
elements.up_powder = {
|
||||||
|
color: "#8ffcb9",
|
||||||
|
behavior: behaviors.AGPOWDER,
|
||||||
|
category: "more_powders",
|
||||||
|
state: "solid",
|
||||||
|
tempLow: -200,
|
||||||
|
stateLow: "powder",
|
||||||
|
},
|
||||||
|
elements.up_gas_powder = {
|
||||||
|
color: ["#a2c5da", "#a0a7d8"],
|
||||||
|
behavior: behaviors.AGPOWDER,
|
||||||
|
category: "more_powders",
|
||||||
|
state: "gas",
|
||||||
|
stateHigh: "gas_powder",
|
||||||
|
tempHigh: 1000,
|
||||||
|
hidden: true,
|
||||||
|
tempLow: -200,
|
||||||
|
stateLow: "powder",
|
||||||
|
}
|
||||||
|
elements.slow_powder = {
|
||||||
|
color: "#c9445c",
|
||||||
|
behavior:[
|
||||||
|
"XX|XX|XX",
|
||||||
|
"XX|XX|XX",
|
||||||
|
"M2%20|M1%20|M2%20",
|
||||||
|
],
|
||||||
|
category: "more_powders",
|
||||||
|
state: "solid",
|
||||||
|
stateHigh: "smoke",
|
||||||
|
tempHigh: 2000,
|
||||||
|
reactions: {
|
||||||
|
"gas_powder": { elem1: null, elem2: "slow_gas_powder" },
|
||||||
|
"up_powder": { elem1: null, elem2: "slow_up_powder" },
|
||||||
|
},
|
||||||
|
tempLow: -200,
|
||||||
|
stateLow: "powder",
|
||||||
|
}
|
||||||
|
elements.slow_gas_powder = {
|
||||||
|
color: "#c069aa",
|
||||||
|
behavior:[
|
||||||
|
"XX|XX|XX",
|
||||||
|
"XX|XX|XX",
|
||||||
|
"M2%20|M1%20|M2%20",
|
||||||
|
],
|
||||||
|
category: "more_powders",
|
||||||
|
state: "gas",
|
||||||
|
stateHigh: "gas_powder",
|
||||||
|
tempHigh: 1000,
|
||||||
|
hidden: true,
|
||||||
|
tempLow: -200,
|
||||||
|
stateLow: "powder",
|
||||||
|
}
|
||||||
|
elements.slow_up_powder = {
|
||||||
|
color:["#aba18a", "#a4aa8a"],
|
||||||
|
behavior:[
|
||||||
|
"M2%20|M1%20|M2%20",
|
||||||
|
"XX|XX|XX",
|
||||||
|
"XX|XX|XX",
|
||||||
|
],
|
||||||
|
category: "more_powders",
|
||||||
|
state: "solid",
|
||||||
|
stateHigh: "up_powder",
|
||||||
|
tempHigh: 1000,
|
||||||
|
hidden: true,
|
||||||
|
reactions: {
|
||||||
|
"slow_powder": { elem1: null, elem2: "slower_up_powder" },
|
||||||
|
},
|
||||||
|
tempLow: -200,
|
||||||
|
stateLow: "powder",
|
||||||
|
}
|
||||||
|
elements.slower_up_powder = {
|
||||||
|
color: ["#b5827b", "#b59e7b"],
|
||||||
|
behavior:[
|
||||||
|
"M2%10|M1%10|M2%10",
|
||||||
|
"XX|XX|XX",
|
||||||
|
"XX|XX|XX",
|
||||||
|
],
|
||||||
|
category: "more_powders",
|
||||||
|
state: "solid",
|
||||||
|
stateHigh: "up_powder",
|
||||||
|
tempHigh: 1000,
|
||||||
|
hidden: true,
|
||||||
|
tempLow: -200,
|
||||||
|
stateLow: "powder",
|
||||||
|
}
|
||||||
|
elements.sticky_powder = {
|
||||||
|
color: ["#badd96", "#96dd96"],
|
||||||
|
behavior:[
|
||||||
|
"ST|ST|ST",
|
||||||
|
"ST|XX|ST",
|
||||||
|
"ST AND M2|ST AND M1|ST AND M2",
|
||||||
|
],
|
||||||
|
category: "more_powders",
|
||||||
|
state: "solid",
|
||||||
|
hidden: true,
|
||||||
|
tempLow: -200,
|
||||||
|
stateLow: "powder",
|
||||||
|
}
|
||||||
|
elements.foam_powder = {
|
||||||
|
color: ["#e0be8b", "#ffffff"],
|
||||||
|
behavior: behaviors.FOAM,
|
||||||
|
category: "more_powders",
|
||||||
|
state: "gas",
|
||||||
|
tempLow: -200,
|
||||||
|
stateLow: "frozen_foam_powder",
|
||||||
|
hidden: true
|
||||||
|
}
|
||||||
|
elements.frozen_foam_powder = {
|
||||||
|
color: ["#c0eded", "#a7cfba"],
|
||||||
|
behavior: behaviors.POWDER,
|
||||||
|
category: "more_powders",
|
||||||
|
state: "gas",
|
||||||
|
tempHigh: 1000,
|
||||||
|
stateHigh: "foam_powder",
|
||||||
|
hidden: true
|
||||||
|
}
|
||||||
|
elements.electric_powder = {
|
||||||
|
color: ["#eae463", "#f9fc45"],
|
||||||
|
behavior: [
|
||||||
|
"SH|SH|SH",
|
||||||
|
"SH|XX|SH",
|
||||||
|
"SH AND M2|SH AND M1|SH AND M2",
|
||||||
|
],
|
||||||
|
category: "more_powders",
|
||||||
|
state: "solid",
|
||||||
|
reactions: {
|
||||||
|
},
|
||||||
|
stateHigh: "smoke",
|
||||||
|
tempHigh: 500,
|
||||||
|
tempLow: -1000,
|
||||||
|
stateLow: "powder",
|
||||||
|
hidden: true
|
||||||
|
}
|
||||||
|
elements.hot_powder = {
|
||||||
|
color: ["#8a3b87", "#d43a3a", "#d43a3a"],
|
||||||
|
behavior:[
|
||||||
|
"HT|HT|HT",
|
||||||
|
"HT|XX|HT",
|
||||||
|
"HT AND M2|HT AND M1|HT AND M2",
|
||||||
|
],
|
||||||
|
category: "more_powders",
|
||||||
|
state: "solid",
|
||||||
|
tempLow: -200,
|
||||||
|
stateLow: "cold_powder",
|
||||||
|
temp: 200,
|
||||||
|
hidden: true
|
||||||
|
}
|
||||||
|
elements.cold_powder = {
|
||||||
|
color: ["#8a3b87", "#3f3cd4", "#3f3cd4"],
|
||||||
|
behavior:[
|
||||||
|
"CO|CO|CO",
|
||||||
|
"CO|XX|CO",
|
||||||
|
"CO AND M2|CO AND M1|CO AND M2",
|
||||||
|
],
|
||||||
|
category: "more_powders",
|
||||||
|
state: "solid",
|
||||||
|
tempHigh: 400,
|
||||||
|
stateHigh: "hot_powder",
|
||||||
|
temp: -200,
|
||||||
|
hidden: true
|
||||||
|
}
|
||||||
|
elements.void_powder = {
|
||||||
|
color: "#303031",
|
||||||
|
category: "more_powders",
|
||||||
|
state: "solid",
|
||||||
|
hidden: true,
|
||||||
|
behavior: [
|
||||||
|
"DL|DL|DL",
|
||||||
|
"DL|XX|DL",
|
||||||
|
"DL AND M2|DL AND M1|DL AND M2",
|
||||||
|
]
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,138 @@
|
||||||
|
elements.power_core = {
|
||||||
|
color: ["#10F7F3", "#5AEDEB", "#BDFCFB"],
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
temp: 250,
|
||||||
|
category: "special",
|
||||||
|
stateHigh: "n_explosion",
|
||||||
|
tempHigh: 9500,
|
||||||
|
state: "solid",
|
||||||
|
desc: "The power core for your spaceship! Make sure it doesnt reach 9500 degrees!" ,
|
||||||
|
tick: function(pixel) {
|
||||||
|
const elementToCheck = "core_casing";
|
||||||
|
let isValid = true;
|
||||||
|
for (let i = pixel.x - 4; i < pixel.x + 4; i++) {
|
||||||
|
for (let j = pixel.y - 4; j < pixel.y + 4; j++) {
|
||||||
|
if (Math.abs(pixel.x - i) === 4 || Math.abs(pixel.y - j) === 4) {isValid &= pixelMap[i][j]?.element === elementToCheck;}
|
||||||
|
else if (i !== pixel.x && j !== pixel.y) isValid &= isEmpty(i, j);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if (!pixel.alerted) {
|
||||||
|
// if (isValid) { alert("Power Core succesfully stored") }
|
||||||
|
// else { alert("Invalid core! Make sure its a 9x9 hollow box with the pixel in the middle!"); }
|
||||||
|
// pixel.alerted = true;
|
||||||
|
// } Not finished Yet
|
||||||
|
if (pixel.temp === 5000) { pixel.color = pixelColorPick(pixel,"#F92810");}
|
||||||
|
else if ( pixel.temp < 2000) { pixel.color = pixelColorPick(pixel,"#F9B610");}
|
||||||
|
else { pixel.color = pixelColorPick(pixel,"#5AEDEB");}
|
||||||
|
if (isValid) { if (pixelMap[pixel.x][pixel.y-4].element === "core_casing")
|
||||||
|
{createPixel("core_energizer", pixel.x, pixel.y-5);}}
|
||||||
|
else {{createPixel("core_energizer", pixel.x, pixel.y-4);}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
elements.thrusters = {
|
||||||
|
color: ["#8D8D8C", "#666666"],
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
category: "special",
|
||||||
|
behaviorOn: [
|
||||||
|
"XX|XX|XX",
|
||||||
|
"XX|XX|CR:fire",
|
||||||
|
"XX|XX|XX",
|
||||||
|
],
|
||||||
|
state: "solid",
|
||||||
|
desc: "Use this to drive your ship! (Cosmetic)",
|
||||||
|
conduct:1,
|
||||||
|
};
|
||||||
|
elements.core_wall = {
|
||||||
|
color: ["#6EB5F1", "#708494"],
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
hardness: 1,
|
||||||
|
density: 90000000,
|
||||||
|
desc: "Harder than anything in the world!",
|
||||||
|
category: "special",
|
||||||
|
};
|
||||||
|
elements.space_blaster = {
|
||||||
|
color: ["#10F7F3", "#5AEDEB", "#BDFCFB"],
|
||||||
|
tick: function(pixel) {
|
||||||
|
for (var i = 0; i < 3; i++) {
|
||||||
|
var skip = false;
|
||||||
|
if (!isEmpty(pixel.x,pixel.y-1,true)) {
|
||||||
|
var p = pixelMap[pixel.x][pixel.y-1];
|
||||||
|
if (p.element === "space_blaster") { skip = true; }
|
||||||
|
if (Math.random() < 0.9 && elements[p.element].hardness !== 1) {
|
||||||
|
deletePixel(p.x,p.y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!tryMove(pixel,pixel.x-1,pixel.y,["flash","heat_ray","electric"]) && !skip) {
|
||||||
|
explodeAt(pixel.x,pixel.y,30,"plasma");
|
||||||
|
var coords = circleCoords(pixel.x,pixel.y,15);
|
||||||
|
coords.forEach(function(coord) {
|
||||||
|
var x = coord.x;
|
||||||
|
var y = coord.y;
|
||||||
|
if (!isEmpty(x,y,true)) {
|
||||||
|
pixelMap[x][y].temp += 10000;
|
||||||
|
pixelTempCheck(pixelMap[x][y]);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
deletePixel(pixel.x,pixel.y);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
category: "energy",
|
||||||
|
state: "solid",
|
||||||
|
density: 100000000,
|
||||||
|
temp: 10000,
|
||||||
|
hardness: 1,
|
||||||
|
maxSize: 3,
|
||||||
|
cooldown: defaultCooldown,
|
||||||
|
excludeRandom: true,
|
||||||
|
desc: "A energized blaster pixel",
|
||||||
|
};
|
||||||
|
elements.space_gunner_LEFT = {
|
||||||
|
color: ["#708494", "#5A6873"],
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
category: "special",
|
||||||
|
behaviorOn: [
|
||||||
|
"XX|XX|XX",
|
||||||
|
"CR:space_blaster|XX|XX",
|
||||||
|
"XX|XX|XX",
|
||||||
|
],
|
||||||
|
state: "solid",
|
||||||
|
desc: "Use this to shoot your enemies! (Shoots Left)",
|
||||||
|
conduct:1,
|
||||||
|
};
|
||||||
|
elements.space_gunner_RIGHT = {
|
||||||
|
color: ["#708494", "#5A6873"],
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
category: "special",
|
||||||
|
behaviorOn: [
|
||||||
|
"XX|XX|XX",
|
||||||
|
"XX|XX|CR:space_blaster",
|
||||||
|
"XX|XX|XX",
|
||||||
|
],
|
||||||
|
state: "solid",
|
||||||
|
desc: "Use this to shoot your enemies! (Shoots Right)",
|
||||||
|
conduct:1,
|
||||||
|
};
|
||||||
|
elements.core_energizer = {
|
||||||
|
color: "#FFFB00",
|
||||||
|
hidden: true,
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
state: "solid",
|
||||||
|
tick: function(pixel) {
|
||||||
|
createPixel("radiation", pixel.x, pixel.y+1)
|
||||||
|
},
|
||||||
|
};
|
||||||
|
elements.core_casing = {
|
||||||
|
color: ["#4A7375","#C1D875","#8BFCF3"],
|
||||||
|
reactions: {
|
||||||
|
"radiation": { elem2:"electric", temp1:200 }
|
||||||
|
},
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
category: "special",
|
||||||
|
density: 2710,
|
||||||
|
conduct: 0.73,
|
||||||
|
hardness: 1,
|
||||||
|
desc: "Casing for the inner core!",
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue