Adrenalin compatibility
drandarov-io opened this issue · 0 comments
drandarov-io commented
Hey Dahaka! Sorry for the slow response about compatibility with Adrenaline.
Instead of reading the moodle level, you could read the exact fatigue value using:
playerObject:getStats():getFatigue()
This gives you a number between [0, 1.0]
The max level of the tired moodle occurs when fatigue >= 0.9
For compatiblity with adrenaline, I store how much fatigue has been reduced in a global variable in the player mod data:
playerObject:getModData().adrenalineFatigue
so this code would give you a proper reading of the players fatigue (with or without adrenaline) to base your pass out logic on:
local effectiveFatigue = playerObject:getStats():getFatigue()
if playerObject:getModData().adrenalineFatigue then
effectiveFatigue = effectiveFatigue + playerObject:getModData().adrenalineFatigue
end
https://steamcommunity.com/sharedfiles/filedetails/?id=2807001835&searchtext=adrenalin