@s2script/sdk 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/chat.d.ts CHANGED
@@ -11,8 +11,13 @@ export declare const Chat: {
11
11
  /**
12
12
  * An opaque prefix prepended to every chat message (NOT rcon/console replies). Color is content the
13
13
  * caller owns (SourceMod-parity), so the engine-generic layer never picks one. A game/plugin sets this
14
- * to a color control byte — e.g. `Chat.color = ChatColors.Green` from `@s2script/cs2`. `""` = send raw
15
- * (CS2 needs a leading control byte for chat to render). A message may also embed its own colors.
14
+ * to a color control byte — e.g. `Chat.color = ChatColors.Green` from `@s2script/cs2`. `""` = no prefix.
15
+ * A message may also embed its own colors mid-string.
16
+ *
17
+ * You do NOT need a leading space for color to render: every chat line is auto-prefixed with an invisible
18
+ * zero-width space (U+200B) so a Source 2 chat box doesn't swallow the message's first color byte. Just
19
+ * write `Chat.toSlot(slot, ChatColors.Green + "hi")` — the green lands. (Idempotent: a line you already
20
+ * lead with a space or a ZWSP is passed through unchanged.)
16
21
  */
17
22
  color: string;
18
23
  /** Print to the chat of the client in `slot` (0-based). */