changed ambiguous naming from water and food to thirst and hunger. fixed For node execution

This commit is contained in:
2026-05-14 20:12:30 +02:00
parent a2acfcefd6
commit 6591dfe637
4 changed files with 9 additions and 5 deletions
+5 -1
View File
@@ -15,7 +15,11 @@ public class ForNode : ProgramNode
{
bool isConditionFulfilled = DetermineCondition();
amountExecuted++;
return isConditionFulfilled ? NodeResult.SUCCESS : NodeResult.CONDITIONFALSE;
if (isConditionFulfilled)
{
amountExecuted = 0;
}
return isConditionFulfilled ? NodeResult.CONDITIONFALSE : NodeResult.SUCCESS;
}
private bool DetermineCondition()
+2 -2
View File
@@ -46,8 +46,8 @@ public partial class UIHandler
private void DisplaySurvivalStats()
{
energyLabel.Text = $"Energy: {GameData.survival.energy:0}/{GameData.survival.maxEnergy:0}";
waterLabel.Text = $"Water: {GameData.survival.thirst:0}/{GameData.survival.maxThirst:0}";
hungerLabel.Text = $"Food: {GameData.survival.hunger:0}/{GameData.survival.maxHunger:0}";
waterLabel.Text = $"Thirst: {GameData.survival.thirst:0}/{GameData.survival.maxThirst:0}";
hungerLabel.Text = $"Hunger: {GameData.survival.hunger:0}/{GameData.survival.maxHunger:0}";
survivalStatus.Text = GameData.survival.currentStatus;
survivalStatus.Modulate = GameData.survival.currentStatus.Contains("critical")
? UIStyle.GetWarningColor()