Sync bol for module releas
All checks were successful
Release Creation / build (release) Successful in 53s
All checks were successful
Release Creation / build (release) Successful in 53s
This commit is contained in:
@ -9,24 +9,5 @@
|
||||
*/
|
||||
export function handleSocketEvent({ action = null, data = {} } = {}) {
|
||||
console.debug("handleSocketEvent", action, data)
|
||||
switch (action) {
|
||||
case "fortune":
|
||||
return CthulhuEternalFortune.handleSocketEvent(data)
|
||||
case "askRoll":
|
||||
return _askRoll(data)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the socket event to ask for a roll.
|
||||
*
|
||||
* @param {Object} [options={}] The options object.
|
||||
* @param {string} [options.userId] The ID of the user who initiated the roll.
|
||||
*/
|
||||
export function _askRoll({ userId } = {}) {
|
||||
console.debug(`handleSocketEvent _askRoll from ${userId} !`)
|
||||
const currentUser = game.user._id
|
||||
if (userId === currentUser) {
|
||||
foundry.audio.AudioHelper.play({ src: "/systems/fvtt-cthulhu-eternal/sounds/drums.wav", volume: 0.8, autoplay: true, loop: false }, false)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user