Merge branch 'main' of https://github.com/JustAGenericUsername/sandboxelsmodding
This commit is contained in:
commit
8bccdbc52c
73
index.html
73
index.html
|
|
@ -33,19 +33,19 @@
|
||||||
<meta property="og:description" content="Relax or experiment with over 500 materials in this falling sand simulator.">
|
<meta property="og:description" content="Relax or experiment with over 500 materials in this falling sand simulator.">
|
||||||
<meta property="og:url" content="https://sandboxels.r74n.com">
|
<meta property="og:url" content="https://sandboxels.r74n.com">
|
||||||
<meta property="og:site_name" content="Sandboxels">
|
<meta property="og:site_name" content="Sandboxels">
|
||||||
<meta property="og:image" content="https://sandboxels.r74n.com/icons/wallpaper.png">
|
<meta property="og:image" content="https://sandboxels.r74n.com/icons/cover-3840x1240px-text.png">
|
||||||
<meta property="og:image:width" content="1980">
|
<meta property="og:image:width" content="1980">
|
||||||
<meta property="og:image:height" content="971">
|
<meta property="og:image:height" content="971">
|
||||||
<meta property="og:image:type" content="image/png">
|
<meta property="og:image:type" content="image/png">
|
||||||
<meta property="og:image:alt" content="A rainforest made in Sandboxels">
|
<meta property="og:image:alt" content="Magma falling into Water, forming Steam and Basalt. Pixel art style.">
|
||||||
|
|
||||||
<!--Twitter-->
|
<!--Twitter-->
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
<meta name="twitter:description" content="Relax or experiment with over 500 materials in this falling sand simulator.">
|
<meta name="twitter:description" content="Relax or experiment with over 500 materials in this falling sand simulator.">
|
||||||
<meta name="twitter:title" content="Sandboxels - Experiment with Pixels">
|
<meta name="twitter:title" content="Sandboxels - Experiment with Pixels">
|
||||||
<meta name="twitter:site:id" content="1436857621827530753">
|
<meta name="twitter:site:id" content="1436857621827530753">
|
||||||
<meta name="twitter:image" content="https://sandboxels.r74n.com/icons/card.png">
|
<meta name="twitter:image" content="https://sandboxels.r74n.com/icons/cover-3840x1240px-text.png">
|
||||||
<meta name="twitter:image:alt" content="A rainforest made in Sandboxels">
|
<meta name="twitter:image:alt" content="Magma falling into Water, forming Steam and Basalt. Pixel art style.">
|
||||||
<meta name="twitter:creator:id" content="1436857621827530753">
|
<meta name="twitter:creator:id" content="1436857621827530753">
|
||||||
|
|
||||||
<script> // versioning info
|
<script> // versioning info
|
||||||
|
|
@ -16230,10 +16230,25 @@ behaviorRules = {
|
||||||
}
|
}
|
||||||
function resetPrompt() {
|
function resetPrompt() {
|
||||||
if (settings.resetwarning === 0 || currentPixels.length===0) { autoResizeCanvas(); focusGame(); return }
|
if (settings.resetwarning === 0 || currentPixels.length===0) { autoResizeCanvas(); focusGame(); return }
|
||||||
promptConfirm("Are you sure you want to clear the whole scene?",(r) => {
|
let pause = false;
|
||||||
|
if (promptState) { pause = promptState.wasPaused }
|
||||||
|
else if (paused) { pause = true }
|
||||||
|
promptState = {
|
||||||
|
text: "Are you sure you want to clear the whole scene?",
|
||||||
|
title: "Clear Canvas",
|
||||||
|
handler: (r) => {
|
||||||
if (r) autoResizeCanvas();
|
if (r) autoResizeCanvas();
|
||||||
focusGame();
|
focusGame();
|
||||||
},"Clear Canvas")
|
},
|
||||||
|
html: standalone ? null : `<br><br><p style="text-align:center"><input id="playlightButton" class="button" type="button" onclick="loadPlaylight();" value="Play More Games" style=""></input></p>`,
|
||||||
|
type: "confirm",
|
||||||
|
wasPaused: pause
|
||||||
|
}
|
||||||
|
showPromptScreen();
|
||||||
|
// promptConfirm("Are you sure you want to clear the whole scene?",(r) => {
|
||||||
|
// if (r) autoResizeCanvas();
|
||||||
|
// focusGame();
|
||||||
|
// },"Clear Canvas")
|
||||||
}
|
}
|
||||||
function tpsPrompt() {
|
function tpsPrompt() {
|
||||||
promptInput("Enter the new simulation Ticks Per Second (TPS) between 1 and 1000. This is how many updates per second the simulation will run.\n\nThe default is 30.\n\nThe current TPS is " + tps + ".",
|
promptInput("Enter the new simulation Ticks Per Second (TPS) between 1 and 1000. This is how many updates per second the simulation will run.\n\nThe default is 30.\n\nThe current TPS is " + tps + ".",
|
||||||
|
|
@ -17602,6 +17617,9 @@ for (var k = 0; k < b0.split(" AND ").length; k++) {
|
||||||
menuTitle.style.color = promptState.titleColor || "unset";
|
menuTitle.style.color = promptState.titleColor || "unset";
|
||||||
var promptMenuText = document.getElementById("promptMenuText");
|
var promptMenuText = document.getElementById("promptMenuText");
|
||||||
promptMenuText.innerText = promptState.text || "";
|
promptMenuText.innerText = promptState.text || "";
|
||||||
|
if (promptState.html) {
|
||||||
|
promptMenuText.insertAdjacentHTML("beforeend",promptState.html);
|
||||||
|
}
|
||||||
let promptOK = document.getElementById("promptOK");
|
let promptOK = document.getElementById("promptOK");
|
||||||
let promptCancel = document.getElementById("promptCancel");
|
let promptCancel = document.getElementById("promptCancel");
|
||||||
let promptConfirm = document.getElementById("promptConfirm");
|
let promptConfirm = document.getElementById("promptConfirm");
|
||||||
|
|
@ -19063,7 +19081,9 @@ Cancer, Landmine, Grenade, Smoke Grenade">?</span>
|
||||||
<option value="uk">Українська Мова</option>
|
<option value="uk">Українська Мова</option>
|
||||||
<option value="xem">😂🗣</option>
|
<option value="xem">😂🗣</option>
|
||||||
</optgroup>
|
</optgroup>
|
||||||
</select></p>
|
</select>
|
||||||
|
|
||||||
|
<input id="playlightButton" type="submit" onclick="loadPlaylight();" value="More Games" style="background: rgb(23, 166, 255); padding:15px; border-radius: 20px"></input></p>
|
||||||
<script>
|
<script>
|
||||||
if (standalone) { // move langSelect to Settings
|
if (standalone) { // move langSelect to Settings
|
||||||
let span = document.getElementById("setting-span-lang");
|
let span = document.getElementById("setting-span-lang");
|
||||||
|
|
@ -19071,12 +19091,51 @@ Cancer, Landmine, Grenade, Smoke Grenade">?</span>
|
||||||
span.style.display = "block";
|
span.style.display = "block";
|
||||||
document.getElementById("langSelectP").style.display = "none";
|
document.getElementById("langSelectP").style.display = "none";
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
/*R74n Observer
|
||||||
|
Don't worry, I'm harmless!*/
|
||||||
|
if (document.referrer && document.referrer.indexOf("r74n.") === -1) {
|
||||||
|
const refdomain = document.referrer.replace(/^https?:\/\//g, "").replace(/^www\./g, "").replace(/\/$/g, "");
|
||||||
|
document.cookie = "R74nRef="+refdomain+";max-age=86400;path=/;domain=r74n.com";
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadPlaylight() {
|
||||||
|
if (typeof playlightSDK === "undefined") {
|
||||||
|
document.getElementById("playlightButton").value = "Loading...";
|
||||||
|
document.head.insertAdjacentHTML("beforeend",`<link rel="stylesheet" href="https://sdk.playlight.dev/playlight-sdk.css">`);
|
||||||
|
let script = document.createElement("script");
|
||||||
|
script.setAttribute("type","module");
|
||||||
|
script.innerHTML = `try {
|
||||||
|
const module = await import("https://sdk.playlight.dev/playlight-sdk.es.js");
|
||||||
|
const playlightSDK = module.default;
|
||||||
|
await playlightSDK.init({
|
||||||
|
button: {
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
exitIntent: {
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
playlightSDK.setDiscovery(true);
|
||||||
|
document.getElementById("playlightButton").value = "More Games";
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error loading the Playlight SDK:", error);
|
||||||
|
document.getElementById("playlightButton").value = "Error...";
|
||||||
|
}`;
|
||||||
|
document.head.appendChild(script);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
playlightSDK.setDiscovery(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<div id="bottomTopBoxColumns">
|
<div id="bottomTopBoxColumns">
|
||||||
<div>
|
<div>
|
||||||
<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">
|
||||||
<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>
|
<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>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
if (!enabledMods.includes("mods/betterSettings.js")) { enabledMods.unshift("mods/betterSettings.js"); localStorage.setItem("enabledMods", JSON.stringify(enabledMods)); window.location.reload(); };
|
|
||||||
let setting = null
|
let setting = null
|
||||||
|
|
||||||
dependOn("betterSettings.js", () => {
|
dependOn("betterSettings.js", () => {
|
||||||
|
|
|
||||||
|
|
@ -625,7 +625,7 @@ button, input { /*Disable double tap zoom on mobile devices*/
|
||||||
touch-action: manipulation;
|
touch-action: manipulation;
|
||||||
color-scheme: dark;
|
color-scheme: dark;
|
||||||
}
|
}
|
||||||
.settingsButton, select, .toggleInput, #settingsMenu input[type="number"], #settingsMenu input[type="text"], #savePromptMenu input, input[type="email"], input[type="number"] {
|
.settingsButton, select, .toggleInput, #settingsMenu input[type="number"], #settingsMenu input[type="text"], #savePromptMenu input, input[type="email"], input[type="number"], .button {
|
||||||
background-color: var(--theme-darkest2);
|
background-color: var(--theme-darkest2);
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
|
|
@ -640,7 +640,7 @@ button, input { /*Disable double tap zoom on mobile devices*/
|
||||||
font-family: 'VT323';
|
font-family: 'VT323';
|
||||||
font-size:1.5em
|
font-size:1.5em
|
||||||
}
|
}
|
||||||
#settingsMenu .toggleInput, #settingsMenu .menuText button, #settingsMenu input[type], #settingsMenu select {
|
#settingsMenu .toggleInput, #settingsMenu .menuText button, #settingsMenu input[type], #settingsMenu select, .button {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: 'VT323';
|
font-family: 'VT323';
|
||||||
|
|
@ -648,6 +648,10 @@ button, input { /*Disable double tap zoom on mobile devices*/
|
||||||
padding-right:13px;
|
padding-right:13px;
|
||||||
margin:0
|
margin:0
|
||||||
}
|
}
|
||||||
|
.button {
|
||||||
|
cursor:pointer;
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
#settingsMenu input[type=color] {
|
#settingsMenu input[type=color] {
|
||||||
padding:0;
|
padding:0;
|
||||||
background-color: var(--theme-dark);
|
background-color: var(--theme-dark);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue