Mission objectives gain a redacted checkbox. Redacted objectives are shown block-redacted to players; mission managers, authors, and Zeus see the real text (via tooltip) and can toggle the flag from the mission detail page. Toggles emit mission:objective-redacted-toggle events. Also registers the mission:auto-complete event type used by the upcoming mission-tick bin.
6 lines
164 B
TypeScript
6 lines
164 B
TypeScript
const BLOCK = "█";
|
|
|
|
export function redactText(text: string | null | undefined): string | null {
|
|
if (!text) return null;
|
|
return text.replace(/\S/g, BLOCK);
|
|
}
|