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

Method GetScriptPath

internal/buffs/buffspec.go:169–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

167}
168
169func (b *BuffSpec) GetScriptPath() string {
170 // Load any script for the buff
171
172 buffFilePath := b.Filename()
173 scriptFilePath := strings.Replace(buffFilePath, `.yaml`, `.js`, 1)
174
175 fullScriptPath := strings.Replace(string(configs.GetFilePathsConfig().DataFiles)+`/buffs/`+b.Filepath(),
176 buffFilePath,
177 scriptFilePath,
178 1)
179
180 return util.FilePath(fullScriptPath)
181}
182
183// file self loads due to init()
184func LoadDataFiles() {

Callers 3

GetScriptMethod · 0.95
DeleteBuffSpecFunction · 0.45
SaveBuffScriptFunction · 0.45

Calls 4

FilenameMethod · 0.95
FilepathMethod · 0.95
GetFilePathsConfigFunction · 0.92
FilePathFunction · 0.92

Tested by

no test coverage detected