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

Method LoadFile

contents.go:1134–1151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1132}
1133
1134func (sc *SoundContents) LoadFile() {
1135
1136 fp := sc.Card.Properties.Get("filepath").AsString()
1137
1138 if newRes := globals.Resources.Get(fp); sc.Resource != newRes {
1139
1140 sc.Resource = newRes
1141
1142 if sc.Sound != nil {
1143 sc.Sound.Pause()
1144 sc.Sound.Destroy()
1145 sc.Playing = false
1146 }
1147 sc.Sound = nil
1148
1149 }
1150
1151}
1152
1153func (sc *SoundContents) LoadFileFrom(filepath string) {
1154

Callers 4

NewSoundContentsFunction · 0.95
LoadFileFromMethod · 0.95
ReceiveMessageMethod · 0.95
OpenProjectFromFunction · 0.45

Calls 4

AsStringMethod · 0.80
PauseMethod · 0.80
DestroyMethod · 0.65
GetMethod · 0.45

Tested by

no test coverage detected