mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-02-16 09:41:41 +00:00
v1.1 Pre-Release 2
This commit is contained in:
parent
c08042da7e
commit
ffc72e2826
3 changed files with 28 additions and 25 deletions
|
@ -29,9 +29,9 @@ var colors = {
|
||||||
3: "#7f7f7f",
|
3: "#7f7f7f",
|
||||||
},
|
},
|
||||||
aqua: {
|
aqua: {
|
||||||
1: "#bfefff",
|
1: "#bfdfff",
|
||||||
2: "#8fb3bf",
|
2: "#8fa7bf",
|
||||||
3: "#5f777f",
|
3: "#5f6f7f",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
var colors_theme
|
var colors_theme
|
||||||
|
|
22
js/game.js
22
js/game.js
|
@ -1870,7 +1870,11 @@ function checkForVars() {
|
||||||
}
|
}
|
||||||
if (player.hasNaN === undefined) player.hasNaN = false
|
if (player.hasNaN === undefined) player.hasNaN = false
|
||||||
if (player.h.active === undefined) player.h.active = 0
|
if (player.h.active === undefined) player.h.active = 0
|
||||||
if (player.h.time === undefined) player.h.time = 0
|
if (player.h.time === undefined) player.h.time = player.timePlayed
|
||||||
|
else if (typeof(player.h.time) == "string") {
|
||||||
|
player.h.time = Number(player.h.time)
|
||||||
|
if (isNaN(player.h.time)) player.h.time = player.timePlayed
|
||||||
|
}
|
||||||
if (player.q.auto === undefined) player.q.auto = false
|
if (player.q.auto === undefined) player.q.auto = false
|
||||||
if (player.msDisplay === undefined) player.msDisplay = "always"
|
if (player.msDisplay === undefined) player.msDisplay = "always"
|
||||||
if (player.hb.auto === undefined) player.hb.auto = false
|
if (player.hb.auto === undefined) player.hb.auto = false
|
||||||
|
@ -3849,8 +3853,10 @@ function gameLoop(diff) {
|
||||||
player.tab = "gameEnded"
|
player.tab = "gameEnded"
|
||||||
}
|
}
|
||||||
if (player.devSpeed) diff *= player.devSpeed
|
if (player.devSpeed) diff *= player.devSpeed
|
||||||
|
|
||||||
player.timePlayed += diff
|
player.timePlayed += diff
|
||||||
player.h.time += diff
|
player.h.time += diff
|
||||||
|
|
||||||
if (tmp.challActive ? tmp.challActive.h[42] : true) {
|
if (tmp.challActive ? tmp.challActive.h[42] : true) {
|
||||||
if (player.h.time>=10) diff = 0
|
if (player.h.time>=10) diff = 0
|
||||||
else diff = Decimal.div(diff, Decimal.div(10, Decimal.sub(10, player.h.time + 1)).pow(1000))
|
else diff = Decimal.div(diff, Decimal.div(10, Decimal.sub(10, player.h.time + 1)).pow(1000))
|
||||||
|
@ -3939,10 +3945,11 @@ function gameLoop(diff) {
|
||||||
if (player.ps.auto&&player.ps.best.gte(2)) doReset("ps")
|
if (player.ps.auto&&player.ps.best.gte(2)) doReset("ps")
|
||||||
|
|
||||||
if (player.hasNaN&&!NaNalert) {
|
if (player.hasNaN&&!NaNalert) {
|
||||||
alert("We have detected a corruption in your save. Please visit https://discord.gg/wwQfgPa for help.")
|
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
player.autosave = false;
|
player.autosave = false;
|
||||||
NaNalert = true;
|
NaNalert = true;
|
||||||
|
|
||||||
|
alert("We have detected a corruption in your save. Please visit https://discord.gg/wwQfgPa for help.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3985,9 +3992,10 @@ const theme_names = {
|
||||||
function changeTheme() {
|
function changeTheme() {
|
||||||
let aqua = player.theme == "aqua"
|
let aqua = player.theme == "aqua"
|
||||||
colors_theme = colors[player.theme || "default"]
|
colors_theme = colors[player.theme || "default"]
|
||||||
document.body.style.setProperty('--background', aqua ? "#002f3f" : "#000000")
|
document.body.style.setProperty('--background', aqua ? "#001f3f" : "#0f0f0f")
|
||||||
document.body.style.setProperty('--color', aqua ? "#bfefff" : "#bfbfbf")
|
document.body.style.setProperty('--background_tooltip', aqua ? "rgba(0, 15, 31, 0.75)" : "rgba(0, 0, 0, 0.75)")
|
||||||
document.body.style.setProperty('--points', aqua ? "#dff7ff" : "#ffffff")
|
document.body.style.setProperty('--color', aqua ? "#bfdfff" : "#dfdfdf")
|
||||||
|
document.body.style.setProperty('--points', aqua ? "#dfefff" : "#ffffff")
|
||||||
}
|
}
|
||||||
|
|
||||||
function getThemeName() {
|
function getThemeName() {
|
||||||
|
@ -4010,8 +4018,8 @@ document.onkeydown = function(e) {
|
||||||
let shiftDown = e.shiftKey
|
let shiftDown = e.shiftKey
|
||||||
let ctrlDown = e.ctrlKey
|
let ctrlDown = e.ctrlKey
|
||||||
let key = e.key
|
let key = e.key
|
||||||
if (ctrlDown && (key != "a" || key != "c" || key != "v")) e.preventDefault()
|
|
||||||
if (onFocused) return
|
if (onFocused) return
|
||||||
|
if (ctrlDown) e.preventDefault()
|
||||||
if (player.m.unl && key >= 0 && key <= 9) {
|
if (player.m.unl && key >= 0 && key <= 9) {
|
||||||
if (key == 0) activateSpell(10)
|
if (key == 0) activateSpell(10)
|
||||||
else activateSpell(key)
|
else activateSpell(key)
|
||||||
|
@ -4031,7 +4039,7 @@ document.onkeydown = function(e) {
|
||||||
if (player.sg.unl) doReset("sg")
|
if (player.sg.unl) doReset("sg")
|
||||||
return
|
return
|
||||||
case "s":
|
case "s":
|
||||||
if (ctrlDown && player.hs.unl) doReset("ss")
|
if (ctrlDown && player.hs.unl) doReset("hs")
|
||||||
return
|
return
|
||||||
case "S":
|
case "S":
|
||||||
if (player.ss.unl) doReset("ss")
|
if (player.ss.unl) doReset("ss")
|
||||||
|
|
25
style.css
25
style.css
|
@ -16,7 +16,7 @@ body {
|
||||||
background-color: var(--background);
|
background-color: var(--background);
|
||||||
color: var(--color);
|
color: var(--color);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
--background: #000000;
|
--background: #0f0f0f;
|
||||||
--color: #dfdfdf;
|
--color: #dfdfdf;
|
||||||
--points: #ffffff;
|
--points: #ffffff;
|
||||||
}
|
}
|
||||||
|
@ -583,9 +583,10 @@ ul {
|
||||||
}
|
}
|
||||||
|
|
||||||
.hChall {
|
.hChall {
|
||||||
background-color: #fa7f8a;
|
background-color: #bf8f8f;
|
||||||
border: 2px solid #ff0017;
|
border: 4px solid;
|
||||||
color: #ff0017;
|
border-color: rgba(255, 255, 255, 0.125) rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.25) rgba(255, 255, 255, 0.125);
|
||||||
|
color: rgba(0, 0, 0, 0.5);
|
||||||
width: 300px;
|
width: 300px;
|
||||||
height: 300px;
|
height: 300px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
@ -593,15 +594,11 @@ ul {
|
||||||
}
|
}
|
||||||
|
|
||||||
.hChall.done {
|
.hChall.done {
|
||||||
background-color: #95fcb4;
|
background-color: #77bf5f;
|
||||||
border: 2px solid #038c2c;
|
|
||||||
color: #038c2c;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.hChall.canComplete {
|
.hChall.canComplete {
|
||||||
background-color: #93f0fa;
|
background-color: #ffbf00;
|
||||||
border: 2px solid #03858f;
|
|
||||||
color: #03858f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullWidth {
|
.fullWidth {
|
||||||
|
@ -640,9 +637,8 @@ ul {
|
||||||
-webkit-border-radius: 3px;
|
-webkit-border-radius: 3px;
|
||||||
-moz-border-radius: 3px;
|
-moz-border-radius: 3px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background-color: #000;
|
background-color: var(--background_tooltip);
|
||||||
background-color: hsla(0, 0%, 5%, 0.9);
|
color: var(--points);
|
||||||
color: #fff;
|
|
||||||
content: attr(tooltip);
|
content: attr(tooltip);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
@ -657,8 +653,7 @@ ul {
|
||||||
left: 50%;
|
left: 50%;
|
||||||
margin-left: -5px;
|
margin-left: -5px;
|
||||||
width: 0;
|
width: 0;
|
||||||
border-top: 5px solid #000;
|
border-top: 5px solid var(--background_tooltip);
|
||||||
border-top: 5px solid hsla(0, 0%, 5%, 0.9);
|
|
||||||
border-right: 5px solid transparent;
|
border-right: 5px solid transparent;
|
||||||
border-left: 5px solid transparent;
|
border-left: 5px solid transparent;
|
||||||
content: " ";
|
content: " ";
|
||||||
|
|
Loading…
Add table
Reference in a new issue