Skip to content

Commit

Permalink
Make Space Frictionless (#46)
Browse files Browse the repository at this point in the history
<details><summary><h1>Media</h1></summary>
<p>


https://github.com/Simple-Station/Parkstation-Friendly-Chainsaw/assets/77995199/5570ef35-16e2-493a-ac35-738f27751346


https://github.com/Simple-Station/Parkstation-Friendly-Chainsaw/assets/77995199/51fba943-8dce-4265-a9cc-7181155eb8de


https://github.com/Simple-Station/Parkstation-Friendly-Chainsaw/assets/77995199/cd6c0511-2639-4e14-8160-426ba7f2ba73

---
</p>
</details> 

# Changelog

:cl:
- tweak: Space has suddenly become less dense (objects don't slow down
in space)
- remove: Moths are unable to move in space
- tweak: Moths have way better control in zero gravity environments
  • Loading branch information
DEATHB4DEFEAT committed Feb 4, 2024
1 parent faa2072 commit 6710313
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
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

0 comments on commit 6710313

Please sign in to comment.