MCPcopy Create free account
hub / github.com/codecombat/codecombat / getAllowedSlots

Method getAllowedSlots

app/models/ThangType.js:466–471  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

464 // Item functions
465
466 getAllowedSlots () {
467 const itemComponentRef = _.find(
468 this.get('components') || [],
469 compRef => compRef.original === LevelComponent.ItemID)
470 return __guard__(itemComponentRef != null ? itemComponentRef.config : undefined, x => x.slots) || ['right-hand'] // ['right-hand'] is default
471 }
472
473 getAllowedHeroClasses () {
474 const heroClass = this.get('heroClass')

Callers 7

sortItemMethod · 0.80
equipSelectedItemMethod · 0.80
onItemsFetchedMethod · 0.80
onItemPurchasedMethod · 0.80

Calls 2

__guard__Function · 0.70
getMethod · 0.45

Tested by

no test coverage detected