Skip to content

Commit

Permalink
Docs: Update pages with new badges
Browse files Browse the repository at this point in the history
Added Badge component for new, planned and deprecated.
  • Loading branch information
rtxa committed Aug 31, 2024
1 parent 4ba80a5 commit f333875
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 41 deletions.
56 changes: 27 additions & 29 deletions website/docs/guides/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ Here you will find most of the commands used in the mod.

## Client commands

### General

***New!** `say settings` or `settings` — Show server settings.
* <Badge type='new'/> `say settings` or `settings` — Show server settings.
* `help` — Lists all commands with their description into your console.
* `aglistvotes` — List available votes.
* `play_team <file.wav>` — Play .wav files to your teammates.
Expand All @@ -33,11 +31,13 @@ Here you will find most of the commands used in the mod.

* `dropitems` or `drop flag` — Drop flag in CTF mode.
* `ready/notready` — Set ready mode in Arena mode.
* 🚧 *Not Implemented* `customtimer` (seconds) — Shows countdown for the amount of seconds.
* 🚧 *Not Implemented* `variables` — Dump of server variable list.
* 🚧 *Not Implemented* `timeout` — Call 1 minute timeout in matches. Useful when a players drops from the match. Only one for team.
* <Badge type='planned'/> `timeout` — Call 1 minute timeout in matches. Useful when a players drops from the match. Only one for team.
* <Badge type='planned'/> `customtimer` — Shows countdown for the amount of seconds.
* <Badge type='planned'/> `variables` — Dump of server variable list.

## Vote and admin commands

### Match commands
### Match

* `agstart` — Start a match.
* `agallow [name or #userid]` — Allow a player into the match. If empty, you allow yourself to enter the match.
Expand All @@ -46,48 +46,46 @@ Here you will find most of the commands used in the mod.
* `agnextmode <mode>` — Set next mode.
* `agforcespectator <name or #userid>` — Force a player into spectator mode.
* `agforceteamup <name or #userid> <teamname or #teamid>` — Force a player into a team.

### Vote commands

* `ag_spectalk <0-1>` — Allow spectators to talk to all.
* `ag_gauss_fix <0-2>` — 0: Self gauss enabled. 1: Self gauss partially disabled. 2: Self gauss fully disabled.
* `ag_rpg_fix <0-1>` — Avoids self-damage on rocket launch when moving at high speeds or closer to a wall.
***New!** `mp_falldamage`— Enable fall damage for players.
***New!** `mp_bunnyhop <0-1>`— Enable bunny hop technique to gain additional speed.
***New!** `mp_footsteps`— Enable sound of player's footsteps.
***New!** `mp_forcerespawn`— Enforce respawn of players after 5 seconds.
***New!** `mp_flashlight`— Enable player flashlight.
***New!** `mp_selfgauss <0-2>` — 0: Self gauss partially disabled. 1: Self gauss enabled. 2: Self gauss fully disabled.

### General

* <Badge type='new'/> `mp_falldamage`— Enable fall damage for players.
* <Badge type='new'/> `mp_bunnyhop <0-1>`— Enable bunny hop technique to gain additional speed.
* <Badge type='new'/> `mp_footsteps`— Enable sound of player's footsteps.
* <Badge type='new'/> `mp_forcerespawn`— Enforce respawn of players after 5 seconds.
* <Badge type='new'/> `mp_flashlight`— Enable player flashlight.
* <Badge type='new'/> `mp_selfgauss <0-2>` — 0: Self gauss partially disabled. 1: Self gauss enabled. 2: Self gauss fully disabled.
* `mp_timelimit` — Sets the time limit for the current map, in minutes.
* `mp_friendlyfire` — Prevents players from damaging their teammates.
* `mp_weaponstay` — Weapons don't disappear from the floor when picked up.
* `mp_fraglimit` — Sets the frag limit for the current map.
* `sv_maxspeed` — Sets the maximum movement speed for players.
* *Deprecated* `agadmin` — Dropped in favour of AMXX admin system.
* <Badge type='deprecated'/> `agadmin` — Dropped in favour of AMXX admin system.

:::note
All game modes (TDM, Arena, etc.) and match commands (agstart, agallow, etc.) are already included in the vote list.
All game modes (TDM, Arena, etc.) are already included in the vote list.
:::

