From 4705f317918af53a3075e8867be8205f03027ada Mon Sep 17 00:00:00 2001 From: DEATHB4DEFEAT Date: Sat, 27 Jan 2024 23:32:57 -0800 Subject: [PATCH 1/3] remove weird space friction --- .../MovementSpeedModifierComponent.cs | 2 +- .../Physics/FrictionRemoverSystem.cs | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 Content.Shared/SimpleStation14/Physics/FrictionRemoverSystem.cs diff --git a/Content.Shared/Movement/Components/MovementSpeedModifierComponent.cs b/Content.Shared/Movement/Components/MovementSpeedModifierComponent.cs index b84c340855..0f404f45b9 100644 --- a/Content.Shared/Movement/Components/MovementSpeedModifierComponent.cs +++ b/Content.Shared/Movement/Components/MovementSpeedModifierComponent.cs @@ -14,7 +14,7 @@ public sealed partial class MovementSpeedModifierComponent : Component // Weightless public const float DefaultMinimumFrictionSpeed = 0.005f; public const float DefaultWeightlessFriction = 1f; - public const float DefaultWeightlessFrictionNoInput = 0.2f; + public const float DefaultWeightlessFrictionNoInput = 0f; public const float DefaultWeightlessModifier = 0.7f; public const float DefaultWeightlessAcceleration = 1f; diff --git a/Content.Shared/SimpleStation14/Physics/FrictionRemoverSystem.cs b/Content.Shared/SimpleStation14/Physics/FrictionRemoverSystem.cs new file mode 100644 index 0000000000..983fb987d6 --- /dev/null +++ b/Content.Shared/SimpleStation14/Physics/FrictionRemoverSystem.cs @@ -0,0 +1,25 @@ +using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Systems; + +namespace Content.Shared.SimpleStation14.Physics; + +public sealed class FrictionRemoverSystem : EntitySystem +{ + [Dependency] private readonly SharedPhysicsSystem _physics = default!; + + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(RemoveDampening); + } + + + private void RemoveDampening(EntityUid uid, PhysicsComponent component, PhysicsSleepEvent args) + { + _physics.SetAngularDamping(component, 0, false); + _physics.SetLinearDamping(component, 0); + } +} From 098f8ac7ac5c6374f59c006166e351e6fae7636b Mon Sep 17 00:00:00 2001 From: DEATHB4DEFEAT Date: Sat, 27 Jan 2024 23:34:39 -0800 Subject: [PATCH 2/3] codebase change marker !! --- .../Movement/Components/MovementSpeedModifierComponent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Shared/Movement/Components/MovementSpeedModifierComponent.cs b/Content.Shared/Movement/Components/MovementSpeedModifierComponent.cs index 0f404f45b9..796611fc0a 100644 --- a/Content.Shared/Movement/Components/MovementSpeedModifierComponent.cs +++ b/Content.Shared/Movement/Components/MovementSpeedModifierComponent.cs @@ -14,7 +14,7 @@ public sealed partial class MovementSpeedModifierComponent : Component // Weightless public const float DefaultMinimumFrictionSpeed = 0.005f; public const float DefaultWeightlessFriction = 1f; - public const float DefaultWeightlessFrictionNoInput = 0f; + public const float DefaultWeightlessFrictionNoInput = 0f; // Parkstation-FrictionlessSpace public const float DefaultWeightlessModifier = 0.7f; public const float DefaultWeightlessAcceleration = 1f; From 80dc5a0116592a076dab8a775cdde360f1b41fba Mon Sep 17 00:00:00 2001 From: DEATHB4DEFEAT Date: Sun, 28 Jan 2024 18:02:31 -0800 Subject: [PATCH 3/3] moths can't move in space but have better movement in zero-g environments --- Resources/Prototypes/Entities/Mobs/Species/moth.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Resources/Prototypes/Entities/Mobs/Species/moth.yml b/Resources/Prototypes/Entities/Mobs/Species/moth.yml index 292828b4e6..5b067d89cb 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/moth.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/moth.yml @@ -48,9 +48,7 @@ Female: UnisexMoth Unsexed: UnisexMoth - type: MovementSpeedModifier - weightlessAcceleration: 1.5 # Move around more easily in space. - weightlessFriction: 1 - weightlessModifier: 1 + weightlessAcceleration: 2.5 # Move around more easily in space. # Parkstation-FrictionlessSpace - type: Flammable damage: types: