packages: the registry text a game fills is keys (Maroon Lake's phase 26.4) - ThingKind.name, GearKind blurb/howto/names, HintCard's words, JobDef title/text/how, NpcLine and NpcChoice text, WeatherKind.name are @Text Key fields (a compiled row that leaves one out takes its derived key, the English is the game's en.po); what a package hands back as text is the key's marked text, "" for none; NpcName.name, NpcChoice.line and SettingDef.text are not text and lose @Text; ludic.i18n's tr/trf/trn/key_text say @alloc_ok (tr is a cast); the packages' tests with key literals (built, not run); changes/text-keys-data.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
86146782f7
commit
86644e6533
21 changed files with 81 additions and 54 deletions
|
|
@ -44,9 +44,12 @@ export function hints_mute_card(hints_st: mut HintsState) -> void {
|
|||
|
||||
# a step's words and its picture (n 1..3): the glyph's name, or the item (-1 when it is a glyph)
|
||||
export function hints_step_text(id: int, n: int) -> string {
|
||||
if n == 1 { return Hints[id].s1 }
|
||||
if n == 2 { return Hints[id].s2 }
|
||||
return Hints[id].s3
|
||||
var k = Hints[id].s3
|
||||
if n == 1 { k = Hints[id].s1 }
|
||||
if n == 2 { k = Hints[id].s2 }
|
||||
if k == null { return "" }
|
||||
@alloc_ok("a cast: a key's marked text, nothing is made")
|
||||
return string(k)
|
||||
}
|
||||
|
||||
export function hints_step_icon(id: int, n: int) -> string {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue