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

Method FindItem

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

Source from the content-addressed store, hash-verified

210}
211
212func (c ScriptContainer) FindItem(itemName string) *ScriptItem {
213 if container, ok := c.roomRecord.Containers[c.name]; ok {
214 if item, found := container.FindItem(itemName); found {
215 si := newScriptItem(item)
216 return &si
217 }
218 }
219 return nil
220}
221
222func (c ScriptContainer) AddItem(itm ScriptItem) bool {
223 if itm.itemRecord == nil || itm.itemRecord.ItemId == 0 {

Callers

nothing calls this directly

Calls 1

newScriptItemFunction · 0.85

Tested by

no test coverage detected