]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Replace the teleportation logic on the SCRAM implant! (#26429)
authornikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
Mon, 1 Apr 2024 06:31:36 +0000 (06:31 +0000)
committerGitHub <noreply@github.com>
Mon, 1 Apr 2024 06:31:36 +0000 (17:31 +1100)
commit2ffd616c41b548e8fcd869dca7e980ffc6e384b1
tree9b74cd84420aed39ec03d3f94e03453ba1577965
parent1db178b63254c5b509a6493a631fddb596b376a4
Replace the teleportation logic on the SCRAM implant! (#26429)

* Replace the teleportation logic on the SCRAM implant!

Now instead of just trying to pick a random tile in range 20 times, the
scram teleportation logic now:

- Gets a list of grids in range
- Until a suitable tile is picked it picks a random grid
- From that grid it picks a random tile.
- If the tile is suitable, then it is set as the target and the user
  will be teleported there.
- Grids and tiles are randomly picked as outlined above until a valid
  tile is found, or all valid grids and tiles are exhausted.
- Should no suitable tile be found then they get teleported to the same
  position they are at. Effectively not teleporting them.

* Actually make the defaults sane which I forgor in the last commit

* Extract tile section to its own function. Bias selection for current grid. Use proper coords for box.

* Address reviews as much as possible

* Address reviews
Content.Server/Implants/Components/ScramImplantComponent.cs
Content.Server/Implants/SubdermalImplantSystem.cs