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

Method GetItems

internal/scripting/pet_func.go:201–210  ·  view source on GitHub ↗

New ScriptPet methods

()

Source from the content-addressed store, hash-verified

199// ////////////////////////////////////////////////////////
200
201func (p ScriptPet) GetItems() []ScriptItem {
202 if p.petRecord == nil {
203 return []ScriptItem{}
204 }
205 itms := make([]ScriptItem, 0, len(p.petRecord.Items))
206 for _, itm := range p.petRecord.Items {
207 itms = append(itms, newScriptItem(itm))
208 }
209 return itms
210}
211
212func (p ScriptPet) FindItem(itemName string) *ScriptItem {
213 if p.petRecord == nil {

Callers

nothing calls this directly

Calls 1

newScriptItemFunction · 0.85

Tested by

no test coverage detected