From 7f5b42ecdffc95e1825f1f56c4ce9381eb47d7ef Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 26 Feb 2022 21:45:40 +0200 Subject: [PATCH] Add rules of SendouQ --- app/routes/play.tsx | 36 +++++++++++++++++ app/routes/play/rules.tsx | 79 ++++++++++++++++++++++++++++++++++++++ app/styles/global.css | 4 ++ app/styles/play-layout.css | 14 +++++++ 4 files changed, 133 insertions(+) create mode 100644 app/routes/play.tsx create mode 100644 app/routes/play/rules.tsx create mode 100644 app/styles/play-layout.css diff --git a/app/routes/play.tsx b/app/routes/play.tsx new file mode 100644 index 000000000..50c449d66 --- /dev/null +++ b/app/routes/play.tsx @@ -0,0 +1,36 @@ +import clsx from "clsx"; +import { Link } from "react-router-dom"; +import { LinksFunction, NavLink, Outlet, useLocation } from "remix"; +import styles from "~/styles/play-layout.css"; + +export const links: LinksFunction = () => { + return [{ rel: "stylesheet", href: styles }]; +}; + +export default function PlayLayoutPage() { + const location = useLocation(); + + const playActive = + !location.pathname.includes("rules") && + !location.pathname.includes("settings"); + + return ( +
+
+ + Rules + + + Play + + + Settings + +
+ +
+ ); +} diff --git a/app/routes/play/rules.tsx b/app/routes/play/rules.tsx new file mode 100644 index 000000000..913d8c2de --- /dev/null +++ b/app/routes/play/rules.tsx @@ -0,0 +1,79 @@ +import React from "react"; +import { MetaFunction } from "remix"; +import { makeTitle } from "~/utils"; + +export const meta: MetaFunction = () => { + return { + title: makeTitle("Rules of SendouQ"), + }; +}; + +export default function PlayRulesPage() { + return ( +
+

Rules of SendouQ

+
v.1.0
+ +

Disconnections

+ + Each team is allowed one replay per set due to a team member + disconnecting. Replay is only possible if ALL of the following are true: +
    +
  1. + More than half was left in the clock (clock was 2:30 or higher at + the time of the DC) +
  2. +
  3. + The team without DC's objective counter was at 30 or higher at the + time of the disconnect +
  4. +
  5. Team with the disconnection stopped playing without delay
  6. +
  7. + Disconnection was unintentional (smacking your table and the Switch + popping out of the dock is not considered unintentional btw) +
  8. +
+
+ + For the replay same weapons and gear must be used by both teams. Team + who fails to do so loses the map. + + + If players disconnect from both teams a replay can be played without + using either team's one replay for the set (or even if there were no + replays left to use from either team). + + + Host disconnection can be replayed with the same conditions as above. + + +

Time limits

+ + Once a team has all 4 players in the room ready to play then the other + team has at most 10 minutes to join the room. Failure to do so means + that the set should be started with whatever players are currently in + the room. + + +

Subbing

+ + Subs are not allowed. If one or several players in a team can't play or + can't be reached then the set has to be played without them (3v4 etc.) + or forfeited. + + +

Alting

+ + You are only allowed to play SendouQ on one account. You are not allowed + to impersonate another player. + + +

General conduct

+ Treat everyone with respect. +
+ ); +} + +function Paragraph({ children }: { children: React.ReactNode }) { + return

{children}

; +} diff --git a/app/styles/global.css b/app/styles/global.css index 4b6ccefe8..ed12f03f9 100644 --- a/app/styles/global.css +++ b/app/styles/global.css @@ -533,6 +533,10 @@ hr { margin-block: var(--s-4); } +.text-center { + text-align: center; +} + .text-sm { font-size: var(--fonts-sm); } diff --git a/app/styles/play-layout.css b/app/styles/play-layout.css new file mode 100644 index 000000000..5fc0d55be --- /dev/null +++ b/app/styles/play-layout.css @@ -0,0 +1,14 @@ +.play-layout__link-container { + display: flex; + justify-content: space-between; + margin-block-end: var(--s-2); +} + +.play-layout__link { + font-size: var(--fonts-xs); + font-weight: var(--body); +} + +.play-layout__link.active { + visibility: hidden; +}