Skip to content

TorqueToYieldBolt

Tommo J. Phillips edited this page Oct 22, 2023 · 3 revisions

TorqueToYieldBolt

Namespace: TommoJProductions.ModApi.Attachable

Represents a Torque to yield bolt. When this bolt becomes completely tight, it can be tightened slightly more, - The bolt just rotates after being completly tight. It can break and need repairing if torqued too much. It can become loose over time if not torqued correctly.

public class TorqueToYieldBolt : Bolt

Inheritance ObjectBoltTorqueToYieldBolt

Fields

ignoreInput

if , scrolling on this bolt will do nothing.

public bool ignoreInput;

Properties

settings

The base bolt settings for this bolt

public virtual BoltSettings settings { get; }

Property Value

BoltSettings

torqueToYieldBolt

Bolt specific settings. derived from BoltSettings.

public TorqueToYieldBoltSettings torqueToYieldBolt { get; }

Property Value

TorqueToYieldBoltSettings

wait

The bolt waiting value. when true, the bolt has been tightened/loosened and is waiting for x amount of time base on the tool used before continuing to update the model transform, play the bolt audio, invoke events bolt tighten/loosen events.

public virtual bool wait { get; set; }

Property Value

Boolean

scrollInput

The last scroll input.

public virtual int scrollInput { get; set; }

Property Value

Int32

tightness

The bolts tightness (0 - 8)

public virtual int tightness { get; set; }

Property Value

Int32

isTight

Returns true if this bolt is tight.

public virtual bool isTight { get; }

Property Value

Boolean

isLoose

Returns true if this bolt is loose.

public virtual bool isLoose { get; }

Property Value

Boolean

startPosition

The start position of the bolt.

public virtual Vector3 startPosition { get; set; }

Property Value

Vector3

startEulerAngles

The start rotation of the bolt.

public virtual Vector3 startEulerAngles { get; set; }

Property Value

Vector3

positionVectorStep

The position vector step (direction * step). How much and in what direction does the bolt move per tightness step.

public virtual Vector3 positionVectorStep { get; }

Property Value

Vector3

rotationVectorStep

The rotation vector (direction * step). How much and in what direction does the bolt rotate per tightness step.

public virtual Vector3 rotationVectorStep { get; }

Property Value

Vector3

maxTightness

The max tightness of the bolt.

public virtual int maxTightness { get; }

Property Value

Int32

boltID

The Bolts ID

public string boltID { get; }

Property Value

String

model

The bolt model

public GameObject model { get; }

Property Value

GameObject

callback

The callback

public BoltCallback callback { get; }

Property Value

BoltCallback

routine

the bolt func routine.

public Coroutine routine { get; }

Property Value

Coroutine

Constructors

TorqueToYieldBolt()

public TorqueToYieldBolt()

Events

onScrew

Represents the post onscrew event. occurs when this bolt is screwed in or out. called after all other bolt events are called. Bolt.onLoose, Bolt.onTight.

public event Action onScrew;

onLoose

Represents the on loose event. occurs when this bolt becomes loose (screwed to loose state)

public event Action onLoose;

onTight

Represents the on tight event. occurs when this bolt becomes tight (screwed to tight state)

public event Action onTight;

outLoose

Represents the out loose event. occurs when this bolt was loose but was screw in (screwed from loose state)

public event Action outLoose;

outTight

Represents the out tight event. occurs when this bolt was tight but was screw out. (screwed from tight state)

public event Action outTight;
Clone this wiki locally