Skip to content

PartSettings

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

PartSettings

Namespace: TommoJProductions.ModApi.Attachable

Represents settings for the part class.

public class PartSettings

Inheritance ObjectPartSettings

Fields

collisionSettings

Represents the physic Material Settings.

public CollisionSettings collisionSettings;

assembleType

Represents the assemble type of the part.

public AssembleType assembleType;

assemblyTypeJointSettings

Represents 'AssembleType.joint' settings.

public AssemblyTypeJointSettings assemblyTypeJointSettings;

installedPartToLayer

Represents the layer to send a part that is installed

public LayerMasks installedPartToLayer;

notInstalledPartToLayer

Represents the layer to send a part that is not installed

public LayerMasks notInstalledPartToLayer;

setPositionRotationOnInitialisePart

Represents if Part.initPart(PartSaveInfo, TriggerData, PartSettings, Bolt[]) will set pos and rot of part if NOT installed.

public bool setPositionRotationOnInitialisePart;

setPhysicsMaterialOnInitialisePart

Sets the parts colliders physics material if enabled.

public bool setPhysicsMaterialOnInitialisePart;

disassembleCollider

Represents the disassemble collider. collider must not be of IsTrigger. if null, logic uses Parts Gameobject to determine if part is being looked at. otherwise logic uses this collider to determine if part is being looked at.

public Collider disassembleCollider;

assembleCollider

Represents the assemble collider. collider must be of IsTrigger. if not null, logic uses this collider to determine if part is in trigger.

public Collider assembleCollider;

installEitherDirection

Represents whether this part can be installed by: 1.) (false) holding this part in one of its triggers. OR 2.) (true) if the trigger is a child of another part. you can hold the root part to install aswell.

public bool installEitherDirection;

tightnessThreshold

Represents the tightness threshold. (Range: 0.25f - 1f). at what percent of all bolt tightness does the part trigger disable. 0.25f = triggers will disable at 25% of total tightness. 1 = triggers will disable at 100% of total tightness (tightness == maxTightness)

public float tightnessThreshold;

autoSave

Represents if the part should autoSave.

public bool autoSave;

Constructors

PartSettings()

Initializes a new instance of part settings.

public PartSettings()

PartSettings(PartSettings)

Initializes a new instance of part settings and sets all class fields to the provided settings instance, .

public PartSettings(PartSettings s)

Parameters

s PartSettings
The Setting instance to rep.

Clone this wiki locally