add syndicate singularity beacon (#18486)

* implement singulo attraction

* add attractor syndie item

* cleanup

* fix name/desc

* actually fix name

* singulo toolbox no longer whitelisted

* add custom sprite, overhaul prototype

* address review

* beacon real

* webedit 1

* webedit 2

* webedit 3

* permalink to copyright

---------

Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
This commit is contained in:
Ilya246
2024-01-06 12:21:24 +04:00
committed by GitHub
parent 2629a8d92c
commit 154416787e
9 changed files with 229 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
using System.Numerics;
using Content.Server.Physics.Components;
using Content.Shared.Follower.Components;
using Content.Shared.Throwing;
@@ -69,11 +70,15 @@ internal sealed class RandomWalkController : VirtualController
if(!Resolve(uid, ref physics))
return;
var pushAngle = _random.NextAngle();
var pushVec = _random.NextAngle().ToVec();
pushVec += randomWalk.BiasVector;
pushVec.Normalize();
if (randomWalk.ResetBiasOnWalk)
randomWalk.BiasVector *= 0f;
var pushStrength = _random.NextFloat(randomWalk.MinSpeed, randomWalk.MaxSpeed);
_physics.SetLinearVelocity(uid, physics.LinearVelocity * randomWalk.AccumulatorRatio, body: physics);
_physics.ApplyLinearImpulse(uid, pushAngle.ToVec() * (pushStrength * physics.Mass), body: physics);
_physics.ApplyLinearImpulse(uid, pushVec * (pushStrength * physics.Mass), body: physics);
}
/// <summary>