-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from minidogg/dev
Dev
- Loading branch information
Showing
14 changed files
with
197 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Logging stuff for better collab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,49 @@ | ||
// generates a random name for your warehouse :3 | ||
function randomName() { | ||
var nameAdjs = ['Tired', 'High', 'Hungry', 'Agitated', 'Excited', 'Grumpy', 'Sleepy', 'Angry', 'Bored']; | ||
var nameNouns = ['Cartel Leader', 'Addict', 'Mafia Boss', 'Discord Moderator', 'Internet Troll', 'Slacker', 'Loser', 'Scammer']; | ||
addProperty(game, "name", nameAdjs[Math.floor(Math.random() * nameAdjs.length)] + ' ' + nameNouns[Math.floor(Math.random() * nameNouns.length)]) | ||
var goldenNames = ["Sugar Smuggling Minor", "Unlucky Crafter", "Code Mob", "Shadow Dev", "Really Bad Dev", "Abstract Melon"] | ||
async function randomName(overwrite=false) { | ||
const nameAdjs = ['Tired', 'High', 'Hungry', 'Agitated', 'Excited', 'Grumpy', 'Sleepy', 'Angry', 'Bored', 'Thirsty', 'Extremely High', 'Illegal', 'Scamming', 'Scammed', 'Screaming', 'Drug Promoting', 'Your Friendly',"Sugar Smuggling"]; | ||
const nameNouns = ['Cartel Leader', 'Addict', 'Mafia Boss', 'Discord Moderator', 'Internet Troll', 'Slacker', 'Loser', 'Scammer', 'Karen', 'Drug Lord', 'Mother', 'Minor', 'Crack Addict',"Mafia"]; | ||
const creatorNameAdjs = ['Unlucky', 'Code', 'Shadow', 'Really Bad', 'Abstract']; | ||
const creatorNameNouns = ['Crafter', 'Mob', 'Dev', 'Melon']; | ||
|
||
|
||
var name = 'this shouldn\'t be your name and if it does then something probably went wrong'; | ||
if (Math.random() > 0.075) { | ||
name = nameAdjs[Math.floor(Math.random() * nameAdjs.length)] + ' ' + nameNouns[Math.floor(Math.random() * nameNouns.length)] | ||
} else { | ||
let mode = Math.floor(Math.random() * 3); | ||
if (mode == 0) { | ||
name = creatorNameAdjs[Math.floor(Math.random() * creatorNameAdjs.length)] + ' ' + nameNouns[Math.floor(Math.random() * nameNouns.length)] | ||
} else if (mode == 1) { | ||
name = nameAdjs[Math.floor(Math.random() * nameAdjs.length)] + ' ' + creatorNameNouns[Math.floor(Math.random() * creatorNameNouns.length)] | ||
} else if (mode == 2) { | ||
name = creatorNameAdjs[Math.floor(Math.random() * creatorNameAdjs.length)] + ' ' + creatorNameNouns[Math.floor(Math.random() * creatorNameNouns.length)] | ||
} | ||
} | ||
|
||
if (overwrite) removeProperty(game, "name"); | ||
addProperty(game, "name", name); | ||
addProperty(game, "goldenName", goldenNames.includes(name)); | ||
|
||
|
||
saving.save() | ||
} | ||
render.renderFunctions.push(() => { | ||
document.getElementById('companyName').textContent = game.name + "'s Warehouse" | ||
|
||
if(game.goldenName==true)document.getElementById('companyName').style.color = "gold" | ||
}) | ||
|
||
// todo: update this to an actual prompt | ||
document.getElementById('companyName').onclick = () => { | ||
game.name = prompt("Name?") | ||
render.render() | ||
document.getElementById('companyName').onclick = async () => { | ||
const name = await showPrompt("Company Name","Unluckycrafter",100); | ||
if (!name) { | ||
randomName(true); | ||
} else { | ||
game.name = name; | ||
} | ||
render.render(); | ||
} | ||
|
||
|
||
window.addEventListener("load", randomName) | ||
randomName() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
margin-top: 0vh; | ||
padding: 1vh 0; | ||
background-color: #333; | ||
cursor: pointer; | ||
} | ||
|
||
/* New style for #name */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#popup{ | ||
background-color: gray; | ||
z-index: 10000; | ||
position: fixed; | ||
top:20vh; | ||
left:70vh; | ||
|
||
|
||
width:fit-content; | ||
height: fit-content; | ||
padding: 2vmin; | ||
|
||
|
||
|
||
border-radius: 10px; | ||
|
||
transition:top 0.5s ease-in-out; | ||
} | ||
|
||
#popupSubmit{ | ||
display:block; | ||
margin:auto; | ||
|
||
margin-top:10px; | ||
} | ||
|
||
#popupHeader{ | ||
text-align: center; | ||
font-size:5vmin; | ||
} | ||
|
||
.popupClose{ | ||
top: 110vh!important;; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters