mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2025-01-31 21:40:38 +00:00
Move to lobby if regathering fixes #31
This commit is contained in:
parent
8a1c3a4b43
commit
192921ad0f
1 changed files with 8 additions and 0 deletions
|
@ -117,6 +117,14 @@ StateMachine.create({
|
|||
this.assignMarineLeader(parseInt(rank.pop().candidate, 0));
|
||||
},
|
||||
|
||||
onleaveselection: function (event, from, to, voter, candidate) {
|
||||
if (event === "removeGatherer" || event === "regather") {
|
||||
this.gatherers.forEach(gatherer => {
|
||||
gatherer.team = "lobby";
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
onbeforeconfirmSelection: function (event, from, to, leader) {
|
||||
return (this.aliens().length === this.TEAM_SIZE
|
||||
&& this.marines().length === this.TEAM_SIZE);
|
||||
|
|
Loading…
Reference in a new issue