## Server variables

### General

***New!** `sv_ag_hud_color "230 230 0"` — Changes the color of AG Hud.
* <Badge type='new'/> `sv_ag_hud_color "230 230 0"` — Changes the color of AG Hud.
* `sv_ag_allowed_gamemodes "ffa;tdm;arena;arcade"` — The allowed gamemodes. Set this in startup_server.cfg.
* `sv_ag_max_spectators 32` — Max spectators allowed.
* `sv_ag_start_minplayers 2` — Minimum amount of players to allow match with agstart command.
* `ag_spectalk <0|1>` — Allow spectators to talk to all.
* 🚧 *Not Implemented* `sv_ag_show_gibs 1` — Show dead bodies.
* 🚧 *Not Implemented* `sv_ag_spawn_volume 0.5` — Respawn sound volume.
* 🚧 *Not Implemented* `sv_ag_allow_timeout 1` — Allow players calling timeout when playing a match.
* 🚧 *Not Implemented* `ag_spec_team_only 0` — Limit spectators to their team only.
* *Deprecated* `sv_ag_pure 1` — 0: Checks for player models consistency, variables and wallhack. 1: Adds checks for weapon models.
* <Badge type='planned'/> `sv_ag_show_gibs 1` — Show dead bodies.
* <Badge type='planned'/> `sv_ag_spawn_volume 0.5` — Respawn sound volume.
* <Badge type='planned'/> `sv_ag_allow_timeout 1` — Allow players calling timeout when playing a match.
* <Badge type='planned'/> `ag_spec_team_only 0` — Limit spectators to their team only.
* <Badge type='deprecated'/> `sv_ag_pure 1` — 0: Checks for player models consistency, variables and wallhack. 1: Adds checks for weapon models.

### Vote

* **New!** `sv_ag_vote_duration 30` — Duration of vote.
* **New!** `sv_ag_vote_oldstyle 0` — Sets the style of the vote. Old style (text vote) or the new style (HUD vote).
* <Badge type='new'/> `sv_ag_vote_duration 30` — Duration of vote.
* <Badge type='new'/> `sv_ag_vote_oldstyle 0` — Sets the style of the vote. Old style (text vote) or the new style (HUD vote).
* `sv_ag_allow_vote 1` — Allow voting.
* `sv_ag_vote_setting 1` — Vote ag_xxx settings.
* `sv_ag_vote_gamemode 1` — Allow game mode switching. If enabled, only shows available modes in `sv_ag_allowed_gamemodes`.
Expand All @@ -100,4 +98,4 @@ All game modes (TDM, Arena, etc.) and match commands (agstart, agallow, etc.) ar
* `sv_ag_vote_mp_timelimit_high 1440` — Highest timelimit to vote on.
* `sv_ag_vote_mp_fraglimit_low 0` — Lowest fraglimit to vote on.
* `sv_ag_vote_mp_fraglimit_high 999` — Highest fraglimit to vote on.
* *Deprecated* `sv_ag_vote_admin 0` — Allow voting an admin. Dropped in favour of AMXX admin system.
* <Badge type='deprecated'/> `sv_ag_vote_admin 0` — Allow voting an admin. Dropped in favour of AMXX admin system.
24 changes: 12 additions & 12 deletions website/docs/guides/gamemodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ Some settings don't change on the fly, requiring a map change to have any effect
### General
* `sv_ag_gametype ""` — Special plugins will be activated according to game type. E.g. `ctf`, `arena`, etc.
* `sv_ag_wallgauss 1` — Wall gauss effect multiplier.
* `sv_ag_headshot 3`Headshot damage multiplier.
* `sv_ag_blastradius 1`Explosions radius multiplier.
* 🚧 *Not implemented* `sv_ag_lj_timer 0` — Remove LJ from player after certain time.
* 🚧 *Not implemented* `sv_ag_spawn_volume 1` — Default volume for spawn.
* *Deprecated* `sv_ag_pure 0` 0: Checks for player models consistency, variables and wallhack. 1: Adds checks for weapon models.
* *Deprecated* `sv_ag_oldphysics 1` — Bunnyhop enabled. Dropped in favour of `mp_bunnyhop`.
* `sv_ag_headshot 3`Head shot damage multiplier.
* `sv_ag_blastradius 1`Explosion radius multiplier.
* <Badge type='planned' /> `sv_ag_lj_timer 0` — Remove LJ from player after certain time.
* <Badge type='planned' /> `sv_ag_spawn_volume 1` — Default volume for spawn.
* <Badge type='deprecated' /> `sv_ag_pure 0` 0: Checks for player models consistency, variables and wallhack. 1: Adds checks for weapon models.
* <Badge type='deprecated' /> `sv_ag_oldphysics 1` — Bunnyhop enabled. Dropped in favour of `mp_bunnyhop`.

