Fix hunger and thirst status retrieval

Changed Framework.GetHunger and Framework.GetThirst to fetch the 'status' instead of 'hunger' or 'thirst' directly. This ensures the functions correctly iterate over the status table to find the relevant values.
This commit is contained in:
MrNewb committed 2025-09-10 11:29:42 -04:00
1 parent aae3d540ff
commit 8bf02f6372
1 file changed
+2 -2
+2 -2
View File
@@ -252,7 +252,7 @@ end
--- @param src number
--- @return number | nil
Framework.GetHunger = function(src)
local status = Framework.GetStatus(src, "hunger")
local status = Framework.GetStatus(src, "status")
if not status then return end
if type(status) ~= "table" then return end
for _, entry in ipairs(status) do
@@ -266,7 +266,7 @@ end
--- @param src any
--- @return number | nil
Framework.GetThirst = function(src)
local status = Framework.GetStatus(src, "thirst")
local status = Framework.GetStatus(src, "status")
if not status then return nil end
if type(status) ~= "table" then return end
for _, entry in ipairs(status) do