Skip to content

BoltSettings

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

BoltSettings

Namespace: TommoJProductions.ModApi.Attachable

Represents bolt settings eg => the size of ther bolt.

public class BoltSettings : BaseBoltSettings

Inheritance ObjectBaseBoltSettingsBoltSettings

Fields

name

for initializing a new instance of bolt with custom name.

public string name;

type

Represents the bolts type.

public BoltType type;

canUseRachet

If , the rachet can be used to tighten and loosen the fastener.

public bool canUseRachet;

posStep

Represents the position step. (how quick the position of the bolt moves in BoltSettings.posDirection. when un/tightening)

public float posStep;

rotStep

Represents the rot step. (how quick the bolt rotates when un/tightening.

public float rotStep;

posDirection

Represents positional direction of bolt.

public Vector3 posDirection;

rotDirection

Represents the rotational direction of bolt.

public Vector3 rotDirection;

highlightWhenActive

if true, highlights the bolt green when the bolt is activated.

public bool highlightWhenActive;

activeWhenUninstalled

If true, Bolt is visible and logic is active when uninstalled.

public bool activeWhenUninstalled;

size

Represents the tool size required to un/tighten this fastener.

public BoltSize size;

customPrefab

Represents the custom prefab to use. set this to the prefab you want the fastener to be. leave null if you want modapi to handle model creation.

public GameObject customPrefab;

Constructors

BoltSettings()

Initializes new instance of b settings with default values.

public BoltSettings()

BoltSettings(BoltSettings)

inits new instance of bolt settings and copies instance values.

public BoltSettings(BoltSettings s)

Parameters

s BoltSettings
the instance of bolt settings to copy.

Methods

copy()

Copies field values to a new instance and returns.

public BoltSettings copy()

Returns

BoltSettings
A new instance with the same values

Clone this wiki locally