Merge branch 'R74nCom:main' into main
This commit is contained in:
commit
12e6477203
10
index.html
10
index.html
|
|
@ -16244,7 +16244,7 @@ Cancer, Landmine, Grenade, Smoke Grenade">?</span> <input type="button" value="O
|
|||
</optgroup>
|
||||
</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?subject=%5BSandboxels%5D">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>
|
||||
<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">
|
||||
<input type="email" placeholder="Type your email..." name="email" style="padding:15px"><input type="submit" value="Subscribe" style="background: rgb(23, 166, 255); padding:15px; border-radius: 20px"></input>
|
||||
|
|
@ -16259,10 +16259,10 @@ Cancer, Landmine, Grenade, Smoke Grenade">?</span> <input type="button" value="O
|
|||
border: white solid 2px;
|
||||
}
|
||||
</style>
|
||||
<!-- <iframe id="newsletteriframe" width="450" height="250" style="border:1px solid #EEE; background:black; max-width:90%" frameborder="0" scrolling="no"></iframe>
|
||||
<!-- <iframe id="newsletteriframe" width="450" height="250" style="border:1px solid #EEE; background:black; max-width:90%" frameborder="0" scrolling="no"></iframe> -->
|
||||
<script>
|
||||
window.addEventListener('load', function() {
|
||||
document.getElementById("newsletteriframe").src = "https://news.r74n.com/embed";
|
||||
// document.getElementById("newsletteriframe").src = "https://news.r74n.com/embed";
|
||||
var langSelect = document.getElementById("langSelect");
|
||||
if (langCode) { langSelect.value = langCode }
|
||||
else if (settings.lang) { langSelect.value = settings.lang }
|
||||
|
|
@ -16271,7 +16271,7 @@ Cancer, Landmine, Grenade, Smoke Grenade">?</span> <input type="button" value="O
|
|||
document.getElementById("langCredit").style.display = "block";
|
||||
}
|
||||
})
|
||||
</script> -->
|
||||
</script>
|
||||
<p>Support development by subscribing on <a href="https://www.patreon.com/R74n" rel="me" target="_blank">our Patreon</a>! Many benefits!!</p>
|
||||
</div>
|
||||
|
||||
|
|
@ -16285,7 +16285,7 @@ Cancer, Landmine, Grenade, Smoke Grenade">?</span> <input type="button" value="O
|
|||
<p>Sandboxels has many <a href="https://sandboxels.R74n.com/education-use"></a>applications in education</a>. With a hands-on experience, it can give students an understanding of emerging phenomena in many fields, such as biology, chemistry, ecology, geology, cooking, and even virology. There are countless aspects to discover.</p>
|
||||
<p>We have a thriving community on <a href="https://discord.gg/ejUc6YPQuS" target="_blank">Discord</a>! There you can post feedback or share your creations.</p>
|
||||
<!-- <p>If you'd like to support us, consider donating on <a href="https://www.paypal.com/donate/?hosted_button_id=GCX4VHQ7SZWTN" target="_blank">PayPal</a> or <a href="https://cash.app/$emojiartist" target="_blank" title="$emojiartist">CashApp</a>, or subscribing on Discord.</p> -->
|
||||
<p>Business inquiries? Education stories? Help needed? Email us at <a href="mailto:contact@r74n.com">contact@R74n.com</a>!</p>
|
||||
<p>Business inquiries? Education stories? Help needed? Email us at <a href="mailto:contact@R74n.com?subject=%5BSandboxels%5D">contact@R74n.com</a>!</p>
|
||||
<p>More links: <a href="https://sandboxels.R74n.com/help" rel="help">Help</a> • <a href="https://sandboxels.R74n.com/tips">Tips</a> • <a href="https://sandboxels.R74n.com/mod-list">Mods</a> • <a href="https://sandboxels.R74n.com/mobile-use">Mobile</a> • <a href="https://sandboxels.R74n.com/offline-use">Offline</a> • <a href="https://R74n.com/privacy">Privacy</a></p>
|
||||
<p>Thanks to: Serioustar, ggod, Midi_png, personman, fnl4y, PitsPower, swagg boi, kaeud, WeiChei, Trent, u2ce</p>
|
||||
<p style="display:none" id="langCredit">Translation by R74n</p>
|
||||
|
|
|
|||
|
|
@ -151,12 +151,13 @@
|
|||
<tr><td>save_loading.js</td><td>Adds the ability to save and load scenes from files (See the info page of the element)</td><td>Alice</td></tr>
|
||||
<tr><td>selective_paint.js</td><td>Adds a tool to paint only selected elements</td><td>SquareScreamYT</td></tr>
|
||||
<tr><td>stripe_paint.js</td><td>Adds a tool to paint with stripes</td><td>Alice</td></tr>
|
||||
<tr><td>texturepack.js</td><td>Adds tools that let you create and share custom texture packs</td><td>nousernamefound</td></tr>
|
||||
<tr><td>the_ground.js</td><td>Adds several rock types, worldgen settings, and gemstones</td><td>Alice</td></tr>
|
||||
|
||||
<!----><tr><td class="modCat" colspan="3">Science & Chemistry</td></tr><!---->
|
||||
<tr><td>alcohol.js</td><td>Adds methanol, (iso-)propanol, and butanol</td><td>Alice</td></tr>
|
||||
<tr><td>alkahest.js</td><td>Adds the alkahest, a liquid which dissolves anything</td><td>Alice</td></tr>
|
||||
<tr><td>aScientistsWish.js</td><td>Adds things that related to science, especially radiation</td><td>Carbon Monoxide, CPU</td></tr>
|
||||
<tr><td>aScientistsWish.js</td><td>Adds things that related to science, especially radiation</td><td>Carbon Monoxide, salmonfishy</td></tr>
|
||||
<tr><td>bettermetalscrap.js</td><td>Allows metal scrap to be melted back into its original material</td><td>nousernamefound</td></tr>
|
||||
<tr><td>bigger_star_spawners.js</td><td>Adds spawners for larger stars</td><td>Alice</td></tr>
|
||||
<tr><td>bioooze_and_pyrogens.js</td><td>Adds Bio-Ooze from <a herf="https://frackinuniverse.miraheze.org/wiki/Main_Page">Frackin’ Universe</a> and several heat-producing materials from various games’ mods</td><td>Alice</td></tr>
|
||||
|
|
@ -225,18 +226,18 @@
|
|||
<!----><tr><td class="modCat" colspan="3">Food & Cooking</td></tr><!---->
|
||||
<tr><td>aChefsDream.js</td><td>Adds more foods, animals, tools and many other cooking related items. Updates can be found in <a href="https://www.youtube.com/watch?v=pQFTtlNPODQ&list=PLWHqGb75vC8o7CLv-pMoVb56JL9BY9F0t">this YouTube Playlist</a></td><td>SquareScreamYT</td></tr>
|
||||
<tr><td>aChefsDream_beta.js</td><td>Beta testing for aChefsDream. The code can be found <a href="https://www.github.com/SquareScreamYT/aChefsDream.js">on GitHub</a></td><td>SquareScreamYT</td></tr>
|
||||
<tr><td>bananas.js</td><td>Adds bananas and banana plants</td><td>Alice</td></tr>
|
||||
<tr><td>bananas.js</td><td>Adds bananas and banana plants</td><td>Alice</td></tr>'
|
||||
<tr><td>CherrySoda.js</td><td>Adds materials to make Cherry soda. Benzaldehyde + seltzer = Cherrysoda.</td><td>guzzo86</td></tr>
|
||||
<tr><td>community_desserts.js</td><td>Adds various desserts from community suggestions</td><td>Tisquares</td></tr>
|
||||
<tr><td>greenitemsandmore.js</td><td>Adds various green things, including apples and more food</td><td>zonneschijn7</td>
|
||||
<tr><td>ketchup_mod.js</td><td>Adds a bunch of ketchup related stuff, plus a few other condiments</td><td>Nubo318 (main dev), Devi, Alice (contributors)</td></tr>
|
||||
<tr><td>lemonade.js</td><td>Adds lemons and lemonade</td><td>personman / baconthemyth</td></tr>
|
||||
<tr><td>morefoodsmod.js</td><td>Adds more foods</td><td>Clide4</td></tr>
|
||||
<tr><td>pizzasstuff.js</td><td>New animals, foods, and plants</td><td>_ilikepizza_</td></tr>
|
||||
<tr><td>potato_chips.js</td><td>Potato chips.</td><td>guzzo86</td></tr>
|
||||
<tr><td>sbstuff.js</td><td>Adds many foods</td><td>stefanblox</td></tr>
|
||||
<tr><td>soups.js</td><td>Adds seasoning and soup</td><td>pixelegend4</td></tr>
|
||||
<tr><td>weAllScreamFor.js</td><td>Adds ice cream toppings</td><td>rottenEgghead</td></tr>
|
||||
<tr><td>CherrySoda.js</td><td>Adds materials to make Cherry soda. Benzaldehyde + seltzer = Cherrysoda.</td><td>guzzo86</td></tr>
|
||||
<tr><td>GrapeSoda.js</td><td>Adds materials to make Grape soda. Methylanthranilate + seltzer = Grapesoda.</td><td>guzzo86</td></tr>
|
||||
|
||||
<!----><tr><td class="modCat" colspan="3">Life & Nature</td></tr><!---->
|
||||
<tr><td>advanced_colonies.js</td><td>Adds davlers, creatures with complex colonies</td><td>DaviStudios</td></tr>
|
||||
|
|
|
|||
|
|
@ -74,6 +74,14 @@ if (Math.abs(settings.randomcount) == settings.randomcount){
|
|||
}else(elements["element_"+i].desc += (" or " + reaction))
|
||||
}
|
||||
}
|
||||
for (var reaction in elements["element_" + i].reactions){
|
||||
if (elements[elements["element_"+i].reactions[reaction].elem1].category == "tools" || elements[elements["element_"+i].reactions[reaction].elem2].category == "tools"){
|
||||
console.log(i + " makes a tool...? when it touches " + reaction)
|
||||
if (!elements["element_"+i].desc){
|
||||
elements["element_" + i].desc = "This breaks the laws of physics if it touches " + reaction
|
||||
}else(elements["element_"+i].desc += (" or " + reaction))
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (var i = 1; i <= settings.randomcount; i++){
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ elements.cherrysoda_gas = {
|
|||
temp: 169,
|
||||
}
|
||||
elements.cherrysoda_ice = {
|
||||
color: "BF4F9C",
|
||||
color: "#BF4F9C",
|
||||
behavior: behaviors.wALL,
|
||||
category: "solids",
|
||||
state: "solid",
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ elements.anthranilicacid = {
|
|||
tempLow: -98,
|
||||
burn: 100,
|
||||
burnTime: 100,
|
||||
burnInto: "carbondioxide"
|
||||
}
|
||||
|
||||
elements.methanolice = {
|
||||
|
|
@ -68,6 +67,8 @@ elements.anthranilicacid = {
|
|||
stateLow: "methanol",
|
||||
tempLow: 64,
|
||||
temp: 84,
|
||||
burn: 100,
|
||||
burnTime: 100,
|
||||
}
|
||||
elements.methylanthranilate = {
|
||||
color: "#FFFBBA",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,58 @@
|
|||
elements.cash = {
|
||||
color: "#00e600",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "powders",
|
||||
};
|
||||
|
||||
delete elements.paper;
|
||||
delete elements.sponge;
|
||||
|
||||
elements.sponge = {
|
||||
color: "#ffff1a",
|
||||
behavior: behaviors.SOLID,
|
||||
category: "solids",
|
||||
tool: function(pixel) {
|
||||
if (pixel.element == "water") {
|
||||
pixel.element = "wet_sponge"
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
elements.wet_sponge = {
|
||||
color: "#cccc00",
|
||||
behavior: behaviors.SOLID,
|
||||
category: "solids",
|
||||
};
|
||||
|
||||
|
||||
elements.paper = {
|
||||
color: "#ffffff",
|
||||
behavior: behaviors.SOLID,
|
||||
category: "solids",
|
||||
};
|
||||
|
||||
elements.shredded_paper = {
|
||||
color: "#ffffff",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "powders",
|
||||
};
|
||||
|
||||
elements.shredded_cash = {
|
||||
color: "#004d00",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "powders",
|
||||
};
|
||||
|
||||
elements.shredder = {
|
||||
color: "#08b508",
|
||||
behavior: behaviors.SOLID,
|
||||
tool: function(pixel) {
|
||||
if (pixel.element == "cash") {
|
||||
pixel.element = "shredded_cash"
|
||||
},
|
||||
if (pixel.element == "paper") {
|
||||
pixel.element = "shredded_money"
|
||||
}
|
||||
},
|
||||
category: "tools",
|
||||
};
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
elements.led = {
|
||||
behavior: behaviors.WALL,
|
||||
reactions: {
|
||||
"light": {"charge1":1},
|
||||
"liquid_light": {"charge1":1},
|
||||
},
|
||||
color: "#666666",
|
||||
colorOn: "#ffffff",
|
||||
category: "machines",
|
||||
tempHigh: 1500,
|
||||
stateHigh: ["molten_glass","molten_glass","molten_glass","molten_gallium"],
|
||||
conduct: 1,
|
||||
breakInto: "glass_shard",
|
||||
tick: (pixel) => {
|
||||
if (pixel.start == pixelTicks) {
|
||||
pixel.normalColor = pixel.color;
|
||||
pixel.chargeColor = `rgb(${pixel.color.replace(/[rgb\(\)]/g, "").split(",").map(a => parseInt(a.trim()) + 120).join(", ")})`;
|
||||
}
|
||||
if (pixel.color != pixel.normalColor && !pixel.charge && !pixel.chargeCD) {
|
||||
pixel.normalColor = pixel.color;
|
||||
pixel.chargeColor = `rgb(${pixel.color.replace(/[rgb\(\)]/g, "").split(",").map(a => parseInt(a.trim()) + 120).join(", ")})`;
|
||||
}
|
||||
if (pixel.charge) {
|
||||
pixel.color = pixel.chargeColor;
|
||||
} else {
|
||||
pixel.color = pixel.normalColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pixelColorPick = (function() {
|
||||
const oldPixelColorPick = pixelColorPick;
|
||||
|
||||
return function(pixel, customColor = null) {
|
||||
if (pixel.element == "led" && pixel.color && !customColor) return pixel.color;
|
||||
return oldPixelColorPick.apply(this, arguments);
|
||||
}
|
||||
})()
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
elements.colored_light_bulb = {
|
||||
color: "#666666",
|
||||
colorOn: "#ffffff",
|
||||
behavior: behaviors.WALL,
|
||||
category: "machines",
|
||||
tempHigh: 1500,
|
||||
stateHigh: ["molten_glass","molten_glass","molten_copper"],
|
||||
conduct: 1,
|
||||
breakInto: "glass_shard",
|
||||
tick: function(pixel) {
|
||||
if (pixel.start == pixelTicks) {
|
||||
pixel.normalColor = pixel.color;
|
||||
pixel.chargeColor = `rgb(${pixel.color.replace(/[rgb\(\)]/g, "").split(",").map(a => parseInt(a.trim()) + 150).join(", ")})`;
|
||||
}
|
||||
if (pixel.color != pixel.normalColor && !pixel.charge && !pixel.chargeCD) {
|
||||
pixel.normalColor = pixel.color;
|
||||
pixel.chargeColor = `rgb(${pixel.color.replace(/[rgb\(\)]/g, "").split(",").map(a => parseInt(a.trim()) + 150).join(", ")})`;
|
||||
}
|
||||
if (pixel.charge) {
|
||||
pixel.color = pixel.chargeColor;
|
||||
} else {
|
||||
pixel.color = pixel.normalColor;
|
||||
}
|
||||
if (pixel.charge > 0) {
|
||||
for (let i = 0; i < adjacentCoords.length; i++){
|
||||
let coord = adjacentCoords[i]
|
||||
let x = coord[0]+pixel.x
|
||||
let y = coord[1]+pixel.y
|
||||
if (isEmpty(x, y)){
|
||||
//do crap to the pixel
|
||||
createPixel("light", x, y,),
|
||||
pixelMap[x][y].color = pixel.chargeColor
|
||||
}
|
||||
}
|
||||
}}
|
||||
}
|
||||
pixelColorPick = (function() {
|
||||
const oldPixelColorPick = pixelColorPick;
|
||||
|
||||
return function(pixel, customColor = null) {
|
||||
if (pixel.element == "colored_light_bulb" && pixel.color && !customColor) return pixel.color;
|
||||
return oldPixelColorPick.apply(this, arguments);
|
||||
}
|
||||
})()
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
var ct = 100
|
||||
|
||||
elements.customtemp = {
|
||||
color: ["#FF0000", "#FF6600", "#FFCC00", "#FFFF00", "#CCFF00", "#66FF00", "#00FF00", "#00FF66", "#00FFCC", "#00FFFF"],
|
||||
onSelect: function() {
|
||||
var answer4 = parseInt(prompt("Please input the desired temperature to reach.",(ct||undefined)));
|
||||
if (!answer4) { return }
|
||||
ct = answer4;
|
||||
if (isNaN(answer4)) {
|
||||
ct = 100
|
||||
}
|
||||
},
|
||||
tool: function(pixel) {
|
||||
pixel.temp = ct,
|
||||
pixelTempCheck(pixel)
|
||||
},
|
||||
category: "tools",
|
||||
};
|
||||
elements.customheat = {
|
||||
color: ["#FF0000", "#FFFFFF", "#FF0000"],
|
||||
onSelect: function() {
|
||||
var answer4 = parseInt(prompt("Please input the desired temperature increase per tick. (In celsius)",(ct||undefined)));
|
||||
if (!answer4) { return }
|
||||
ct = answer4;
|
||||
if (isNaN(answer4)) {
|
||||
ct = 100
|
||||
}
|
||||
},
|
||||
tool: function(pixel) {
|
||||
pixel.temp = pixel.temp + ct,
|
||||
pixelTempCheck(pixel)
|
||||
},
|
||||
category: "tools",
|
||||
};
|
||||
elements.customcool = {
|
||||
color: ["#0000FF", "#FFFFFF", "#0000FF"],
|
||||
onSelect: function() {
|
||||
var answer4 = parseInt(prompt("Please input the desired temperature decrease per tick. (In celsius)",(ct||undefined)));
|
||||
if (!answer4) { return }
|
||||
ct = answer4;
|
||||
if (isNaN(answer4)) {
|
||||
ct = 100
|
||||
}
|
||||
},
|
||||
tool: function(pixel) {
|
||||
pixel.temp = pixel.temp - ct,
|
||||
pixelTempCheck(pixel)
|
||||
},
|
||||
category: "tools",
|
||||
};
|
||||
|
|
@ -3,7 +3,7 @@ function weightedAverage(num1, num2, weight){
|
|||
}
|
||||
const heatfunc = function(pixel){
|
||||
if (pixel.element != "metal_scrap" || eLists.metals.includes(pixel.scrapType) || !pixel.scrapType){{
|
||||
if (pixel.ogR == null || pixel.ogG == null || pixel.ogB == null || (pixel.element != pixel.ogElement && pixel.element == "metal_scrap") || (pixel.element != "metal_scrap" && pixel.ogElement == "metal_scrap")){
|
||||
if (pixel.ogR == null || pixel.ogG == null || pixel.ogB == null || (pixel.element != pixel.ogElement && pixel.element == "metal_scrap") || (pixel.element != "metal_scrap" && pixel.ogElement == "metal_scrap") || (pixel.element == "oxidized_copper" && pixel.ogElement == "copper")){
|
||||
pixel.ogR = parseInt(pixel.color.slice(4, pixel.color.indexOf(',')), 10)
|
||||
pixel.ogG = parseInt(pixel.color.slice(pixel.color.indexOf(',') + 1, pixel.color.lastIndexOf(',')), 10)
|
||||
pixel.ogB = parseInt(pixel.color.slice(pixel.color.lastIndexOf(',') + 1, -1), 10)
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ elements.potato_chip = {
|
|||
density: 1350,
|
||||
color: ["#F7DD93", "#D8A44B"],
|
||||
category: "food",
|
||||
desc: "Potato chip. Turns potato next to it into potato chip if temp is >= 104.",
|
||||
desc: "Potato chip. Turns potato next to it into potato chip if temp is >= 104 - 180.",
|
||||
|
||||
tick: function(pixel) {
|
||||
if(pixelTicks - pixel.start >= 15) {
|
||||
if(pixelTicks - pixel.start >= 10) {
|
||||
if (!isEmpty(pixel.x, pixel.y - 1, true)) {
|
||||
if (pixel.temp >= 104 && pixelMap[pixel.x][pixel.y - 1].element === "potato") {
|
||||
changePixel(pixelMap[pixel.x][pixel.y - 1], "potato_chip");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,94 @@
|
|||
if (!settings.texturepack){
|
||||
settings.texturepack = {}
|
||||
saveSettings()
|
||||
}
|
||||
elements.clear_textures = {
|
||||
color: "#dd0000",
|
||||
onSelect: function(){
|
||||
var sure = prompt("Are you sure you wanna reset all texture data? Type \"yes\". Also, refresh once you've done this for the changes to apply!", "no");
|
||||
if (sure == "yes"){
|
||||
settings.texturepack = {}
|
||||
saveSettings()
|
||||
}
|
||||
},
|
||||
canPlace: false,
|
||||
category: "texture tools"
|
||||
}
|
||||
var addSave = null
|
||||
elements.add_texture = {
|
||||
color: elements.rainbow.color,
|
||||
category: "texture tools",
|
||||
canPlace: false,
|
||||
onSelect: function(){
|
||||
var whoelement = prompt("What element would you like to change the texture of? Type no if this was a mistake.", (addSave||"no"))
|
||||
if (whoelement != "no"){
|
||||
addSave = whoelement
|
||||
var replacehm = prompt("Would you like to overwrite all textures or add? 1 for overwrite, 2 for add.", 2)
|
||||
var colortodo = prompt("Hex code, please! Also, refresh once you've done this for the changes to apply!", "#ff0000")
|
||||
if (replacehm == 1){
|
||||
if (!replacehm || !colortodo){return}
|
||||
if (!settings.texturepack[whoelement]){settings.texturepack[whoelement] = []}
|
||||
settings.texturepack[whoelement] = [colortodo]
|
||||
elements[whoelement].color = settings.texturepack[whoelement]
|
||||
saveSettings()
|
||||
} else {
|
||||
if (!replacehm || !colortodo){return}
|
||||
if (!settings.texturepack[whoelement]){settings.texturepack[whoelement] = []}
|
||||
settings.texturepack[whoelement].push(colortodo)
|
||||
elements[whoelement].color = settings.texturepack[whoelement]
|
||||
saveSettings()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
elements.remove_a_texture = {
|
||||
color: elements.void.color,
|
||||
category: "texture tools",
|
||||
canPlace: false,
|
||||
onSelect: function(){
|
||||
var whoelement = prompt("What element would you like to change the texture of? Type no if this was a mistake.", "no")
|
||||
if (whoelement != "no"){
|
||||
var replacehm = prompt("Would you like to delete all textures of the element or just one? Type 1 for all, 2 for just one.", 2)
|
||||
var colortodo = prompt(("Ignore this if you chose 1. Index of the color you wanna delete. For reference, here are the current colors:" + settings.texturepack[whoelement]), 0)
|
||||
if (replacehm == 1){
|
||||
delete settings.texturepack[whoelement]
|
||||
saveSettings()
|
||||
} else {
|
||||
delete settings.texturepack[whoelement][colortodo]
|
||||
elements[whoelement].color = settings.texturepack[whoelement]
|
||||
saveSettings()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
elements.list_all_textures = {
|
||||
color: elements.mix.color,
|
||||
category: "texture tools",
|
||||
canPlace: false,
|
||||
onSelect: function(){
|
||||
var whoelement = prompt("What element would you like to see the textures of?")
|
||||
alert(whoelement + " has the following textures: " + settings.texturepack[whoelement])
|
||||
}
|
||||
}
|
||||
elements.texture_pack_share_or_load = {
|
||||
color: elements.image.color,
|
||||
category: "texture tools",
|
||||
canPlace: false,
|
||||
onSelect: function(){
|
||||
var whichSL = prompt("Would you like to copy the texture pack to your clipboard or load it from your clipboard? Type 1 for copy, 2 for load.", 1)
|
||||
if (whichSL == 1){
|
||||
var text = JSON.stringify(settings.texturepack)
|
||||
alert(text)
|
||||
} else {
|
||||
var text = prompt("Paste your texture pack here. It should be in the format of a JSON object.")
|
||||
if (text){
|
||||
settings.texturepack = JSON.parse(text)
|
||||
saveSettings()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (settings.texturepack){
|
||||
for (var elementi in settings.texturepack){
|
||||
elements[elementi].color = settings.texturepack[elementi]
|
||||
}}
|
||||
Loading…
Reference in New Issue