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

Method loadBackgroundObjects

ozaria/engine/cinematic/Loader.js:86–97  ·  view source on GitHub ↗

* Queues up the background objects * @param {Shot[]} shots

(shots)

Source from the content-addressed store, hash-verified

84 * @param {Shot[]} shots
85 */
86 loadBackgroundObjects (shots) {
87 shots
88 .filter(shot => (shot.dialogNodes || []).length > 0)
89 .forEach(({ dialogNodes }) =>
90 dialogNodes
91 .map(dialogNode => getBackgroundObject(dialogNode))
92 .filter(bgObject => bgObject)
93 .map(({ type: { slug } }) => slug)
94 .filter(slug => slug)
95 .forEach(slug => this.queueThangType(slug))
96 )
97 }
98
99 /**
100 * Iterate through the shotSetups and start loading the required thangTypes.

Callers 1

loadAssetsMethod · 0.95

Calls 2

queueThangTypeMethod · 0.95
filterMethod · 0.80

Tested by

no test coverage detected