Revert "Fix chat bubbles (#25643)" (#25645)

* Revert "Fix chat bubbles (#25643)"

This reverts commit 23d2c4d924.

* Revert "Fixes obsolete Transform warnings in Content. (#25256)"

This reverts commit f284b43ff6.
This commit is contained in:
metalgearsloth
2024-02-28 00:51:20 +11:00
committed by GitHub
parent d204896bf5
commit a9502be29e
154 changed files with 435 additions and 611 deletions

View File

@@ -18,7 +18,6 @@ namespace Content.Server.Solar.EntitySystems
{
[Dependency] private readonly IRobustRandom _robustRandom = default!;
[Dependency] private readonly SharedPhysicsSystem _physicsSystem = default!;
[Dependency] private readonly SharedTransformSystem _xformSystem = default!;
/// <summary>
/// Maximum panel angular velocity range - used to stop people rotating panels fast enough that the lag prevention becomes noticable
@@ -113,7 +112,7 @@ namespace Content.Server.Solar.EntitySystems
while (query.MoveNext(out var uid, out var panel, out var xform))
{
TotalPanelPower += panel.MaxSupply * panel.Coverage;
_xformSystem.SetWorldRotation(xform, TargetPanelRotation);
xform.WorldRotation = TargetPanelRotation;
_updateQueue.Enqueue((uid, panel));
}
}
@@ -136,7 +135,7 @@ namespace Content.Server.Solar.EntitySystems
// directly downwards (abs(theta) = pi) = coverage -1
// as TowardsSun + = CCW,
// panelRelativeToSun should - = CW
var panelRelativeToSun = _xformSystem.GetWorldRotation(xform) - TowardsSun;
var panelRelativeToSun = xform.WorldRotation - TowardsSun;
// essentially, given cos = X & sin = Y & Y is 'downwards',
// then for the first 90 degrees of rotation in either direction,
// this plots the lower-right quadrant of a circle.
@@ -154,7 +153,7 @@ namespace Content.Server.Solar.EntitySystems
if (coverage > 0)
{
// Determine if the solar panel is occluded, and zero out coverage if so.
var ray = new CollisionRay(_xformSystem.GetWorldPosition(xform), TowardsSun.ToWorldVec(), (int) CollisionGroup.Opaque);
var ray = new CollisionRay(xform.WorldPosition, TowardsSun.ToWorldVec(), (int) CollisionGroup.Opaque);
var rayCastResults = _physicsSystem.IntersectRayWithPredicate(
xform.MapID,
ray,