From 3249bcfbcb833364c17577d7e4fe727be597a3ec Mon Sep 17 00:00:00 2001 From: Ed Date: Tue, 12 Nov 2024 23:21:33 +0300 Subject: [PATCH] paddle problem --- Content.Server/Shuttles/Components/ShuttleComponent.cs | 4 ++-- Content.Shared/_CP14/Shuttle/CP14WatershipPaddleComponent.cs | 5 ++++- Content.Shared/_CP14/Shuttle/CP14WatershipSystem.cs | 3 ++- Resources/Prototypes/_CP14/Entities/watershipTEST.yml | 5 ++++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Content.Server/Shuttles/Components/ShuttleComponent.cs b/Content.Server/Shuttles/Components/ShuttleComponent.cs index 949d8ea5bb..18471cd457 100644 --- a/Content.Server/Shuttles/Components/ShuttleComponent.cs +++ b/Content.Server/Shuttles/Components/ShuttleComponent.cs @@ -60,9 +60,9 @@ namespace Content.Server.Shuttles.Components /// Damping applied to the shuttle's physics component when not in FTL. /// [DataField("linearDamping"), ViewVariables(VVAccess.ReadWrite)] - public float LinearDamping = 0.05f; + public float LinearDamping = 0.5f;//0.05f; //CP14 - the ocean is much denser than space, you know. [DataField("angularDamping"), ViewVariables(VVAccess.ReadWrite)] - public float AngularDamping = 0.05f; + public float AngularDamping = 0.5f; //0.05f; //CP14 - the ocean is much denser than space, you know. } } diff --git a/Content.Shared/_CP14/Shuttle/CP14WatershipPaddleComponent.cs b/Content.Shared/_CP14/Shuttle/CP14WatershipPaddleComponent.cs index 2527ebd823..163c3f7c5a 100644 --- a/Content.Shared/_CP14/Shuttle/CP14WatershipPaddleComponent.cs +++ b/Content.Shared/_CP14/Shuttle/CP14WatershipPaddleComponent.cs @@ -7,5 +7,8 @@ namespace Content.Shared._CP14.Shuttle; public sealed partial class CP14WaterShipPaddleComponent : Component { [DataField] - public float Power = 10f; + public float Power = 5f; + + [DataField] + public Angle ImpulseAngle = Angle.FromDegrees(90f); } diff --git a/Content.Shared/_CP14/Shuttle/CP14WatershipSystem.cs b/Content.Shared/_CP14/Shuttle/CP14WatershipSystem.cs index 2d0e9928b2..a6e84add46 100644 --- a/Content.Shared/_CP14/Shuttle/CP14WatershipSystem.cs +++ b/Content.Shared/_CP14/Shuttle/CP14WatershipSystem.cs @@ -59,7 +59,8 @@ public sealed class CP14WatershipSystem : EntitySystem if (paddleTransform.GridUid is null) return; - var impulseDirection = paddleTransform.LocalRotation.ToVec(); + var direction = _transform.GetWorldRotation(paddleTransform) + ent.Comp.ImpulseAngle; + var impulseDirection = direction.ToVec(); _physics.ApplyLinearImpulse(paddleTransform.GridUid.Value, impulseDirection * ent.Comp.Power * modifier, paddleTransform.LocalPosition); } diff --git a/Resources/Prototypes/_CP14/Entities/watershipTEST.yml b/Resources/Prototypes/_CP14/Entities/watershipTEST.yml index 6a35bdfd80..062f0a163d 100644 --- a/Resources/Prototypes/_CP14/Entities/watershipTEST.yml +++ b/Resources/Prototypes/_CP14/Entities/watershipTEST.yml @@ -41,6 +41,7 @@ - type: Anchorable - type: Pullable - type: CP14WaterShipPaddle + impulseAngle: 90 - type: entity parent: CP14BaseWatershipPaddle @@ -49,6 +50,7 @@ components: - type: Sprite state: wooden_l + - type: CP14WaterShipPaddle - type: entity parent: CP14BaseWatershipPaddle @@ -56,4 +58,5 @@ suffix: Right components: - type: Sprite - state: wooden_r \ No newline at end of file + state: wooden_r + - type: CP14WaterShipPaddle \ No newline at end of file