diff options
author | RoyalBlue1 <realEmail@veryRealURL.com> | 2022-10-18 02:33:57 +0200 |
---|---|---|
committer | RoyalBlue1 <realEmail@veryRealURL.com> | 2022-10-18 02:33:57 +0200 |
commit | 52dab1de818e957c3817548de9bf23c1471172dd (patch) | |
tree | 0cfba289dda76c0851a8e8a587f6d0561cbf251a /Northstar.Client/mod | |
parent | e32bd27b12d198301e0221a1f4176c854487c6a9 (diff) | |
parent | 118f9414326b0af067ee2a925d052c3ee17e4bef (diff) | |
download | NorthstarMods-52dab1de818e957c3817548de9bf23c1471172dd.tar.gz NorthstarMods-52dab1de818e957c3817548de9bf23c1471172dd.zip |
Merge remote-tracking branch 'upsteam/main' into gamemode_fd
Diffstat (limited to 'Northstar.Client/mod')
16 files changed, 1353 insertions, 683 deletions
diff --git a/Northstar.Client/mod/resource/Lato-Regular.ttf b/Northstar.Client/mod/resource/Lato-Regular.ttf Binary files differnew file mode 100644 index 00000000..adbfc467 --- /dev/null +++ b/Northstar.Client/mod/resource/Lato-Regular.ttf diff --git a/Northstar.Client/mod/resource/NorthstarMono.ttf b/Northstar.Client/mod/resource/NorthstarMono.ttf Binary files differnew file mode 100644 index 00000000..2814eee6 --- /dev/null +++ b/Northstar.Client/mod/resource/NorthstarMono.ttf diff --git a/Northstar.Client/mod/resource/fontfiletable.txt b/Northstar.Client/mod/resource/fontfiletable.txt new file mode 100644 index 00000000..b4238134 --- /dev/null +++ b/Northstar.Client/mod/resource/fontfiletable.txt @@ -0,0 +1,40 @@ +FontFileTable +{ + "Default" "resource/MetronicPro-Regular.vfont" [!$JAPANESE && !$TCHINESE] + "Default" "resource/NotoSansJP-Regular.vfont" [$JAPANESE] + "Default" "resource/NotoSansTC-Regular.vfont" [$TCHINESE] + + "DefaultBold" "resource/MetronicPro-SemiBold.vfont" [!$JAPANESE && !$TCHINESE] + "DefaultBold" "resource/NotoSansJP-Regular.vfont" [$JAPANESE] + "DefaultBold" "resource/NotoSansTC-Regular.vfont" [$TCHINESE] + + "Titanfall" "resource/Titanfall-Regular.vfont" [!$JAPANESE && !$TCHINESE && !$RUSSIAN] + "Titanfall" "resource/NotoSansJP-Regular.vfont" [$JAPANESE] + "Titanfall" "resource/NotoSansTC-Regular.vfont" [$TCHINESE] + "Titanfall" "resource/MetronicPro-SemiBold.vfont" [$RUSSIAN] + + "marlett" "vgui/fonts/marlett.ttf" + + // Everything below is DONOTSHIP / Dev only + + "arial unicode ms" "resource/Lato-Regular.ttf" + + "lucida console" "resource/NorthstarMono.ttf" [$PC] + "lucida console" "resource/MetronicPro-Regular.vfont" [$GAMECONSOLE] + + "tahoma" "fonts\\tahoma.ttf" [$PC] + "tahoma" "resource/MetronicPro-Regular.vfont" [$GAMECONSOLE] + + "tahoma bold" "fonts\\tahomabd.ttf" [$PC] + "tahoma bold" "resource/MetronicPro-SemiBold.vfont" [$GAMECONSOLE] + + "courier new" "fonts\\cour.ttf" [$PC] + "courier new" "vgui/fonts/cour.ttf" [$GAMECONSOLE] + + "times new roman" "fonts\\times.ttf" [$PC] + "times new roman" "vgui/fonts/times.ttf" [$GAMECONSOLE] + + "arial" "resource/Lato-Regular.ttf" + "arial bold" "resource/Lato-Regular.ttf" + "arial narrow" "resource/Lato-Regular.ttf" +} diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt index 8c6cadcf..3382e5b1 100644 --- a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt +++ b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt @@ -301,6 +301,8 @@ Press Yes if you agree to this. This choice can be changed in the mods menu at a "SHOW_ALL" "All" "SHOW_ONLY_ENABLED" "Only Enabled" "SHOW_ONLY_DISABLED" "Only Disabled" + "SHOW_ONLY_NOT_REQUIRED" "Only Optional Mods" + "SHOW_ONLY_REQUIRED" "Only Required Mods" // Maps menu "HIDE_LOCKED" "Hide locked" diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_french.txt b/Northstar.Client/mod/resource/northstar_client_localisation_french.txt index 0d4786a0..276698a0 100644 --- a/Northstar.Client/mod/resource/northstar_client_localisation_french.txt +++ b/Northstar.Client/mod/resource/northstar_client_localisation_french.txt @@ -82,6 +82,8 @@ Choisissez Oui si vous êtes d'accord. Ce choix peut être modifié à tout inst "cp_amped_capture_points" "Points de capture améliorés" "coliseum_loadouts_enabled" "Equipements du Colisée" + "aitdm_archer_grunts" "Soldats (Archer)" + // northstar.custom localisation is just deciding not to work, so putting it here for now "PL_sbox" "Bac à sable" "PL_sbox_lobby" "Lobby: Bac à sable" diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_german.txt b/Northstar.Client/mod/resource/northstar_client_localisation_german.txt index 0eded5bc..9077fac0 100644 --- a/Northstar.Client/mod/resource/northstar_client_localisation_german.txt +++ b/Northstar.Client/mod/resource/northstar_client_localisation_german.txt @@ -8,6 +8,9 @@ "MENU_LAUNCH_NORTHSTAR" "Northstar starten" "MENU_TITLE_MODS" "Mods" "RELOAD_MODS" "Mods neu laden" + "WARNING" "Warnung" + "CORE_MOD_DISABLE_WARNING" "Das Deaktivieren von essentiellen Mods kann die Funktion deines Clients beeinträchtigen!" + "DISABLE" "Deaktiviere" "DIALOG_TITLE_INSTALLED_NORTHSTAR" "Danke, dass du Northstar installiert hast!" "AUTHENTICATION_AGREEMENT_DIALOG_TEXT" "Damit Northstar funktionieren kann, muss es mithilfe des Northstar Masterservers authentifizieren. Dies setzt ein Weitergeben deines Origin Tokens an den Masterserver voraus, er wird nicht gespeichert oder für andere Zwecke verwendet. @@ -16,6 +19,9 @@ Drücke Ja, um zuzustimmen. Du kannst diese Entscheidung jederzeit im Modmenü "AUTHENTICATION_AGREEMENT" "Authentifizierungs-Einwilligung" "AUTHENTICATION_AGREEMENT_RESTART" "Ein Neustart ist notwendig, um diese Änderung zu übernehmen" + "DIALOG_AUTHENTICATING_MASTERSERVER" "Authentifizierung mit Master Server" + "AUTHENTICATIONAGREEMENT_NO" "Du hast dich gegen die Authentifizierung mit Northstar entschieden. Du kannst die Authentifizierungs-Einwilligung im Modmenü ansehen." + "MENU_TITLE_SERVER_BROWSER" "Server Browser" "NS_SERVERBROWSER_NOSERVERS" "Keine Server gefunden" "NS_SERVERBROWSER_UNKNOWNMODE" "Unbekannter Modus" @@ -75,6 +81,8 @@ Drücke Ja, um zuzustimmen. Du kannst diese Entscheidung jederzeit im Modmenü "cp_amped_capture_points" "Verstärkte Hardpoints" "coliseum_loadouts_enabled" "Coliseum Loadouts" + "aitdm_archer_grunts" "Archer Frontsoldaten" + // northstar.custom localisation is just deciding not to work, so putting it here for now "PL_sbox" "Sandbox" "PL_sbox_lobby" "Sandbox Lobby" @@ -88,6 +96,8 @@ Drücke Ja, um zuzustimmen. Du kannst diese Entscheidung jederzeit im Modmenü "PL_gg_hint" "Erhalte einen Kill mit jeder Waffe um zu siegen." "PL_gg_abbr" "GG" "GAMEMODE_GG" "Gun Game" + "gg_kill_reward" "Killprozentbelohnung" + "gg_execution_reward" "Exekutierungsprozentbelohnung" "PL_tt" "Titan Tag" "PL_tt_lobby" "Titan Tag Lobby" @@ -113,6 +123,17 @@ Drücke Ja, um zuzustimmen. Du kannst diese Entscheidung jederzeit im Modmenü "HIDDEN_KILL_SURVIVORS" "Töte alle Überlebenden" "HIDDEN_FIRST_HIDDEN" "%s1 ist the The Hidden." + "PL_sns" "Stock und Stein" + "PL_sns_lobby" "Stock und Stein Lobby" + "PL_sns_desc" "Frei für Alle. Erziele Kills mit Impulsklingen und Exekutierungen um die Punktzahl des Gegners zurückzusetzen" + "PL_sns_abbr" "SuS" + "GAMEMODE_SNS" "Stock und Stein" + "sns_wme_kill_value" "Wingman Elite Killwert" + "sns_softball_kill_value" "Softball Killwert" + "sns_reset_kill_value" "Pulseklinge/Exekutierung Killwert" + "sns_melee_kill_value" "Nahkampfkill Killwert" + "sns_softball_enabled" "Softball aktiviert" + "PL_inf" "Infektion" "PL_inf_lobby" "Infektion-Lobby" "PL_inf_desc" "Überlebe die Infektion. Überlebende werden nach dem Tod infiziert." @@ -266,6 +287,15 @@ Drücke Ja, um zuzustimmen. Du kannst diese Entscheidung jederzeit im Modmenü "INGAME_PLAYERS" "Spieler: ^6BA6C400%s1" "TOTAL_SERVERS" "Server: ^C46C6C00%s1" + // Mods menu + "SHOW" "Anzeigen" + "SHOW_ALL" "Alle anzeigen" + "SHOW_ONLY_ENABLED" "Nur aktivierte" + "SHOW_ONLY_DISABLED" "Nur deaktivierte" + + // Maps menu + "HIDE_LOCKED" "Verstecke gesperrte" + // In-game chat "HUD_CHAT_WHISPER_PREFIX" "[WHISPER]" "HUD_CHAT_SERVER_PREFIX" "[SERVER]" diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_italian.txt b/Northstar.Client/mod/resource/northstar_client_localisation_italian.txt index b8253ad9..b0bc348f 100644 --- a/Northstar.Client/mod/resource/northstar_client_localisation_italian.txt +++ b/Northstar.Client/mod/resource/northstar_client_localisation_italian.txt @@ -6,6 +6,9 @@ "MENU_LAUNCH_NORTHSTAR" "Avvia Northstar" "MENU_TITLE_MODS" "Mods" "RELOAD_MODS" "Ricarica Mods" + "WARNING", "Attenzione" + "CORE_MOD_DISABLE_WARNING", "Disattivare Mods Principali può rompere il tuo Client!" + "DISABLE", "Disattiva" "DIALOG_TITLE_INSTALLED_NORTHSTAR" "Grazie per aver installato Northstar!" "AUTHENTICATION_AGREEMENT_DIALOG_TEXT" "Affinché Northstar funzioni, è necessario autenticarsi utilizzando il server principale di Northstar. Ciò richiederà l'invio del tuo token di Origin al server principale, non verrà archiviato o utilizzato per altri scopi. @@ -14,8 +17,12 @@ Premi Sì se sei d'accordo. Questa scelta può essere modificata in qualsiasi mo "AUTHENTICATION_AGREEMENT" "Accordo di autenticazione" "AUTHENTICATION_AGREEMENT_RESTART" "Dovrai riavviare Titanfall 2 affinché questa scelta abbia effetto." + "DIALOG_AUTHENTICATING_MASTERSERVER", "Autenticazione Sul Master Server in corso" + "AUTHENTICATIONAGREEMENT_NO", "Hai Scelto di non autenticarti con Northstar. Puoi vedere l'Accordo nel Menu Mods" + "MENU_TITLE_SERVER_BROWSER" "Server Browser" "NS_SERVERBROWSER_NOSERVERS" "Nessun server trovato" + "NS_SERVERBROWSER_UNKNOWNMODE", "Modalità Sconosciuta" "NS_SERVERBROWSER_WAITINGFORSERVERS" "In attesa dei server..." "NS_SERVERBROWSER_CONNECTIONFAILED" "Connessione fallita!" "REFRESH_SERVERS" "Aggiorna" @@ -46,6 +53,7 @@ Premi Sì se sei d'accordo. Questa scelta può essere modificata in qualsiasi mo "roundscorelimit" "Limite Punteggio (per round)" "timelimit" "Limite di Tempo" "roundtimelimit" "Limite di Tempo (per round)" + "respawnprotection", "Tempo Protezione di Respawn" "pilot_health_multiplier" "Moltiplicatore di Salute" "respawn_delay" "Tempo di Respawn" @@ -72,6 +80,8 @@ Premi Sì se sei d'accordo. Questa scelta può essere modificata in qualsiasi mo "cp_amped_capture_points" "Hardpoints Amplificati" "coliseum_loadouts_enabled" "Equipaggiamento Colosseo" + "aitdm_archer_grunts", "Schagniozzi Archer" + // northstar.custom localisation is just deciding not to work, so putting it here for now "PL_sbox" "Sandbox" "PL_sbox_lobby" "Sandbox Lobby" @@ -85,6 +95,10 @@ Premi Sì se sei d'accordo. Questa scelta può essere modificata in qualsiasi mo "PL_gg_hint" "Ottieni una nuova arma ogni uccisione." "PL_gg_abbr" "GG" "GAMEMODE_GG" "Gioco d'Armi" + "aitdm_archer_grunts", "Schagniozzi Archer" + "gg_kill_reward", "Punteggio Riconpensa Uccisione" + "gg_assist_reward", "Punteggio Ricompensa Assist" + "gg_execution_reward", "Punteggio Ricompensa Esecuzione" "PL_tt" "Titan Tag" "PL_tt_lobby" "Lobby: Titan Tag" @@ -110,6 +124,24 @@ Premi Sì se sei d'accordo. Questa scelta può essere modificata in qualsiasi mo "HIDDEN_KILL_SURVIVORS" "Uccidi tutti i giocatori." "HIDDEN_FIRST_HIDDEN" "%s1 è il Cacciatore." + "PL_sns", "Sticks and Stones" + "PL_sns_lobby", "Sticks and Stones Lobby" + "PL_sns_desc", "Tutti contro Tutti, Usa la Pulse Blade e Esecuzioni per Resettare il Puntegio Nemico" + "PL_sns_abbr", "SNS" + "GAMEMODE_SNS", "Sticks and Stones" + "SCOREBOARD_BANKRUPTS", "Uccisioni Bancarotta" + "SNS_LEADER_BANKRUPT", "Leader Punteggio andato in Bancarotta!" + "SNS_LEADER_BANKRUPT_SUB", "%s1 è stato Resettato da %s2" + "SNS_BANKRUPT", "Bancarotta!" + "SNS_BANKRUPT_SUB", "Il Tuo Punteggio è stato Resettato da %s1" + "sns_wme_kill_value", "Valore Uccisione Wingman d'Elite" + "sns_softball_kill_value", "Valore Uccisione Softball" + "sns_offhand_kill_value", "Valore Uccisione Improvvisa" + "sns_reset_kill_value", "Valore Uccisione Pulse/Esecuzione" + "sns_melee_kill_value", "Valore Uccisione Corpo a Corpo" + "sns_reset_pulse_blade_cooldown_on_pulse_blade_kill", "Reset Cooldown Uccisione" + "sns_softball_enabled", "Softball Attivato" + "PL_inf" "Infetto" "PL_inf_lobby" "Lobby: Infetto" "PL_inf_desc" "Sopravvivi all'infezione. I sopravvissuti vengono infettati quando uccisi." @@ -124,6 +156,13 @@ Premi Sì se sei d'accordo. Questa scelta può essere modificata in qualsiasi mo "INFECTION_YOU_ARE_LAST_SURVIVOR" "Sei l'Ultimo Sopravvissuto!" "INFECTION_SURVIVE_LAST_SURVIVOR" "Sopravvivi." + "PL_tffa", "Titan Free for All" + "PL_tffa_lobby", "Titan Free for All Lobby" + "PL_tffa_desc", "Ogni Pilota per sè, distruggi tutti i Titan Nemici." + "PL_tffa_hint", "Ogni Pilota per sè, distruggi tutti i Titan Nemici." + "PL_tffa_abbr", "TFFA" + "GAMEMODE_TFFA", "Titan Free for All" + "PL_hs" "Nascondino" "PL_hs_lobby" "Lobby: Nascondino" "PL_hs_desc" "Nasconditi oppure trova gli avversari." @@ -257,6 +296,15 @@ Premi Sì se sei d'accordo. Questa scelta può essere modificata in qualsiasi mo "INGAME_PLAYERS" "Players: ^6BA6C400%s1" "TOTAL_SERVERS" "Server: ^C46C6C00%s1" + // Mods menu + "SHOW", "Mostra" + "SHOW_ALL", "Mostra Tutti" + "SHOW_ONLY_ENABLED", "Mostra solo Attivi" + "SHOW_ONLY_DISABLED", "Mostra solo Inattivi" + + // Maps menu + "HIDE_LOCKED" "Nascondi bloccati" + // In-game chat "HUD_CHAT_WHISPER_PREFIX" "[WHISPER]" "HUD_CHAT_SERVER_PREFIX" "[SERVER]" diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_japanese.txt b/Northstar.Client/mod/resource/northstar_client_localisation_japanese.txt index 08772933..b35c9fb8 100644 --- a/Northstar.Client/mod/resource/northstar_client_localisation_japanese.txt +++ b/Northstar.Client/mod/resource/northstar_client_localisation_japanese.txt @@ -3,9 +3,15 @@ "Language" "japanese" "Tokens" { + // ファイルはUTF-16 LEでエンコードしてください、メモ帳なら"名前を付けて保存"から + "MENU_LAUNCH_NORTHSTAR" "Northstarを起動" "MENU_TITLE_MODS" "Modの管理" "RELOAD_MODS" "Modをリロード" + "WARNING" "警告" + "CORE_MOD_DISABLE_WARNING" "コアModを無効化すると、クライアントが破損する可能性があります!" + // 多分ボタンに使われると思うので「無効化」としたが、今後変更する必要があるかもしれない + "DISABLE" "無効化" "MENU_MAIN_AUTHENTICATING" "認証中..." "MENU_MAIN_CONNECTING" "ローカルサーバーへの接続" @@ -17,8 +23,12 @@ "AUTHENTICATION_AGREEMENT" "認証への同意" "AUTHENTICATION_AGREEMENT_RESTART" "変更を適用するには、一度Titanfall 2を再起動する必要があります。" + "DIALOG_AUTHENTICATING_MASTERSERVER" "マスターサーバーへ認証中..." + "AUTHENTICATIONAGREEMENT_NO" "Northstarの認証を行わないことを選択しました。Modメニューから再度このダイアログを開くことができます。" + "MENU_TITLE_SERVER_BROWSER" "サーバーブラウザー" "NS_SERVERBROWSER_NOSERVERS" "サーバーが見つかりませんでした。" + "NS_SERVERBROWSER_UNKNOWNMODE" "不明なモード" "NS_SERVERBROWSER_WAITINGFORSERVERS" "サーバーを待っています..." "NS_SERVERBROWSER_CONNECTIONFAILED" "接続に失敗しました!" // 要議論 @@ -60,6 +70,7 @@ // 要議論: "時間制限"のままか、"マッチ時間"、"タイム上限"、それ以外への差し替え "timelimit" "時間制限" "roundtimelimit" "時間制限 (ラウンドベース)" + "respawnprotection" "リスポーン保護時間" "pilot_health_multiplier" "ヘルス倍率" // 要議論: "リスポーン遅延" のままか、"リスポーンまでの時間"、それ以外への差し替え @@ -89,29 +100,76 @@ "cp_amped_capture_points" "拠点増幅" "coliseum_loadouts_enabled" "コロシアムロードアウト" + // そのまま「グラント」よりも、Respawn翻訳で使われている + //「ミニオン」のほうが伝わりやすいかもしれないのでこっちにする + // 「アーチャーを持ったミニオン」とかだと流石によくなさそうなのでとりあえずそのまま日本語に。 + "aitdm_archer_grunts" "アーチャー持ちミニオン" + // northstar.custom localisation is just deciding not to work, so putting it here for now "PL_sbox" "サンドボックス" - "PL_sbox_lobby" "サンドボックスロビー" + "PL_sbox_lobby" "サンドボックス ロビー" "PL_sbox_desc" "サンドボックス" "PL_sbox_abbr" "SBOX" "GAMEMODE_SBOX" "Sandbox" "PL_gg" "ガン・ゲーム" - "PL_gg_lobby" "ガン・ゲームロビー" + "PL_gg_lobby" "ガン・ゲーム ロビー" "PL_gg_desc" "全ての銃でキルを取って勝利しろ。" "PL_gg_hint" "全ての銃でキルを取って勝利しろ。" "PL_gg_abbr" "GG" "GAMEMODE_GG" "ガン・ゲーム" + "gg_kill_reward" "キルリワード倍率" + "gg_assist_reward" "アシストリワード倍率" + "gg_execution_reward" "処刑リワード倍率" "PL_tt" "タイタン・タグ" - "PL_tt_lobby" "タイタン・タグロビー" + "PL_tt_lobby" "タイタン・タグ ロビー" "PL_tt_desc" "タイタンとしてポイントを稼げ。敵のタイタンを破壊し自分のタイタンを確保しろ。" "PL_tt_hint" "タイタンとしてポイントを稼げ。敵のタイタンを破壊し自分のタイタンを確保しろ。" "PL_tt_abbr" "TT" "GAMEMODE_TT" "タイタン・タグ" + "PL_chamber" "ワン・イン・ザ・チャンバー" + "PL_chamber_lobby" "ワン・イン・ザ・チャンバー ロビー" + "PL_chamber_desc" "ワンショット・ワンキル。敵をキルして、弾倉に新たな弾丸を込めろ。" + "PL_chamber_hint" "ワンショット・ワンキル。敵をキルして、弾倉に新たな弾丸を込めろ。" + "PL_chamber_abbr" "CHAMBER" + "GAMEMODE_CHAMBER" "ワン・イン・ザ・チャンバー" + + "PL_hidden" "ザ・ヒデゥン" + "PL_hidden_lobby" "ザ・ヒデゥン ロビー" + "PL_hidden_desc" "透明化しているプレイヤーが一人潜んでいる。ヒデゥンを撃破せよ。" + "PL_hidden_hint" "透明化しているプレイヤーが一人潜んでいる。ヒデゥンを撃破せよ。" + "PL_hidden_abbr" "HIDDEN" + "GAMEMODE_HIDDEN" "ザ・ヒデゥン" + "HIDDEN_YOU_ARE_HIDDEN" "ヒデゥンになった!" + "HIDDEN_KILL_SURVIVORS" "すべてのサバイバーを撃破せよ。" + "HIDDEN_FIRST_HIDDEN" "%s1 はヒデゥンになった。" + + "PL_sns" "スティック・アンド・ストーン" + "PL_sns_lobby" "スティック・アンド・ストーン ロビー" + "PL_sns_desc" "フリー・フォー・オール。パルスブレードか、処刑を使用して敵のスコアをリセットできる。" + "PL_sns_abbr" "SNS" + "GAMEMODE_SNS" "スティック・アンド・ストーン" + // 要変更: 破産以外の言葉に置き換える + "SCOREBOARD_BANKRUPTS" "破産キル" + "SNS_LEADER_BANKRUPT" "スコアリーダーが破産した!" + "SNS_LEADER_BANKRUPT_SUB" "%s1 は %s2 にスコアをリセットされた" + "SNS_BANKRUPT" "破産!" + "SNS_BANKRUPT_SUB" "あなたのスコアは %s1 によってリセットされた" + // 要議論: value -> "数"?それとも"値"? + "sns_wme_kill_value" "ウィングマン・エリートキル数" + "sns_softball_kill_value" "ソフトボールキル数" + "sns_offhand_kill_value" "オフハンドキル数" + "sns_reset_kill_value" "パルスブレード/処刑キル数" + "sns_melee_kill_value" "格闘キル数" + // 要変更: 「キルリセットまでのクールダウンを有効化するかどうか」なのか、「キルによってクールダウンをリセットするかどうか」なのか。 + // ひとまずそのまま日本語に直したが、わかりにくいので変更するべき。 + "sns_reset_pulse_blade_cooldown_on_pulse_blade_kill" "キルクールダウンリセット" + "sns_softball_enabled" "ソフトボールを有効化" + "PL_inf" "インフェクション" - "PL_inf_lobby" "インフェクションロビー" + "PL_inf_lobby" "インフェクション ロビー" "PL_inf_desc" "生き残りは死亡するとインフェクターになる。" "PL_inf_hint" "生き残りは死亡するとインフェクターになる。" "PL_inf_abbr" "INF" @@ -125,8 +183,15 @@ "INFECTION_YOU_ARE_LAST_SURVIVOR" "お前が最後の生き残りだ!" "INFECTION_SURVIVE_LAST_SURVIVOR" "生きろ" + "PL_tffa" "タイタン フリー・フォー・オール" + "PL_tffa_lobby" "タイタン フリー・フォー・オール ロビー" + "PL_tffa_desc" "すべてのパイロットはタイタンに搭乗している。すべての敵タイタンを撃破せよ。" + "PL_tffa_hint" "すべてのパイロットはタイタンに搭乗している。すべての敵タイタンを撃破せよ。" + "PL_tffa_abbr" "TFFA" + "GAMEMODE_TFFA" "タイタン フリー・フォー・オール" + "PL_hs" "ハイド・アンド・シーク" - "PL_hs_lobby" "ハイド・アンド・シークロビー" + "PL_hs_lobby" "ハイド・アンド・シーク ロビー" "PL_hs_desc" "ハイダーは隠れ、シーカーはハイダーを探せ!" "PL_hs_hint" "ハイダーは隠れ、シーカーはハイダーを探せ!" "PL_hs_abbr" "HS" @@ -145,13 +210,13 @@ "GAMEMODE_fw" "フロンティア戦争" "PL_fw" "フロンティア戦争" - "PL_fw_lobby" "フロンティア戦争ロビー" + "PL_fw_lobby" "フロンティア戦争 ロビー" "PL_fw_desc" "敵のハーベスターを破壊し、自分のを守れ!" "PL_fw_abbr" "FW" "GAMEMODE_kr" "強化キルレース" "PL_kr" "強化キルレース" - "PL_kr_lobby" "強化キルレースロビー" + "PL_kr_lobby" "強化キルレース ロビー" "PL_kr_desc" "旗を拾い、キルレースを開始しろ。キルでポイントを上げ、キルレースの時間を延ばせ。最高ポイント記録が一番高い者が勝利する" "PL_kr_hint" "旗を拾い、キルレースを開始しろ。キルでポイントを上げ、キルレースの時間を延ばせ。最高ポイント記録が一番高い者が勝利する" "PL_kr_abbr" "KR" @@ -167,7 +232,7 @@ "GAMEMODE_fastball" "ファストボール" "PL_fastball" "ファストボール" - "PL_fastball_lobby" "ファストボールロビー" + "PL_fastball_lobby" "ファストボール ロビー" "PL_fastball_desc" "ライブファイア。パネルをハックし、味方を蘇生できる" "PL_fastball_hint" "ライブファイア。パネルをハックし、味方を蘇生できる" "PL_fastball_abbr" "FB" @@ -182,6 +247,7 @@ "MODE_SETTING_CATEGORY_BLEEDOUT" "パイロットのダウン" "custom_air_accel_pilot" "空中加速度" + "no_pilot_collision" "パイロット同士の当たり判定" "promode_enable" "Proモードの武器" "fp_embark_enabled" "搭乗と処刑の一人称視点" "classic_rodeo" "クラシックロデオ" @@ -257,10 +323,31 @@ "CONNECTING" "接続中..." "INGAME_PLAYERS" "プレイヤー数: ^6BA6C400%s1" "TOTAL_SERVERS" "サーバー数: ^C46C6C00%s1" - // Translation done by Zetryox and CYakigasi + + // Mods menu + "SHOW" "表示" + "SHOW_ALL" "全て" + "SHOW_ONLY_ENABLED" "有効のみ" + "SHOW_ONLY_DISABLED" "無効のみ" + + // Maps menu + "HIDE_LOCKED" "ロック中を隠す" // In-game chat "HUD_CHAT_WHISPER_PREFIX" "[WHISPER]" "HUD_CHAT_SERVER_PREFIX" "[SERVER]" + + "NO_GAMESERVER_RESPONSE" "ゲームサーバーに接続できません\n(Couldn't reach game server)" + "BAD_GAMESERVER_RESPONSE" "ゲームサーバーが不明なレスポンスを返しました\n(Game server gave an invalid response)" + "UNAUTHORIZED_GAMESERVER" "ゲームサーバーにそのリクエストを作成する許可がありません\n(Game server is not authorized to make that request)" + "UNAUTHORIZED_GAME" "StryderはこのアカウントがTitanfall 2を所持しているかどうかを確認できませんでした\nStryder couldn't confirm that this account owns Titanfall 2" + "UNAUTHORIZED_PWD" "パスワードが間違っています\n(Wrong password)" + "STRYDER_RESPONSE" "Stryderからのレスポンスの処理に失敗しました\n(Couldn't parse stryder response)" + "PLAYER_NOT_FOUND" "プレイヤーのアカウントが見つかりません\n(Couldn't find player account)" + "INVALID_MASTERSERVER_TOKEN" "マスターサーバーのトークンが不明か期限切れです\n(Invalid or expired masterserver token)" + "JSON_PARSE_ERROR" "JSONレスポンスの処理に失敗しました\n(Error parsing json response)" + "UNSUPPORTED_VERSION" "現在使用しているバージョンはサポートされていません\n(The version you are using is no longer supported)" + + // Translation done by Zetryox and CYakigasi } } diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_mspanish.txt b/Northstar.Client/mod/resource/northstar_client_localisation_mspanish.txt index ea62415e..208747f9 100644 --- a/Northstar.Client/mod/resource/northstar_client_localisation_mspanish.txt +++ b/Northstar.Client/mod/resource/northstar_client_localisation_mspanish.txt @@ -82,6 +82,8 @@ Si estas de acuerdo con esto, presiona SI. Esta decision puede ser cambiada en e "cp_amped_capture_points" "Fortalezas amplificadas" "coliseum_loadouts_enabled" "Equipamientos de coliseo" + "aitdm_archer_grunts" "Soldado Archer" + // northstar.custom localisation is just deciding not to work, so putting it here for now "PL_sbox" "Sandbox" "PL_sbox_lobby" "Lobby sandbox" diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_spanish.txt b/Northstar.Client/mod/resource/northstar_client_localisation_spanish.txt index 8d2df53b..fa732b63 100644 --- a/Northstar.Client/mod/resource/northstar_client_localisation_spanish.txt +++ b/Northstar.Client/mod/resource/northstar_client_localisation_spanish.txt @@ -82,6 +82,8 @@ Presiona Sí al estar de acuerdo. Esta opcion se puede cambiar en el menú de mo "cp_amped_capture_points" "Fortines cargados" "coliseum_loadouts_enabled" "Arsenales de coliseo" + "aitdm_archer_grunts" "Soldado Archer" + // northstar.custom localisation is just deciding not to work, so putting it here for now "PL_sbox" "Sandbox" "PL_sbox_lobby" "Vestíbulo de Sandbox" diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txt b/Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txt index 5e6721a9..276a192d 100644 --- a/Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txt +++ b/Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txt @@ -82,6 +82,8 @@ "cp_amped_capture_points" "強化據點" "coliseum_loadouts_enabled" "競技場裝備" + "aitdm_archer_grunts" "射手飛彈步兵" + // northstar.custom localisation is just deciding not to work, so putting it here for now "PL_sbox" "沙盒" "PL_sbox_lobby" "沙盒大廳" diff --git a/Northstar.Client/mod/resource/ui/menus/modlist.menu b/Northstar.Client/mod/resource/ui/menus/modlist.menu index ffe9a257..da59bcdd 100644 --- a/Northstar.Client/mod/resource/ui/menus/modlist.menu +++ b/Northstar.Client/mod/resource/ui/menus/modlist.menu @@ -1,4 +1,4 @@ -resource/ui/menus/mods_browse.menu +resource/ui/menus/modlist.menu { menu { @@ -18,497 +18,654 @@ resource/ui/menus/mods_browse.menu Vignette { - ControlName ImagePanel - InheritProperties MenuVignette + ControlName ImagePanel + InheritProperties MenuVignette } Title { - ControlName Label - InheritProperties MenuTitle - labelText "#MENU_TITLE_MODS" + ControlName Label + InheritProperties MenuTitle + labelText "#MENU_TITLE_MODS" } ImgTopBar { - ControlName ImagePanel - InheritProperties MenuTopBar + ControlName ImagePanel + InheritProperties MenuTopBar } - + ButtonRowAnchor { - ControlName Label - labelText "" + ControlName Label + labelText "" - xpos 120 - ypos 160 + xpos 120 + ypos 160 } - + FilterButtonsRowAnchor { - ControlName Label - labelText "" + ControlName Label + labelText "" - xpos 90 - ypos 848 + xpos 90 + ypos 848 } - + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// PANELS //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - BtnMod1 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 0 - navUp BtnMod15 - navDown BtnMod2 - - pin_to_sibling ButtonRowAnchor - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner TOP_LEFT - } - BtnMod2 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 1 - pin_to_sibling BtnMod1 - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT - navUp BtnMod1 - navDown BtnMod3 - } - BtnMod3 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 2 - pin_to_sibling BtnMod2 - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT - navUp BtnMod2 - navDown BtnMod4 - } - BtnMod4 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 3 - pin_to_sibling BtnMod3 - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT - //ypos 11 - navUp BtnMod3 - navDown BtnMod5 - } - BtnMod5 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 4 - pin_to_sibling BtnMod4 - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT - navUp BtnMod4 - navDown BtnMod6 - } - BtnMod6 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 5 - pin_to_sibling BtnMod5 - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT - navUp BtnMod5 - navDown BtnMod7 - } - BtnMod7 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 6 - pin_to_sibling BtnMod6 - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT - navUp BtnMod6 - navDown BtnMod8 - } - BtnMod8 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 7 - pin_to_sibling BtnMod7 - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT - navUp BtnMod7 - navDown BtnMod9 - } - BtnMod9 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 8 - pin_to_sibling BtnMod8 - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT - navUp BtnMod8 - navDown BtnMod10 - } - BtnMod10 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 9 - pin_to_sibling BtnMod9 - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT - navUp BtnMod9 - navDown BtnMod11 - } - BtnMod11 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 10 - pin_to_sibling BtnMod10 - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT - navUp BtnMod10 - navDown BtnMod12 - } - BtnMod12 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 11 - pin_to_sibling BtnMod11 - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT - navUp BtnMod11 - navDown BtnMod13 - } - BtnMod13 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 12 - pin_to_sibling BtnMod12 - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT - navUp BtnMod12 - navDown BtnMod14 - } - BtnMod14 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 13 - pin_to_sibling BtnMod13 - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT - navUp BtnMod13 - navDown BtnMod15 - } - BtnMod15 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 14 - pin_to_sibling BtnMod14 - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT - navUp BtnMod14 - navDown BtnMod1 - } - BtnMod16 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 15 - pin_to_sibling BtnMod15 - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT - navUp BtnMod15 - navDown BtnMod17 - } - BtnMod17 - { - ControlName RuiButton - InheritProperties RuiSmallButton - classname ModButton - scriptID 16 - pin_to_sibling BtnMod16 - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT - navUp BtnMod16 - navDown BtnMod18 + Panel1 + { + ControlName CNestedPanel + classname ModSelectorPanel + scriptID 1 + + controlSettingsFile "resource/ui/menus/panels/modlist_settings.res" + wide %100 + tall 45 + + pin_to_sibling ButtonRowAnchor + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + + Panel2 + { + ControlName "CNestedPanel" + classname ModSelectorPanel + scriptID 2 + + controlSettingsFile "resource/ui/menus/panels/modlist_settings.res" + wide %100 + tall 45 + + pin_to_sibling Panel1 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + + Panel3 + { + ControlName "CNestedPanel" + classname ModSelectorPanel + scriptID 3 + + controlSettingsFile "resource/ui/menus/panels/modlist_settings.res" + wide %100 + tall 45 + + pin_to_sibling Panel2 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + + Panel4 + { + ControlName "CNestedPanel" + classname ModSelectorPanel + scriptID 4 + + controlSettingsFile "resource/ui/menus/panels/modlist_settings.res" + wide %100 + tall 45 + + pin_to_sibling Panel3 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + + Panel5 + { + ControlName "CNestedPanel" + classname ModSelectorPanel + scriptID 5 + + controlSettingsFile "resource/ui/menus/panels/modlist_settings.res" + wide %100 + tall 45 + + pin_to_sibling Panel4 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + + Panel6 + { + ControlName "CNestedPanel" + classname ModSelectorPanel + scriptID 6 + + controlSettingsFile "resource/ui/menus/panels/modlist_settings.res" + wide %100 + tall 45 + + pin_to_sibling Panel5 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + + Panel7 + { + ControlName "CNestedPanel" + classname ModSelectorPanel + scriptID 7 + + controlSettingsFile "resource/ui/menus/panels/modlist_settings.res" + wide %100 + tall 45 + + pin_to_sibling Panel6 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + + Panel8 + { + ControlName "CNestedPanel" + classname ModSelectorPanel + scriptID 8 + + controlSettingsFile "resource/ui/menus/panels/modlist_settings.res" + wide %100 + tall 45 + + pin_to_sibling Panel7 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + + Panel9 + { + ControlName "CNestedPanel" + classname ModSelectorPanel + scriptID 9 + + controlSettingsFile "resource/ui/menus/panels/modlist_settings.res" + wide %100 + tall 45 + + pin_to_sibling Panel8 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + + Panel10 + { + ControlName "CNestedPanel" + classname ModSelectorPanel + scriptID 10 + + controlSettingsFile "resource/ui/menus/panels/modlist_settings.res" + wide %100 + tall 45 + + pin_to_sibling Panel9 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + + Panel11 + { + ControlName "CNestedPanel" + classname ModSelectorPanel + scriptID 11 + + controlSettingsFile "resource/ui/menus/panels/modlist_settings.res" + wide %100 + tall 45 + + pin_to_sibling Panel10 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + + Panel12 + { + ControlName "CNestedPanel" + classname ModSelectorPanel + scriptID 12 + + controlSettingsFile "resource/ui/menus/panels/modlist_settings.res" + wide %100 + tall 45 + + pin_to_sibling Panel11 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT } + Panel13 + { + ControlName "CNestedPanel" + classname ModSelectorPanel + scriptID 13 + + controlSettingsFile "resource/ui/menus/panels/modlist_settings.res" + wide %100 + tall 45 + + pin_to_sibling Panel12 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + + Panel14 + { + ControlName "CNestedPanel" + classname ModSelectorPanel + scriptID 14 + + controlSettingsFile "resource/ui/menus/panels/modlist_settings.res" + wide %100 + tall 45 + + pin_to_sibling Panel13 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + + Panel15 + { + ControlName "CNestedPanel" + classname ModSelectorPanel + scriptID 15 + + controlSettingsFile "resource/ui/menus/panels/modlist_settings.res" + wide %100 + tall 45 + + pin_to_sibling Panel14 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - +// FILTERS +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + FilterPanel { - ControlName RuiPanel - wide 800 - tall 112 - xpos -8 - classname FilterPanelChild - - rui "ui/knowledgebase_panel.rpak" + ControlName RuiPanel + classname FilterPanelChild + + wide 800 + tall 112 + xpos -8 + zpos -1 - visible 1 - zpos -1 + rui "ui/knowledgebase_panel.rpak" + visible 1 - pin_to_sibling FilterButtonsRowAnchor - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner TOP_LEFT + pin_to_sibling FilterButtonsRowAnchor + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner TOP_LEFT } - + BtnSearchLabel { - ControlName RuiButton - InheritProperties RuiSmallButton - labelText "#SEARCHBAR_LABEL" - textAlignment west - classname FilterPanelChild - - wide 500 - xpos -23 - ypos -16 - - wrap 1 - visible 1 - zpos 0 - - pin_to_sibling FilterButtonsRowAnchor - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner TOP_LEFT - } - + ControlName RuiButton + InheritProperties RuiSmallButton + classname FilterPanelChild + + labelText #SEARCHBAR_LABEL + textAlignment west + + wide 500 + xpos -23 + ypos -16 + zpos 0 + wrap 1 + visible 1 + + + + pin_to_sibling FilterButtonsRowAnchor + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner TOP_LEFT + } + BtnModsSearch { - ControlName TextEntry - classname FilterPanelChild - zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox. - xpos -400 - ypos -5 - wide 390 - tall 30 - textHidden 0 - editable 1 - font Default_21 - allowRightClickMenu 0 - allowSpecialCharacters 0 - unicode 0 - - pin_to_sibling BtnSearchLabel - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner TOP_RIGHT + ControlName TextEntry + classname FilterPanelChild + + zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox. + xpos -400 + ypos -5 + wide 390 + tall 30 + + textHidden 0 // Why? + editable 1 + font Default_21 + + allowRightClickMenu 0 + allowSpecialCharacters 0 + unicode 1 + + pin_to_sibling BtnSearchLabel + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner TOP_RIGHT } - + SwtBtnShowFilter { - ControlName RuiButton - InheritProperties SwitchButton - labelText "#SHOW" - ConVar "filter_mods" - classname FilterPanelChild + ControlName RuiButton + InheritProperties SwitchButton + classname FilterPanelChild + + labelText "#SHOW" + ConVar "filter_mods" wide 500 - + list { - "#SHOW_ALL" 0 - "#SHOW_ONLY_ENABLED" 1 - "#SHOW_ONLY_DISABLED" 2 + "#SHOW_ALL" 0 + "#SHOW_ONLY_ENABLED" 1 + "#SHOW_ONLY_DISABLED" 2 + "#SHOW_ONLY_NOT_REQUIRED" 3 + "#SHOW_ONLY_REQUIRED" 4 } - - pin_to_sibling BtnSearchLabel - pin_corner_to_sibling TOP_LEFT - pin_to_sibling_corner BOTTOM_LEFT + + pin_to_sibling BtnSearchLabel + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT } - + + BtnListReverse + { + ControlName RuiButton + InheritProperties SwitchButton + classname FilterPanelChild + + xpos -15 + ypos -15 + + labelText "Reverse" + ConVar "modlist_reverse" + wide 260 + + list + { + "low first" 0 + "high first" 1 + } + + pin_to_sibling FilterPanel + pin_corner_to_sibling TOP_RIGHT + pin_to_sibling_corner TOP_RIGHT + } + BtnFiltersClear { - ControlName RuiButton - InheritProperties RuiSmallButton - labelText "#CLEAR_FILTERS" - classname FilterPanelChild - wide 100 - xpos -15 - ypos -55 - zpos 90 - - scriptID 999 - - pin_to_sibling FilterPanel - pin_corner_to_sibling TOP_RIGHT - pin_to_sibling_corner BOTTOM_RIGHT + ControlName RuiButton + InheritProperties RuiSmallButton + classname FilterPanelChild + + labelText "#CLEAR_FILTERS" + wide 100 + xpos -15 + ypos -55 + zpos 90 + + pin_to_sibling FilterPanel + pin_corner_to_sibling TOP_RIGHT + pin_to_sibling_corner BOTTOM_RIGHT } - + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// MOD INFO +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + ModButtonsPanel + { + ControlName RuiPanel + classname FilterPanelChild + + wide 950 + tall 112 + + rui "ui/knowledgebase_panel.rpak" + + pin_to_sibling LabelDetails + pin_corner_to_sibling TOP + pin_to_sibling_corner BOTTOM + } + + HideCVButton + { + ControlName RuiButton + InheritProperties SwitchButton + + labelText "ConVars" + ConVar "modlist_show_convars" + wide 300 + + list + { + "Hidden" 0 + "Shown" 1 + } + + pin_to_sibling ModButtonsPanel + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner TOP_LEFT + } + + ModPageButton + { + ControlName RuiButton + InheritProperties RuiSmallButton + + textAlignment west + visible 0 + + pin_to_sibling HideCVButton + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + + WarningLegendImage + { + ControlName RuiPanel + + rui ui/basic_image.rpak + wide 30 + tall 30 + xpos -10 + ypos -5 + visible 0 + + pin_to_sibling ModButtonsPanel + pin_corner_to_sibling BOTTOM_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + + WarningLegendLabel + { + ControlName Label + + labelText " : This mod gets (un)loaded automatically" + wide 500 + tall 50 + visible 0 + + pin_to_sibling WarningLegendImage + pin_corner_to_sibling LEFT + pin_to_sibling_corner RIGHT + } + LabelDetails { - ControlName RuiPanel - xpos 900 - ypos 160 - tall 800 - wide 950 - rui "ui/knowledgebase_panel.rpak" - wrap 1 - visible 1 - zpos 1 + ControlName RuiPanel + + xpos 900 + ypos 160 + zpos 1 + + tall 688 + wide 950 + rui "ui/knowledgebase_panel.rpak" + wrap 1 + visible 1 } - + + ModEnabledBar + { + ControlName RuiPanel + + rui ui/basic_image.rpak + wide 950 + tall 7 + zpos 2 + visible 0 + + pin_to_sibling LabelDetails + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner TOP_LEFT + } + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// SLIDER //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + BtnModListUpArrow { - ControlName RuiButton - InheritProperties RuiSmallButton - //labelText "A" - wide 40 - tall 40 - xpos 2 - ypos 2 - - image "vgui/hud/white" - drawColor "255 255 255 128" - - pin_to_sibling LabelDetails - pin_corner_to_sibling TOP_RIGHT - pin_to_sibling_corner TOP_LEFT - } - + ControlName RuiButton + InheritProperties RuiSmallButton + + wide 40 + tall 40 + xpos 2 + ypos 2 + + image "vgui/hud/white" + drawColor "255 255 255 128" + + pin_to_sibling LabelDetails + pin_corner_to_sibling TOP_RIGHT + pin_to_sibling_corner TOP_LEFT + } + BtnModListUpArrowPanel { - ControlName RuiPanel - wide 40 - tall 40 - xpos 2 - ypos 2 - - rui "ui/knowledgebase_panel.rpak" - - visible 1 - zpos -1 - - pin_to_sibling LabelDetails - pin_corner_to_sibling TOP_RIGHT - pin_to_sibling_corner TOP_LEFT - } - + ControlName RuiPanel + + wide 40 + tall 40 + xpos 2 + ypos 2 + + rui "ui/knowledgebase_panel.rpak" + visible 1 + zpos -1 + + pin_to_sibling LabelDetails + pin_corner_to_sibling TOP_RIGHT + pin_to_sibling_corner TOP_LEFT + } + BtnModListDownArrow { - ControlName RuiButton - InheritProperties RuiSmallButton - //labelText "V" - wide 40 - tall 40 - xpos 2 - ypos -646 - - image "vgui/hud/white" - drawColor "255 255 255 128" - - pin_to_sibling LabelDetails - pin_corner_to_sibling TOP_RIGHT - pin_to_sibling_corner TOP_LEFT - } - + ControlName RuiButton + InheritProperties RuiSmallButton + + wide 40 + tall 40 + xpos 2 + ypos -646 + + image "vgui/hud/white" + drawColor "255 255 255 128" + + pin_to_sibling LabelDetails + pin_corner_to_sibling TOP_RIGHT + pin_to_sibling_corner TOP_LEFT + } + BtnModListDownArrowPanel { - ControlName RuiPanel - wide 40 - tall 40 - xpos 2 - ypos -646 - - rui "ui/knowledgebase_panel.rpak" - - visible 1 - zpos -1 - - pin_to_sibling LabelDetails - pin_corner_to_sibling TOP_RIGHT - pin_to_sibling_corner TOP_LEFT - } - + ControlName RuiPanel + + wide 40 + tall 40 + xpos 2 + ypos -646 + zpos -1 + + rui "ui/knowledgebase_panel.rpak" + visible 1 + + pin_to_sibling LabelDetails + pin_corner_to_sibling TOP_RIGHT + pin_to_sibling_corner TOP_LEFT + } + BtnModListSlider { - ControlName RuiButton - InheritProperties RuiSmallButton - //labelText "V" - wide 40 - tall 604 - xpos 2 - ypos -40 - zpos 0 - - image "vgui/hud/white" - drawColor "255 255 255 128" - - pin_to_sibling LabelDetails - pin_corner_to_sibling TOP_RIGHT - pin_to_sibling_corner TOP_LEFT - } - + ControlName RuiButton + InheritProperties RuiSmallButton + + wide 40 + tall 604 + xpos 2 + ypos -40 + zpos 0 + + image "vgui/hud/white" + drawColor "255 255 255 128" + + pin_to_sibling LabelDetails + pin_corner_to_sibling TOP_RIGHT + pin_to_sibling_corner TOP_LEFT + } + BtnModListSliderPanel { - ControlName RuiPanel - wide 40 - tall 604 - xpos 2 - ypos -40 - - rui "ui/knowledgebase_panel.rpak" - - visible 1 - zpos -1 - - pin_to_sibling LabelDetails - pin_corner_to_sibling TOP_RIGHT - pin_to_sibling_corner TOP_LEFT - } - + ControlName RuiPanel + + wide 40 + tall 604 + xpos 2 + ypos -40 + zpos -1 + + rui "ui/knowledgebase_panel.rpak" + visible 1 + + + pin_to_sibling LabelDetails + pin_corner_to_sibling TOP_RIGHT + pin_to_sibling_corner TOP_LEFT + } + // sh_menu_models.gnut has a global function which gets called when // left mouse button gets called while hovering and has mouse // deltaX; deltaY which we can yoink for ourselfes MouseMovementCapture { - ControlName CMouseMovementCapturePanel - wide 40 - tall 604 - xpos 2 - ypos -40 - zpos 1 - - pin_to_sibling LabelDetails - pin_corner_to_sibling TOP_RIGHT - pin_to_sibling_corner TOP_LEFT + ControlName CMouseMovementCapturePanel + + wide 40 + tall 604 + xpos 2 + ypos -40 + zpos 1 + + pin_to_sibling LabelDetails + pin_corner_to_sibling TOP_RIGHT + pin_to_sibling_corner TOP_LEFT } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// FooterButtons { - ControlName CNestedPanel - InheritProperties FooterButtons + ControlName CNestedPanel + InheritProperties FooterButtons } } } diff --git a/Northstar.Client/mod/resource/ui/menus/panels/modlist_settings.res b/Northstar.Client/mod/resource/ui/menus/panels/modlist_settings.res new file mode 100644 index 00000000..cd596238 --- /dev/null +++ b/Northstar.Client/mod/resource/ui/menus/panels/modlist_settings.res @@ -0,0 +1,79 @@ +resource/ui/menus/panels/modlist_setting.res +{ + BtnMod + { + ControlName RuiButton + InheritProperties RuiSmallButton + classname ModButton + labelText "please show up" + + pin_to_sibling ControlBox + pin_corner_to_sibling LEFT + pin_to_sibling_corner RIGHT + } + + Header + { + ControlName Label + wide 400 + labelText "labelText" + + pin_to_sibling ControlBox + pin_corner_to_sibling LEFT + pin_to_sibling_corner RIGHT + } + + ControlBox + { + ControlName RuiPanel + classname ControlBox + + tall 30 + wide 5 + ypos 5 + rui "ui/basic_image.rpak" + + pin_corner_to_sibling LEFT + pin_to_sibling_corner LEFT + } + + BottomLine + { + ControlName ImagePanel + InheritProperties MenuTopBar + ypos 0 + wide %50 + + pin_to_sibling BtnMod + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + } + + WarningImage + { + ControlName RuiPanel + + rui ui/basic_image.rpak + wide 30 + tall 30 + visible 0 + + pin_to_sibling BtnMod + pin_corner_to_sibling LEFT + pin_to_sibling_corner RIGHT + } + + EnabledImage + { + ControlName RuiPanel + + rui ui/basic_image.rpak + wide 30 + tall 30 + visible 0 + + pin_to_sibling BtnMod + pin_corner_to_sibling RIGHT + pin_to_sibling_corner LEFT + } +} diff --git a/Northstar.Client/mod/resource/ui/menus/server_browser.menu b/Northstar.Client/mod/resource/ui/menus/server_browser.menu index 89fb951d..d25d1219 100644 --- a/Northstar.Client/mod/resource/ui/menus/server_browser.menu +++ b/Northstar.Client/mod/resource/ui/menus/server_browser.menu @@ -2197,7 +2197,7 @@ resource/ui/menus/mods_browse.menu font Default_21 allowRightClickMenu 0 allowSpecialCharacters 0 - unicode 0 + unicode 1 pin_to_sibling BtnSearchLabel pin_corner_to_sibling TOP_LEFT diff --git a/Northstar.Client/mod/scripts/kb_act.lst b/Northstar.Client/mod/scripts/kb_act.lst index ace98222..238d7eef 100644 --- a/Northstar.Client/mod/scripts/kb_act.lst +++ b/Northstar.Client/mod/scripts/kb_act.lst @@ -1,7 +1,16 @@ "blank" "==========================" "blank" "NORTHSTAR" "blank" "==========================" -"toggleconsole" "Toggle Developer Console" +"toggleconsole" "Toggle Developer Console" +"vote 1" "Vote 1" +"vote 2" "Vote 2" +"vote 3" "Vote 3" +"vote 4" "Vote 4" +"vote 5" "Vote 5" +"vote 6" "Vote 6" +"vote 7" "Vote 7" +"vote 8" "Vote 8" +"vote 9" "Vote 9" "blank" "==========================" "blank" "#KEY_BINDINGS_HEADER_ACTIONS" "blank" "==========================" diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut index 15d78025..329ea73f 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut @@ -5,18 +5,26 @@ global function AddNorthstarModMenu_MainMenuFooter global function ReloadMods -const int BUTTONS_PER_PAGE = 17 - +struct modData { + string name = "" + string version = "" + string link = "" + int loadPriority = 0 + bool enabled = false + array<string> conVars = [] +} -struct modStruct { - int modIndex - string modName +struct panelContent { + modData& mod + bool isHeader = false } enum filterShow { ALL = 0, ONLY_ENABLED = 1, ONLY_DISABLED = 2 + ONLY_NOT_REQUIRED = 3, + ONLY_REQUIRED = 4 } struct { @@ -25,16 +33,19 @@ struct { } mouseDeltaBuffer struct { - bool shouldReloadModsOnEnd - string currentMod - var currentButton - int scrollOffset = 0 - - array<modStruct> modsArrayFiltered - + array<panelContent> mods var menu + array<var> panels + int scrollOffset = 0 + array<string> enabledMods + var currentButton + string searchTerm + modData& lastMod } file +const int PANELS_LEN = 15 +const string[3] CORE_MODS = ["Northstar.Client", "Northstar.Coop", "Northstar.CustomServers"] // Shows a warning if you try to disable these + void function AddNorthstarModMenu() { AddMenu( "ModListMenu", $"resource/ui/menus/modlist.menu", InitModMenu ) @@ -54,11 +65,46 @@ void function AdvanceToModListMenu( var button ) void function InitModMenu() { file.menu = GetMenu( "ModListMenu" ) - + file.panels = GetElementsByClassname( file.menu, "ModSelectorPanel" ) + + var rui = Hud_GetRui( Hud_GetChild( file.menu, "WarningLegendImage" ) ) + RuiSetImage( rui, "basicImage", $"ui/menu/common/dialog_error" ) + + RuiSetFloat( Hud_GetRui( Hud_GetChild( file.menu, "ModEnabledBar" ) ), "basicImageAlpha", 0.8 ) + + // Mod buttons + foreach ( var panel in file.panels ) + { + var button = Hud_GetChild( panel, "BtnMod" ) + AddButtonEventHandler( button, UIE_GET_FOCUS, OnModButtonFocused ) + AddButtonEventHandler( button, UIE_CLICK, OnModButtonPressed ) + + var rui = Hud_GetRui( Hud_GetChild( panel, "WarningImage" ) ) + RuiSetImage( rui, "basicImage", $"ui/menu/common/dialog_error" ) + } + AddMouseMovementCaptureHandler( file.menu, UpdateMouseDeltaBuffer ) + // UI Events AddMenuEventHandler( file.menu, eUIEvent.MENU_OPEN, OnModMenuOpened ) AddMenuEventHandler( file.menu, eUIEvent.MENU_CLOSE, OnModMenuClosed ) + + // up / down buttons + AddButtonEventHandler( Hud_GetChild( file.menu, "BtnModListUpArrow" ), UIE_CLICK, OnUpArrowSelected ) + AddButtonEventHandler( Hud_GetChild( file.menu, "BtnModListDownArrow" ), UIE_CLICK, OnDownArrowSelected ) + + // Mod info buttons + AddButtonEventHandler( Hud_GetChild( file.menu, "ModPageButton" ), UIE_CLICK, OnModLinkButtonPressed ) + + // Filter buttons + AddButtonEventHandler( Hud_GetChild( file.menu, "SwtBtnShowFilter"), UIE_CHANGE, OnFiltersChange ) + AddButtonEventHandler( Hud_GetChild( file.menu, "BtnModsSearch"), UIE_CHANGE, OnFiltersChange ) + AddButtonEventHandler( Hud_GetChild( file.menu, "BtnListReverse"), UIE_CHANGE, OnFiltersChange ) + AddButtonEventHandler( Hud_GetChild( file.menu, "BtnFiltersClear"), UIE_CLICK, OnBtnFiltersClear_Activate ) + + AddButtonEventHandler( Hud_GetChild( file.menu, "HideCVButton"), UIE_CHANGE, OnHideConVarsChange ) + + // Footers AddMenuFooterOption( file.menu, BUTTON_B, "#B_BUTTON_BACK", "#BACK" ) AddMenuFooterOption( file.menu, @@ -74,37 +120,25 @@ void function InitModMenu() "#AUTHENTICATION_AGREEMENT", OnAuthenticationAgreementButtonPressed ) - - foreach ( var button in GetElementsByClassname( file.menu, "ModButton" ) ) - { - AddButtonEventHandler( button, UIE_GET_FOCUS, OnModMenuButtonFocused ) - AddButtonEventHandler( button, UIE_CLICK, OnModMenuButtonPressed ) - } - - AddButtonEventHandler( Hud_GetChild( file.menu, "SwtBtnShowFilter"), UIE_CHANGE, OnFiltersChange ) - AddButtonEventHandler( Hud_GetChild( file.menu, "BtnModsSearch"), UIE_CHANGE, OnFiltersChange ) - - AddButtonEventHandler( Hud_GetChild( file.menu, "BtnModListUpArrow"), UIE_CLICK, OnUpArrowSelected ) - AddButtonEventHandler( Hud_GetChild( file.menu, "BtnModListDownArrow"), UIE_CLICK, OnDownArrowSelected ) - - AddButtonEventHandler( Hud_GetChild( file.menu, "BtnFiltersClear"), UIE_CLICK, OnBtnFiltersClear_Activate ) - + // Nuke weird rui on filter switch RuiSetString( Hud_GetRui( Hud_GetChild( file.menu, "SwtBtnShowFilter")), "buttonText", "") + RuiSetString( Hud_GetRui( Hud_GetChild( file.menu, "HideCVButton")), "buttonText", "") + RuiSetString( Hud_GetRui( Hud_GetChild( file.menu, "BtnListReverse")), "buttonText", "") } +// EVENTS + void function OnModMenuOpened() { - file.shouldReloadModsOnEnd = false - file.scrollOffset = 0 - - RegisterButtonPressedCallback(MOUSE_WHEEL_UP , OnScrollUp) - RegisterButtonPressedCallback(MOUSE_WHEEL_DOWN , OnScrollDown) + file.enabledMods = GetEnabledModsArray() // used to check if mods should be reloaded - Hud_SetText( Hud_GetChild( file.menu, "Title" ), "#MENU_TITLE_MODS" ) + UpdateList() + UpdateListSliderHeight() + UpdateListSliderPosition() - - OnFiltersChange(0) + RegisterButtonPressedCallback(MOUSE_WHEEL_UP , OnScrollUp) + RegisterButtonPressedCallback(MOUSE_WHEEL_DOWN , OnScrollDown) } void function OnModMenuClosed() @@ -115,120 +149,123 @@ void function OnModMenuClosed() DeregisterButtonPressedCallback(MOUSE_WHEEL_DOWN , OnScrollDown) } catch ( ex ) {} - - if ( file.shouldReloadModsOnEnd ) - ReloadMods() -} - -void function OnFiltersChange( var n ) -{ - file.scrollOffset = 0 - - HideAllButtons() - - RefreshModsArray() - - UpdateList() - - UpdateListSliderHeight() -} -void function RefreshModsArray() -{ - string searchTerm = Hud_GetUTF8Text( Hud_GetChild( file.menu, "BtnModsSearch" ) ).tolower() - - file.modsArrayFiltered.clear() - - - bool useSearch = searchTerm != "" - - - array<string> modNames = NSGetModNames() - int modCount = modNames.len() - - foreach ( int index_, mod in modNames ) { - modStruct tempMod - tempMod.modIndex = index_ - tempMod.modName = mod - - int filter = GetConVarInt( "filter_mods" ) - bool enabled = NSIsModEnabled( tempMod.modName ) - - bool containsTerm = tempMod.modName.tolower().find(searchTerm) != null - - if ( filter == filterShow.ALL && (useSearch == true ? containsTerm : true ) ) - { - file.modsArrayFiltered.append( tempMod ) - } - else if ( filter == filterShow.ONLY_ENABLED && enabled && (useSearch == true ? containsTerm : true )) - { - file.modsArrayFiltered.append( tempMod ) - } - else if ( filter == filterShow.ONLY_DISABLED && !enabled && (useSearch == true ? containsTerm : true )) + array<string> current = GetEnabledModsArray() + bool reload + foreach ( string mod in current ) + { + if ( file.enabledMods.find(mod) == -1 ) { - file.modsArrayFiltered.append( tempMod ) + reload = true + break } } + if ( current.len() != file.enabledMods.len() || reload ) // Only reload if we have to + ReloadMods() } -void function HideAllButtons() +void function OnModButtonFocused( var button ) { - array<var> buttons = GetElementsByClassname( file.menu, "ModButton" ) - - // disable all buttons, we'll enable the ones we need later - foreach ( var button in buttons ) + if( int ( Hud_GetScriptID( Hud_GetParent( button ) ) ) > file.mods.len() ) + return + + file.currentButton = button + file.lastMod = file.mods[ int ( Hud_GetScriptID( Hud_GetParent( button ) ) ) + file.scrollOffset - 1 ].mod + string modName = file.lastMod.name + var rui = Hud_GetRui( Hud_GetChild( file.menu, "LabelDetails" ) ) + + RuiSetGameTime( rui, "startTime", -99999.99 ) // make sure it skips the whole animation for showing this + RuiSetString( rui, "headerText", modName ) + RuiSetString( rui, "messageText", FormatModDescription( modName ) ) + + // Add a button to open the link with if required + string link = NSGetModDownloadLinkByModName( modName ) + var linkButton = Hud_GetChild( file.menu, "ModPageButton" ) + if ( link.len() ) { - Hud_SetEnabled( button, false ) - Hud_SetVisible( button, false ) + Hud_SetEnabled( linkButton, true ) + Hud_SetVisible( linkButton, true ) + Hud_SetText( linkButton, link ) } + else + { + Hud_SetEnabled( linkButton, false ) + Hud_SetVisible( linkButton, false ) + } + + SetControlBarColor( modName ) + + bool required = NSIsModRequiredOnClient( modName ) + Hud_SetVisible( Hud_GetChild( file.menu, "WarningLegendLabel" ), required ) + Hud_SetVisible( Hud_GetChild( file.menu, "WarningLegendImage" ), required ) } -void function UpdateList() +void function OnModButtonPressed( var button ) { - array<var> buttons = GetElementsByClassname( file.menu, "ModButton" ) - - - int j = file.modsArrayFiltered.len() > 17 ? 17 : file.modsArrayFiltered.len() - - for ( int i = 0; i < j; i++ ) + string modName = file.mods[ int ( Hud_GetScriptID( Hud_GetParent( button ) ) ) + file.scrollOffset - 1 ].mod.name + if ( StaticFind( modName ) && NSIsModEnabled( modName ) ) + CoreModToggleDialog( modName ) + else { - Hud_SetEnabled( buttons[ i ], true ) - Hud_SetVisible( buttons[ i ], true ) - - SetModMenuNameText( buttons[ i ] ) + NSSetModEnabled( modName, !NSIsModEnabled( modName ) ) + var panel = file.panels[ int ( Hud_GetScriptID( Hud_GetParent( button ) ) ) - 1 ] + SetControlBoxColor( Hud_GetChild( panel, "ControlBox" ), modName ) + SetControlBarColor( modName ) + SetModEnabledHelperImageAsset( Hud_GetChild( panel, "EnabledImage" ), modName ) + // RefreshMods() + UpdateListSliderPosition() + UpdateListSliderHeight() } } -void function SetModMenuNameText( var button ) +void function OnReloadModsButtonPressed( var button ) { - modStruct mod = file.modsArrayFiltered[ int ( Hud_GetScriptID( button ) ) + file.scrollOffset ] + ReloadMods() +} - // should be localisation at some point - if ( NSIsModEnabled( mod.modName ) ) - SetButtonRuiText( button, mod.modName + " v" + NSGetModVersionByModName( mod.modName ) ) - else - SetButtonRuiText( button, mod.modName + " (DISABLED)" ) +void function OnAuthenticationAgreementButtonPressed( var button ) +{ + NorthstarMasterServerAuthDialog() } -void function OnModMenuButtonPressed( var button ) +void function OnModLinkButtonPressed( var button ) { - string modName = file.modsArrayFiltered[ int ( Hud_GetScriptID( button ) ) + file.scrollOffset ].modName - if ( ( modName == "Northstar.Client" || modName == "Northstar.Coop" || modName == "Northstar.CustomServers") && NSIsModEnabled( modName ) ) - { - file.currentMod = modName - file.currentButton = button - CoreModToggleDialog( modName ) - } - else - { - NSSetModEnabled( modName, !NSIsModEnabled( modName ) ) + string modName = file.mods[ int ( Hud_GetScriptID( Hud_GetParent( file.currentButton ) ) ) + file.scrollOffset - 1 ].mod.name + string link = NSGetModDownloadLinkByModName( modName ) + if ( link.find("http://") != 0 && link.find("https://") != 0 ) + link = "http://" + link // links without the http or https protocol get opened in the internal browser + LaunchExternalWebBrowser( link, WEBBROWSER_FLAG_FORCEEXTERNAL ) +} - SetModMenuNameText( button ) +void function OnFiltersChange( var n ) +{ + file.scrollOffset = 0 - file.shouldReloadModsOnEnd = true - } + UpdateList() + UpdateListSliderHeight() + UpdateListSliderPosition() } +void function OnBtnFiltersClear_Activate( var button ) +{ + Hud_SetText( Hud_GetChild( file.menu, "BtnModsSearch" ), "" ) + + SetConVarInt( "filter_mods", 0 ) + + OnFiltersChange( null ) +} + +void function OnHideConVarsChange( var n ) +{ + string modName = file.lastMod.name + if ( modName == "" ) + return + var rui = Hud_GetRui( Hud_GetChild( file.menu, "LabelDetails" ) ) + RuiSetString( rui, "messageText", FormatModDescription( modName ) ) +} + +// LIST LOGIC + void function CoreModToggleDialog( string mod ) { DialogData dialogData @@ -247,46 +284,235 @@ void function CoreModToggleDialog( string mod ) void function DisableMod() { - NSSetModEnabled( file.currentMod, false ) + string modName = file.mods[ int ( Hud_GetScriptID( Hud_GetParent( file.currentButton ) ) ) + file.scrollOffset - 1 ].mod.name + NSSetModEnabled( modName, false ) - SetModMenuNameText( file.currentButton ) + var panel = file.panels[ int ( Hud_GetScriptID( Hud_GetParent( file.currentButton ) ) ) - 1] + SetControlBoxColor( Hud_GetChild( panel, "ControlBox" ), modName ) + SetControlBarColor( modName ) + SetModEnabledHelperImageAsset( Hud_GetChild( panel, "EnabledImage" ), modName ) - file.shouldReloadModsOnEnd = true + RefreshMods() } -void function OnModMenuButtonFocused( var button ) +array<string> function GetEnabledModsArray() { - string modName = file.modsArrayFiltered[ int ( Hud_GetScriptID( button ) ) + file.scrollOffset ].modName + array<string> enabledMods + foreach ( string mod in NSGetModNames() ) + { + if ( NSIsModEnabled( mod ) ) + enabledMods.append( mod ) + } + return enabledMods +} - var rui = Hud_GetRui( Hud_GetChild( file.menu, "LabelDetails" ) ) - - RuiSetGameTime( rui, "startTime", -99999.99 ) // make sure it skips the whole animation for showing this - RuiSetString( rui, "headerText", modName ) - RuiSetString( rui, "messageText", FormatModDescription( modName ) ) +void function HideAllPanels() +{ + foreach ( var panel in file.panels ) + { + Hud_SetEnabled( panel, false ) + Hud_SetVisible( panel, false ) + } +} + +void function UpdateList() +{ + HideAllPanels() + RefreshMods() + DisplayModPanels() +} + +void function RefreshMods() +{ + array<string> modNames = NSGetModNames() + file.mods.clear() + + bool reverse = GetConVarBool( "modlist_reverse" ) + + int lastLoadPriority = reverse ? NSGetModLoadPriority( modNames[ modNames.len() - 1 ] ) + 1 : -1 + string searchTerm = Hud_GetUTF8Text( Hud_GetChild( file.menu, "BtnModsSearch" ) ).tolower() + + for ( int i = reverse ? modNames.len() - 1 : 0; + reverse ? ( i >= 0 ) : ( i < modNames.len() ); + i += ( reverse ? -1 : 1) ) + { + string mod = modNames[i] + + if ( searchTerm.len() && mod.tolower().find( searchTerm ) == null ) + continue + + bool enabled = NSIsModEnabled( mod ) + bool required = NSIsModRequiredOnClient( mod ) + switch ( GetConVarInt( "filter_mods" ) ) + { + case filterShow.ONLY_ENABLED: + if ( !enabled ) + continue + break + case filterShow.ONLY_DISABLED: + if ( enabled ) + continue + break + case filterShow.ONLY_REQUIRED: + if ( !required ) + continue + break + case filterShow.ONLY_NOT_REQUIRED: + if( required ) + continue + break + } + + int pr = NSGetModLoadPriority( mod ) + + if ( reverse ? pr < lastLoadPriority : pr > lastLoadPriority ) + { + modData m + m.name = pr.tostring() + + panelContent c + c.mod = m + c.isHeader = true + file.mods.append( c ) + lastLoadPriority = pr + } + + modData m + m.name = mod + m.version = NSGetModVersionByModName( mod ) + m.link = NSGetModDownloadLinkByModName( mod ) + m.loadPriority = NSGetModLoadPriority( mod ) + m.enabled = enabled + m.conVars = NSGetModConvarsByModName( mod ) + + panelContent c + c.mod = m + + file.mods.append( c ) + } +} + +void function DisplayModPanels() +{ + foreach ( int i, var panel in file.panels) + { + if ( i >= file.mods.len() || file.scrollOffset + i >= file.mods.len() ) // don't try to show more panels than needed + break + + panelContent c = file.mods[ file.scrollOffset + i ] + modData mod = c.mod + var btn = Hud_GetChild( panel, "BtnMod" ) + var headerLabel = Hud_GetChild( panel, "Header" ) + var box = Hud_GetChild( panel, "ControlBox" ) + var line = Hud_GetChild( panel, "BottomLine" ) + var warning = Hud_GetChild( panel, "WarningImage" ) + var enabledImage = Hud_GetChild( panel, "EnabledImage" ) + + if ( c.isHeader ) + { + Hud_SetEnabled( btn, false ) + Hud_SetVisible( btn, false ) + + Hud_SetText( headerLabel, "Load Priority: " + mod.name ) + Hud_SetVisible( headerLabel, true ) + + Hud_SetVisible( box, false ) + Hud_SetVisible( line, true ) + + Hud_SetVisible( warning, false ) + Hud_SetVisible( enabledImage, false ) + } + else + { + Hud_SetEnabled( btn, true ) + Hud_SetVisible( btn, true ) + Hud_SetText( btn, mod.name ) + + Hud_SetVisible( headerLabel, false ) + + SetControlBoxColor( box, mod.name ) + Hud_SetVisible( box, true ) + Hud_SetVisible( line, false ) + + Hud_SetVisible( warning, NSIsModRequiredOnClient( c.mod.name ) ) + + SetModEnabledHelperImageAsset( enabledImage, c.mod.name ) + } + Hud_SetVisible( panel, true ) + } +} + +void function SetModEnabledHelperImageAsset( var panel, string modName ) +{ + if( NSIsModEnabled( modName ) ) + RuiSetImage( Hud_GetRui( panel ), "basicImage", $"rui/menu/common/merit_state_success" ) + else + RuiSetImage( Hud_GetRui( panel ), "basicImage", $"rui/menu/common/merit_state_failure" ) + RuiSetFloat3(Hud_GetRui( panel ), "basicImageColor", GetControlColorForMod( modName ) ) + Hud_SetVisible( panel, true ) +} + +void function SetControlBoxColor( var box, string modName ) +{ + var rui = Hud_GetRui( box ) + // if ( NSIsModEnabled( modName ) ) + // RuiSetFloat3(rui, "basicImageColor", <0,1,0>) + // else + // RuiSetFloat3(rui, "basicImageColor", <1,0,0>) + RuiSetFloat3(rui, "basicImageColor", GetControlColorForMod( modName ) ) +} + +void function SetControlBarColor( string modName ) +{ + var bar_element = Hud_GetChild( file.menu, "ModEnabledBar" ) + var bar = Hud_GetRui( bar_element ) + // if ( NSIsModEnabled( modName ) ) + // RuiSetFloat3(bar, "basicImageColor", <0,1,0>) + // else + // RuiSetFloat3(bar, "basicImageColor", <1,0,0>) + RuiSetFloat3(bar, "basicImageColor", GetControlColorForMod( modName ) ) + Hud_SetVisible( bar_element, true ) +} + +vector function GetControlColorForMod( string modName ) +{ + if ( NSIsModEnabled( modName ) ) + switch ( GetConVarInt( "colorblind_mode" ) ) + { + case 1: + case 2: + case 3: + default: + return <0,1,0> + } + else + switch ( GetConVarInt( "colorblind_mode" ) ) + { + case 1: + case 2: + return <0.29,0,0.57> + case 3: + default: + return <1,0,0> + } + unreachable } string function FormatModDescription( string modName ) { string ret // version - ret += format( "Version %s\n", NSGetModVersionByModName( modName ) ) - - // download link - string modLink = NSGetModDownloadLinkByModName( modName ) - if ( modLink.len() != 0 ) - ret += format( "Download link: \"%s\"\n", modLink ) - + ret += format( "Version %s\n", NSGetModVersionByModName( modName ) ) + // load priority ret += format( "Load Priority: %i\n", NSGetModLoadPriority( modName ) ) - - // todo: add ClientRequired here - + // convars array<string> modCvars = NSGetModConvarsByModName( modName ) - if ( modCvars.len() != 0 ) + if ( modCvars.len() != 0 && GetConVarBool( "modlist_show_convars" ) ) { ret += "ConVars: " - + for ( int i = 0; i < modCvars.len(); i++ ) { if ( i != modCvars.len() - 1 ) @@ -294,76 +520,34 @@ string function FormatModDescription( string modName ) else ret += format( "\"%s\"", modCvars[ i ] ) } - + ret += "\n" } - + // description ret += format( "\n%s\n", NSGetModDescriptionByModName( modName ) ) - - return ret -} - -void function OnReloadModsButtonPressed( var button ) -{ - ReloadMods() -} - -void function ReloadMods() -{ - NSReloadMods() - ClientCommand( "reload_localization" ) - ClientCommand( "loadPlaylists" ) - - bool svCheatsOriginal = GetConVarBool( "sv_cheats" ) - SetConVarBool( "sv_cheats", true ) - ClientCommand( "weapon_reparse" ) // weapon_reparse only works if a server is running and sv_cheats is 1, gotta figure this out eventually - SetConVarBool( "sv_cheats", svCheatsOriginal ) - - // note: the logic for this seems really odd, unsure why it doesn't seem to update, since the same code seems to get run irregardless of whether we've read weapon data before - ClientCommand( "uiscript_reset" ) -} -void function OnAuthenticationAgreementButtonPressed( var button ) -{ - NorthstarMasterServerAuthDialog() + return ret } +//////////// +// SLIDER +//////////// -void function OnBtnFiltersClear_Activate( var button ) -{ - Hud_SetText( Hud_GetChild( file.menu, "BtnModsSearch" ), "" ) - - SetConVarInt( "filter_mods", 0 ) - - OnFiltersChange(0) -} - -////////////////////////////// -// Slider -////////////////////////////// void function UpdateMouseDeltaBuffer(int x, int y) { - mouseDeltaBuffer.deltaX += x - mouseDeltaBuffer.deltaY += y + mouseDeltaBuffer.deltaX = x + mouseDeltaBuffer.deltaY = y + UpdateListSliderHeight() SliderBarUpdate() } -void function FlushMouseDeltaBuffer() -{ - mouseDeltaBuffer.deltaX = 0 - mouseDeltaBuffer.deltaY = 0 -} - void function SliderBarUpdate() { - if ( file.modsArrayFiltered.len() <= 17 ) - { - FlushMouseDeltaBuffer() + if ( file.mods.len() <= 15 ) return - } var sliderButton = Hud_GetChild( file.menu , "BtnModListSlider" ) var sliderPanel = Hud_GetChild( file.menu , "BtnModListSliderPanel" ) @@ -376,12 +560,11 @@ void function SliderBarUpdate() float maxYPos = minYPos - (maxHeight - Hud_GetHeight( sliderPanel )) float useableSpace = (maxHeight - Hud_GetHeight( sliderPanel )) - float jump = minYPos - (useableSpace / ( float( file.modsArrayFiltered.len()))) + float jump = minYPos - (useableSpace / ( float( file.mods.len()))) // got local from official respaw scripts, without untyped throws an error local pos = Hud_GetPos(sliderButton)[1] local newPos = pos - mouseDeltaBuffer.deltaY - FlushMouseDeltaBuffer() if ( newPos < maxYPos ) newPos = maxYPos if ( newPos > minYPos ) newPos = minYPos @@ -390,22 +573,42 @@ void function SliderBarUpdate() Hud_SetPos( sliderPanel , 2, newPos ) Hud_SetPos( movementCapture , 2, newPos ) - file.scrollOffset = -int( ( (newPos - minYPos) / useableSpace ) * ( file.modsArrayFiltered.len() - BUTTONS_PER_PAGE) ) + file.scrollOffset = -int( ( (newPos - minYPos) / useableSpace ) * ( file.mods.len() - PANELS_LEN) ) UpdateList() } +void function UpdateListSliderPosition() +{ + var sliderButton = Hud_GetChild( file.menu , "BtnModListSlider" ) + var sliderPanel = Hud_GetChild( file.menu , "BtnModListSliderPanel" ) + var movementCapture = Hud_GetChild( file.menu , "MouseMovementCapture" ) + + float mods = float ( file.mods.len() ) + + float minYPos = -40.0 * (GetScreenSize()[1] / 1080.0) + float useableSpace = (604.0 * (GetScreenSize()[1] / 1080.0) - Hud_GetHeight( sliderPanel )) + + float jump = minYPos - (useableSpace / ( mods - float( PANELS_LEN ) ) * file.scrollOffset) + + if ( jump > minYPos ) jump = minYPos + + Hud_SetPos( sliderButton , 2, jump ) + Hud_SetPos( sliderPanel , 2, jump ) + Hud_SetPos( movementCapture , 2, jump ) +} + void function UpdateListSliderHeight() { var sliderButton = Hud_GetChild( file.menu , "BtnModListSlider" ) var sliderPanel = Hud_GetChild( file.menu , "BtnModListSliderPanel" ) var movementCapture = Hud_GetChild( file.menu , "MouseMovementCapture" ) - - float mods = float ( file.modsArrayFiltered.len() ) + + float mods = float ( file.mods.len() ) float maxHeight = 604.0 * (GetScreenSize()[1] / 1080.0) float minHeight = 80.0 * (GetScreenSize()[1] / 1080.0) - float height = maxHeight * ( float( BUTTONS_PER_PAGE ) / mods ) + float height = maxHeight * ( float( PANELS_LEN ) / mods ) if ( height > maxHeight ) height = maxHeight if ( height < minHeight ) height = minHeight @@ -415,68 +618,75 @@ void function UpdateListSliderHeight() Hud_SetHeight( movementCapture , height ) } - -void function UpdateListSliderPosition() +void function OnScrollDown( var button ) { - var sliderButton = Hud_GetChild( file.menu , "BtnModListSlider" ) - var sliderPanel = Hud_GetChild( file.menu , "BtnModListSliderPanel" ) - var movementCapture = Hud_GetChild( file.menu , "MouseMovementCapture" ) - - float mods = float ( file.modsArrayFiltered.len() ) - - float minYPos = -40.0 * (GetScreenSize()[1] / 1080.0) - float useableSpace = (604.0 * (GetScreenSize()[1] / 1080.0) - Hud_GetHeight( sliderPanel )) - - float jump = minYPos - (useableSpace / ( mods - float( BUTTONS_PER_PAGE ) ) * file.scrollOffset) - - //jump = jump * (GetScreenSize()[1] / 1080.0) - - if ( jump > minYPos ) jump = minYPos + if ( file.mods.len() <= PANELS_LEN ) return + file.scrollOffset += 5 + if (file.scrollOffset + PANELS_LEN > file.mods.len()) + file.scrollOffset = file.mods.len() - PANELS_LEN + Hud_SetFocused( Hud_GetChild( file.menu, "BtnModListSlider" ) ) + ValidateScrollOffset() +} - Hud_SetPos( sliderButton , 2, jump ) - Hud_SetPos( sliderPanel , 2, jump ) - Hud_SetPos( movementCapture , 2, jump ) +void function OnScrollUp( var button ) +{ + file.scrollOffset -= 5 + if (file.scrollOffset < 0) + file.scrollOffset = 0 + Hud_SetFocused( Hud_GetChild( file.menu, "BtnModListSlider" ) ) + ValidateScrollOffset() } void function OnDownArrowSelected( var button ) { - if ( file.modsArrayFiltered.len() <= BUTTONS_PER_PAGE ) return + if ( file.mods.len() <= PANELS_LEN ) return file.scrollOffset += 1 - if (file.scrollOffset + BUTTONS_PER_PAGE > file.modsArrayFiltered.len()) { - file.scrollOffset = file.modsArrayFiltered.len() - BUTTONS_PER_PAGE - } - UpdateList() - UpdateListSliderPosition() + if (file.scrollOffset + PANELS_LEN > file.mods.len()) + file.scrollOffset = file.mods.len() - PANELS_LEN + ValidateScrollOffset() } - void function OnUpArrowSelected( var button ) { file.scrollOffset -= 1 - if (file.scrollOffset < 0) { + if (file.scrollOffset < 0) file.scrollOffset = 0 - } - UpdateList() - UpdateListSliderPosition() + ValidateScrollOffset() } -void function OnScrollDown( var button ) +void function ValidateScrollOffset() { - if ( file.modsArrayFiltered.len() <= BUTTONS_PER_PAGE ) return - file.scrollOffset += 5 - if (file.scrollOffset + BUTTONS_PER_PAGE > file.modsArrayFiltered.len()) { - file.scrollOffset = file.modsArrayFiltered.len() - BUTTONS_PER_PAGE - } - UpdateList() + RefreshMods() + if( file.scrollOffset + 15 > file.mods.len() ) + file.scrollOffset = file.mods.len() - 15 + if( file.scrollOffset < 0 ) + file.scrollOffset = 0 + HideAllPanels() + DisplayModPanels() + UpdateListSliderHeight() UpdateListSliderPosition() } -void function OnScrollUp( var button ) +// Static arrays don't have the .find method for some reason +bool function StaticFind( string mod ) { - file.scrollOffset -= 5 - if (file.scrollOffset < 0) { - file.scrollOffset = 0 - } - UpdateList() - UpdateListSliderPosition() + foreach( string smod in CORE_MODS ) + if ( mod == smod ) + return true + return false +} + +void function ReloadMods() +{ + NSReloadMods() + ClientCommand( "reload_localization" ) + ClientCommand( "loadPlaylists" ) + + bool svCheatsOriginal = GetConVarBool( "sv_cheats" ) + SetConVarBool( "sv_cheats", true ) + ClientCommand( "weapon_reparse" ) // weapon_reparse only works if a server is running and sv_cheats is 1, gotta figure this out eventually + SetConVarBool( "sv_cheats", svCheatsOriginal ) + + // note: the logic for this seems really odd, unsure why it doesn't seem to update, since the same code seems to get run irregardless of whether we've read weapon data before + ClientCommand( "uiscript_reset" ) }
\ No newline at end of file |