MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / PlaySound

Method PlaySound

internal/users/userrecord.go:309–327  ·  view source on GitHub ↗
(soundId string, category string)

Source from the content-addressed store, hash-verified

307}
308
309func (u *UserRecord) PlaySound(soundId string, category string) {
310
311 v := 100
312 if soundConfig := audio.GetFile(soundId); soundConfig.FilePath != `` {
313 soundId = soundConfig.FilePath
314 if soundConfig.Volume > 0 && soundConfig.Volume <= 100 {
315 v = soundConfig.Volume
316 }
317 }
318
319 events.AddToQueue(events.MSP{
320 UserId: u.UserId,
321 SoundType: `SOUND`,
322 SoundFile: soundId,
323 Volume: v,
324 Category: category,
325 })
326
327}
328
329func (u *UserRecord) Command(inputTxt string, waitSeconds ...float64) {
330

Callers 7

GoFunction · 0.45
StartFunction · 0.45
PicklockFunction · 0.45
UnlockFunction · 0.45
LockFunction · 0.45
tryPurchaseFunction · 0.45
UseFunction · 0.45

Calls 2

GetFileFunction · 0.92
AddToQueueFunction · 0.92

Tested by

no test coverage detected