From ae6a6db247b983148eb79699bdef816d4f5b0ddf Mon Sep 17 00:00:00 2001 From: NullBite Date: Tue, 27 Jun 2023 23:01:20 -0400 Subject: [PATCH] Move sound_settings function to global scope --- script.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/script.lua b/script.lua index 575ac39..f418f51 100644 --- a/script.lua +++ b/script.lua @@ -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"