Skip to content
This repository has been archived by the owner on Jul 30, 2023. It is now read-only.

Even more simplification and show screw size feature

Compare
Choose a tag to compare
@MarvinBeym MarvinBeym released this 31 Oct 20:37
· 25 commits to master since this release

Simplified creation of a screwable part by using a new clas "Screw"
Meaning you only have to pass a single array of Screw objects

example:

new ScrewablePart(screwListSave, screwableAssetsBundle, esp_module_part.rigidPart,
    new Screw[] {
        new Screw(new Vector3(0.09f, -0.002f, -0.052f), new Vector3(-90, 0, 0), 0.8f, 8, ScrewablePart.ScrewType.Screw1),
        new Screw(new Vector3(0.09f, -0.002f, 0.0528f), new Vector3(-90, 0, 0), 0.8f, 8, ScrewablePart.ScrewType.Screw2),
        new Screw(new Vector3(-0.092f, -0.002f, 0.0528f), new Vector3(-90, 0, 0), 0.8f, 8, ScrewablePart.ScrewType.Nut),
        new Screw(new Vector3(-0.092f, -0.002f, -0.052f), new Vector3(-90, 0, 0), 0.8f, 8),
    });

1st Value = position of the screw
2nd Value = rotation of the screw
3rd Value = scale (x y and z)
4th Value = screw size (wrench size needed
5th Value = screw type (the model)

3rd to 5th values are optional.
If ommited these values are used:
3rd = 1f
4th = 10
5th = ScrewablePart.ScrewType.Screw2

There is also an optional static function that can be called inside your ModSettings method.
This will add a Checkbox to your mods Mod Settings called "Show screw size"
If the user ticks this checkbox. The size of the screw currently looked at is displayed to the user.