Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Space Frictionless #46

Merged
merged 3 commits into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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; // Parkstation-FrictionlessSpace
public const float DefaultWeightlessModifier = 0.7f;
public const float DefaultWeightlessAcceleration = 1f;

Expand Down
25 changes: 25 additions & 0 deletions Content.Shared/SimpleStation14/Physics/FrictionRemoverSystem.cs
Original file line number Diff line number Diff line change
@@ -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<PhysicsComponent, PhysicsSleepEvent>(RemoveDampening);
}


private void RemoveDampening(EntityUid uid, PhysicsComponent component, PhysicsSleepEvent args)
{
_physics.SetAngularDamping(component, 0, false);
_physics.SetLinearDamping(component, 0);
}
}
4 changes: 1 addition & 3 deletions Resources/Prototypes/Entities/Mobs/Species/moth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading