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
|
|
@ -142,15 +142,15 @@ namespace RacesOfValheim
|
||||||
if (isEnslaved)
|
if (isEnslaved)
|
||||||
{
|
{
|
||||||
bool following = m_ai != null && m_ai.GetFollowTarget() != null;
|
bool following = m_ai != null && m_ai.GetFollowTarget() != null;
|
||||||
return following ? "[<color=yellow><b>E</b></color>] Stay" : "[<color=yellow><b>E</b></color>] Follow";
|
return (following ? ModText.Get("rov_hover_aswid_stay") : ModText.Get("rov_hover_aswid_follow"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (BossProgressionManager.GetCurrentProgressionState() < 6) return "";
|
if (BossProgressionManager.GetCurrentProgressionState() < 6) return "";
|
||||||
|
|
||||||
float cd = AswidRace.GetEnslaveCooldown();
|
float cd = AswidRace.GetEnslaveCooldown();
|
||||||
if (cd > 0) return $"[<color=red>E</color>] Dominate (Cooldown: {Mathf.CeilToInt(cd / 60f)}m)";
|
if (cd > 0) return ModText.Get("rov_hover_aswid_dominate_cooldown_m", Mathf.CeilToInt(cd / 60f));
|
||||||
return "[<color=yellow><b>E</b></color>] Dominate";
|
return ModText.Get("rov_hover_aswid_dominate");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,12 +137,11 @@ namespace RacesOfValheim
|
||||||
|
|
||||||
if (servant == null)
|
if (servant == null)
|
||||||
{
|
{
|
||||||
return m_title + "\nNo servant stands here.\n" +
|
return ModText.Get("rov_hover_butler_no_servant_stands_here_raise", m_title);
|
||||||
"[<color=yellow><b>$KEY_Use</b></color>] Raise one";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
string status = servant.Status;
|
string status = servant.Status;
|
||||||
if (string.IsNullOrEmpty(status)) status = "Waiting.";
|
if (string.IsNullOrEmpty(status)) status = ModText.Get("rov_hover_butler_waiting");
|
||||||
|
|
||||||
return m_title + "\n" + status;
|
return m_title + "\n" + status;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -328,21 +328,20 @@ namespace RacesOfValheim
|
||||||
if (thrall.Kind == DraughSpawner.KindElite) aliveElite++; else aliveNormal++;
|
if (thrall.Kind == DraughSpawner.KindElite) aliveElite++; else aliveNormal++;
|
||||||
}
|
}
|
||||||
|
|
||||||
string body = $"flesh {Mathf.Floor(GetFlesh())}/{DraughSpawner.FleshPerThrall}, " +
|
string body = ModText.Get("rov_hover_draugh_flesh_risen_waiting", Mathf.Floor(GetFlesh()), DraughSpawner.FleshPerThrall, aliveNormal, AliveCap(), GetReserve(), DraughSpawner.ReserveCap);
|
||||||
$"risen {aliveNormal}/{AliveCap()}, waiting {GetReserve()}/{DraughSpawner.ReserveCap}";
|
|
||||||
|
|
||||||
if (IsUpgraded())
|
if (IsUpgraded())
|
||||||
{
|
{
|
||||||
body += $"\nofficers {aliveElite}/{EliteCap()}, waiting {GetReserveElite()}/{DraughSpawner.ReserveCapElite}";
|
body += ModText.Get("rov_hover_draugh_officers_waiting", aliveElite, EliteCap(), GetReserveElite(), DraughSpawner.ReserveCapElite);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_respawnTimer > 0f)
|
if (m_respawnTimer > 0f)
|
||||||
{
|
{
|
||||||
int left = Mathf.Max(1, Mathf.CeilToInt(DraughSpawner.RespawnSeconds - m_respawnTimer));
|
int left = Mathf.Max(1, Mathf.CeilToInt(DraughSpawner.RespawnSeconds - m_respawnTimer));
|
||||||
body += $"\nnext rises in {left}s";
|
body += ModText.Get("rov_hover_draugh_next_rises_s", left);
|
||||||
}
|
}
|
||||||
|
|
||||||
body += "\n[<color=yellow><b>$KEY_Use</b></color>] Feed it flesh, or a draugr's head";
|
body += ModText.Get("rov_hover_draugh_feed_flesh_or_draugr_s");
|
||||||
|
|
||||||
return Localization.instance.Localize($"{DraughSpawner.PieceDisplayName} ({body})");
|
return Localization.instance.Localize($"{DraughSpawner.PieceDisplayName} ({body})");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -277,16 +277,16 @@ namespace RacesOfValheim
|
||||||
|
|
||||||
private string Hover()
|
private string Hover()
|
||||||
{
|
{
|
||||||
string body = $"contracts {CountGroups()}/{DvergarBanco.MaxTroops}";
|
string body = ModText.Get("rov_hover_dvergar_contracts", CountGroups(), DvergarBanco.MaxTroops);
|
||||||
|
|
||||||
// Said in as many words: a player who cannot see their own discount will read the lower
|
// Said in as many words: a player who cannot see their own discount will read the lower
|
||||||
// number in the window as a mistake.
|
// number in the window as a mistake.
|
||||||
float discount = Mathf.Clamp01(DvergarProgression.Current.TraderBuyDiscount);
|
float discount = Mathf.Clamp01(DvergarProgression.Current.TraderBuyDiscount);
|
||||||
if (discount > 0f) body += $"\nyour seal is worth {Mathf.RoundToInt(discount * 100f)}% off";
|
if (discount > 0f) body += ModText.Get("rov_hover_dvergar_seal_worth_off", Mathf.RoundToInt(discount * 100f));
|
||||||
|
|
||||||
if (!IsUpgraded()) body += "\n(what the Queen left behind buys two more crews)";
|
if (!IsUpgraded()) body += ModText.Get("rov_hover_dvergar_what_queen_left_behind_buys");
|
||||||
|
|
||||||
body += "\n[<color=yellow><b>$KEY_Use</b></color>] Read the ledger";
|
body += ModText.Get("rov_hover_dvergar_read_ledger");
|
||||||
|
|
||||||
return Localization.instance.Localize($"{DvergarBanco.PieceDisplayName} ({body})");
|
return Localization.instance.Localize($"{DvergarBanco.PieceDisplayName} ({body})");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -252,14 +252,12 @@ namespace RacesOfValheim
|
||||||
string body;
|
string body;
|
||||||
if (doses <= 0 || string.IsNullOrEmpty(brew))
|
if (doses <= 0 || string.IsNullOrEmpty(brew))
|
||||||
{
|
{
|
||||||
body = "empty\n[<color=yellow><b>$KEY_Use</b></color>] Pour a brew in";
|
body = ModText.Get("rov_hover_dvergar_empty_pour_brew");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int waiting = InRange().Count;
|
int waiting = InRange().Count;
|
||||||
body = $"{DvergarBotte.BrewDisplayName(brew)} {doses}/{DvergarBotte.MaxDoses}" +
|
body = ModText.Get("rov_hover_dvergar_at_barrel_pour_round", DvergarBotte.BrewDisplayName(brew), doses, DvergarBotte.MaxDoses, waiting);
|
||||||
$"\n{waiting} at the barrel" +
|
|
||||||
$"\n[<color=yellow><b>$KEY_Use</b></color>] Pour a round";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Localization.instance.Localize($"{DvergarBotte.PieceDisplayName} ({body})");
|
return Localization.instance.Localize($"{DvergarBotte.PieceDisplayName} ({body})");
|
||||||
|
|
|
||||||
|
|
@ -440,13 +440,10 @@ namespace RacesOfValheim
|
||||||
{
|
{
|
||||||
Count(out int wolves, out int ulv, out int fenrir);
|
Count(out int wolves, out int ulv, out int fenrir);
|
||||||
|
|
||||||
string body = $"meat {Mathf.Floor(GetFeed())}/{FenrirMangiatoia.TankCap}" +
|
string body = ModText.Get("rov_hover_fenrir_meat_wolves_ulv", Mathf.Floor(GetFeed()), FenrirMangiatoia.TankCap, wolves, WolfCap(), ulv, UlvCap());
|
||||||
$"\nwolves {wolves}/{WolfCap()}, ulv {ulv}/{UlvCap()}";
|
|
||||||
|
|
||||||
// Said in as many words, because the upgrade is deliberately invisible on the model.
|
// Said in as many words, because the upgrade is deliberately invisible on the model.
|
||||||
body += IsUpgraded()
|
body += (IsUpgraded() ? ModText.Get("rov_hover_fenrir_fenrir", fenrir, FenrirCap()) : ModText.Get("rov_hover_fenrir_blood_thin_here_raises_no"));
|
||||||
? $", fenrir {fenrir}/{FenrirCap()}"
|
|
||||||
: "\nthe blood is thin here - it raises no fenrir yet";
|
|
||||||
|
|
||||||
if (m_waitingFor != null)
|
if (m_waitingFor != null)
|
||||||
{
|
{
|
||||||
|
|
@ -458,16 +455,14 @@ namespace RacesOfValheim
|
||||||
: m_waitingFor == FenrirMangiatoia.KindUlv ? FenrirMangiatoia.UlvCost
|
: m_waitingFor == FenrirMangiatoia.KindUlv ? FenrirMangiatoia.UlvCost
|
||||||
: FenrirMangiatoia.FenrirCost;
|
: FenrirMangiatoia.FenrirCost;
|
||||||
|
|
||||||
body += GetFeed() < cost
|
body += (GetFeed() < cost ? ModText.Get("rov_hover_fenrir_not_enough_meat_next_one", cost) : ModText.Get("rov_hover_fenrir_next_s", Mathf.Max(1, Mathf.CeilToInt(wait - m_timer))));
|
||||||
? $"\nnot enough meat for the next one ({cost} needed)"
|
|
||||||
: $"\nnext in {Mathf.Max(1, Mathf.CeilToInt(wait - m_timer))}s";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
body += "\nthe pack is whole";
|
body += ModText.Get("rov_hover_fenrir_pack_whole");
|
||||||
}
|
}
|
||||||
|
|
||||||
body += "\n[<color=yellow><b>$KEY_Use</b></color>] Fill it with meat";
|
body += ModText.Get("rov_hover_fenrir_fill_with_meat");
|
||||||
|
|
||||||
return Localization.instance.Localize($"{FenrirMangiatoia.PieceDisplayName} ({body})");
|
return Localization.instance.Localize($"{FenrirMangiatoia.PieceDisplayName} ({body})");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,14 @@ namespace RacesOfValheim
|
||||||
string[] words = args
|
string[] words = args
|
||||||
.Select(a => Localization.instance.Localize(a?.ToString() ?? ""))
|
.Select(a => Localization.instance.Localize(a?.ToString() ?? ""))
|
||||||
.ToArray();
|
.ToArray();
|
||||||
return Localization.instance.Localize("$" + key, words);
|
string text = Localization.instance.Localize("$" + key, words);
|
||||||
|
|
||||||
|
// Valheim resolves tokens in one pass and never looks inside what it put in, so a
|
||||||
|
// "$KEY_Use" written in a translation came out as it was. Places that localize the
|
||||||
|
// result again (MessageHud, the stations' own Localize) hid that; hover texts returned
|
||||||
|
// straight to the HUD did not. A second pass costs nothing when there is no $ left.
|
||||||
|
if (text.IndexOf('$') >= 0) text = Localization.instance.Localize(text);
|
||||||
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -171,13 +171,11 @@ namespace RacesOfValheim
|
||||||
|
|
||||||
public string GetHoverText()
|
public string GetHoverText()
|
||||||
{
|
{
|
||||||
string mode = BossProgressionManager.UsePersonalProgression ? "Personal" : "World";
|
string mode = (BossProgressionManager.UsePersonalProgression ? ModText.Get("rov_hover_ward_personal") : ModText.Get("rov_hover_ward_world"));
|
||||||
int state = BossProgressionManager.GetCurrentProgressionState();
|
int state = BossProgressionManager.GetCurrentProgressionState();
|
||||||
string boss = BossProgressionManager.GetBossNameForState(state);
|
string boss = BossProgressionManager.GetBossTokenForState(state);
|
||||||
|
|
||||||
return $"Race Menu Ward\n{mode} progression - {boss} ({state}/{BossProgressionManager.MaxState})\n" +
|
return ModText.Get("rov_hover_ward_race_menu_ward_progression_open", mode, boss, state, BossProgressionManager.MaxState);
|
||||||
"[<color=yellow><b>E</b></color>] Open\n" +
|
|
||||||
"[<color=yellow><b>Use item</b></color>] Offer a boss relic";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Interact(Humanoid user, bool hold, bool alt)
|
public bool Interact(Humanoid user, bool hold, bool alt)
|
||||||
|
|
|
||||||
|
|
@ -362,25 +362,21 @@ namespace RacesOfValheim
|
||||||
// upgraded, so there was no way to know the cap was two until ten trophies had gone in.
|
// upgraded, so there was no way to know the cap was two until ten trophies had gone in.
|
||||||
// Every shelf is now visible whether or not it can be used yet, and says why when it cannot.
|
// Every shelf is now visible whether or not it can be used yet, and says why when it cannot.
|
||||||
string body =
|
string body =
|
||||||
$"\nmelee {alive[SkeletonBonePile.KindMelee]}/{GetSlots(SkeletonBonePile.KindMelee)} of {MeleeCap()}" +
|
ModText.Get("rov_hover_skeleton_melee_archers_rotten", alive[SkeletonBonePile.KindMelee], GetSlots(SkeletonBonePile.KindMelee), MeleeCap(), alive[SkeletonBonePile.KindRanged], GetSlots(SkeletonBonePile.KindRanged), RangedCap(), alive[SkeletonBonePile.KindRancid], GetSlots(SkeletonBonePile.KindRancid), RancidCap());
|
||||||
$"\narchers {alive[SkeletonBonePile.KindRanged]}/{GetSlots(SkeletonBonePile.KindRanged)} of {RangedCap()}" +
|
|
||||||
$"\nrotten {alive[SkeletonBonePile.KindRancid]}/{GetSlots(SkeletonBonePile.KindRancid)} of {RancidCap()}";
|
|
||||||
|
|
||||||
if (!IsUpgraded()) body += " (needs a Greater Cursed Skull)";
|
if (!IsUpgraded()) body += ModText.Get("rov_hover_skeleton_needs_greater_cursed_skull");
|
||||||
|
|
||||||
int bonesToward = m_nview.GetZDO().GetInt(KeyBones);
|
int bonesToward = m_nview.GetZDO().GetInt(KeyBones);
|
||||||
int placesLeft = TotalCap() - PaidSlots();
|
int placesLeft = TotalCap() - PaidSlots();
|
||||||
body += placesLeft > 0
|
body += (placesLeft > 0 ? ModText.Get("rov_hover_skeleton_bone_toward_next_places", bonesToward, SkeletonBonePile.BonesPerSlot, placesLeft) : ModText.Get("rov_hover_skeleton_every_place_bought"));
|
||||||
? $"\nbone {bonesToward}/{SkeletonBonePile.BonesPerSlot} toward the next of {placesLeft} places"
|
|
||||||
: "\nevery place is bought";
|
|
||||||
|
|
||||||
if (m_respawnTimer > 0f)
|
if (m_respawnTimer > 0f)
|
||||||
{
|
{
|
||||||
int left = Mathf.Max(1, Mathf.CeilToInt(RespawnSeconds() - m_respawnTimer));
|
int left = Mathf.Max(1, Mathf.CeilToInt(RespawnSeconds() - m_respawnTimer));
|
||||||
body += $"\nnext rises in {left}s";
|
body += ModText.Get("rov_hover_skeleton_next_rises_s", left);
|
||||||
}
|
}
|
||||||
|
|
||||||
body += "\n[<color=yellow><b>$KEY_Use</b></color>] Bone in hand to buy a place, empty hands to move the line";
|
body += ModText.Get("rov_hover_skeleton_bone_hand_buy_place_empty");
|
||||||
|
|
||||||
return Localization.instance.Localize($"{SkeletonBonePile.PieceDisplayName} ({body})");
|
return Localization.instance.Localize($"{SkeletonBonePile.PieceDisplayName} ({body})");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -461,11 +461,7 @@ namespace RacesOfValheim
|
||||||
|
|
||||||
// Both numbers, always, even when nothing is going down. A line that appears and
|
// Both numbers, always, even when nothing is going down. A line that appears and
|
||||||
// disappears is one the player has to notice twice before they believe it.
|
// disappears is one the player has to notice twice before they believe it.
|
||||||
return $"{SvermHiveStage.NameOf(SvermHiveStage.Of(transform))}\n" +
|
return ModText.Get("rov_hover_sverm_beehives_taken_allowed_range_feed", SvermHiveStage.NameOf(SvermHiveStage.Of(transform)), SvermHiveReadout.Tank(transform), infected, SvermConfigManagement.Beehives, beehives, SvermWorker.Readout(transform.position));
|
||||||
SvermHiveReadout.Tank(transform) +
|
|
||||||
$"Beehives {infected} taken of {SvermConfigManagement.Beehives} allowed, {beehives} in range\n" +
|
|
||||||
SvermWorker.Readout(transform.position) +
|
|
||||||
"[<color=yellow><b>$KEY_Use</b></color>] Feed it a stack";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// New in Valheim 1.0: Hoverable gained this. Every vanilla implementation returns a
|
// New in Valheim 1.0: Hoverable gained this. Every vanilla implementation returns a
|
||||||
|
|
|
||||||
|
|
@ -222,17 +222,15 @@ namespace RacesOfValheim
|
||||||
SvermHiveBehaviour hive = Hive;
|
SvermHiveBehaviour hive = Hive;
|
||||||
if (hive == null) return Title;
|
if (hive == null) return Title;
|
||||||
|
|
||||||
return $"{Title}\n" +
|
return ModText.Get("rov_hover_sverm_msg", Title, SvermHiveReadout.Tank(hive.transform), Prompt);
|
||||||
SvermHiveReadout.Tank(hive.transform) +
|
|
||||||
$"[<color=yellow><b>$KEY_Use</b></color>] {Prompt}";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>The hive at the foot of the nest. Press E, a stack goes in.</summary>
|
/// <summary>The hive at the foot of the nest. Press E, a stack goes in.</summary>
|
||||||
public class SvermHiveStomach : SvermHiveMouth
|
public class SvermHiveStomach : SvermHiveMouth
|
||||||
{
|
{
|
||||||
protected override string Title => "Hive Stomach";
|
protected override string Title => "$rov_hover_sverm_stomach_title";
|
||||||
protected override string Prompt => "Feed it a stack";
|
protected override string Prompt => "$rov_hover_sverm_stomach_prompt";
|
||||||
|
|
||||||
protected override bool Use(SvermHiveBehaviour hive, Player player)
|
protected override bool Use(SvermHiveBehaviour hive, Player player)
|
||||||
{
|
{
|
||||||
|
|
@ -459,13 +457,11 @@ namespace RacesOfValheim
|
||||||
SvermHiveBehaviour nest = Nest;
|
SvermHiveBehaviour nest = Nest;
|
||||||
if (nest == null)
|
if (nest == null)
|
||||||
{
|
{
|
||||||
return $"{SvermHiveMarketPiece.DisplayName}\n" +
|
return ModText.Get("rov_hover_sverm_market_no_hive", SvermHiveMarketPiece.DisplayName,
|
||||||
$"No hive within {SvermConfigManagement.AuraRadius:0} metres.";
|
SvermConfigManagement.AuraRadius.ToString("0"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $"{SvermHiveMarketPiece.DisplayName}\n" +
|
return ModText.Get("rov_hover_sverm_trade_with_hive", SvermHiveMarketPiece.DisplayName, SvermHiveReadout.Tank(nest.transform));
|
||||||
SvermHiveReadout.Tank(nest.transform) +
|
|
||||||
"[<color=yellow><b>$KEY_Use</b></color>] Trade with the hive";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -474,9 +470,10 @@ namespace RacesOfValheim
|
||||||
{
|
{
|
||||||
public static string Tank(Transform nest)
|
public static string Tank(Transform nest)
|
||||||
{
|
{
|
||||||
return $"Biomass {SvermBiomass.Bank(nest):0} / {SvermBiomass.Capacity(nest):0}\n" +
|
return ModText.Get("rov_hover_sverm_tank",
|
||||||
$"Digesting {SvermBiomass.Digesting(nest):0}\n" +
|
SvermBiomass.Bank(nest).ToString("0"), SvermBiomass.Capacity(nest).ToString("0"),
|
||||||
$"Brood eggs {SvermBroodEggs.Count(nest)} / {SvermBroodEggs.Cap(nest)}\n";
|
SvermBiomass.Digesting(nest).ToString("0"),
|
||||||
|
SvermBroodEggs.Count(nest), SvermBroodEggs.Cap(nest));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
52
JotunnModStub/Translations/English/hover.json
Normal file
52
JotunnModStub/Translations/English/hover.json
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
{
|
||||||
|
"rov_hover_aswid_dominate": "[<color=yellow><b>$KEY_Use</b></color>] Dominate",
|
||||||
|
"rov_hover_aswid_dominate_cooldown_m": "[<color=red>$KEY_Use</color>] Dominate (Cooldown: $1m)",
|
||||||
|
"rov_hover_aswid_follow": "[<color=yellow><b>$KEY_Use</b></color>] Follow",
|
||||||
|
"rov_hover_aswid_stay": "[<color=yellow><b>$KEY_Use</b></color>] Stay",
|
||||||
|
"rov_hover_butler_no_servant_stands_here_raise": "$1\nNo servant stands here.\n[<color=yellow><b>$KEY_Use</b></color>] Raise one",
|
||||||
|
"rov_hover_butler_waiting": "Waiting.",
|
||||||
|
"rov_hover_draugh_feed_flesh_or_draugr_s": "\n[<color=yellow><b>$KEY_Use</b></color>] Feed it flesh, or a draugr's head",
|
||||||
|
"rov_hover_draugh_flesh_risen_waiting": "flesh $1/$2, risen $3/$4, waiting $5/$6",
|
||||||
|
"rov_hover_draugh_next_rises_s": "\nnext rises in $1s",
|
||||||
|
"rov_hover_draugh_officers_waiting": "\nofficers $1/$2, waiting $3/$4",
|
||||||
|
"rov_hover_dvergar_at_barrel_pour_round": "$1 $2/$3\n$4 at the barrel\n[<color=yellow><b>$KEY_Use</b></color>] Pour a round",
|
||||||
|
"rov_hover_dvergar_contracts": "contracts $1/$2",
|
||||||
|
"rov_hover_dvergar_empty_pour_brew": "empty\n[<color=yellow><b>$KEY_Use</b></color>] Pour a brew in",
|
||||||
|
"rov_hover_dvergar_read_ledger": "\n[<color=yellow><b>$KEY_Use</b></color>] Read the ledger",
|
||||||
|
"rov_hover_dvergar_seal_worth_off": "\nyour seal is worth $1% off",
|
||||||
|
"rov_hover_dvergar_what_queen_left_behind_buys": "\n(what the Queen left behind buys two more crews)",
|
||||||
|
"rov_hover_fenrir_blood_thin_here_raises_no": "\nthe blood is thin here - it raises no fenrir yet",
|
||||||
|
"rov_hover_fenrir_fenrir": ", fenrir $1/$2",
|
||||||
|
"rov_hover_fenrir_fill_with_meat": "\n[<color=yellow><b>$KEY_Use</b></color>] Fill it with meat",
|
||||||
|
"rov_hover_fenrir_meat_wolves_ulv": "meat $1/$2\nwolves $3/$4, ulv $5/$6",
|
||||||
|
"rov_hover_fenrir_next_s": "\nnext in $1s",
|
||||||
|
"rov_hover_fenrir_not_enough_meat_next_one": "\nnot enough meat for the next one ($1 needed)",
|
||||||
|
"rov_hover_fenrir_pack_whole": "\nthe pack is whole",
|
||||||
|
"rov_hover_skeleton_bone_hand_buy_place_empty": "\n[<color=yellow><b>$KEY_Use</b></color>] Bone in hand to buy a place, empty hands to move the line",
|
||||||
|
"rov_hover_skeleton_bone_toward_next_places": "\nbone $1/$2 toward the next of $3 places",
|
||||||
|
"rov_hover_skeleton_every_place_bought": "\nevery place is bought",
|
||||||
|
"rov_hover_skeleton_melee_archers_rotten": "\nmelee $1/$2 of $3\narchers $4/$5 of $6\nrotten $7/$8 of $9",
|
||||||
|
"rov_hover_skeleton_needs_greater_cursed_skull": " (needs a Greater Cursed Skull)",
|
||||||
|
"rov_hover_skeleton_next_rises_s": "\nnext rises in $1s",
|
||||||
|
"rov_hover_sverm_beehives_taken_allowed_range_feed": "$1\n$2Beehives $3 taken of $4 allowed, $5 in range\n$6[<color=yellow><b>$KEY_Use</b></color>] Feed it a stack",
|
||||||
|
"rov_hover_sverm_market_no_hive": "$1\nNo hive within $2 metres.",
|
||||||
|
"rov_hover_sverm_msg": "$1\n$2[<color=yellow><b>$KEY_Use</b></color>] $3",
|
||||||
|
"rov_hover_sverm_stomach_prompt": "Feed it a stack",
|
||||||
|
"rov_hover_sverm_stomach_title": "Hive Stomach",
|
||||||
|
"rov_hover_sverm_tank": "Biomass $1 / $2\nDigesting $3\nBrood eggs $4 / $5\n",
|
||||||
|
"rov_hover_sverm_trade_with_hive": "$1\n$2[<color=yellow><b>$KEY_Use</b></color>] Trade with the hive",
|
||||||
|
"rov_hover_trenta_flesh_feed_raw_flesh": "flesh $1/$2\n[<color=yellow><b>$KEY_Use</b></color>] Feed it raw flesh",
|
||||||
|
"rov_hover_trenta_grove_growing": "$1 (growing, $2 minutes left)",
|
||||||
|
"rov_hover_trenta_grove_grown": "$1 ($2 $3/$4, honey $5)\n[<color=yellow><b>$KEY_Use</b></color>] Feed it Fertilizer",
|
||||||
|
"rov_hover_trenta_honey_full": "$1, full",
|
||||||
|
"rov_hover_trenta_honey_next": "$1, next in $2 min",
|
||||||
|
"rov_hover_trenta_honey_none": "none (no honey item found)",
|
||||||
|
"rov_hover_trenta_ready_empty": "ready: $1 $2\n[<color=yellow><b>$KEY_Use</b></color>] Empty it",
|
||||||
|
"rov_hover_trenta_rotting_minutes_left": "rotting, $1 minutes left",
|
||||||
|
"rov_hover_trol_call_warbands": "\n[<color=yellow><b>$KEY_Use</b></color>] Call the warbands",
|
||||||
|
"rov_hover_trol_warbands": "warbands $1/$2",
|
||||||
|
"rov_hover_trol_yagluth_drop_hand_buys_king": "\n(a Yagluth drop in hand buys a king's head, and two more bands)",
|
||||||
|
"rov_hover_ward_personal": "Personal",
|
||||||
|
"rov_hover_ward_race_menu_ward_progression_open": "$rov_piece_racemenuward_name\n$1 progression - $2 ($3/$4)\n[<color=yellow><b>$KEY_Use</b></color>] Open\n[<color=yellow><b>Use item</b></color>] Offer a boss relic",
|
||||||
|
"rov_hover_ward_world": "World"
|
||||||
|
}
|
||||||
52
JotunnModStub/Translations/Italian/hover.json
Normal file
52
JotunnModStub/Translations/Italian/hover.json
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
{
|
||||||
|
"rov_hover_aswid_dominate": "[<color=yellow><b>$KEY_Use</b></color>] Domina",
|
||||||
|
"rov_hover_aswid_dominate_cooldown_m": "[<color=red>$KEY_Use</color>] Domina (ricarica: $1m)",
|
||||||
|
"rov_hover_aswid_follow": "[<color=yellow><b>$KEY_Use</b></color>] Segui",
|
||||||
|
"rov_hover_aswid_stay": "[<color=yellow><b>$KEY_Use</b></color>] Resta",
|
||||||
|
"rov_hover_butler_no_servant_stands_here_raise": "$1\nQui non c'è nessun servitore.\n[<color=yellow><b>$KEY_Use</b></color>] Fanne alzare uno",
|
||||||
|
"rov_hover_butler_waiting": "In attesa.",
|
||||||
|
"rov_hover_draugh_feed_flesh_or_draugr_s": "\n[<color=yellow><b>$KEY_Use</b></color>] Nutrilo di carne, o della testa di un draugr",
|
||||||
|
"rov_hover_draugh_flesh_risen_waiting": "carne $1/$2, risorti $3/$4, in attesa $5/$6",
|
||||||
|
"rov_hover_draugh_next_rises_s": "\nil prossimo si alza tra $1s",
|
||||||
|
"rov_hover_draugh_officers_waiting": "\nufficiali $1/$2, in attesa $3/$4",
|
||||||
|
"rov_hover_dvergar_at_barrel_pour_round": "$1 $2/$3\n$4 al barile\n[<color=yellow><b>$KEY_Use</b></color>] Versa un giro",
|
||||||
|
"rov_hover_dvergar_contracts": "contratti $1/$2",
|
||||||
|
"rov_hover_dvergar_empty_pour_brew": "vuoto\n[<color=yellow><b>$KEY_Use</b></color>] Versaci una bevanda",
|
||||||
|
"rov_hover_dvergar_read_ledger": "\n[<color=yellow><b>$KEY_Use</b></color>] Leggi il registro",
|
||||||
|
"rov_hover_dvergar_seal_worth_off": "\nil tuo sigillo vale uno sconto del $1%",
|
||||||
|
"rov_hover_dvergar_what_queen_left_behind_buys": "\n(ciò che la Regina ha lasciato compra altre due squadre)",
|
||||||
|
"rov_hover_fenrir_blood_thin_here_raises_no": "\nqui il sangue è debole: non fa ancora nascere fenrir",
|
||||||
|
"rov_hover_fenrir_fenrir": ", fenrir $1/$2",
|
||||||
|
"rov_hover_fenrir_fill_with_meat": "\n[<color=yellow><b>$KEY_Use</b></color>] Riempila di carne",
|
||||||
|
"rov_hover_fenrir_meat_wolves_ulv": "carne $1/$2\nlupi $3/$4, ulv $5/$6",
|
||||||
|
"rov_hover_fenrir_next_s": "\nil prossimo tra $1s",
|
||||||
|
"rov_hover_fenrir_not_enough_meat_next_one": "\nnon c'è abbastanza carne per il prossimo (ne serve $1)",
|
||||||
|
"rov_hover_fenrir_pack_whole": "\nil branco è al completo",
|
||||||
|
"rov_hover_skeleton_bone_hand_buy_place_empty": "\n[<color=yellow><b>$KEY_Use</b></color>] Osso in mano per comprare un posto, mani vuote per muovere la fila",
|
||||||
|
"rov_hover_skeleton_bone_toward_next_places": "\nossa $1/$2 per il prossimo dei $3 posti",
|
||||||
|
"rov_hover_skeleton_every_place_bought": "\nogni posto è comprato",
|
||||||
|
"rov_hover_skeleton_melee_archers_rotten": "\nmischia $1/$2 di $3\narcieri $4/$5 di $6\nrancidi $7/$8 di $9",
|
||||||
|
"rov_hover_skeleton_needs_greater_cursed_skull": " (serve un teschio maledetto superiore)",
|
||||||
|
"rov_hover_skeleton_next_rises_s": "\nil prossimo si alza tra $1s",
|
||||||
|
"rov_hover_sverm_beehives_taken_allowed_range_feed": "$1\n$2Alveari $3 occupati su $4 consentiti, $5 nel raggio\n$6[<color=yellow><b>$KEY_Use</b></color>] Dagli da mangiare una pila",
|
||||||
|
"rov_hover_sverm_market_no_hive": "$1\nNessun alveare entro $2 metri.",
|
||||||
|
"rov_hover_sverm_msg": "$1\n$2[<color=yellow><b>$KEY_Use</b></color>] $3",
|
||||||
|
"rov_hover_sverm_stomach_prompt": "Dagli da mangiare una pila",
|
||||||
|
"rov_hover_sverm_stomach_title": "Stomaco dell'alveare",
|
||||||
|
"rov_hover_sverm_tank": "Biomassa $1 / $2\nIn digestione $3\nUova della covata $4 / $5\n",
|
||||||
|
"rov_hover_sverm_trade_with_hive": "$1\n$2[<color=yellow><b>$KEY_Use</b></color>] Commercia con l'alveare",
|
||||||
|
"rov_hover_trenta_flesh_feed_raw_flesh": "carne $1/$2\n[<color=yellow><b>$KEY_Use</b></color>] Nutrila di carne cruda",
|
||||||
|
"rov_hover_trenta_grove_growing": "$1 (in crescita, mancano $2 minuti)",
|
||||||
|
"rov_hover_trenta_grove_grown": "$1 ($2 $3/$4, miele $5)\n[<color=yellow><b>$KEY_Use</b></color>] Nutrilo di fertilizzante",
|
||||||
|
"rov_hover_trenta_honey_full": "$1, pieno",
|
||||||
|
"rov_hover_trenta_honey_next": "$1, il prossimo tra $2 min",
|
||||||
|
"rov_hover_trenta_honey_none": "nessuno (oggetto miele non trovato)",
|
||||||
|
"rov_hover_trenta_ready_empty": "pronto: $1 $2\n[<color=yellow><b>$KEY_Use</b></color>] Svuotala",
|
||||||
|
"rov_hover_trenta_rotting_minutes_left": "sta marcendo, mancano $1 minuti",
|
||||||
|
"rov_hover_trol_call_warbands": "\n[<color=yellow><b>$KEY_Use</b></color>] Chiama le bande da guerra",
|
||||||
|
"rov_hover_trol_warbands": "bande da guerra $1/$2",
|
||||||
|
"rov_hover_trol_yagluth_drop_hand_buys_king": "\n(un bottino di Yagluth in mano compra la testa di un re, e altre due bande)",
|
||||||
|
"rov_hover_ward_personal": "Personale",
|
||||||
|
"rov_hover_ward_race_menu_ward_progression_open": "$rov_piece_racemenuward_name\nProgressione $1 - $2 ($3/$4)\n[<color=yellow><b>$KEY_Use</b></color>] Apri\n[<color=yellow><b>Usa oggetto</b></color>] Offri una reliquia di boss",
|
||||||
|
"rov_hover_ward_world": "del mondo"
|
||||||
|
}
|
||||||
|
|
@ -243,17 +243,15 @@ namespace RacesOfValheim
|
||||||
switch (GetState())
|
switch (GetState())
|
||||||
{
|
{
|
||||||
case State.Ready:
|
case State.Ready:
|
||||||
body = $"ready: {m_yield} {TrentaConfig.FertilizerDisplayName}\n" +
|
body = ModText.Get("rov_hover_trenta_ready_empty", m_yield, TrentaConfig.FertilizerDisplayName);
|
||||||
"[<color=yellow><b>$KEY_Use</b></color>] Empty it";
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case State.Composting:
|
case State.Composting:
|
||||||
body = $"rotting, {MinutesLeft()} minutes left";
|
body = ModText.Get("rov_hover_trenta_rotting_minutes_left", MinutesLeft());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
body = $"flesh {Mathf.Floor(GetFlesh())}/{m_capacity}\n" +
|
body = ModText.Get("rov_hover_trenta_flesh_feed_raw_flesh", Mathf.Floor(GetFlesh()), m_capacity);
|
||||||
"[<color=yellow><b>$KEY_Use</b></color>] Feed it raw flesh";
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -318,34 +318,32 @@ namespace RacesOfValheim
|
||||||
{
|
{
|
||||||
if (!IsGrown())
|
if (!IsGrown())
|
||||||
{
|
{
|
||||||
return Localization.instance.Localize(
|
return ModText.Get("rov_hover_trenta_grove_growing", TrentaConfig.GroveDisplayName, MinutesLeft());
|
||||||
$"{TrentaConfig.GroveDisplayName} (growing, {MinutesLeft()} minutes left)");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// The honey line is here because it was missing, and its absence is why a grove that
|
// The honey line is here because it was missing, and its absence is why a grove that
|
||||||
// was quietly producing nothing looked exactly like one that was working.
|
// was quietly producing nothing looked exactly like one that was working.
|
||||||
return Localization.instance.Localize(
|
return ModText.Get("rov_hover_trenta_grove_grown", TrentaConfig.GroveDisplayName,
|
||||||
$"{TrentaConfig.GroveDisplayName} ({TrentaConfig.FertilizerDisplayName} " +
|
TrentaConfig.FertilizerDisplayName, GetFertilizer(), TrentaConfig.GroveFertilizerCapacity,
|
||||||
$"{GetFertilizer()}/{TrentaConfig.GroveFertilizerCapacity}, honey {HoneyStatus()})\n" +
|
HoneyStatus());
|
||||||
"[<color=yellow><b>$KEY_Use</b></color>] Feed it Fertilizer");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>How much honey is in the crate and how long until the next drop of it.</summary>
|
/// <summary>How much honey is in the crate and how long until the next drop of it.</summary>
|
||||||
private string HoneyStatus()
|
private string HoneyStatus()
|
||||||
{
|
{
|
||||||
if (m_honeyPrefab == null) return "none (no honey item found)";
|
if (m_honeyPrefab == null) return ModText.Get("rov_hover_trenta_honey_none");
|
||||||
|
|
||||||
Inventory inventory = m_container != null ? m_container.GetInventory() : null;
|
Inventory inventory = m_container != null ? m_container.GetInventory() : null;
|
||||||
int stored = inventory != null ? CountHoney(inventory) : 0;
|
int stored = inventory != null ? CountHoney(inventory) : 0;
|
||||||
|
|
||||||
string status = $"{stored}/{m_honeyCapacity}";
|
string status = $"{stored}/{m_honeyCapacity}";
|
||||||
if (stored >= m_honeyCapacity) return status + ", full";
|
if (stored >= m_honeyCapacity) return ModText.Get("rov_hover_trenta_honey_full", status);
|
||||||
|
|
||||||
long stamp = m_nview.GetZDO().GetLong(KeyHoneyTime, 0L);
|
long stamp = m_nview.GetZDO().GetLong(KeyHoneyTime, 0L);
|
||||||
if (stamp == 0L || ZNet.instance == null) return status;
|
if (stamp == 0L || ZNet.instance == null) return status;
|
||||||
|
|
||||||
double left = m_secPerHoney - (ZNet.instance.GetTime() - new DateTime(stamp)).TotalSeconds;
|
double left = m_secPerHoney - (ZNet.instance.GetTime() - new DateTime(stamp)).TotalSeconds;
|
||||||
return status + $", next in {Mathf.Max(1, Mathf.CeilToInt((float)left / 60f))} min";
|
return ModText.Get("rov_hover_trenta_honey_next", status, Mathf.Max(1, Mathf.CeilToInt((float)left / 60f)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------- state
|
// ---------------------------------------------------------------- state
|
||||||
|
|
|
||||||
|
|
@ -276,14 +276,14 @@ namespace RacesOfValheim
|
||||||
|
|
||||||
private string Hover()
|
private string Hover()
|
||||||
{
|
{
|
||||||
string body = $"warbands {CountGroups()}/{TrolTotem.MaxTroops}";
|
string body = ModText.Get("rov_hover_trol_warbands", CountGroups(), TrolTotem.MaxTroops);
|
||||||
|
|
||||||
if (!IsUpgraded()) body += "\n(a Yagluth drop in hand buys a king's head, and two more bands)";
|
if (!IsUpgraded()) body += ModText.Get("rov_hover_trol_yagluth_drop_hand_buys_king");
|
||||||
|
|
||||||
// The roster lives in the window now, not in the hover - so this only has to get the player
|
// The roster lives in the window now, not in the hover - so this only has to get the player
|
||||||
// to open it. The hold gesture it used to advertise was unreadable: it cycled faster than
|
// to open it. The hold gesture it used to advertise was unreadable: it cycled faster than
|
||||||
// anyone could see what was selected.
|
// anyone could see what was selected.
|
||||||
body += "\n[<color=yellow><b>$KEY_Use</b></color>] Call the warbands";
|
body += ModText.Get("rov_hover_trol_call_warbands");
|
||||||
|
|
||||||
return Localization.instance.Localize($"{TrolTotem.PieceDisplayName} ({body})");
|
return Localization.instance.Localize($"{TrolTotem.PieceDisplayName} ({body})");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue