Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor changes (Splitting into smaller PRs (done)) #214

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crate/src/species.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl Species {
Species::Ice => update_ice(cell, api),
// Species::Snow => update_ice(cell, api),
//lightning
// Species::Sink => update_sink(cell, api),
// Species::Sink => {}
Species::Plant => update_plant(cell, api),
Species::Acid => update_acid(cell, api),
Species::Mite => update_mite(cell, api),
Expand Down
2 changes: 1 addition & 1 deletion functions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ app.post("/creations", validateFirebaseIdToken, async (req, res) => {
);

if (banned.rows[0].exists) {
res.sendStatus(401).json({ id: "you're banned for two months" });
res.sendStatus(401).json({ id: "you're banned for two months, if you believe this is in error, contact me at [email protected]" });
return;
}
const countRows = await pgPool.query(
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/>
<meta
name="Description"
content="Sandspiel is a falling sand game that provides a relaxing and creative place to play with elements like sand, water, plant, and fire. Enjoy on your phone or computer, and share drawings with your friends!"
content="Sandspiel is a falling sand game that provides a relaxing and creative place to play with elements like sand, water, plant, and fire. Enjoy on your phone, tablet or computer, and share your creations with your friends!"
/>
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down Expand Up @@ -39,7 +39,7 @@

<head>
<meta charset="utf-8" />
<title>sandspiel</title>
<title>Sandspiel</title>
<link rel="manifest" href="/manifest.json" />

<link
Expand Down
4 changes: 2 additions & 2 deletions js/components/Post.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function Post({
<div style={{ width: "50%" }}>
{hasParent && !redundent_parent_id && (
<button
title="parent post"
title="Show replying to"
className={classnames("parent", { active: nextPost })}
onClick={fetchParent}
>
Expand Down Expand Up @@ -132,7 +132,7 @@ export function Post({
{submission.data.children > (redundent_child_id ? 1 : 0) && (
<button
className={classnames("children", { active: childrenPosts })}
title="show children"
title="Show replies"
onClick={fetchChildren}
>
{submission.data.children}↓
Expand Down
6 changes: 3 additions & 3 deletions js/components/browse.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class Browse extends React.Component {
return (
<React.Fragment>
<SignInScreen />
<p style={{ gridColumn: "auto / span 2", margin: "8px", fontSize: 16 }}>
<p style={{ gridColumn: "auto / span 2", margin: "8px", fontSize: 16 }}
Check out ☞<br></br>
<a href="https://studio.sandspiel.club" target="_blank">
{" "}
Expand Down Expand Up @@ -225,14 +225,14 @@ class Browse extends React.Component {
<button>Month</button>
</NavLink>
<NavLink exact to="/browse/top/">
<button>All </button>
<button>All</button>
</NavLink>
<span style={{ display: "inline-block" }}>
<input
value={search}
onChange={(e) => this.setState({ search: e.target.value })}
onKeyDown={(e) =>
e.keyCode == 13 && // I think that's enter
e.keyCode == 13 && // Can confirm this is enter -LL
this.props.history.push(`/browse/search/?title=${search}`)
}
placeholder="search"
Expand Down
34 changes: 18 additions & 16 deletions js/components/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,49 +37,51 @@ const Info = () => {
Lastly, I want to say that if you enjoy this game or share your artwork
on it, your opinion is important to me and I want to do my best to
ensure sandspiel is a friendly and kind place to play, without bullying,
racism, or homophobia. If something is wrong or there's some way I can
racism, transphobia, homophobia, or any other forms of bigotry. If something is wrong or there's some way I can
help, feel free to contact me at <a href="mailto:[email protected]">[email protected]</a> or <a href="https://twitter.com/maxbittker">@maxbittker on twitter.</a>
</p>
<br />
<hr />
<br />
<h2>Element Information:</h2>
<h4>Wall </h4>
Indestructible
Indestructible.
<h4>Sand </h4>
Sinks in water
Sinks in water.
<h4>Water </h4>
Puts out fire
Puts out fire.
<h4>Stone </h4>
Forms arches, folds under pressure
Forms arches, turns into sand under pressure.
<h4>Ice </h4>
Freezes Water, slippery!
<h4>Gas </h4>
Highly Flammable!
<h4>Cloner </h4>
Copies the first element it touches
Copies the first element it touches.
<h4>Mite </h4>
Eats wood and plant, but loves dust! Slides on ice
Eats wood and plant, but loves dust! Slides on ice..
<h4>Wood </h4>
Sturdy, but biodegradable
Sturdy, but biodegradable.
<h4>Plant </h4>
Thrives in wet enviroments
Thrives in wet enviroments.
<h4>Fungus </h4>
Spreads over everything
Spreads over everything.
<h4>Seed </h4>
Grows in sand
Grows on sand, plant, and fungus.
<h4>Fire </h4>
Hot!
<h4>Lava </h4>
Flammable and heavy
Flammable and heavy.
<h4>Acid </h4>
Corrodes other elements
Corrodes other elements.
<h4>Dust </h4>
Pretty, but dangerously explosive
Pretty, but dangerously explosive.
<h4>Oil </h4>
Produces smoke
Produces smoke when set on fire.
<h4>Rocket </h4>
Explodes into copies of the first element it touches
Explodes into copies of the first element it touches.
<h4>Empty </h4>
Erases.
<hr />
<hr />
<hr />
Expand Down
2 changes: 1 addition & 1 deletion js/components/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Menu = ({ close, children }) => {
<div className={"menu"}>
{children}
<Link to="/" className="x" onClick={close}>
<button> x</button>
<button title="Close"> x</button>
</Link>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion js/components/signin.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class SignInScreen extends React.Component {
<button
style={{ flexGrow: 0, margin: "0 10px" }}
onClick={() => {
if (window.confirm("sign out?")) {
if (window.confirm("Sign out?")) {
firebase.auth().signOut();
}
}}
Expand Down
6 changes: 3 additions & 3 deletions js/components/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class Index extends React.Component {
});
}
reset() {
if (window.confirm("Reset?")) {
if (window.confirm("Are you sure you want to reset?")) {
this.play();
window.location = "#";
this.setState({ currentSubmission: null });
Expand Down Expand Up @@ -441,7 +441,7 @@ class Index extends React.Component {
{this.state.currentSubmission && (
<div className="submission-title">
<button onClick={() => this.incScore()}>
+♡{this.state.currentSubmission.data.score}{" "}
♡{this.state.currentSubmission.data.score}{" "}
</button>
{this.state.currentSubmission.data.title}
</div>
Expand All @@ -459,7 +459,7 @@ class Index extends React.Component {
<div style={{ display: "flex" }}>
<input
maxlength="200"
placeholder="title"
placeholder="Title"
onChange={(e) => this.setState({ title: e.target.value })}
/>
<button
Expand Down
8 changes: 8 additions & 0 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,13 @@ document.addEventListener("keydown", function (event) {
}
});


document.addEventListener("keydown", function (event) {
if (event.metaKey && event.key === "z") { // MacOS command key
reset();
universe.pop_undo();
}
});

(adsbygoogle = window.adsbygoogle || []).push({});
export { canvas, width, height, universe, reset };
7 changes: 4 additions & 3 deletions js/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ img {
flex-grow: 0;
margin-left: -4px;
margin-bottom: -8px;
/* position: absolute; */
/* right: 35px; */
/* bottom: 0px; */
right: -2px;
bottom: 3px;
border: none;
}
.blocker {
height: 23px;
Expand Down Expand Up @@ -309,6 +309,7 @@ img {
/* margin-left: auto; */
margin-right: -2px;
/* margin-bottom: 15px; */
filter: saturate(0%) brightness(50%);
}
.heart:active {
color: red;
Expand Down