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

Releases: MarvinBeym/ScrewablePartAPI

Hotfix

31 Dec 19:16
Compare
Choose a tag to compare
  • Fixed issue preventing parts from beeing removeable after a screw has been unscrewed.
  • Improved when to check if all screws are tight/untight.

Performance improvements

27 Dec 15:20
Compare
Choose a tag to compare

It's now possible to set the tightness of screws by code.
This can for example be used to "cheat" by setting the screw of every part to 8, making the part fixed.

The performance has also been improved by making the screw models collider be a trigger.
This will prevent them from colliding with other colliders helping with performance and potential issues caused by collision.

  • Reorganized project folders.
  • Made the collider of a screw be a trigger to improve performance and prevent issues with colliders interacting with each other.
  • Added unity asset bundle project.
  • Added SetScrewPosition function that allows setting of the screw tightness by code.
  • Screw tightness is now checked on each screw in.
  • Made array of screws public accessible.

Hotfix

19 Dec 14:22
Compare
Choose a tag to compare

I just realised the last release had a bug where the assets wouldn't be loaded when the version recieved from the server was the same as the current one (up to date).

I also noticed that when the screws where loaded from the save that if they were all tight, the part could still be removed by right clicking.

Changelog:

Fixed api not loading assets when version recieved from server was up to date.

Fixed part collider not beeing disabled when screws where tightened on load (loaded from save)

Conversion to mod & Auto updater

19 Dec 13:43
Compare
Choose a tag to compare

The api has now been converted to be a mod.
This gives me many advantages. Like beeing able to load in menu and beeing able to load stuff before any other mod using the ScrewablePartAPI.

This for example allows me to load the assets bundle just once. The mod using the api doesn't have to load the bundle anymore the mod also doesn't need to include the screwableapi.unity3d file in it's own Assets folder.

The problem with this is that this means that the api is now no longer located in the "References" folder. It now goes in the normal "Mods" folder like any other mod.
This then means:
All mods have to use the new version as the api won't load when two .dll files are present (one in Mods folder and one in References folder)
Mods have to be updated and the reference to the api .dll has to be changed.
If this update is installed any mod using the old version won't work and will crash!

Changelog:
Converted api into a mod to get some of the mod advantages like loading in menu.
Improved loading time thanks to cconversion to mod.
Added auto updater & ability to install other versions (last 5 from server).
Removed the need to call a function by the mod dev to get the show screw size feature. This is now enabled in code by the mod dev and can be enabled/disabled by the user in the Mod Settings of the ScrewablePartAPI.
Added ability to disable update checking in Mod Settings. (last 5 will still be available in Mod Settings).

ScrewablePartAPI V2 Rework

09 Dec 20:40
Compare
Choose a tag to compare

I have reworked the screwable part api improving the code by alot and making it easier to use.

  • Changelog (v2.0.0):
  • Reworked API creating a V2.
  • Improved loading
  • Improved logic running in the background
  • Improved performance of the logic
  • Made loading/saving easier
  • Made setup of a screwable part simpler and quicker
  • Reduced code size
  • Improved performance when creating more than one screwable part (the more parts you have the more performance gets saved)

For compatibility the old version is still included.
I recommend anyone using the old version to update their mod
and use the new version as it makes alot of things easier and the whole thing faster.

The old version < v2.0.0 will no longer be updated.
Bugs will not be fixed.

The wiki will be updated some time after this release to have a seperate guide for the V2 version.
The wiki for the < v2.0.0 is also outdated and hasn't been updated for quite some time now.

Fixed required .txt extension

17 Nov 20:11
Compare
Choose a tag to compare

Fixed api always requiring to have the screw save file have the extension ".txt"

Fixed forgotten playmakerfsm code bug from 1.4.0

01 Nov 13:01
Compare
Choose a tag to compare

Also removed really old obsolete code.

Fixed mod crashing bug with playmakerfsm component for screw size/tightness

31 Oct 21:57
Compare
Choose a tag to compare

There was an issue in the 1.4 release that would make the mod crash
if the gameobject passed to the ScrewablePart constructor was not active.

ex: If ModApi was used and the .rigidPart was passed but the part wasn't installed at the time of creating the screws.

The playmakerfsm component has been replaced with a new class "ScrewInfo" that simply contains two public fields (tightness & size).

Even more simplification and show screw size feature

31 Oct 20:37
Compare
Choose a tag to compare

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.

Simplification and improved loading time

17 Oct 09:10
Compare
Choose a tag to compare
  • Moved logic in constructors to seperate functions
  • Added new Constructor that reduces loading time and adds a simpler way to use
  • Marked old constructors as obsolete
  • Improved screwing logic a bit
  • Removed loading of assets bundle for each screwable part
  • Improved loading time on entering game