Added time warning
parent
6c04ba7bf4
commit
d74ca682eb
|
@ -4,17 +4,38 @@ namespace stardew_access.Features
|
|||
{
|
||||
private int prevStamina;
|
||||
private int prevHealth;
|
||||
private int prevHour;
|
||||
|
||||
public Warnings()
|
||||
{
|
||||
prevStamina = 100;
|
||||
prevHealth = 100;
|
||||
prevHour = 6;
|
||||
}
|
||||
|
||||
public void update()
|
||||
{
|
||||
this.checkForHealth();
|
||||
this.checkForStamina();
|
||||
this.checkForTimeOfDay();
|
||||
}
|
||||
|
||||
private void checkForTimeOfDay()
|
||||
{
|
||||
if (MainClass.ModHelper == null)
|
||||
return;
|
||||
|
||||
int hours = StardewValley.Game1.timeOfDay / 100;
|
||||
string toSpeak = MainClass.ModHelper.Translation.Get("warnings.time", new { value = CurrentPlayer.TimeOfDay });
|
||||
|
||||
if (hours < 1 && prevHour > 2 || hours >= 1 && prevHour < 1)
|
||||
{
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
// Pause the read tile feature to prevent interruption in warning message
|
||||
MainClass.ReadTileFeature.pause();
|
||||
}
|
||||
|
||||
prevHour = hours;
|
||||
}
|
||||
|
||||
public void checkForStamina()
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"warnings.health": "Warnung! Die Gesundheit liegt bei {{value}} Prozent!",
|
||||
"warnings.stamina": "Warnung! Ausdauer beträgt ar {{value}} Prozent!"
|
||||
"warnings.stamina": "Warnung! Ausdauer beträgt ar {{value}} Prozent!",
|
||||
"warnings.time": "Warnung! Zeit ist {{value}}"
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"warnings.health": "Warning! Health is at {{value}} percent!",
|
||||
"warnings.stamina": "Warning! Stamina is at {{value}} percent!"
|
||||
"warnings.stamina": "Warning! Stamina is at {{value}} percent!",
|
||||
"warnings.time": "Warning! Time is {{value}}"
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"warnings.health": "¡Advertencia! ¡La salud está al {{value}} por ciento!",
|
||||
"warnings.stamina": "¡Advertencia! ¡La resistencia es un {{value}} por ciento!"
|
||||
"warnings.stamina": "¡Advertencia! ¡La resistencia es un {{value}} por ciento!",
|
||||
"warnings.time": "¡Advertencia! El tiempo es {{valor}}"
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"warnings.health": "Avertissement! La santé est à {{value}} pour cent!",
|
||||
"warnings.stamina": "Avertissement! L'endurance est à {{value}} pour cent!"
|
||||
"warnings.stamina": "Avertissement! L'endurance est à {{value}} pour cent!",
|
||||
"warnings.time": "Avertissement! Le temps est de {{value}}"
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"warnings.health": "Figyelem! Az egészségi állapot {{érték}} százalék!",
|
||||
"warnings.stamina": "Figyelem! Az állóképesség {{value}} százalék!"
|
||||
"warnings.stamina": "Figyelem! Az állóképesség {{value}} százalék!",
|
||||
"warnings.time": "Figyelem! Az idő {{érték}}"
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"warnings.health": "Avvertimento! La salute è al {{value}} percento!",
|
||||
"warnings.stamina": "Avvertimento! La resistenza è al {{value}} percento!"
|
||||
"warnings.stamina": "Avvertimento! La resistenza è al {{value}} percento!",
|
||||
"warnings.time": "Avvertimento! L'ora è {{value}}"
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"warnings.health": "警告!健康状態は{{value}}パーセントです!",
|
||||
"warnings.stamina": "警告!スタミナは{{value}}パーセントです!"
|
||||
"warnings.stamina": "警告!スタミナは{{value}}パーセントです!",
|
||||
"warnings.time": "警告!時間は{{value}}です"
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"warnings.health": "경고! 건강은 {{value}}퍼센트입니다!",
|
||||
"warnings.stamina": "경고! 체력은 {{value}}퍼센트입니다!"
|
||||
"warnings.stamina": "경고! 체력은 {{value}}퍼센트입니다!",
|
||||
"warnings.time": "경고! 시간은 {{value}}입니다"
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"warnings.health": "Aviso! A saúde está em {{value}} por cento!",
|
||||
"warnings.stamina": "Aviso! A resistência está em {{value}} por cento!"
|
||||
"warnings.stamina": "Aviso! A resistência está em {{value}} por cento!",
|
||||
"warnings.time": "Aviso! O tempo é {{value}}"
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"warnings.health": "Предупреждение! Здоровье составляет {{value}} процентов!",
|
||||
"warnings.stamina": "Предупреждение! Выносливость составляет {{value}} процентов!"
|
||||
"warnings.stamina": "Предупреждение! Выносливость составляет {{value}} процентов!",
|
||||
"warnings.time": "Предупреждение! Время {{value}}"
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"warnings.health": "Uyarı! Sağlık yüzde {{değer}}!",
|
||||
"warnings.stamina": "uyarı! Dayanıklılık yüzde {{değer}}!"
|
||||
"warnings.stamina": "uyarı! Dayanıklılık yüzde {{değer}}!",
|
||||
"warnings.time": "Uyarı! Zaman {{değer}}"
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"warnings.health": "警告!健康状况为 {{value}} 百分!",
|
||||
"warnings.stamina": "警告!耐力为 {{value}} 百分!"
|
||||
"warnings.stamina": "警告!耐力为 {{value}} 百分!",
|
||||
"warnings.time": "警告!时间是 {{value}}"
|
||||
}
|
Loading…
Reference in New Issue