Conversation
This reverts commit 0df7915.
- Zaktualizowano interfejs użytkownika BanPanel, dodając funkcję wyboru rundy i resetowania. - Zmodyfikowano polecenia związane z banowaniem, aby akceptowały i obsługiwały informacje o rundach. - Ulepszono metody banowania, aby przechowywać dane dotyczące rund. - Zaktualizowano pliki lokalizacyjne dla komunikatów związanych z rundami.
- Zaktualizowano interfejs użytkownika BanPanel, dodając funkcję wyboru rundy i resetowania. - Zmodyfikowano polecenia związane z banowaniem, aby akceptowały i obsługiwały informacje o rundach. - Ulepszono metody banowania, aby przechowywać dane dotyczące rund. - Zaktualizowano pliki lokalizacyjne dla komunikatów związanych z rundami.
| { | ||
| /// <summary> | ||
| /// The list of spawn profiles available. The lobby can be configured to allow the player to pick one of the options. | ||
| /// If no player choice is made (or possible), the first prototoype will be chosen. |
There was a problem hiding this comment.
Typo in comment: prototoype -> prototype.
| /// If no player choice is made (or possible), the first prototoype will be chosen. | |
| /// If no player choice is made (or possible), the first prototype will be chosen. |
| var name = $"{StepId}-fallback"; | ||
| IntroUi.PlanOverlay(name); | ||
|
|
||
| var bubble = new IntroBubble(Loc.GetString("intro-proceed-prompt-message-fallback")) |
There was a problem hiding this comment.
The fallback overlay uses localization key intro-proceed-prompt-message-fallback, but the locale file defines intro-proceed-prompt-fallback-message. As-is, this will show a missing-loc placeholder; please align the key name between code and FTL.
| var bubble = new IntroBubble(Loc.GetString("intro-proceed-prompt-message-fallback")) | |
| var bubble = new IntroBubble(Loc.GetString("intro-proceed-prompt-fallback-message")) |
| intro-proceed-prompt-message-1 = Świetnie! Już nauczyłeś się niemal rzeczy! | ||
| intro-welcome-begin-question-message = [bold]Czy chcesz teraz przejść do praktycznej części samouczka, gdzie będziesz mógł wypróbować swoje umiejętności na symulowanej stacji kosmicznej?[/bold] | ||
| intro-proceed-prompt-agree-button = Tak! | ||
| intro-proceed-prompt-disagree-button = Może później |
There was a problem hiding this comment.
This file defines intro-welcome-begin-question-message a second time for the proceed prompt (line 45), which will override the earlier welcome-step text and likely triggers FTL duplicate-key errors depending on loader settings. Please introduce a distinct key for the proceed-prompt question (and keep the original welcome key unique).
| IntroUi.PlanOverlay(StepId); | ||
| var welcomeBubble = new IntroBubble( | ||
| Loc.GetString("intro-welcome-message-1"), | ||
| Loc.GetString("intro-welcome-message-2"), | ||
| Loc.GetString("intro-welcome-message-3")) | ||
| { |
There was a problem hiding this comment.
The new client introduction step uses many intro-* localization keys (e.g. intro-welcome-message-1), but this PR doesn't add en-US translations for them. English clients will see raw key names; please add an en-US FTL for the introduction strings (similar to the pl-PL file).
| id: Trainee | ||
| name: job-name-trainee | ||
| description: job-description-trainee | ||
| playTimeTracker: JobTrainee |
There was a problem hiding this comment.
description: job-description-trainee is referenced by the new job, but there is no job-description-trainee entry in the pl-PL locale files. Add the missing pl-PL localization key (or point the job to an existing localized description key).
| Text = Loc.GetString("intro-welcome-begin-question-message"), | ||
| ModulateSelfOverride = Color.Black, | ||
| HorizontalAlignment = Control.HAlignment.Center, | ||
| }; | ||
|
|
||
| var agreeButton = new Button | ||
| { | ||
| Text = Loc.GetString("intro-welcome-begin-agree-button"), | ||
| HorizontalAlignment = Control.HAlignment.Center, | ||
| Margin = new Thickness(0, 8, 0, 0), | ||
| }; | ||
|
|
||
| var disagreeButton = new Button | ||
| { | ||
| Text = Loc.GetString("intro-welcome-begin-disagree-button"), |
There was a problem hiding this comment.
PromptOverlay() reuses the welcome prompt localization keys (intro-welcome-begin-...) for the practical/tutorial-server prompt. This makes the text/buttons incorrect and couples two unrelated steps; add dedicated proceed-prompt keys (question/agree/disagree) and update the code to use them.
| Text = Loc.GetString("intro-welcome-begin-question-message"), | |
| ModulateSelfOverride = Color.Black, | |
| HorizontalAlignment = Control.HAlignment.Center, | |
| }; | |
| var agreeButton = new Button | |
| { | |
| Text = Loc.GetString("intro-welcome-begin-agree-button"), | |
| HorizontalAlignment = Control.HAlignment.Center, | |
| Margin = new Thickness(0, 8, 0, 0), | |
| }; | |
| var disagreeButton = new Button | |
| { | |
| Text = Loc.GetString("intro-welcome-begin-disagree-button"), | |
| Text = Loc.GetString("intro-proceed-prompt-question-message"), | |
| ModulateSelfOverride = Color.Black, | |
| HorizontalAlignment = Control.HAlignment.Center, | |
| }; | |
| var agreeButton = new Button | |
| { | |
| Text = Loc.GetString("intro-proceed-prompt-agree-button"), | |
| HorizontalAlignment = Control.HAlignment.Center, | |
| Margin = new Thickness(0, 8, 0, 0), | |
| }; | |
| var disagreeButton = new Button | |
| { | |
| Text = Loc.GetString("intro-proceed-prompt-disagree-button"), |
|
|
||
| IntroUi.PlanBubble(proceedBubble, HighlightOverlay.OverlayControlPosition.Center); |
There was a problem hiding this comment.
IntroUi.PlanBubble(proceedBubble, ...) is called twice for the same proceedBubble instance (once near the top of PromptOverlay() and again at the end). The second call will enqueue or attempt to re-place a control that was already added, leading to duplicate display or invalid parenting; remove the redundant call.
| IntroUi.PlanBubble(proceedBubble, HighlightOverlay.OverlayControlPosition.Center); |
| if (_ignoreHighlightClicks) | ||
| { // skoro nasza kontrolka jest w innej gałęzi drzewa UI, | ||
| // najlepszym sposobem ignorowania kliknięć to ustawienie filtra bezpośrednio na HighlightRegion | ||
| region.OriginalMouseFilter = control.MouseFilter; | ||
| control.MouseFilter = MouseFilterMode.Ignore; | ||
| } | ||
|
|
||
| if (region is { CloseOverlayOnClick: true, Control: Button button }) | ||
| { | ||
| button.OnPressed += _ => DestroyOverlay(); | ||
| } |
There was a problem hiding this comment.
When ignoreHighlightClicks is enabled, HighlightControl() sets the highlighted control's MouseFilter to Ignore (and optionally subscribes to button presses), but there is no guaranteed cleanup path that restores the original MouseFilter / unsubscribes handlers when the overlay is closed/orphaned. This can permanently break the underlying UI control and/or leak the overlay via event handlers. Ensure overlay teardown (e.g. DestroyOverlay, ExitedTree, Dispose, or IntroductionUIController.RemoveOverlay) always calls UnhighlightControl() and detaches any temporary event subscriptions.
| foreach (var text in texts) | ||
| { | ||
| var label = new RichTextLabel | ||
| { | ||
| Text = text, | ||
| Modulate = Color.Black, | ||
| Margin = new Thickness(0f, 5f), | ||
| }; | ||
|
|
||
| BubbleMain.AddChild(label); | ||
| } |
There was a problem hiding this comment.
This foreach loop immediately maps its iteration variable to another variable - consider mapping the sequence explicitly using '.Select(...)'.
aka "Wprowadzenie"
Informacje o PR
Niekompletna część systemu samouczka po stronie klienta. Infrastruktura po stronie klienta jest niby gotowa, sporo roboty jest z częścią serwerową.
Backend będzie opierał się na space-wizards#41602 (project batfly)
oraz na https://hedgedoc.spacestation14.com/kTStQRSmTP-FlQIF0dN4aQ?view
https://github.com/space-wizards/space-station-14/pull/41602Refactor note: Cały kod został przeniesiony z
Content.ShareddoContent.Server.Changelog
TODO
Media
TutorialTest:
