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

Method GetScript

internal/spells/spells.go:167–179  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

165}
166
167func (s *SpellData) GetScript() string {
168
169 scriptPath := s.GetScriptPath()
170
171 // Load the script into a string
172 if _, err := os.Stat(scriptPath); err == nil {
173 if bytes, err := util.ReadFile(scriptPath); err == nil {
174 return string(bytes)
175 }
176 }
177
178 return ``
179}
180
181func (s *SpellData) GetScriptPath() string {
182 // Load any script for the room

Callers 6

getSpellVMFunction · 0.45
getScriptMethod · 0.45
getScriptMethod · 0.45
getRoomVMFunction · 0.45
getBuffVMFunction · 0.45
getScriptMethod · 0.45

Calls 3

GetScriptPathMethod · 0.95
ReadFileFunction · 0.92
StatMethod · 0.45

Tested by

no test coverage detected