Jump to content

How do I get the friendly name of a part?


Recommended Posts

I'm trying to fetch the friendly name of a part (an engine, in my case). If I use ModuleEngines.name I get something like "liquidEngine1-2" - great for debugging, but rubbish for a UI. I notice in part cfgs there is a "title" field, with nice text like "RE-M3 "Mainsail" Liquid Fuel Engine" - how can I access this from a ModuleEngines or PartModule object?

Edited by nadseh
Link to comment
Share on other sites

There is actually a PartInfo class that is a property of the Part class that has all the part UI information like that name.

You'll have to drill down into that and find the in-game display name in there.

(I might have that class name wrong, it might be slightly off as I'm going from memory.)

D.

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...