This repository was archived by the owner on Jul 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Code Guide 02
Marvin Beym edited this page Apr 7, 2020
·
4 revisions
Next Saving:
- go into your OnSave() Method
add this line
ScrewablePart.SaveScrews(this, new ScrewablePart[]{ exhaust_header_screwable }, "test.txt");
- first parameter is your mod (usually this
- second is an array of ScrewablePart, this should be filled with all your screwable objects that belong to your mod. so only call this ONCE with an array of all ScrewablePart
- the last parameter is the name of your saveFile (only add the NAME you want, not the complete path this is done automatically

inside your Update()
- add .DetectScrewing();
- if you want to disable Detection just use a bool value that bypasses the DetectScrewing()

- go into each Part class of the parts that are supposed to be screwable
- add the lines shown in the picture. The order is important
- it is also important that your Screwables Objects are static or else it can't access them.
