Skip to content

Commit

Permalink
paddle problem
Browse files Browse the repository at this point in the history
  • Loading branch information
TheShuEd committed Nov 12, 2024
1 parent c33c655 commit 3249bcf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Content.Server/Shuttles/Components/ShuttleComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ public sealed partial class ShuttleComponent : Component
/// Damping applied to the shuttle's physics component when not in FTL.
/// </summary>
[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.
}
}
5 changes: 4 additions & 1 deletion Content.Shared/_CP14/Shuttle/CP14WatershipPaddleComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
3 changes: 2 additions & 1 deletion Content.Shared/_CP14/Shuttle/CP14WatershipSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ private void Bulb(Entity<CP14WaterShipPaddleComponent> ent, TransformComponent p
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);
}
Expand Down
5 changes: 4 additions & 1 deletion Resources/Prototypes/_CP14/Entities/watershipTEST.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- type: Anchorable
- type: Pullable
- type: CP14WaterShipPaddle
impulseAngle: 90

- type: entity
parent: CP14BaseWatershipPaddle
Expand All @@ -49,11 +50,13 @@
components:
- type: Sprite
state: wooden_l
- type: CP14WaterShipPaddle

- type: entity
parent: CP14BaseWatershipPaddle
id: CP14WatershipPaddleRight
suffix: Right
components:
- type: Sprite
state: wooden_r
state: wooden_r
- type: CP14WaterShipPaddle

0 comments on commit 3249bcf

Please sign in to comment.