From 1f5d917c5704774f54177c9183739e7125e10cbd Mon Sep 17 00:00:00 2001 From: Kill_Me_I_Noobs <118206719+Vonsant@users.noreply.github.com> Date: Sat, 20 Apr 2024 18:00:17 +0300 Subject: [PATCH] =?UTF-8?q?Revert=20"=D0=9F=D0=B5=D1=80=D0=B5=D0=B2=D0=BE?= =?UTF-8?q?=D0=B4=20=D0=BD=D0=B0=20=D0=B1=D0=BE=D0=BB=D0=B5=D0=B5=20=D0=B0?= =?UTF-8?q?=D0=BA=D1=82=D1=83=D0=B0=D0=BB=D1=8C=D0=BD=D1=83=D1=8E=20=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D1=81=D0=B8=D1=8E=20=D1=80=D0=BE=D0=B1=D0=B0=D1=81?= =?UTF-8?q?=D1=82=D0=B0=20(#43)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 6f21841355c695b5e21fa1107aa3d6c748bae80c. --- .gitmodules | 8 ++++---- .../Administration/Systems/AdminVerbSystem.Smites.cs | 12 ++++++------ .../AtmosphereSystem.HighPressureDelta.cs | 8 ++++---- .../Chemistry/EntitySystems/VaporSystem.cs | 4 ++-- Content.Server/ImmovableRod/ImmovableRodSystem.cs | 6 +++--- .../ParticleAcceleratorSystem.Emitter.cs | 2 +- .../Physics/Controllers/ChasingWalkSystem.cs | 2 +- .../Systems/ShuttleSystem.FasterThanLight.cs | 4 ++-- Content.Server/Shuttles/Systems/ShuttleSystem.cs | 8 ++++---- .../StationEvents/Events/MeteorSwarmRule.cs | 6 +++--- Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs | 2 +- .../Movement/Systems/SharedJetpackSystem.cs | 4 ++-- Content.Shared/Throwing/ThrowingSystem.cs | 6 +++--- Content.Shared/Throwing/ThrownItemSystem.cs | 2 +- .../Weapons/Melee/MeleeThrowOnHitSystem.cs | 4 ++-- Content.Shared/Weapons/Misc/SharedTetherGunSystem.cs | 10 +++++----- .../Weapons/Ranged/Systems/SharedGunSystem.cs | 2 +- RobustToolbox | 2 +- 18 files changed, 46 insertions(+), 46 deletions(-) diff --git a/.gitmodules b/.gitmodules index 121e43f9a30..5ba1735ee8c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ +[submodule "RobustToolbox"] + path = RobustToolbox + url = https://github.com/space-wizards/RobustToolbox.git + branch = master [submodule "Secrets"] path = Secrets url = git@github.com:corvax-project/secrets.git branch = master update = none -[submodule "RobustToolbox"] - path = RobustToolbox - url = https://github.com/Corvax-Frontier/CorvustToolbox - branch = FronTest diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs index 8ee52ad03e7..8a819f59420 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs @@ -409,7 +409,7 @@ private void AddSmiteVerbs(GetVerbsEvent args) var fixtures = Comp(args.Target); xform.Anchored = false; // Just in case. _physics.SetBodyType(args.Target, BodyType.Dynamic, manager: fixtures, body: physics); - _physics.SetBodyStatus(args.Target, physics, BodyStatus.InAir); + _physics.SetBodyStatus(physics, BodyStatus.InAir); _physics.WakeBody(args.Target, manager: fixtures, body: physics); foreach (var fixture in fixtures.Fixtures.Values) @@ -424,8 +424,8 @@ private void AddSmiteVerbs(GetVerbsEvent args) _physics.SetLinearVelocity(args.Target, _random.NextVector2(1.5f, 1.5f), manager: fixtures, body: physics); _physics.SetAngularVelocity(args.Target, MathF.PI * 12, manager: fixtures, body: physics); - _physics.SetLinearDamping(args.Target, physics, 0f); - _physics.SetAngularDamping(args.Target, physics, 0f); + _physics.SetLinearDamping(physics, 0f); + _physics.SetAngularDamping(physics, 0f); }, Impact = LogImpact.Extreme, Message = Loc.GetString("admin-smite-pinball-description") @@ -444,7 +444,7 @@ private void AddSmiteVerbs(GetVerbsEvent args) xform.Anchored = false; // Just in case. _physics.SetBodyType(args.Target, BodyType.Dynamic, body: physics); - _physics.SetBodyStatus(args.Target, physics, BodyStatus.InAir); + _physics.SetBodyStatus(physics, BodyStatus.InAir); _physics.WakeBody(args.Target, manager: fixtures, body: physics); foreach (var fixture in fixtures.Fixtures.Values) @@ -454,8 +454,8 @@ private void AddSmiteVerbs(GetVerbsEvent args) _physics.SetLinearVelocity(args.Target, _random.NextVector2(8.0f, 8.0f), manager: fixtures, body: physics); _physics.SetAngularVelocity(args.Target, MathF.PI * 12, manager: fixtures, body: physics); - _physics.SetLinearDamping(args.Target, physics, 0f); - _physics.SetAngularDamping(args.Target, physics, 0f); + _physics.SetLinearDamping(physics, 0f); + _physics.SetAngularDamping(physics, 0f); }, Impact = LogImpact.Extreme, Message = Loc.GetString("admin-smite-yeet-description") diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs index 346a3af089c..53035e1ed3c 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs @@ -54,7 +54,7 @@ private void UpdateHighPressure(float frameTime) if (HasComp(uid) && TryComp(uid, out var body)) { - _physics.SetBodyStatus(uid, body, BodyStatus.OnGround); + _physics.SetBodyStatus(body, BodyStatus.OnGround); } if (TryComp(uid, out var fixtures)) @@ -77,7 +77,7 @@ private void AddMobMovedByPressure(EntityUid uid, MovedByPressureComponent compo if (!TryComp(uid, out var fixtures)) return; - _physics.SetBodyStatus(uid, body, BodyStatus.InAir); + _physics.SetBodyStatus(body, BodyStatus.InAir); foreach (var (id, fixture) in fixtures.Fixtures) { @@ -96,9 +96,9 @@ private void HighPressureMovements(Entity gridAtmospher // TODO ATMOS finish this // Don't play the space wind sound on tiles that are on fire... - if (tile.PressureDifference > 15 && !tile.Hotspot.Valid) + if(tile.PressureDifference > 15 && !tile.Hotspot.Valid) { - if (_spaceWindSoundCooldown == 0 && !string.IsNullOrEmpty(SpaceWindSound)) + if(_spaceWindSoundCooldown == 0 && !string.IsNullOrEmpty(SpaceWindSound)) { var coordinates = _mapSystem.ToCenterCoordinates(tile.GridIndex, tile.GridIndices); _audio.PlayPvs(SpaceWindSound, coordinates, AudioParams.Default.WithVariation(0.125f).WithVolume(MathHelper.Clamp(tile.PressureDifference / 10, 10, 100))); diff --git a/Content.Server/Chemistry/EntitySystems/VaporSystem.cs b/Content.Server/Chemistry/EntitySystems/VaporSystem.cs index 4bec90db5f5..2c23b8f0390 100644 --- a/Content.Server/Chemistry/EntitySystems/VaporSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/VaporSystem.cs @@ -66,8 +66,8 @@ public void Start(Entity vapor, TransformComponent vaporXform, V // Set Move if (EntityManager.TryGetComponent(vapor, out PhysicsComponent? physics)) { - _physics.SetLinearDamping(vapor, physics, 0f); - _physics.SetAngularDamping(vapor, physics, 0f); + _physics.SetLinearDamping(physics, 0f); + _physics.SetAngularDamping(physics, 0f); _throwing.TryThrow(vapor, dir, speed, user: user); diff --git a/Content.Server/ImmovableRod/ImmovableRodSystem.cs b/Content.Server/ImmovableRod/ImmovableRodSystem.cs index 31aa39cf03a..0fa8f7d292f 100644 --- a/Content.Server/ImmovableRod/ImmovableRodSystem.cs +++ b/Content.Server/ImmovableRod/ImmovableRodSystem.cs @@ -53,9 +53,9 @@ private void OnMapInit(EntityUid uid, ImmovableRodComponent component, MapInitEv { if (EntityManager.TryGetComponent(uid, out PhysicsComponent? phys)) { - _physics.SetLinearDamping(uid, phys, 0f); - _physics.SetFriction(uid, phys, 0f); - _physics.SetBodyStatus(uid, phys, BodyStatus.InAir); + _physics.SetLinearDamping(phys, 0f); + _physics.SetFriction(phys, 0f); + _physics.SetBodyStatus(phys, BodyStatus.InAir); if (!component.RandomizeVelocity) return; diff --git a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Emitter.cs b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Emitter.cs index da30f73858a..7fad69e349f 100644 --- a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Emitter.cs +++ b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Emitter.cs @@ -28,7 +28,7 @@ private void FireEmitter(EntityUid uid, ParticleAcceleratorPowerState strength, if (TryComp(emitted, out var particlePhys)) { var angle = _transformSystem.GetWorldRotation(uid, xformQuery); - _physicsSystem.SetBodyStatus(emitted, particlePhys, BodyStatus.InAir); + _physicsSystem.SetBodyStatus(particlePhys, BodyStatus.InAir); var velocity = angle.ToWorldVec() * 20f; if (TryComp(uid, out var phys)) diff --git a/Content.Server/Physics/Controllers/ChasingWalkSystem.cs b/Content.Server/Physics/Controllers/ChasingWalkSystem.cs index 618dd4156fc..215e7e3124e 100644 --- a/Content.Server/Physics/Controllers/ChasingWalkSystem.cs +++ b/Content.Server/Physics/Controllers/ChasingWalkSystem.cs @@ -97,6 +97,6 @@ private void ForceImpulse(EntityUid uid, ChasingWalkComponent component) var speed = delta.Length() > 0 ? delta.Normalized() * component.Speed : Vector2.Zero; _physics.SetLinearVelocity(uid, speed); - _physics.SetBodyStatus(uid, physics, BodyStatus.InAir); //If this is not done, from the explosion up close, the tesla will "Fall" to the ground, and almost stop moving. + _physics.SetBodyStatus(physics, BodyStatus.InAir); //If this is not done, from the explosion up close, the tesla will "Fall" to the ground, and almost stop moving. } } diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs index b3b07306f60..beaf1fef5b4 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs @@ -287,8 +287,8 @@ private void UpdateHyperspace(float frameTime) Enable(uid, component: body, shuttle: shuttle); _physics.SetLinearVelocity(uid, new Vector2(0f, 20f), body: body); _physics.SetAngularVelocity(uid, 0f, body: body); - _physics.SetLinearDamping(uid, body, 0f); - _physics.SetAngularDamping(uid, body, 0f); + _physics.SetLinearDamping(body, 0f); + _physics.SetAngularDamping(body, 0f); } SetDockBolts(uid, true); diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.cs index 8d38147d074..7b7ac04cc9e 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.cs @@ -139,10 +139,10 @@ public void Enable(EntityUid uid, FixturesComponent? manager = null, PhysicsComp return; _physics.SetBodyType(uid, BodyType.Dynamic, manager: manager, body: component); - _physics.SetBodyStatus(uid, component, BodyStatus.InAir); + _physics.SetBodyStatus(component, BodyStatus.InAir); _physics.SetFixedRotation(uid, false, manager: manager, body: component); - _physics.SetLinearDamping(uid, component, shuttle.LinearDamping); - _physics.SetAngularDamping(uid, component, shuttle.AngularDamping); + _physics.SetLinearDamping(component, shuttle.LinearDamping); + _physics.SetAngularDamping(component, shuttle.AngularDamping); } public void Disable(EntityUid uid, FixturesComponent? manager = null, PhysicsComponent? component = null) @@ -151,7 +151,7 @@ public void Disable(EntityUid uid, FixturesComponent? manager = null, PhysicsCom return; _physics.SetBodyType(uid, BodyType.Static, manager: manager, body: component); - _physics.SetBodyStatus(uid, component, BodyStatus.OnGround); + _physics.SetBodyStatus(component, BodyStatus.OnGround); _physics.SetFixedRotation(uid, true, manager: manager, body: component); } diff --git a/Content.Server/StationEvents/Events/MeteorSwarmRule.cs b/Content.Server/StationEvents/Events/MeteorSwarmRule.cs index ad56479b379..192a620c9fc 100644 --- a/Content.Server/StationEvents/Events/MeteorSwarmRule.cs +++ b/Content.Server/StationEvents/Events/MeteorSwarmRule.cs @@ -68,9 +68,9 @@ protected override void ActiveTick(EntityUid uid, MeteorSwarmRuleComponent compo var spawnPosition = new MapCoordinates(center + offset, mapId); var meteor = Spawn("MeteorLarge", spawnPosition); var physics = EntityManager.GetComponent(meteor); - _physics.SetBodyStatus(meteor, physics, BodyStatus.InAir); - _physics.SetLinearDamping(meteor, physics, 0f); - _physics.SetAngularDamping(meteor, physics, 0f); + _physics.SetBodyStatus(physics, BodyStatus.InAir); + _physics.SetLinearDamping(physics, 0f); + _physics.SetAngularDamping(physics, 0f); _physics.ApplyLinearImpulse(meteor, -offset.Normalized() * component.MeteorVelocity * physics.Mass, body: physics); _physics.ApplyAngularImpulse( meteor, diff --git a/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs b/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs index 91d53bc639c..ab5289f35a6 100644 --- a/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs +++ b/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs @@ -381,7 +381,7 @@ public bool TryBuckle(EntityUid buckleUid, EntityUid userUid, EntityUid strapUid if (TryComp(buckleUid, out var physics)) { - _physics.ResetDynamics(buckleUid, physics); + _physics.ResetDynamics(physics); } if (!buckleComp.PullStrap && TryComp(strapUid, out var toPullable)) diff --git a/Content.Shared/Movement/Systems/SharedJetpackSystem.cs b/Content.Shared/Movement/Systems/SharedJetpackSystem.cs index 8c42511f846..abe12b79d1a 100644 --- a/Content.Shared/Movement/Systems/SharedJetpackSystem.cs +++ b/Content.Shared/Movement/Systems/SharedJetpackSystem.cs @@ -92,7 +92,7 @@ private void SetupUser(EntityUid user, EntityUid jetpackUid) _mover.SetRelay(user, jetpackUid); if (TryComp(user, out var physics)) - _physics.SetBodyStatus(user, physics, BodyStatus.InAir); + _physics.SetBodyStatus(physics, BodyStatus.InAir); userComp.Jetpack = jetpackUid; } @@ -103,7 +103,7 @@ private void RemoveUser(EntityUid uid) return; if (TryComp(uid, out var physics)) - _physics.SetBodyStatus(uid, physics, BodyStatus.OnGround); + _physics.SetBodyStatus(physics, BodyStatus.OnGround); RemComp(uid); } diff --git a/Content.Shared/Throwing/ThrowingSystem.cs b/Content.Shared/Throwing/ThrowingSystem.cs index 01682863389..54294318315 100644 --- a/Content.Shared/Throwing/ThrowingSystem.cs +++ b/Content.Shared/Throwing/ThrowingSystem.cs @@ -160,7 +160,7 @@ public void TryThrow(EntityUid uid, } else { - _physics.SetBodyStatus(uid, physics, BodyStatus.InAir); + _physics.SetBodyStatus(physics, BodyStatus.InAir); } if (user == null) @@ -176,10 +176,10 @@ public void TryThrow(EntityUid uid, { var msg = new ThrowPushbackAttemptEvent(); RaiseLocalEvent(uid, msg); - const float massLimit = 5f; + const float MassLimit = 5f; if (!msg.Cancelled) - _physics.ApplyLinearImpulse(user.Value, -impulseVector / physics.Mass * pushbackRatio * MathF.Min(massLimit, physics.Mass), body: userPhysics); + _physics.ApplyLinearImpulse(user.Value, -impulseVector / physics.Mass * pushbackRatio * MathF.Min(MassLimit, physics.Mass), body: userPhysics); } } } diff --git a/Content.Shared/Throwing/ThrownItemSystem.cs b/Content.Shared/Throwing/ThrownItemSystem.cs index cc50094e3dd..b3b5bcf7870 100644 --- a/Content.Shared/Throwing/ThrownItemSystem.cs +++ b/Content.Shared/Throwing/ThrownItemSystem.cs @@ -93,7 +93,7 @@ public void StopThrow(EntityUid uid, ThrownItemComponent thrownItemComponent) { if (TryComp(uid, out var physics)) { - _physics.SetBodyStatus(uid, physics, BodyStatus.OnGround); + _physics.SetBodyStatus(physics, BodyStatus.OnGround); if (physics.Awake) _broadphase.RegenerateContacts(uid, physics); diff --git a/Content.Shared/Weapons/Melee/MeleeThrowOnHitSystem.cs b/Content.Shared/Weapons/Melee/MeleeThrowOnHitSystem.cs index 78863562330..fc364286549 100644 --- a/Content.Shared/Weapons/Melee/MeleeThrowOnHitSystem.cs +++ b/Content.Shared/Weapons/Melee/MeleeThrowOnHitSystem.cs @@ -74,7 +74,7 @@ private void OnThrownStartup(Entity ent, ref ComponentStar comp.PreviousStatus = body.BodyStatus; comp.ThrownEndTime = _timing.CurTime + TimeSpan.FromSeconds(comp.Lifetime); comp.MinLifetimeTime = _timing.CurTime + TimeSpan.FromSeconds(comp.MinLifetime); - _physics.SetBodyStatus(ent, body, BodyStatus.InAir); + _physics.SetBodyStatus(body, BodyStatus.InAir); _physics.SetLinearVelocity(ent, Vector2.Zero, body: body); _physics.ApplyLinearImpulse(ent, comp.Velocity * body.Mass, body: body); Dirty(ent, ent.Comp); @@ -83,7 +83,7 @@ private void OnThrownStartup(Entity ent, ref ComponentStar private void OnThrownShutdown(Entity ent, ref ComponentShutdown args) { if (TryComp(ent, out var body)) - _physics.SetBodyStatus(ent, body, ent.Comp.PreviousStatus); + _physics.SetBodyStatus(body,ent.Comp.PreviousStatus); var ev = new MeleeThrowOnHitEndEvent(); RaiseLocalEvent(ent, ref ev); } diff --git a/Content.Shared/Weapons/Misc/SharedTetherGunSystem.cs b/Content.Shared/Weapons/Misc/SharedTetherGunSystem.cs index 3a950bcd29e..177cb310d18 100644 --- a/Content.Shared/Weapons/Misc/SharedTetherGunSystem.cs +++ b/Content.Shared/Weapons/Misc/SharedTetherGunSystem.cs @@ -207,12 +207,12 @@ protected virtual void StartTether(EntityUid gunUid, BaseForceGunComponent compo TransformSystem.Unanchor(target, targetXform); component.Tethered = target; var tethered = EnsureComp(target); - _physics.SetBodyStatus(target, targetPhysics, BodyStatus.InAir, false); + _physics.SetBodyStatus(targetPhysics, BodyStatus.InAir, false); _physics.SetSleepingAllowed(target, targetPhysics, false); tethered.Tetherer = gunUid; tethered.OriginalAngularDamping = targetPhysics.AngularDamping; - _physics.SetAngularDamping(target, targetPhysics, 0f); - _physics.SetLinearDamping(target, targetPhysics, 0f); + _physics.SetAngularDamping(targetPhysics, 0f); + _physics.SetLinearDamping(targetPhysics, 0f); _physics.SetAngularVelocity(target, SpinVelocity, body: targetPhysics); _physics.WakeBody(target, body: targetPhysics); var thrown = EnsureComp(component.Tethered.Value); @@ -264,9 +264,9 @@ protected virtual void StopTether(EntityUid gunUid, BaseForceGunComponent compon _thrown.StopThrow(component.Tethered.Value, thrown); } - _physics.SetBodyStatus(component.Tethered.Value, targetPhysics, BodyStatus.OnGround); + _physics.SetBodyStatus(targetPhysics, BodyStatus.OnGround); _physics.SetSleepingAllowed(component.Tethered.Value, targetPhysics, true); - _physics.SetAngularDamping(component.Tethered.Value, targetPhysics, Comp(component.Tethered.Value).OriginalAngularDamping); + _physics.SetAngularDamping(targetPhysics, Comp(component.Tethered.Value).OriginalAngularDamping); } if (!transfer) diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index d3aee5a48e9..36b5bbd1927 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -388,7 +388,7 @@ public abstract void Shoot( public void ShootProjectile(EntityUid uid, Vector2 direction, Vector2 gunVelocity, EntityUid gunUid, EntityUid? user = null, float speed = 20f) { var physics = EnsureComp(uid); - Physics.SetBodyStatus(uid, physics, BodyStatus.InAir); + Physics.SetBodyStatus(physics, BodyStatus.InAir); var targetMapVelocity = gunVelocity + direction.Normalized() * speed; var currentMapVelocity = Physics.GetMapLinearVelocity(uid, physics); diff --git a/RobustToolbox b/RobustToolbox index 4b8e1616560..2694dce0766 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 4b8e16165605a5b016f56968c0ab991ab30529b9 +Subproject commit 2694dce0766239075c92911dbd9b39efcc86e31d