add kitty sounds to some events :3
- hurt - chat (meow)
This commit is contained in:
parent
61bd9a30fb
commit
36ab666e50
16
script.lua
16
script.lua
@ -21,7 +21,7 @@ statemonitor=require("nulllib.statemonitor")
|
|||||||
---Set optimal settings for random player sounds
|
---Set optimal settings for random player sounds
|
||||||
---@param sound Sound
|
---@param sound Sound
|
||||||
---@return Sound
|
---@return Sound
|
||||||
local function sound_settings(sound)
|
function sound_settings(sound)
|
||||||
return sound:volume(1):pitch(1):pos(player:getPos())
|
return sound:volume(1):pitch(1):pos(player:getPos())
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -75,7 +75,8 @@ do
|
|||||||
["vanilla_partial"]=false,
|
["vanilla_partial"]=false,
|
||||||
["tail_enabled"]=true,
|
["tail_enabled"]=true,
|
||||||
["aquatic_enabled"]=true,
|
["aquatic_enabled"]=true,
|
||||||
["aquatic_override"]=false
|
["aquatic_override"]=false,
|
||||||
|
["is_cat"]=true
|
||||||
}
|
}
|
||||||
sharedconfig.load_defaults(defaults)
|
sharedconfig.load_defaults(defaults)
|
||||||
end
|
end
|
||||||
@ -309,6 +310,8 @@ do
|
|||||||
end
|
end
|
||||||
|
|
||||||
function hurt()
|
function hurt()
|
||||||
|
if sharedconfig.load("is_cat") then
|
||||||
|
sound_settings(sounds["entity.cat.hurt"]):play() end
|
||||||
lock_color=false
|
lock_color=false
|
||||||
changeExpression("hurt", 10)
|
changeExpression("hurt", 10)
|
||||||
lock_color=true
|
lock_color=true
|
||||||
@ -412,6 +415,15 @@ do
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- meow
|
||||||
|
function pings.meow()
|
||||||
|
sound_settings(sounds["entity.cat.ambient"]):play()
|
||||||
|
end
|
||||||
|
events.CHAT_SEND_MESSAGE:register(function(msg)
|
||||||
|
if sharedconfig.load("is_cat") then pings.meow() end
|
||||||
|
return msg end,
|
||||||
|
"chat_meow")
|
||||||
|
|
||||||
--- Toggle Vanilla ---
|
--- Toggle Vanilla ---
|
||||||
function setVanilla(state)
|
function setVanilla(state)
|
||||||
sharedconfig.save("vanilla_enabled", state)
|
sharedconfig.save("vanilla_enabled", state)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user