Skip to content

Commit

Permalink
Tweak survival context
Browse files Browse the repository at this point in the history
  • Loading branch information
MinLL committed Sep 22, 2024
1 parent c5113de commit ea42eff
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions minai_plugin/context.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit ea42eff

Please sign in to comment.