From 64297c686903f8442d25b3ca2a9073574c8590c4 Mon Sep 17 00:00:00 2001
From: FifthTundraG <117035030+FifthTundraG@users.noreply.github.com>
Date: Sat, 17 Feb 2024 20:09:05 -0500
Subject: [PATCH] add credit card icon & wallet5/Wizard's wallet
Also fixes #23 with a very temporary solution of making the box bigger, eventually it will probably have a complete redesign with dynamic sizing or something similar.
---
beta/beta.css | 4 ++--
beta/beta.js | 26 ++++++++++-------------
beta/img/ase/upgrades/credit-cards.ase | Bin 0 -> 658 bytes
beta/img/ase/upgrades/wizards-wallet.ase | Bin 0 -> 845 bytes
beta/img/upgrades/credit-cards.png | Bin 0 -> 273 bytes
beta/img/upgrades/wizards-wallet.png | Bin 0 -> 501 bytes
beta/img/upgrades/worker-upgrade1.png | Bin 863 -> 0 bytes
7 files changed, 13 insertions(+), 17 deletions(-)
create mode 100644 beta/img/ase/upgrades/credit-cards.ase
create mode 100644 beta/img/ase/upgrades/wizards-wallet.ase
create mode 100644 beta/img/upgrades/credit-cards.png
create mode 100644 beta/img/upgrades/wizards-wallet.png
delete mode 100644 beta/img/upgrades/worker-upgrade1.png
diff --git a/beta/beta.css b/beta/beta.css
index 5536457..6ce6da2 100644
--- a/beta/beta.css
+++ b/beta/beta.css
@@ -362,8 +362,8 @@ small {
/* Infobox when hovering over a building */
.tooltip {
- width: 258px;
- height: 110px;
+ width: 285px;
+ height: 125px;
border: solid 3px black;
border-right-width: 0px;
background-color: var(--colored-container);
diff --git a/beta/beta.js b/beta/beta.js
index 59dedce..82a501c 100644
--- a/beta/beta.js
+++ b/beta/beta.js
@@ -61,8 +61,8 @@ upgrades.names = [
"Hardwood Walking Stick","Rocking Chair","Reading Glasses","Dementia Pills","shotgun", // grandpa
"Pig Slop","ranch2","ranch3","Big baconator","Ranch dressing", // ranch
"LED Display*","Streaming service","Surround sound","OLED Display","8K resolution", // television
- "Medkits","Hard hats","worker3","High salaries*","Robot workers", // worker
- "200 dollar bills","Credit cards","wallet3","safe","wallet5", // wallet
+ "Medkits","Hard hats","Fast fingers*","High salaries*","Robot workers", // worker
+ "200 dollar bills","Credit cards","wallet3","safe","Wizard\'s wallet", // wallet
"the pope","church2","church3","church4","church5", // church
];
upgrades.quotes = [
@@ -70,8 +70,8 @@ upgrades.quotes = [
"nonna dat softwood junk","newest addition to the porch*","helps with precise chocolate chip placement","what was i doing again?","grandpa's precious*", // grandpa
"Wait, what have we been feeding them before now?","temp","temp","think giant pig mech fueled by potatoes","wrong ranch.", // ranch
"World's greatest leap in digital technology*","cookie-flix","it's all around me!","s*** it burned in...","so many pixels!", // television
- "Constant supply of Band-Aids in case of emergency","Keep those skulls safe!","temp","but they pay it back in taxes. to us.","robotic precision*", // worker
- "I'm sure the federal reserve will be okay with this...*","cookies but digitized*","temp","you can keep your cookies even safer!!","temp", // wallet
+ "Constant supply of Band-Aids in case of emergency","Keep those skulls safe!","upmost efficient cookie manufacturing*","but they pay it back in taxes. to us.","robotic precision*", // worker
+ "I'm sure the federal reserve will be okay with this...*","cookies but digitized*","temp","you can keep your cookies even safer!!","infinite storage space*", // wallet
"his holiness will provide many cookies","temp","temp","temp","temp", // church
];
upgrades.descriptions = [`Multiplys Keyboard and clicking ${personalization.currentClicked.toLowerCase()} production by 2`,"Multiplys Grandpa production by 2","Multiplys Ranch production by 2","Multiplys TV production by 2","Multiplys Worker production by 2","Multiplys Wallet production by 2","Multiplys Church production by 2"];
@@ -85,7 +85,7 @@ upgrades.img = [
"pig-slop.png",undefined,undefined,"big-baconator.png","ranch-dressing.png",
"tv-upgrade1.png","streaming-service.png","surround-sound.png",undefined,"8k-display.png",
"medkits.png","hard-hats.png",undefined,undefined,undefined,
- "200-dollar-bill.png",undefined,undefined,"safe.png",undefined,
+ "200-dollar-bill.png","credit-cards.png",undefined,"safe.png","wizards-wallet.png",
"the-pope.png",undefined,undefined,undefined,undefined,
];
@@ -526,7 +526,6 @@ function resizeEventHandler() { // ? is the term "event handler" right?
// change middle text heights
const middleTexts = convertCollectionToArray(document.querySelectorAll(".middle-main"));
for (element in middleTexts) {
- console.log(middleTexts[element]);
middleTexts[element].style.height = window.innerHeight-document.getElementById("middleButtons").offsetHeight+"px";
}
}
@@ -773,7 +772,7 @@ class Building {
if (!mobile) {
// clamping allows between 0 and the height of the window minus the height of the box. also add one from the height of the box because it doesn't work correctly normally, idk why
- tooltip.style.top = clamp(mousePos.y - 50,0,window.innerHeight-(tooltip.offsetHeight + 1))+"px";
+ tooltip.style.top = clamp(mousePos.y - tooltip.offsetHeight/2,0,window.innerHeight-(tooltip.offsetHeight + 1))+"px";
tooltip.style.right = "346px";
tooltip.style.left = "auto"; // when tooltip is a statistic it sets the left property because it won't work correctly with right, this resets that
@@ -924,7 +923,7 @@ upgrades.hovered = function(id,building,statistic=false) {
} else {
tooltip.style.right = "346px";
// clamping allows between 0 and the height of the window minus the height of the box. also add one from the height of the box because it doesn't work correctly normally, idk why
- tooltip.style.top = clamp(mousePos.y - 50,0,window.innerHeight-(tooltip.offsetHeight + 1))+"px";
+ tooltip.style.top = clamp(mousePos.y - tooltip.offsetHeight/2,0,window.innerHeight-(tooltip.offsetHeight + 1))+"px";
tooltip.style.left = "auto"; // when tooltip is a statistic it sets the left property because it won't work correctly with right, this resets that
tooltip.style.borderRightWidth = "0px";
}
@@ -1370,9 +1369,7 @@ saves.loadSave = function() {
upgrades.bought = loadedSave["upgrades.bought"];
}
- if (!inDevelopment) return;
- console.log(`loaded variable: ${variable}`);
- console.log(`loaded value: ${loadedSave[variable]}`);
+ helper.consoleLogDev(`loaded variable: ${variable}, value: ${loadedSave[variable]}`);
} catch {
helper.consoleLogDev(`Attempted to load variable: ${variable}, value: ${loadedSave[variable]}. This is either a constant variable or a malformed save item.`);
}
@@ -1405,12 +1402,11 @@ saves.save = function(data=undefined) {
save[name] = value;
}
}
- if (!versionBranch) {
+ if (!versionBranch)
localStorage.setItem("save",JSON.stringify(save));
- } else {
+ else
localStorage.setItem("betaSave",JSON.stringify(save));
- }
- if (inDevelopment) { console.log("save object: "); console.log(save); }
+ if (inDevelopment) console.log("save object: ", save)
// Update saving notification
const indicator = document.getElementById("savingIndicator");
diff --git a/beta/img/ase/upgrades/credit-cards.ase b/beta/img/ase/upgrades/credit-cards.ase
new file mode 100644
index 0000000000000000000000000000000000000000..5225d75ccbe30e0f000e84636abb403ce588be95
GIT binary patch
literal 658
zcmcJM!Ap~29Dsk*#ykj?p{P6f5)uYs+Zc*%Dp(J_xo1Q#4R66KUJ&3|k7nK-vQOHAvDWA`#lK+6em-pfQzVGlnFW*?2$oJ1WQK_X9
zkv8`KQKCz}l$)&Um~8yVzx64r9zibKpi;^!x^2$+N?p7uyz(V=)I{zmD|}LHhu(5C
z47+UbTi0EhBmsm>4q>(`CNTZ7=ipWW}Xc`qH;75)bElz~kP!%RkDji-931X0^
zE&c7?%KVN8y-LOyMB}HNPo88;-$##IhBfPwd)BA#_!XRQZ3ty$EZXevixbZHhn(A%
zp+DREk6QxXTb{~$2Q_iqX2S98??#%6h67m-jpGG@-Pmf4E3{J5)E!&WeKKZD3_B`H
bj$Rn277SlIBX8H&PcyCeZTaGO6d5@KqE)z#
literal 0
HcmV?d00001
diff --git a/beta/img/ase/upgrades/wizards-wallet.ase b/beta/img/ase/upgrades/wizards-wallet.ase
new file mode 100644
index 0000000000000000000000000000000000000000..11c70fe4e80454c25829a53462df4f4ec4fffa85
GIT binary patch
literal 845
zcmcJNZAg<*7>1v<)-cE%gsT?$(#K4~Hm4ZcY*6SA$7)zuI_Ea0QRsK5%M$Txm0m5+c#OgFEbAG+qL$&1SHuumH5~YXRLd88~^w2#%ljfwqo(
zu;sXvHKT!*gnk(;&;&YwKHMP=Ybe7PvM_}v93cohsKE_?f$%sWJ
z0+EKO&Cw(V*ZsGkK&z*;>$C|xQ7A^*gC3o)e
pQvu6x%0J6zW_fU1jqmY
literal 0
HcmV?d00001
diff --git a/beta/img/upgrades/credit-cards.png b/beta/img/upgrades/credit-cards.png
new file mode 100644
index 0000000000000000000000000000000000000000..56ba057473eca9ea58b424d9501e07e6741a3369
GIT binary patch
literal 273
zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}r#)R9Ln2y}
z6C_v{Cy4MEBpgxvH$U!MV)23h|Nmzu+bb(8x6O@^br8N?c;lo?@@Wnxv79E8KBhx_
z2|!R$pJEo+=6CzA*y@VXWY)l6g;oh~wIdht0HwMUBeQGSCsuv5P>6VA7|7<+d}+f2
zRnuQ9gqWU0_*`II(!!wW*vH4VN8wN;pF+B1iCK?-kA-5xWk#UQ$1??VS|(gw&@Q#H
z?|?MZ4xK}yOebD-vNl`uF8Dn~$Z*cL1VQN!uVyqh_VG>%G~jYO*ucziDc$SS{F5aO
QKyNX4y85}Sb4q9e0EowDQ2+n{
literal 0
HcmV?d00001
diff --git a/beta/img/upgrades/wizards-wallet.png b/beta/img/upgrades/wizards-wallet.png
new file mode 100644
index 0000000000000000000000000000000000000000..e4c81b698da08e738949b776908143b6a6401463
GIT binary patch
literal 501
zcmVPx$uSrBfR9J=WmOo3wKp4iKiks-5MR5yVGq`lf&~^wo1{{hV+#LN1fb2O6POBaJgLWUk(KEfkLmBywC5Ryty9mmlPl(ruS_8HiR>P
z01-LfJ~O`02>`!plN1^QP&2xE(-f=#0z`yi}d(?i#I$d>uV>V
zv+6ofnUsWl5!tH8s}Zht?uxNa3ep6qxsM)v^opX?j2CN8=h@UmlF|i;2sNfkkyNgG
zCHEzBRumY3FbyRD0PqkhAYMLtNRj9Pbi8gUuKnz=DAGhJ5`1}|m}l=L&(fgdb;+=E
zTDkf8>81E?3c@Bd2>XcV(-Op{PLV;_FFatqmfR%(xc71jL1e
z`+&^cwUh}og}M2-uKd>C^GLqPT2cTOqKWzW(S;OB>(6Mp&aEK;U^0s_nZ?36Yr=Tqd1tQZ>~$y~ppR%b$*M$_iB
r25{_*hPx(^ks!fNSyRfq(q~PZqxX@_zsR00000NkvXXu0mjfS7PIf
literal 0
HcmV?d00001
diff --git a/beta/img/upgrades/worker-upgrade1.png b/beta/img/upgrades/worker-upgrade1.png
deleted file mode 100644
index d3a7c84076e06a3d97e65f0c881c7a55cf93364b..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 863
zcmV-l1EBngP)Px&8A(JzRCr$PnL$p&Fc3vsZo!JfAeLN!Ga$rK5aJBI087MSSoIbSa#UN+bUgFN
zPHm?NOKQjdZ~lxY&VIM@zx~Sf?=}FN16EF8OM#UeU@L-K3T!E`90G%|)odqcPprso
z6#o7Blw9)p?Z^LS)?=PfQMg-b;Do=v|Bl=E`gojd=M2K6$uzj4_+-?*c)ynf1otzf
z4H{HYxL-<)Jl#);6M6)|ig%)E^tm+faL{z<4M0*n2Y^PNIs<`lO#tz+g{~t4u%=>5
z0K;%Rg#GUCUy!0St9UdO(8yTePsESPGXSKHI?G1fSj`391Nb|gf@Y~1N`WZ_V9n!;
z=!X_fcflkDe0N7v>EZ6~q5+}>GA@oK0IYeO6c47s2!InFN7tp3)E&|WDHi}MM#<%3
z0AueP70;BdIS8o^aaI6ABt`Ln1JwBz7tE0Y)@Z5%1oxM#Z-T0E_pqsr6$3
zOwmJH?~yOp2|}BTqNKwLP3)o`AOz^83o?hk4yWdfugN_$NQkH$5QudaZC{!K-H3P5D>;6V==(cC
z53Q>+-+C!aZnUYkWY&Zmp