Protection for ship launches (#355)

In case where ship is too big for a dock and can't be launched.
master
phkb 2020-07-23 22:02:17 +10:00 committed by GitHub
parent 58349ee0c1
commit 95ab3d4a39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -2361,7 +2361,11 @@ this._addShips = function(role,num,pos,spread)
var result = [];
for (var i = 0 ; i < num ; i++)
{
result.push(pos.launchShipWithRole(role));
let ship = pos.launchShipWithRole(role);
if( ship )
{
result.push(ship);
}
}
return result;
}