mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Removed hero team color in non-multiplayer levels.
This commit is contained in:
parent
df162080c3
commit
cbf3aab374
2 changed files with 4 additions and 0 deletions
|
@ -330,6 +330,8 @@ module.exports = class LevelLoader extends CocoClass
|
|||
@grabTeamConfigs()
|
||||
@thangTypeTeams = {}
|
||||
for thang in @level.get('thangs')
|
||||
if @level.get('type', true) is 'hero' and thang.id is 'Hero Placeholder'
|
||||
continue # No team colors for heroes on single-player levels
|
||||
for component in thang.components
|
||||
if team = component.config?.team
|
||||
@thangTypeTeams[thang.thangType] ?= []
|
||||
|
|
|
@ -173,6 +173,8 @@ module.exports = class Thang
|
|||
getLankOptions: ->
|
||||
colorConfigs = @teamColors or @world?.getTeamColors() or {}
|
||||
options = {colorConfig: {}}
|
||||
if @id is 'Hero Placeholder' and not @world.getThangByID 'Hero Placeholder 1'
|
||||
return options # No team colors for heroes on single-player levels
|
||||
if @team and teamColor = colorConfigs[@team]
|
||||
options.colorConfig.team = teamColor
|
||||
if @color and color = @grabColorConfig @color
|
||||
|
|
Loading…
Reference in a new issue