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

Started Catalan Translations, Fixed SoundManager. #372

Open
wants to merge 7 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
25 changes: 22 additions & 3 deletions client/src/scripts/managers/soundManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,24 @@ export class SoundManager {
soundsToLoad[key] = `.${path}`;
}

for (const [alias, path] of Object.entries(soundsToLoad)) {
const MAX_SIMULTANEOUS_SOUNDS = 20; // Set the maximum number of sounds to load simultaneously

const soundEntries = Object.entries(soundsToLoad);
let loadedCount = 0;

function loadNextSound() {
if (loadedCount >= soundEntries.length) {
return;
}

const [alias, path] = soundEntries[loadedCount];

/**
* For some reason, PIXI will call the `loaded` callback twice
* when an error occurs…
*/
let called = false;

PixiSound.sound.add(
alias,
{
Expand All @@ -191,9 +202,17 @@ export class SoundManager {
console.warn(`Failed to load sound '${alias}' (path '${path}')\nError object provided below`);
console.error(error);
}

loadedCount++;
loadNextSound(); // Load the next sound
}
}
);
}

// Load the sounds sequentially
for (let i = 0; i < MAX_SIMULTANEOUS_SOUNDS; i++) {
loadNextSound();
}
}
}
}
295 changes: 295 additions & 0 deletions client/src/translations/catalan.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,295 @@
import type { TranslationMap } from "../translations";

