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

@@ -20,7 +20,6 @@ public sealed class MeleeArcOverlay : Overlay
private readonly IPlayerManager _playerManager;
private readonly MeleeWeaponSystem _melee;
private readonly SharedCombatModeSystem _combatMode;
private readonly SharedTransformSystem _xformSystem;
public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowFOV;
@@ -32,7 +31,6 @@ public sealed class MeleeArcOverlay : Overlay
_playerManager = playerManager;
_melee = melee;
_combatMode = combatMode;
_xformSystem = _entManager.System<SharedTransformSystem>();
}
protected override void Draw(in OverlayDrawArgs args)
@@ -54,7 +52,7 @@ public sealed class MeleeArcOverlay : Overlay
if (mapPos.MapId != args.MapId)
return;
var playerPos = _xformSystem.GetMapCoordinates((player.Value, xform));
var playerPos = xform.MapPosition;
if (mapPos.MapId != playerPos.MapId)
return;

View File

@@ -80,7 +80,7 @@ public sealed partial class MeleeWeaponSystem
TransformSystem.AttachToGridOrMap(animationUid, xform);
var worldPos = mapPos + (mapRot - userXform.LocalRotation).RotateVec(localPos);
var newLocalPos = TransformSystem.GetInvWorldMatrix(xform.ParentUid).Transform(worldPos);
TransformSystem.SetLocalPositionNoLerp(animationUid, newLocalPos, xform);
TransformSystem.SetLocalPositionNoLerp(xform, newLocalPos);
if (arcComponent.Fadeout)
_animation.Play(animationUid, GetFadeAnimation(sprite, 0f, 0.15f), FadeAnimationKey);
break;

View File

@@ -136,7 +136,7 @@ public sealed partial class MeleeWeaponSystem : SharedMeleeWeaponSystem
// Light attack
if (useDown == BoundKeyState.Down)
{
var attackerPos = TransformSystem.GetMapCoordinates(entity);
var attackerPos = Transform(entity).MapPosition;
if (mousePos.MapId != attackerPos.MapId ||
(attackerPos.Position - mousePos.Position).Length() > weapon.Range)

View File

@@ -18,7 +18,6 @@ public sealed class GunSpreadOverlay : Overlay
private readonly IInputManager _input;
private readonly IPlayerManager _player;
private readonly GunSystem _guns;
private readonly SharedTransformSystem _xforms;
public GunSpreadOverlay(IEntityManager entManager, IEyeManager eyeManager, IGameTiming timing, IInputManager input, IPlayerManager player, GunSystem system)
{
@@ -28,7 +27,6 @@ public sealed class GunSpreadOverlay : Overlay
_timing = timing;
_player = player;
_guns = system;
_xforms = entManager.System<SharedTransformSystem>();
}
protected override void Draw(in OverlayDrawArgs args)
@@ -43,7 +41,7 @@ public sealed class GunSpreadOverlay : Overlay
return;
}
var mapPos = _xforms.GetMapCoordinates((player.Value, xform));
var mapPos = xform.MapPosition;
if (mapPos.MapId == MapId.Nullspace)
return;

View File

@@ -99,7 +99,8 @@ public sealed partial class GunSystem : SharedGunSystem
var ent = Spawn(HitscanProto, coords);
var sprite = Comp<SpriteComponent>(ent);
TransformSystem.SetLocalRotation(ent, a.angle);
var xform = Transform(ent);
xform.LocalRotation = a.angle;
sprite[EffectLayers.Unshaded].AutoAnimated = false;
sprite.LayerSetSprite(EffectLayers.Unshaded, rsi);
sprite.LayerSetState(EffectLayers.Unshaded, rsi.RsiState);
@@ -277,11 +278,9 @@ public sealed partial class GunSystem : SharedGunSystem
var ent = Spawn(message.Prototype, coordinates);
var effectXform = Transform(ent);
TransformSystem.SetLocalPositionRotation(ent,
TransformSystem.SetLocalPositionRotation(effectXform,
effectXform.LocalPosition + new Vector2(0f, -0.5f),
effectXform.LocalRotation - MathF.PI / 2,
effectXform
);
effectXform.LocalRotation - MathF.PI / 2);
var lifetime = 0.4f;