Jump to content

A request to developers: make Part.autoStrutJoints public


Recommended Posts

As author of a moving-parts mod for KSP, I have to fight with autostruts. Autostruts are fine, and do their job nicely, but when you try to make parts of a ship move they can be a problem. Having the possibility to access and update them would be great, but this looks impossible now, or at least very complicated (maybe some Object.FindObjectsOfType() horrible hack). @SQUAD, could you please make this property public?

EDIT: Hm, I should have put this in Add-on developement instead...

Edited by peteletroll
Link to comment
Share on other sites

14 minutes ago, peteletroll said:

As author of a moving-parts mod for KSP, I have to fight with autostruts. Autostruts are fine, and do their job nicely, but when you try to make parts of a ship move they can be a problem. Having the possibility to access and update them would be great, but this looks impossible now, or at least very complicated (maybe some Object.FindObjectsOfType() horrible hack). @SQUAD, could you please make this property public?

Turn them off ( autoStrutMode ) and remove them ( ReleaseAutoStruts() ) ?

Link to comment
Share on other sites

1 minute ago, sarbian said:

CycleAutoStrut() is public and is the one you need. Other mods already handle all this and we made sure mods would work when we worked on those.

Good! Thank you very much! Is there a way to know if autostruts are already disabled? I'm worried about interferences with other mods that may use it. I can call CycleAutoStruts() at the beginning of the motion (when they're supposed to be enabled) and again at the end (when they're supposed to be disabled), but someone else can call it in between, and the result would be a mess.

Link to comment
Share on other sites

1 minute ago, sarbian said:

autoStrutMode should reflect the state since you need to call the public call to change them and those call use that value.

So probably the best thing to do is to call ReleaseAutoStruts() at the beginning of a motion and CycleAutoStruts() at the end, right? Thanks again, and sorry for abusing your patience :-)

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...