Skip to content

Commit

Permalink
feat: Stamina bhop game mode
Browse files Browse the repository at this point in the history
Note: The game mode won't be visible on the map selector yet
  • Loading branch information
Panzerhandschuh committed Jan 19, 2025
1 parent 7ad6be1 commit 14bb93d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
3 changes: 2 additions & 1 deletion scripts/common/gamemode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const extraModeData = [
[Gamemode.CONC, { i18n: '#Gamemode_Conc' }],
[Gamemode.DEFRAG_CPM, { i18n: '#Gamemode_DefragCPM' }],
[Gamemode.DEFRAG_VQ3, { i18n: '#Gamemode_DefragVQ3' }],
[Gamemode.DEFRAG_VTG, { i18n: '#Gamemode_DefragVTG' }]
[Gamemode.DEFRAG_VTG, { i18n: '#Gamemode_DefragVTG' }],
[Gamemode.BHOP_STAMINA, { i18n: '#Gamemode_BhopStamina' }]
] as const;

// Just append to the existing data, shouldn't be using original version anywhere anyway.
Expand Down
21 changes: 17 additions & 4 deletions scripts/common/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export enum ISOCountryCode {
CC = 'Cocos (Keeling) Islands',
CD = 'Congo',
CF = 'Central African Republic',
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
CG = 'Congo',
CH = 'Switzerland',
CI = 'Ivory Coast',
Expand Down Expand Up @@ -505,7 +505,8 @@ export enum Gamemode {
CONC = 10,
DEFRAG_CPM = 11,
DEFRAG_VQ3 = 12,
DEFRAG_VTG = 13
DEFRAG_VTG = 13,
BHOP_STAMINA = 14
}

/**
Expand Down Expand Up @@ -714,7 +715,7 @@ export const BanNames: ReadonlyMap<Ban, string> = new Map([

export const GamemodeCategories: ReadonlyMap<GamemodeCategory, Array<Gamemode>> = new Map([
[GamemodeCategory.SURF, [Gamemode.SURF]],
[GamemodeCategory.BHOP, [Gamemode.BHOP, Gamemode.BHOP_HL1]],
[GamemodeCategory.BHOP, [Gamemode.BHOP, Gamemode.BHOP_HL1, Gamemode.BHOP_STAMINA]],
[GamemodeCategory.RJ, [Gamemode.RJ]],
[GamemodeCategory.SJ, [Gamemode.SJ]],
[GamemodeCategory.AHOP, [Gamemode.AHOP]],
Expand Down Expand Up @@ -763,6 +764,16 @@ export const GamemodeInfo: ReadonlyMap<Gamemode, GamemodeInfoProperties> = new M
icon: 'bhop'
}
],
[
Gamemode.BHOP_STAMINA,
{
category: GamemodeCategory.BHOP,
name: 'Bhop (Stamina)',
id: 'bhop_stamina',
prefix: 'sbhop',
icon: 'bhop'
}
],
[
Gamemode.CLIMB_MOM,
{
Expand Down Expand Up @@ -892,6 +903,7 @@ export const IncompatibleGamemodes: ReadonlyMap<Gamemode, ReadonlySet<Gamemode>>
[G.SURF, [Cats(GC.BHOP, GC.CLIMB)]],
[G.BHOP, [Cats(GC.SURF, GC.CLIMB)]],
[G.BHOP_HL1, [Cats(GC.SURF, GC.CLIMB)]],
[G.BHOP_STAMINA, [Cats(GC.SURF)]],
[G.CLIMB_MOM, [Cats(GC.SURF, GC.BHOP)]],
[G.CLIMB_KZT, [Cats(GC.SURF, GC.BHOP)]],
[G.CLIMB_16, [Cats(GC.SURF, GC.BHOP)]],
Expand Down Expand Up @@ -1018,6 +1030,7 @@ export const Tickrates: ReadonlyMap<Gamemode, number> = new Map([
[Gamemode.AHOP, 0.015],
[Gamemode.BHOP, 0.01],
[Gamemode.BHOP_HL1, 0.004],
[Gamemode.BHOP_STAMINA, 0.01],
[Gamemode.CLIMB_MOM, 0.01],
[Gamemode.CLIMB_KZT, 0.01],
[Gamemode.CLIMB_16, 0.01],
Expand Down Expand Up @@ -1563,7 +1576,7 @@ export interface CompletedRun {
//#endregion
//#region Misc

/* eslint-disable @typescript-eslint/naming-convention */
export interface TwitchStream {
title: string;
user_name: string;
Expand Down

0 comments on commit 14bb93d

Please sign in to comment.