Skip to content

Commit

Permalink
add credit card icon & wallet5/Wizard's wallet
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
FifthTundraG committed Feb 18, 2024
1 parent dbff115 commit 64297c6
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 17 deletions.
4 changes: 2 additions & 2 deletions beta/beta.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
26 changes: 11 additions & 15 deletions beta/beta.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ 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 = [
"press harder","so heavy they're always pressed","that's very heavy","<i><b>efficiency</b></i>","why press when you don't have to?", // keyboard
"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 <b>safe</b>r!!","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 <b>safe</b>r!!","<b>infinite</b> 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"];
Expand All @@ -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,
];

Expand Down Expand Up @@ -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";
}
}
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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";
}
Expand Down Expand Up @@ -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.`);
}
Expand Down Expand Up @@ -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");
Expand Down
Binary file added beta/img/ase/upgrades/credit-cards.ase
Binary file not shown.
Binary file added beta/img/ase/upgrades/wizards-wallet.ase
Binary file not shown.
Binary file added beta/img/upgrades/credit-cards.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added beta/img/upgrades/wizards-wallet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed beta/img/upgrades/worker-upgrade1.png
Binary file not shown.

0 comments on commit 64297c6

Please sign in to comment.