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

Method GetStorageItems

modules/storage/storage.go:252–257  ·  view source on GitHub ↗

GetStorageItems is exported for use by other systems (e.g. autocomplete).

(userId int)

Source from the content-addressed store, hash-verified

250
251// GetStorageItems is exported for use by other systems (e.g. autocomplete).
252func (m *StorageModule) GetStorageItems(userId int) []items.Item {
253 if data, ok := m.storage[userId]; ok {
254 return data.getItems()
255 }
256 return nil
257}
258
259// AddStorageItem is exported for cross-module use.
260func (m *StorageModule) AddStorageItem(userId int, itm items.Item) bool {

Callers 1

onAutoCompleteMethod · 0.95

Calls 1

getItemsMethod · 0.80

Tested by

no test coverage detected