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

Method GetItems

internal/scripting/room_func.go:201–210  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

199}
200
201func (c ScriptContainer) GetItems() []ScriptItem {
202 if container, ok := c.roomRecord.Containers[c.name]; ok {
203 itms := make([]ScriptItem, 0, len(container.Items))
204 for _, item := range container.Items {
205 itms = append(itms, newScriptItem(item))
206 }
207 return itms
208 }
209 return []ScriptItem{}
210}
211
212func (c ScriptContainer) FindItem(itemName string) *ScriptItem {
213 if container, ok := c.roomRecord.Containers[c.name]; ok {

Callers

nothing calls this directly

Calls 1

newScriptItemFunction · 0.85

Tested by

no test coverage detected