feat(text): hover texts come from translation files
What the stations, thralls, the ward and the hive show under the crosshair now reads its text through ModText.Get, and hover.json holds 50 texts in English and Italian. The Aswid thralls and the Race Menu Ward wrote the use key as a literal E; they now use $KEY_Use, which shows the key the player actually bound. For that to work, ModText.Get runs a second localization pass when a $ is left in the result: Valheim resolves tokens once and never looks inside what it inserted, and hover texts go to the HUD without another pass. The Sverm hive stage names stay English for now: the compendium and the hive's goods show them too, and those come with the merchants step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
19d7cbacbd
commit
99a1817eb0
16 changed files with 164 additions and 79 deletions
|
|
@ -243,17 +243,15 @@ namespace RacesOfValheim
|
|||
switch (GetState())
|
||||
{
|
||||
case State.Ready:
|
||||
body = $"ready: {m_yield} {TrentaConfig.FertilizerDisplayName}\n" +
|
||||
"[<color=yellow><b>$KEY_Use</b></color>] Empty it";
|
||||
body = ModText.Get("rov_hover_trenta_ready_empty", m_yield, TrentaConfig.FertilizerDisplayName);
|
||||
break;
|
||||
|
||||
case State.Composting:
|
||||
body = $"rotting, {MinutesLeft()} minutes left";
|
||||
body = ModText.Get("rov_hover_trenta_rotting_minutes_left", MinutesLeft());
|
||||
break;
|
||||
|
||||
default:
|
||||
body = $"flesh {Mathf.Floor(GetFlesh())}/{m_capacity}\n" +
|
||||
"[<color=yellow><b>$KEY_Use</b></color>] Feed it raw flesh";
|
||||
body = ModText.Get("rov_hover_trenta_flesh_feed_raw_flesh", Mathf.Floor(GetFlesh()), m_capacity);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue