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

Method FindItem

internal/scripting/pet_func.go:212–222  ·  view source on GitHub ↗
(itemName string)

Source from the content-addressed store, hash-verified

210}
211
212func (p ScriptPet) FindItem(itemName string) *ScriptItem {
213 if p.petRecord == nil {
214 return nil
215 }
216 itm, found := p.petRecord.FindItem(itemName)
217 if !found {
218 return nil
219 }
220 si := newScriptItem(itm)
221 return &si
222}
223
224func (p ScriptPet) StoreItem(itm ScriptItem) bool {
225 if p.petRecord == nil || itm.itemRecord == nil {

Callers

nothing calls this directly

Calls 1

newScriptItemFunction · 0.85

Tested by

no test coverage detected