Show / Hide Table of Contents

Interface IMyPistonBase

Describes piston block (PB scripting interface)

Inherited Members
IMyMechanicalConnectionBlock.Attach()
IMyMechanicalConnectionBlock.Detach()
IMyMechanicalConnectionBlock.TopGrid
IMyMechanicalConnectionBlock.Top
IMyMechanicalConnectionBlock.SafetyLockSpeed
IMyMechanicalConnectionBlock.SafetyLock
IMyMechanicalConnectionBlock.IsAttached
IMyMechanicalConnectionBlock.IsLocked
IMyMechanicalConnectionBlock.PendingAttachment
IMyFunctionalBlock.RequestEnable(Boolean)
IMyFunctionalBlock.Enabled
IMyTerminalBlock.HasLocalPlayerAccess()
IMyTerminalBlock.HasPlayerAccess(Int64, MyRelationsBetweenPlayerAndBlock)
IMyTerminalBlock.HasNobodyPlayerAccessToBlock()
IMyTerminalBlock.HasPlayerAccessWithNobodyCheck(Int64, Boolean)
IMyTerminalBlock.SetCustomName(String)
IMyTerminalBlock.SetCustomName(StringBuilder)
IMyTerminalBlock.GetActions(List<ITerminalAction>, Func<ITerminalAction, Boolean>)
IMyTerminalBlock.SearchActionsOfName(String, List<ITerminalAction>, Func<ITerminalAction, Boolean>)
IMyTerminalBlock.GetActionWithName(String)
IMyTerminalBlock.GetProperty(String)
IMyTerminalBlock.GetProperties(List<ITerminalProperty>, Func<ITerminalProperty, Boolean>)
IMyTerminalBlock.IsSameConstructAs(IMyTerminalBlock)
IMyTerminalBlock.CustomName
IMyTerminalBlock.CustomNameWithFaction
IMyTerminalBlock.DetailedInfo
IMyTerminalBlock.CustomInfo
IMyTerminalBlock.CustomData
IMyTerminalBlock.ShowOnHUD
IMyTerminalBlock.ShowInTerminal
IMyTerminalBlock.ShowInToolbarConfig
IMyTerminalBlock.ShowInInventory
IMyCubeBlock.GetOwnerFactionTag()
IMyCubeBlock.GetPlayerRelationToOwner()
IMyCubeBlock.GetUserRelationToOwner(Int64, MyRelationsBetweenPlayerAndBlock)
IMyCubeBlock.UpdateIsWorking()
IMyCubeBlock.UpdateVisual()
IMyCubeBlock.BlockDefinition
IMyCubeBlock.CubeGrid
IMyCubeBlock.DefinitionDisplayNameText
IMyCubeBlock.DisassembleRatio
IMyCubeBlock.DisplayNameText
IMyCubeBlock.IsBeingHacked
IMyCubeBlock.IsFunctional
IMyCubeBlock.IsWorking
IMyCubeBlock.Max
IMyCubeBlock.Mass
IMyCubeBlock.Min
IMyCubeBlock.NumberInGrid
IMyCubeBlock.Orientation
IMyCubeBlock.OwnerId
IMyCubeBlock.Position
IMyEntity.GetInventory()
IMyEntity.GetInventory(Int32)
IMyEntity.GetPosition()
IMyEntity.Components
IMyEntity.EntityId
IMyEntity.Name
IMyEntity.DisplayName
IMyEntity.HasInventory
IMyEntity.InventoryCount
IMyEntity.Closed
IMyEntity.WorldAABB
IMyEntity.WorldAABBHr
IMyEntity.WorldMatrix
IMyEntity.WorldVolume
IMyEntity.WorldVolumeHr
Namespace: Sandbox.ModAPI.Ingame
Assembly: Sandbox.Common.dll
Syntax
public interface IMyPistonBase : IMyMechanicalConnectionBlock, IMyFunctionalBlock, IMyTerminalBlock, IMyCubeBlock, IMyEntity

Properties

CurrentPosition

Gets the current position of the piston head relative to the base.

Declaration
float CurrentPosition { get; }
Property Value
Type Description
System.Single

HighestPosition

Gets the highest position the piston is capable of moving to.

Declaration
float HighestPosition { get; }
Property Value
Type Description
System.Single

LowestPosition

Gets the lowest position the piston is capable of moving to.

Declaration
float LowestPosition { get; }
Property Value
Type Description
System.Single

MaxLimit

Gets or sets the maximum position the piston can extend to. See LowestPosition and HighestPosition for the limits of this value.

Declaration
float MaxLimit { get; set; }
Property Value
Type Description
System.Single

MaxVelocity

Gets the maximum velocity this piston is capable of moving at.

Declaration
float MaxVelocity { get; }
Property Value
Type Description
System.Single

MinLimit

Gets or sets the minimum position the piston can retract to. See LowestPosition and HighestPosition for the limits of this value.

Declaration
float MinLimit { get; set; }
Property Value
Type Description
System.Single

NormalizedPosition

Gets the current position normalized between MinLimit and MaxLimit

Declaration
float NormalizedPosition { get; }
Property Value
Type Description
System.Single

Status

Gets the current status.

Declaration
PistonStatus Status { get; }
Property Value
Type Description
PistonStatus

Velocity

Gets or sets the velocity of the piston as it extends or retracts. This value can be between negative and positive MaxVelocity.

Declaration
float Velocity { get; set; }
Property Value
Type Description
System.Single

Methods

Extend()

Extends the piston.

Declaration
void Extend()

MoveToPosition(Single, Single)

Sets velocity and limits to move the piston to the specified extent value

Declaration
void MoveToPosition(float extent, float speed)
Parameters
Type Name Description
System.Single extent

Desired position

System.Single speed

Desired velocity magnitude

Retract()

Retracts the piston.

Declaration
void Retract()

Reverse()

Reverses the direction of the piston.

Declaration
void Reverse()

Extension Methods

TerminalBlockExtentions.GetId(IMyTerminalBlock)
TerminalBlockExtentions.ApplyAction(IMyTerminalBlock, String)
TerminalBlockExtentions.ApplyAction(IMyTerminalBlock, String, List<TerminalActionParameter>)
TerminalBlockExtentions.HasAction(IMyTerminalBlock, String)
TerminalBlockExtentions.HasInventory(IMyTerminalBlock)
TerminalBlockExtentions.GetInventory(IMyTerminalBlock, Int32)
TerminalBlockExtentions.GetInventoryCount(IMyTerminalBlock)
TerminalBlockExtentions.GetUseConveyorSystem(IMyTerminalBlock)
TerminalBlockExtentions.SetUseConveyorSystem(IMyTerminalBlock, Boolean)
TerminalPropertyExtensions.GetValueFloat(IMyTerminalBlock, String)
TerminalPropertyExtensions.SetValueFloat(IMyTerminalBlock, String, Single)
TerminalPropertyExtensions.GetValueBool(IMyTerminalBlock, String)
TerminalPropertyExtensions.SetValueBool(IMyTerminalBlock, String, Boolean)
TerminalPropertyExtensions.GetValueColor(IMyTerminalBlock, String)
TerminalPropertyExtensions.SetValueColor(IMyTerminalBlock, String, Color)
TerminalPropertyExtensions.GetValue<T>(IMyTerminalBlock, String)
TerminalPropertyExtensions.GetDefaultValue<T>(IMyTerminalBlock, String)
TerminalPropertyExtensions.GetMininum<T>(IMyTerminalBlock, String)
TerminalPropertyExtensions.GetMinimum<T>(IMyTerminalBlock, String)
TerminalPropertyExtensions.GetMaximum<T>(IMyTerminalBlock, String)
TerminalPropertyExtensions.SetValue<T>(IMyTerminalBlock, String, T)
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