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

Function setPositionPlaceholders

app/lib/level-generation.js:1702–1712  ·  view source on GitHub ↗
(thangs)

Source from the content-addressed store, hash-verified

1700const placeholderPositionSimple = 50
1701const placeholderPosition = 6 + placeholderPositionSimple * 8
1702function setPositionPlaceholders (thangs) {
1703 // Move all signifiant Thangs out of the way, so any Thangs in the actual level layout will have to have been moved there deliberately
1704 for (const thang of thangs) {
1705 const spriteName = thangTypesToSpriteNames[thang.thangType]
1706 if (significantSpriteNames.includes(spriteName)) {
1707 const physicalConfig = _.find(thang.components, (component) => component.original === PhysicalID).config
1708 physicalConfig.pos.x = placeholderPosition
1709 physicalConfig.pos.y = placeholderPosition
1710 }
1711 }
1712}
1713
1714async function verifyLevel ({ sourceLevel, thangs, solutionCode, starterCode, supermodel }) {
1715 // console.log('Should verify', { sourceLevel, thangs, solutionCode, starterCode })

Callers 1

permuteActionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected