From 413411e1bc66e931487e662cee0def88fe7d35b7 Mon Sep 17 00:00:00 2001 From: Julian Chang Date: Tue, 4 Aug 2026 16:52:02 +0700 Subject: [PATCH] add a huge warning when people try to install skyblock mods --- .../src/view/onboarding/bundles/mod.rs | 45 ++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/packages/oneclient_app/src/view/onboarding/bundles/mod.rs b/packages/oneclient_app/src/view/onboarding/bundles/mod.rs index 6fe924a7..8b47e306 100644 --- a/packages/oneclient_app/src/view/onboarding/bundles/mod.rs +++ b/packages/oneclient_app/src/view/onboarding/bundles/mod.rs @@ -27,6 +27,43 @@ const MOD_GRID_COLS: usize = 3; const ANSWER_H: f32 = 48.; +const FPS_WARNING_BUNDLE: &str = "SkyBlock"; + +const FPS_WARNING_RUNS: &[(&str, bool, bool)] = &[ + ("YOUR ", false, false), + ("FPS", true, false), + (" WILL BE ", false, false), + ("SIGNIFICANTLY WORSE", true, false), + (" WITH SKYBLOCK MODS. ", false, false), + ("DO NOT INSTALL", true, true), + (" UNLESS YOU PLAY HYPIXEL SKYBLOCK.", false, true), +]; + +fn fps_warning_banner() -> impl IntoElement { + let mut text = paragraph(); + for (run, bold, underlined) in FPS_WARNING_RUNS { + let mut span = Span::new(*run) + .font_size(12.) + .font_weight(if *bold { + FontWeight::BOLD + } else { + FontWeight::NORMAL + }) + .color(colors::code_warn()); + if *underlined { + span = span.text_decoration(TextDecoration::Underline); + } + text = text.span(span); + } + + rect() + .width(Size::fill()) + .corner_radius(CornerRadius::new_all(8.)) + .border(border_all_color(1., colors::code_warn())) + .padding(Gaps::new_all(8.)) + .child(text) +} + fn file_provider(file: &BundleFile) -> ProviderId { match &file.kind { BundleFileKind::Managed { provider, .. } => *provider, @@ -315,7 +352,9 @@ fn opt_in_card( .font_size(15.) .font_weight(FontWeight::SEMI_BOLD) .color(colors::fg_primary()), - ) + ); + + card = card .child( rect() .horizontal() @@ -353,6 +392,10 @@ fn opt_in_card( ), ); + if wanted && name.eq_ignore_ascii_case(FPS_WARNING_BUNDLE) { + card = card.child(fps_warning_banner()); + } + if wanted { let mut rows: Vec = Vec::new(); for chunk in bundle.members.chunks(CHIPS_PER_ROW) {