MCPcopy Create free account
hub / github.com/SolarLune/masterplan / ReceiveMessage

Method ReceiveMessage

contents.go:1225–1248  ·  view source on GitHub ↗
(msg *Message)

Source from the content-addressed store, hash-verified

1223}
1224
1225func (sc *SoundContents) ReceiveMessage(msg *Message) {
1226
1227 if msg.Type == MessageUndoRedo {
1228 sc.LoadFile()
1229 }
1230
1231 if sc.Sound != nil {
1232
1233 if msg.Type == MessageCardDeleted || msg.Type == MessageCardDestroyed {
1234 sc.Sound.Pause()
1235 // if globals.Settings.Get(SettingsCacheAudioBeforePlayback).AsBool() {
1236 sc.Sound.Destroy()
1237 sc.Sound = nil
1238 // }
1239 sc.Playing = false
1240 }
1241
1242 if msg.Type == MessageVolumeChange {
1243 sc.Sound.UpdateVolume()
1244 }
1245
1246 }
1247
1248}
1249
1250type ImageContents struct {
1251 DefaultContents

Callers

nothing calls this directly

Calls 4

LoadFileMethod · 0.95
PauseMethod · 0.80
UpdateVolumeMethod · 0.80
DestroyMethod · 0.65

Tested by

no test coverage detected