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:
@@ -90,8 +90,9 @@ namespace Content.Server.StationEvents.Events
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var randomX = _robustRandom.Next((int) mapGrid.WorldBounds.Left, (int) mapGrid.WorldBounds.Right);
|
var bounds = mapGrid.LocalBounds;
|
||||||
var randomY = _robustRandom.Next((int) mapGrid.WorldBounds.Bottom, (int) mapGrid.WorldBounds.Top);
|
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);
|
coordinates = mapGrid.ToCoordinates(randomX, randomY);
|
||||||
|
|
||||||
@@ -101,7 +102,6 @@ namespace Content.Server.StationEvents.Events
|
|||||||
coordinates = default;
|
coordinates = default;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user