Make radiation storms occur at least somewhat near the station (Revision 3: LocalBounds) (#4745)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
20kdc 2021-10-04 02:26:45 +01:00 committed by GitHub
parent 2d5da9a191
commit ecbf8621a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -90,8 +90,9 @@ namespace Content.Server.StationEvents.Events
return false;
}
var randomX = _robustRandom.Next((int) mapGrid.WorldBounds.Left, (int) mapGrid.WorldBounds.Right);
var randomY = _robustRandom.Next((int) mapGrid.WorldBounds.Bottom, (int) mapGrid.WorldBounds.Top);
var bounds = mapGrid.LocalBounds;
var randomX = _robustRandom.Next((int) bounds.Left, (int) bounds.Right);
var randomY = _robustRandom.Next((int) bounds.Bottom, (int) bounds.Top);
coordinates = mapGrid.ToCoordinates(randomX, randomY);
@ -101,7 +102,6 @@ namespace Content.Server.StationEvents.Events
coordinates = default;
return false;
}
return true;
}
}