Compare commits
2 Commits
e5162146af
...
61bd9a30fb
Author | SHA1 | Date | |
---|---|---|---|
61bd9a30fb | |||
ae6a6db247 |
17
script.lua
17
script.lua
@ -18,6 +18,13 @@ sharedstate=require("nulllib.sharedstate")
|
|||||||
sharedconfig=require("nulllib.sharedconfig")
|
sharedconfig=require("nulllib.sharedconfig")
|
||||||
statemonitor=require("nulllib.statemonitor")
|
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
|
-- shortcuts for /figura run so i don't have to type so much
|
||||||
C={}
|
C={}
|
||||||
|
|
||||||
@ -362,20 +369,12 @@ function setArmor(state)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local snore
|
local snore
|
||||||
-- TODO re-enable snoring
|
|
||||||
do
|
do
|
||||||
local snores={sounds["sounds.snore-1"], sounds["sounds.snore-2"], sounds["sounds.snore-3"]}
|
local snores={sounds["sounds.snore-1"], sounds["sounds.snore-2"], sounds["sounds.snore-3"]}
|
||||||
|
|
||||||
local snore_index=1
|
local snore_index=1
|
||||||
local is_snoring=false
|
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()
|
local function state_not_sleeping()
|
||||||
-- return not player:getPose() ~= "SLEEPING"
|
-- return not player:getPose() ~= "SLEEPING"
|
||||||
return player:getPose() ~= "SLEEPING"
|
return player:getPose() ~= "SLEEPING"
|
||||||
@ -634,7 +633,7 @@ function player_init()
|
|||||||
end
|
end
|
||||||
|
|
||||||
sharedstate.init("health", player:getHealth(), health_callback)
|
sharedstate.init("health", player:getHealth(), health_callback)
|
||||||
-- TODO possibly reconsider if this should be redone
|
-- TODO set part visibility in avatar.json
|
||||||
-- actually it's probably fine, it's jsut here because i forget visibility settings
|
-- actually it's probably fine, it's jsut here because i forget visibility settings
|
||||||
-- local all_parts=util.recurseModelGroup(model)
|
-- local all_parts=util.recurseModelGroup(model)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user