From ea42eff1c60959ff19e5d1c1c35e570fddf02692 Mon Sep 17 00:00:00 2001 From: MinLL Date: Sat, 21 Sep 2024 23:21:32 -0700 Subject: [PATCH] Tweak survival context --- minai_plugin/context.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/minai_plugin/context.php b/minai_plugin/context.php index 308c3c6..4b813ad 100644 --- a/minai_plugin/context.php +++ b/minai_plugin/context.php @@ -17,9 +17,15 @@ $hunger = GetActorValue($name, "hunger"); $thirst = GetActorValue($name, "thirst"); $fatigue = GetActorValue($name, "fatigue"); - $ret .= "{$name}'s hunger level is at {$hunger}/5. "; - $ret .= "{$name}'s thirst level is at {$thirst}/5. "; - $ret .= "{$name}'s fatigue level is at {$fatigue}/5. "; + if ($hunger > 0) { + $ret .= "{$name}'s hunger level is at {$hunger}/5. "; + } + if ($thirst > 0) { + $ret .= "{$name}'s thirst level is at {$thirst}/5. "; + } + if ($fatigue > 0) { + $ret .= "{$name}'s fatigue level is at {$fatigue}/5. "; + } return $ret; }