### Ban weapons from the map
* `sv_ag_ban_crowbar 0`
Expand Down Expand Up @@ -96,9 +96,9 @@ Some settings don't change on the fly, requiring a map change to have any effect
* `sv_ag_start_longjump 0`

### Set weapons damage
* **New!** `sv_ag_dmg_bolts_normal 120` — Using scope.
* **New!** `sv_ag_dmg_bolts_explosion 40` — Not using scope.
* **New!** `sv_ag_dmg_gauss_secondary 200`
* <Badge type='new' /> `sv_ag_dmg_bolts_normal 120` — Using scope.
* <Badge type='new' /> `sv_ag_dmg_bolts_explosion 40` — Not using scope.
* <Badge type='new' /> `sv_ag_dmg_gauss_secondary 200`
* `sv_ag_dmg_crowbar 25`
* `sv_ag_dmg_glock 12`
* `sv_ag_dmg_357 40`
Expand All @@ -112,9 +112,9 @@ Some settings don't change on the fly, requiring a map change to have any effect
* `sv_ag_dmg_satchel 120`
* `sv_ag_dmg_tripmine 150`
* `sv_ag_dmg_m203 100`
* *Deprecated* `sv_ag_dmg_egon_narrow 10` — Dropped. This CVar is only used in single player.
* *Deprecated* `sv_ag_dmg_bolts` — Dropped in favour of better naming. Original mod never actually implemented this.
* *Deprecated* `sv_ag_dmg_crossbow` — Dropped in favour of better naming. Original mod never actually implemented this.
* <Badge type='deprecated' /> `sv_ag_dmg_egon_narrow 10` — Dropped. This CVar is only used in single player.
* <Badge type='deprecated' /> `sv_ag_dmg_bolts` — Dropped in favour of better naming. Original mod never actually implemented this.
* <Badge type='deprecated' /> `sv_ag_dmg_crossbow` — Dropped in favour of better naming. Original mod never actually implemented this.

:::caution Caution

Expand Down
26 changes: 26 additions & 0 deletions website/src/components/Badge/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
function Badge({ type }) {
let badgeContent;
let badgeClass;

switch (type) {
case 'new':
badgeContent = '✨ New';
badgeClass = 'badge badge--info';
break;
case 'planned':
badgeContent = '🚧 Planned';
badgeClass = 'badge badge--warning';
break;
case 'deprecated':
badgeContent = '🚫 Deprecated';
badgeClass = 'badge badge--danger';
break;
default:
badgeContent = '';
badgeClass = '';
}

return (<span class={badgeClass}>{badgeContent}</span>);
}

export default Badge;
5 changes: 5 additions & 0 deletions website/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
--ifm-color-primary-lighter: #8db8fe;
--ifm-color-primary-lightest: #c1d8ff;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
--ifm-badge-color: var(--ifm-font-color-base-inverse);
}

.badge--warning, .badge--danger, .badge--info {
color: black;
}

/* Only apply sidebar centering on Docs page */
Expand Down
2 changes: 2 additions & 0 deletions website/src/theme/MDXComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import React from 'react';
import MDXComponents from '@theme-original/MDXComponents';
import IconExternalLink from "@theme/Icon/ExternalLink";
import { Icon, InlineIcon } from '@iconify/react'; // Import the entire Iconify library.
import Badge from '@site/src/components/Badge';

export default {
// Re-use the default mapping
...MDXComponents,
Icon, // Make the iconify Icon component available in MDX as <icon />.
InlineIcon,
IconExternalLink,
Badge,
};

0 comments on commit f333875

Please sign in to comment.