Skip to content

Commit

Permalink
Frictionless Space (#326)
Browse files Browse the repository at this point in the history
* Port Frictionless Space (#464)

# Description

This ports
Simple-Station/Parkstation-Friendly-Chainsaw#46.
This PR is something I consider a key feature adjacent to Space Wind
Rework and its accompanying updates, and is an essential part of the
space station experience.
In practice, this weirdly enough makes being launched into space a bit
easier to survive, since instead of needing to throw potentially
hundreds of items, you can simply throw enough items to get started
flying in the direction of the station and will eventually float back to
the station.

---

<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: DEATHB4DEFEAT
- 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

---------

Signed-off-by: VMSolidus <[email protected]>
Co-authored-by: DEATHB4DEFEAT <[email protected]>

* File schema stuff.

* Update MovementSpeedModifierComponent.cs

* Update moth.yml

* Update MovementSpeedModifierComponent.cs

---------

Signed-off-by: VMSolidus <[email protected]>
Co-authored-by: VMSolidus <[email protected]>
Co-authored-by: DEATHB4DEFEAT <[email protected]>
  • Loading branch information
3 people committed Jun 18, 2024
1 parent 8837d90 commit ccb8b92
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
25 changes: 25 additions & 0 deletions Content.Shared/Goobstation/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.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(uid, component, 0f, false);
_physics.SetLinearDamping(uid, component, 0f);
}
}
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; // Goobstation - Frictionless Space
public const float DefaultWeightlessModifier = 0.7f;
public const float DefaultWeightlessAcceleration = 1f;

Expand Down
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 @@ -44,9 +44,7 @@
Female: UnisexMoth
Unsexed: UnisexMoth
- type: MovementSpeedModifier
weightlessAcceleration: 1.5 # Move around more easily in space.
weightlessFriction: 1
weightlessModifier: 1
weightlessAcceleration: 2.5 # Goobstation - Frictionless Space, move around more easily in space.
- type: Flammable
damage:
types:
Expand Down

0 comments on commit ccb8b92

Please sign in to comment.