mirror of
https://github.com/kepler155c/opus
synced 2025-01-18 19:32:52 +00:00
neural status
This commit is contained in:
parent
1e011c8bbd
commit
7a57d74e68
@ -152,9 +152,28 @@ local function sendInfo()
|
||||
info.status = device.neuralInterface.status
|
||||
pcall(function()
|
||||
if not info.status and device.neuralInterface.getMetaOwner then
|
||||
info.status = 'health: ' ..
|
||||
math.floor(device.neuralInterface.getMetaOwner().health /
|
||||
device.neuralInterface.getMetaOwner().maxHealth * 100)
|
||||
local meta = device.neuralInterface.getMetaOwner()
|
||||
if meta.isWet then
|
||||
info.status = 'Swimming'
|
||||
elseif meta.isElytraFlying then
|
||||
info.status = 'Flying'
|
||||
elseif meta.isBurning then
|
||||
info.status = 'Burning'
|
||||
elseif meta.isDead then
|
||||
info.status = 'Deceased'
|
||||
elseif meta.isOnLadder then
|
||||
info.status = 'Climbing'
|
||||
elseif meta.isRiding then
|
||||
info.status = 'Riding'
|
||||
elseif meta.isSneaking then
|
||||
info.status = 'Sneaking'
|
||||
elseif meta.isSprinting then
|
||||
info.status = 'Running'
|
||||
else
|
||||
info.status = 'health: ' ..
|
||||
math.floor(meta.health /
|
||||
meta.maxHealth * 100)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user