[Add] Random Spawn Event Location (#953)

* location located

* Update Content.Server/StationEvents/Components/RandomSpawnRuleComponent.cs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>

* fix

---------

Co-authored-by: vanx <vanxxxx@discord>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
This commit is contained in:
vanx
2025-12-29 17:15:14 +03:00
committed by GitHub
parent b3f1bfb329
commit d45adc90ac
5 changed files with 72 additions and 10 deletions

View File

@@ -441,7 +441,7 @@ public sealed partial class NavMapSystem : SharedNavMapSystem
// get the angle between the two positions, adjusted for the grid rotation so that
// we properly preserve north in relation to the grid.
var dir = (pos.Value.Position - coordinates.Position).ToWorldAngle();
var dir = (coordinates.Position - pos.Value.Position).ToWorldAngle(); // White Dream fix
var adjustedDir = (dir - gridOffset).GetDir();
var length = (pos.Value.Position - coordinates.Position).Length();