export const ENGLISH_TRANSLATIONS: TranslationMap = {
"name": "Català",
"flag": "🇪🇸",

"msg_rotate": "Per una millor experiència, col·loqui el seu dispositiu horitzontalment.",
"msg_loading": "Connectant",
"msg_err_joining": "Error a l'unir-se al joc.",
"msg_err_finding": "Error al trobar al joc..",
"msg_try_again": "Si us plau, provi un altre cop.",
"msg_warning": "Has estat avisat!",
"msg_warning_msg": "Has rebut un avis per part dels moderadors per: <reason>",
"msg_temp_ban": "Has estat restringit temporalment!",
"msg_temp_ban_msg": "Has estat restringit temproalment per: <reason>",
"msg_perma_ban": "Has estat restringit permanentment!",
"msg_perma_ban_msg": "Has estat restringit permanentment per: <reason>",
"msg_no_reason": "Ninguna raò provinguda.",

"play_solo": "Juga Solo",
"play_duo": "juga Duos",
"play_squad": "juga Escuadrons",
"join_team": "Uneix-te a un Equip",
"msg_locked_tooltip": "El joc intercambia Solos i Duos, degut a la falta de jugadors per ambdós.",
"rules_and_tutorial": "Regles i Tutorial",
"news": "Notícies",
"loadout": "Càrrega",
"settings": "Configuració",
"fullscreen": "Pantalla Completa",
"resume": "Continuar",
"quit": "Sortir",
"none": "Ningún",
"copy": "Copiar",

"health": "Salut",
"adrenaline": "adrenalina",

"settings_volume": "Volúm",
"settings_keybinds": "Dreceres",
"settings_graphics": "Gràfics",
"settings_interface": "Interfaç",
"settings_save_load": "Guardar/Càrregar",
"settings_mobile": "Mòvil",
"settings_require_reload": "* Cambiant aquestes configuracions requireix recàrregar la pàgina",
"settings_performance_warning": "* Aquesta configuració pot causar problemes en alguns dispositius. Deshabilita-la si ets incapaç d'unir-te al joc.",

"settings_master_volume": "Volum Màster",
"settings_sfx_volume": "Volume SFX",
"settings_music_volume": "Volum Música",
"settings_old_menu_music": "Música del Menú antic",

"settings_render_mode": "Mode Renderitzador",
"settings_render_resolution": "Resolució de Renderització",
"settings_render_resolution_auto": "Automàtic",
"settings_hires_textures": "Textures d'alta resolució",
"settings_cooler_graphics": "Gràfics més guais",
"settings_antialias": "Anti-aliasing",
"settings_movement_smoothing": "Suavització del Moviment",
"settings_responsive_rotation": "Rotació responsiva",
"settings_camera_shake": "Agitar camèra",

"settings_interface_scale": "Interface scale",
"settings_minimap_opacity": "Minimap opacity",
"settings_fs_map_opacity": "Fullscreen map opacity",
"settings_hide_minimap": "Hide minimap",
"settings_blur_splash": "Blur splash screen",
"settings_hide_rules": "Hide rules button",
"settings_warn_before_leaving": "Warn before leaving",
"settings_show_fps": "Show FPS",
"settings_show_ping": "Show ping",
"settings_show_coordinates": "Show coordinates",
"settings_anon_names": "Anonymous player names",
"settings_hide_emotes": "Hide emotes",
"settings_text_killfeed": "Text-based killfeed",
"settings_colored_weapon_slots": "Colored weapon slots",
"settings_scope_looping": "Loop scope selection",
"settings_draw_hud": "Draw HUD",
"settings_autopickup": "Enable autopickup",
"settings_autopickup_dual_guns": "Autopickup dual guns",

"settings_load_settings": "Load settings",
"settings_copy_settings": "Copy settings to clipboard",
"settings_reset_settings": "Reset settings",

"settings_reload": "Reload",
"settings_mobile_controls": "Enable mobile controls",
"settings_joystick_size": "Joystick size",
"settings_joystick_opacity": "Joystick opacity",

"loadout_skins": "Skins",
"loadout_emotes": "Emotes",
"loadout_crosshairs": "Crosshairs",
"loadout_badges": "Badges",
"loadout_special": "Special",
"loadout_crosshairs_default": "System default",
"loadout_crosshairs_size": "Size:",
"loadout_crosshairs_color": "Color:",
"loadout_crosshairs_stroke_size": "Stroke Size:",
"loadout_crosshairs_stroke_color": "Stroke Color:",

"emotes_category_People": "People",
"emotes_category_Text": "Text",
"emotes_category_Memes": "Memes",
"emotes_category_Icons": "Icons",
"emotes_category_Misc": "Misc",

"featured_youtubr": "Featured Youtubr",
"featured_streamr": "Featured Streamr",

"btn_report": "Report",
"btn_spectate_kill_leader": "Spectate Kill Leader",
"btn_spectate": "Spectate",
"btn_play_again": "Play Again",
"btn_menu": "Menu",

"msg_waiting_for_leader": "Waiting for leader",
"msg_you_died": "You died.",
"msg_player_died": "<player> died.",
"msg_win": "Winner Winner Chicken Dinner!",
"msg_your_rank": "Rank",

"msg_kills": "Kills: <kills>",

"gas_waiting": "Toxic gas advances in <time>",
"gas_advancing": "Toxic gas is advancing! Move to the safe zone",
"gas_inactive": "Waiting for players...",

"action_open_door": "Open Door",
"action_close_door": "Close Door",
"action_revive": "Revive <player>",
"action_cancel": "Cancel",
"action_reloading": "Reloading...",
"action_reviving": "Reviving...",
"action_being_revived": "Being revived...",
"action_gauze_use": "Applying <item>",
"action_medikit_use": "Using <item>",
"action_cola_use": "Drinking <item>",
"action_tablets_use": "Taking <item>",

"interact_airdrop_crate_locked": "Open Airdrop",
"interact_control_panel": "Activate Control Panel",
"interact_generator": "Activate Generator",
"interact_button": "Press Button",

"loading_spritesheets": "Loading Spritesheets <progress>",
"loading_connecting": "Connecting",
"loading_joining_game": "Joining Game",
"loading_fetching_data": "Fetching Server Data...",
"loading_finding_game": "Finding Game",

"keybind_clear_tooltip": "To remove a keybind, press the keybind and then press either <kbd>Escape</kbd> or <kbd>Backspace</kbd>.",
"keybind_reset": "Reset to defaults",
"bindings_+up": "Move Up",
"bindings_+down": "Move Down",
"bindings_+left": "Move Left",
"bindings_+right": "Move Right",
"bindings_interact": "Interact",
"bindings_loot": "Loot",
"bindings_slot 0": "Equip Primary",
"bindings_slot 1": "Equip Secondary",
"bindings_slot 2": "Equip Melee",
"bindings_equip_or_cycle_throwables 1": "Equip/Cycle Throwable",
"bindings_last_item": "Equip Last Weapon",
"bindings_other_weapon": "Equip Other Gun",
"bindings_swap_gun_slots": "Swap Gun Slots",
"bindings_cycle_items -1": "Equip Previous Weapon",
"bindings_cycle_items 1": "Equip Next Weapon",
"bindings_+attack": "Use Weapon",
"bindings_drop": "Drop Active Weapon",
"bindings_reload": "Reload",
"bindings_cycle_scopes -1": "Previous Scope",
"bindings_cycle_scopes 1": "Next Scope",
"bindings_use_consumable gauze": "Use Gauze",
"bindings_use_consumable medikit": "Use Medikit",
"bindings_use_consumable cola": "Use Cola",
"bindings_use_consumable tablets": "Use Tablets",
"bindings_cancel_action": "Cancel Action",
"bindings_+view_map": "View Map",
"bindings_toggle_map": "Toggle Fullscreen Map",
"bindings_toggle_minimap": "Toggle Minimap",
"bindings_toggle_hud": "Toggle HUD",
"bindings_+emote_wheel": "Emote Wheel",
"bindings_+map_ping_wheel": "Switch to Map Ping",
"bindings_+map_ping": "Map Ping Wheel",
"bindings_toggle_console": "Toggle Console",
"bindings_toggle_slot_lock": "Toggle Slot Lock",

"kf_suicide_kill": "<player> committed suicide",
"kf_suicide_down": "<player> knocked themselves out",
"kf_two_party_kill": "<player> killed <victim>",
"kf_two_party_down": "<player> knocked out <victim>",
"kf_bleed_out_kill": "<player> bled out",
"kf_bleed_out_down": "<player> bled out non-lethally",
"kf_finished_off_kill": "<player> finished off <victim>",
"kf_finished_off_down": "<player> gently finished off <victim>",
"kf_finally_died": "<player> finally died",
"kf_finally_ended_themselves": "<player> finally ended themselves",
"kf_finally_killed": "<player> was finally killed",
"kf_finally_down": "<player> was finally knocked out",
"kf_gas_kill": "<player> died to the gas",
"kf_gas_down": "<player> was knocked out by the gas",
"kf_airdrop_kill": "<player> was fatally crushed by an airdrop",
"kf_airdrop_down": "<player> was knocked out by an airdrop",
"kf_kl_promotion": "<player> is promoted to the Kill Leader!",
"kf_kl_killed": "<player> killed the Kill Leader",
"kf_kl_dead": "The Kill Leader is dead!",
"kf_kl_suicide": "The Kill Leader killed themselves!",

"tt_restores": "<item> restores <amount> <type>",
"tt_reduces": "<item> reduces <percent>% damage",

"go_kills": "Kills:",
"go_damage_done": "Damage Done:",
"go_damage_taken": "Damage Taken:",
"go_time_alive": "Time Alive:",

"create_team": "Create Team",
"create_team_autofill": "Auto Fill",
"create_team_lock": "Lock Team",
"create_team_waiting": "Waiting...",
"create_team_play": "Start Game",

"report_reporting": "Reporting",
"report_id": "Report ID:",
"report_instructions": `
<p><strong>Please follow the instructions below!</strong> If you don't, your report will be ignored.</p>
<h4>How to Submit a Report</h4>
<ol>
<li>Join the <a href="https://discord.suroi.io">Discord server.</a></li>
<li>Go to the <a href="https://discord.com/channels/1077043833621184563/1135288369526607973">#cheater-reports
channel.</a></li>
<li>Read the report guidelines in the pinned post.</li>
<li>Submit your report as a post.</li>
</ol>`,

"languages": "Llenguatges",

// loot

"gauze": "Gasa",
"medikit": "KitMedic",
"cola": "Cola",
"tablets": "Tabletes",

"basic_vest": "Armilla Bàsic",
"regular_vest": "Armilla Regular",
"tactical_vest": "Armilla Tàctica",
"basic_helmet": "Casc Bàsic",
"regular_helmet": "Casc Regular",
"tactical_helmet": "Casc Tàctic",
"bag": "Bossa", // This shouldn't show up in game
"basic_pack": "Lot Bàsic",
"regular_pack": "Lot Regular",
"tactical_pack": "Lot Tàctic",

"1x_scope": "1x Mira", // This shouldn't show up in game
"2x_scope": "2x Mira",
"4x_scope": "4x Mira",
"8x_scope": "8x Mira",
"15x_scope": "15x Mira",

"fists": "Punys",
"baseball_bat": "Bat de Beisbol",
"hatchet": "Destral",
"kbar": "K-bar",
"maul": "Maul",
"gas_can": "Llauna de Gas",
"heap_sword": "Espasa HE-AP",
"steelfang": "Steelfang",
"ice_pick": "Pic de Gel",
"seax": "Seax",

"mosin": "Mosin-Nagant",
"radio": "Ràdio",
"lewis_gun": "Arma Lewis",
"deathray": "Raig de la mort",
"firework_launcher": "Llençador de Focs Artificials",
"arena_closer": "Destructor de mons",
"revitalizer": "Revitalitzador",
"s_g17": "G17 (Scoped)",

"frag_grenade": "Grenada de Fragments",
"smoke_grenade": "Grenada de Fum",
"confetti_grenade": "Grenada de Confetti",

// For dual guns
"dual_template": "<gun> Dual",

// regions
"region_dev": "Servidor Local",
"region_na": "Nord Amèrica",
"region_eu": "Europa",
"region_sa": "Sud Amèrica",
"region_as": "Àsia"
};
2 changes: 1 addition & 1 deletion common/src/definitions/guns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ export const Guns = ObjectDefinitions.create<GunDefinition>()(
idString: "barrett",
name: "Barrett M95",
ammoType: "127mm",
ammoSpawnAmount: 20,
ammoSpawnAmount: 25,
capacity: 5,
reloadTime: 3.4,
fireDelay: 1400,
Expand Down
15 changes: 7 additions & 8 deletions server/src/utils/usernameFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ import { GameConstants } from "@common/constants";
import { Config } from "../config";

const badWordRegexes: RegExp[] = [
/n[i1l!|\\/(){}[\]]+[g693]+[e3]*[ra@]*/i, // N word
/f[a@4]+[g9]+[s$5z2]+[ao0]+[t+]*/i, // F slur
/n[a@4]+z[i1]+[s$5z2]*/i, // Nazi references
/a[d]+[o0]+[/|l1]+[f]+(\s|\W|_)*h[/|!i1]+[t]+[/|!l1]+[e3]+[r]+/i, // Hitler
/(?=.*k[i1]+[l1]+[l1]*)(?=.*j[e3]+[w]+[s$5z2]*)/i // Antisemitist stuff
// FIXME too broad, matches "rap"
// sounds like that * at the end should be a + then
/// (?=.*m[o0]+[l1]+[e3]+[s$5z2]+[t+]*)|(?=.*r[a@4]+[p]+[e3]*)/i // Molest and rape
/([nNhH]|[\|Il!\(\)\[\]]*[\\\/]+[\|Il!\(\)\[\]]*|[\|Il!\(\)\[\]]*[vV]+[\|Il!\(\)\[\]]*)+[iI!1\|\\\/?\*jeE€3£]+[kKgG369&£]+[eE€£3]*[rRaA@4]+/, // N word
/f[a@4]+[g9]+[s$5z2]+[ao0]+[t+]*/i, // F slur
/n[a@4]+z[i1]+[s$5z2]*/i, // Nazi references
/a[d]+[o0]+[/|l1]+[f]+(\s|\W|_)*h[/|!i1]+[t]+[/|!l1]+[e3]+[r]+/i, // Hitler
/(?=.*k[i1]+[l1]+[l1]*)(?=.*j[e3]+[w]+[s$5z2]*)/i, // Antisemitist stuff
// likely fixed now, please check and remove the following line if still broken
/(?=.*m[o0]+[l1]+[e3]+[s$5z2]+[t+]*)|(?=.*r[a@4]+[p]+[e3]+[\s\S]*r[a@4]+[p]+[e3])/i // Molest and rape lets the name rap go
];

export function cleanUsername(name?: string | null): string {
Expand Down