Skip to content

Commit

Permalink
Add unique id to ksp::vessel::Part (addresses #165)
Browse files Browse the repository at this point in the history
  • Loading branch information
untoldwind committed Apr 14, 2024
1 parent e79262a commit 49a66c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 0.5.8.3 ->

* Fix type check of field assign using operators `+=`, `-=` ... (#114)
* Add unique id to `ksp::vessel::Part` (#165)

## 0.5.7.9 -> 0.5.8.3

Expand Down
3 changes: 3 additions & 0 deletions KSP2Runtime/KSPVessel/KSPVesselModule.Part.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ internal PartAdapter(VesselAdapter vesselAdapter, PartComponent part) : base(par
this.vesselAdapter = vesselAdapter;
}

[KSField(Description = "Unique part id. Note: this will be different for each vessel.")]
public string Id => part.GlobalId.ToString();

[KSField] public PartCategories PartCategory => part.PartData.category;

[KSField] public string PartTitle => part.PartData.Title;
Expand Down

0 comments on commit 49a66c4

Please sign in to comment.