You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you already use `ModTypeDiscoveryHub.RegisterModAssembly(...)` to let RitsuLib scan your assemblies, you can declare keyword registration with CLR attributes:
`LocNamespace` only affects the localization namespace (the `modid` portion). The keyword stem (`brew`) participates in the default rule `<namespace>_<keyword>`, producing:
131
+
132
+
-`<namespace>_<keyword>.title`
133
+
-`<namespace>_<keyword>.description`
134
+
135
+
> Compatibility note: the legacy `LocKeyPrefix` / `locKeyPrefix` historically represents the **full stem** and is easy to misread as a prefix + keyword composition, so it is now obsolete. Use `LocNamespace` for new code.
/// Optional localization namespace used to form the default <c>card_keywords</c> entry stem
324
+
/// <c>"{namespace}_{keyword}"</c>.
325
+
/// </summary>
326
+
publicstring?LocNamespace{get;set;}
327
+
322
328
/// <summary>
323
329
/// Optional explicit localization key prefix.
324
330
/// </summary>
331
+
[Obsolete(
332
+
"Pitfall: LocKeyPrefix is NOT a prefix that affects only the modid/namespace portion. It is the full card_keywords entry stem used to form '{stem}.title' and '{stem}.description'. Prefer LocNamespace.")]
/// <c>card_keywords</c> row with an id from <see cref="ModContentRegistry.GetQualifiedKeywordId" />.
162
+
/// </summary>
163
+
[Obsolete(
164
+
"Pitfall: locKeyPrefix is NOT a prefix that affects only the modid/namespace portion. It is the full card_keywords entry stem used to form '{stem}.title' and '{stem}.description'. Prefer OwnedCardByLocNamespace (default stem: '<modid>_<keyword>').")]
115
165
publicstaticKeywordRegistrationEntryOwnedCard(
116
166
stringmodId,
117
167
stringlocalKeywordStem,
@@ -135,6 +185,8 @@ public static KeywordRegistrationEntry OwnedCard(
135
185
/// <summary>
136
186
/// <c>OwnedCard</c> overload with legacy hover defaults.
137
187
/// </summary>
188
+
[Obsolete(
189
+
"Pitfall: locKeyPrefix is NOT a prefix that affects only the modid/namespace portion. It is the full card_keywords entry stem used to form '{stem}.title' and '{stem}.description'. Prefer OwnedCardByLocNamespace (default stem: '<modid>_<keyword>').")]
0 commit comments