Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Всякое неинтересное #299

Merged
merged 8 commits into from
Jun 14, 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
25 changes: 25 additions & 0 deletions Content.Shared/Corvax/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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ 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;

public const float DefaultAcceleration = 20f;
public const float DefaultFriction = 20f;
public const float DefaultFrictionNoInput = 20f;
public const float DefaultAcceleration = 8f; //Frontier
public const float DefaultFriction = 8f; // Frontier
public const float DefaultFrictionNoInput = 14f; // Frontier

public const float DefaultBaseWalkSpeed = 2.5f;
public const float DefaultBaseSprintSpeed = 4.5f;
Expand Down Expand Up @@ -100,7 +100,7 @@ private float _baseSprintSpeedVV
/// The negative velocity applied for friction.
/// </summary>
[AutoNetworkedField, ViewVariables(VVAccess.ReadWrite), DataField]
public float? FrictionNoInput;
public float? FrictionNoInput = DefaultFrictionNoInput; // Frontier

[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public float BaseWalkSpeed { get; set; } = DefaultBaseWalkSpeed;
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 @@ -49,9 +49,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.
- type: Flammable
damage:
types:
Expand Down
Loading