diff options
| -rw-r--r-- | RULES.md | 42 | ||||
| -rw-r--r-- | frontend/src/App.tsx | 2 | ||||
| -rw-r--r-- | frontend/src/css/Rules.css | 3 | ||||
| -rw-r--r-- | frontend/src/pages/Rules.tsx | 37 |
4 files changed, 84 insertions, 0 deletions
diff --git a/RULES.md b/RULES.md new file mode 100644 index 0000000..99c5a3e --- /dev/null +++ b/RULES.md | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | # Rules | ||
| 2 | |||
| 3 | To compete on the leaderboard, you must adhere to the following rules. Failure to do so may result in warnings or bans depending on severity. | ||
| 4 | |||
| 5 | ## Game | ||
| 6 | |||
| 7 | All runs must be performed on the latest release of Portal 2. Game files must not be modified in any way (things such as binary or dll files). | ||
| 8 | Launch options that alter game behavior (e.g., `-tickrate`) are prohibited | ||
| 9 | The use of scripts, cheats, plugins, third-party software, or anything that changes the game's behavior is strictly forbidden. | ||
| 10 | The only allowed plugin is SourceAutoRecord and if used it must be latest version. | ||
| 11 | |||
| 12 | ### Texture Modifications | ||
| 13 | |||
| 14 | You may modify texture files as long as it doesn't give you any advantage. | ||
| 15 | Both `.vtf` and `.vmt` files associated with these textures can be modified. | ||
| 16 | Models cannot be modified as they alter game behaviour | ||
| 17 | |||
| 18 | ## Runs | ||
| 19 | |||
| 20 | ### Demos | ||
| 21 | |||
| 22 | Proof of your run must be recorded using demos. To start recording, type `record <demoname>` when entering the map, or use the SAR plugin with the command `sar_record_at 0`. | ||
| 23 | A valid demo begins when the player can move and ends when the player touches the end flags. | ||
| 24 | For cooperative runs, both players must submit their demos. | ||
| 25 | |||
| 26 | ### Console Commands & Cheats | ||
| 27 | |||
| 28 | The use of cheats, including specific console commands, is prohibited. Even if a command is not cheat-protected, it may still invalidate your run. For a full list of banned commands, refer to rules.portal2.sr/#command-list. | ||
| 29 | Additionally, commands that affect game behavior (e.g., `net_*` commands) are not allowed. | ||
| 30 | |||
| 31 | ### Banned Exploits | ||
| 32 | |||
| 33 | The following exploits are banned: freezing the game window, pause abuse, packet loss manipulation, intentional internet disconnection, and any glitches requiring setup before the run (e.g., moving portals or EHM). | ||
| 34 | If you're unsure whether an exploit is allowed, ask in the Discord server. | ||
| 35 | |||
| 36 | ### Note | ||
| 37 | |||
| 38 | The moderation team has the authority to remove any record they believe to be illegitimate. | ||
| 39 | If you accidentally submit an illegitimate run, the moderation team will attempt to contact you, and you may receive a warning. | ||
| 40 | However, ignoring their attempts to contact you, deliberately cheating, or receiving too many warnings may result in a ban. | ||
| 41 | |||
| 42 | As this is an open beta, we highly encourage players to test the limits and report any exploits they discover. Your feedback is essential to improving the system and ensuring fair competition. | ||
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 095cbbe..3980e1b 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx | |||
| @@ -11,6 +11,7 @@ import Maps from './pages/Maps'; | |||
| 11 | import User from './pages/User'; | 11 | import User from './pages/User'; |
| 12 | import Homepage from './pages/Homepage'; | 12 | import Homepage from './pages/Homepage'; |
| 13 | import UploadRunDialog from './components/UploadRunDialog'; | 13 | import UploadRunDialog from './components/UploadRunDialog'; |
| 14 | import Rules from './pages/Rules'; | ||
| 14 | import About from './pages/About'; | 15 | import About from './pages/About'; |
| 15 | import { Game } from './types/Game'; | 16 | import { Game } from './types/Game'; |
| 16 | import { API } from './api/Api'; | 17 | import { API } from './api/Api'; |
| @@ -59,6 +60,7 @@ const App: React.FC = () => { | |||
| 59 | <Route path="/games" element={<Games games={games} />} /> | 60 | <Route path="/games" element={<Games games={games} />} /> |
| 60 | <Route path='/games/:id' element={<Maplist />}></Route> | 61 | <Route path='/games/:id' element={<Maplist />}></Route> |
| 61 | <Route path="/maps/*" element={<Maps profile={profile} isModerator={isModerator} onUploadRun={(mapID) => {setUploadRunDialog(true);setUploadRunDialogMapID(mapID)}} />}/> | 62 | <Route path="/maps/*" element={<Maps profile={profile} isModerator={isModerator} onUploadRun={(mapID) => {setUploadRunDialog(true);setUploadRunDialogMapID(mapID)}} />}/> |
| 63 | <Route path="/rules" element={<Rules />} /> | ||
| 62 | <Route path="/about" element={<About />} /> | 64 | <Route path="/about" element={<About />} /> |
| 63 | <Route path='/rankings' element={<Rankings></Rankings>}></Route> | 65 | <Route path='/rankings' element={<Rankings></Rankings>}></Route> |
| 64 | <Route path="*" element={"404"} /> | 66 | <Route path="*" element={"404"} /> |
diff --git a/frontend/src/css/Rules.css b/frontend/src/css/Rules.css new file mode 100644 index 0000000..bbc84c0 --- /dev/null +++ b/frontend/src/css/Rules.css | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | main { | ||
| 2 | font-size: 24px; | ||
| 3 | } \ No newline at end of file | ||
diff --git a/frontend/src/pages/Rules.tsx b/frontend/src/pages/Rules.tsx new file mode 100644 index 0000000..516b73c --- /dev/null +++ b/frontend/src/pages/Rules.tsx | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | import React from 'react'; | ||
| 2 | import ReactMarkdown from 'react-markdown'; | ||
| 3 | |||
| 4 | import '../css/Rules.css'; | ||
| 5 | |||
| 6 | const Rules: React.FC = () => { | ||
| 7 | |||
| 8 | const [rulesText, setRulesText] = React.useState<string>(""); | ||
| 9 | |||
| 10 | React.useEffect(() => { | ||
| 11 | const fetchRules = async () => { | ||
| 12 | try { | ||
| 13 | const response = await fetch( | ||
| 14 | 'https://raw.githubusercontent.com/pektezol/leastportalshub/main/README.md' | ||
| 15 | ); | ||
| 16 | if (!response.ok) { | ||
| 17 | throw new Error('Failed to fetch README'); | ||
| 18 | } | ||
| 19 | const rulesText = await response.text(); | ||
| 20 | setRulesText(rulesText); | ||
| 21 | } catch (error) { | ||
| 22 | console.error('Error fetching Rules:', error); | ||
| 23 | } | ||
| 24 | setRulesText(rulesText) | ||
| 25 | }; | ||
| 26 | fetchRules(); | ||
| 27 | }, []); | ||
| 28 | |||
| 29 | |||
| 30 | return ( | ||
| 31 | <main> | ||
| 32 | <ReactMarkdown>{rulesText}</ReactMarkdown> | ||
| 33 | </main> | ||
| 34 | ); | ||
| 35 | }; | ||
| 36 | |||
| 37 | export default Rules; | ||