Move sound_settings function to global scope

This commit is contained in:
NullBite 2023-06-27 23:01:20 -04:00
parent e5162146af
commit ae6a6db247
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A

View File

@ -18,6 +18,13 @@ sharedstate=require("nulllib.sharedstate")
sharedconfig=require("nulllib.sharedconfig")
statemonitor=require("nulllib.statemonitor")
---Set optimal settings for random player sounds
---@param sound Sound
---@return Sound
local function sound_settings(sound)
return sound:volume(1):pitch(1):pos(player:getPos())
end
-- shortcuts for /figura run so i don't have to type so much
C={}
@ -369,13 +376,6 @@ do
local snore_index=1
local is_snoring=false
---Set optimal settings for random player sounds
---@param sound Sound
---@return Sound
local function sound_settings(sound)
return sound:volume(1):pitch(1):pos(player:getPos())
end
local function state_not_sleeping()
-- return not player:getPose() ~= "SLEEPING"
return player:getPose() ~= "SLEEPING"