Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

I my thrust max effective thrust #564

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
5 changes: 5 additions & 0 deletions Sources/Sandbox.Common/ModAPI/Ingame/IMyThrust.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public interface IMyThrust: IMyFunctionalBlock
/// </summary>
float MaxThrust { get; }

/// <summary>
/// Gets the maximum effective thrust amount, in Newtons (N)
/// </summary>
float MaxEffectiveThrust { get; }

/// <summary>
/// Gets the current thrust amount, in Newtons (N)
/// </summary>
Expand Down
8 changes: 8 additions & 0 deletions Sources/Sandbox.Game/Game/Entities/Blocks/MyThrust.cs
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,14 @@ float Sandbox.ModAPI.Ingame.IMyThrust.MaxThrust
}
}

float Sandbox.ModAPI.Ingame.IMyThrust.MaxEffectiveThrust
{
get
{
return BlockDefinition.ForceMagnitude * m_thrustMultiplier * m_thrustComponent.GetLastThrustMultiplier(this);
}
}

float Sandbox.ModAPI.Ingame.IMyThrust.CurrentThrust
{
get
Expand Down