Skip to content

Commit 3208ff4

Browse files
committed
Add public function to get outfit parts
1 parent fcb38d0 commit 3208ff4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

scripts/OutfitState.reds

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,11 @@ class OutfitState {
252252
return null;
253253
}
254254
255+
public func GetOutfitParts(name: CName) -> array<ref<OutfitPart>> {
256+
let outfit = this.GetOutfit(name);
257+
return IsDefined(outfit) ? outfit.GetParts() : [];
258+
}
259+
255260
public func SaveOutfit(name: CName, overwrite: Bool, timestamp: Float) -> Bool {
256261
return this.SaveOutfit(name, this.m_parts, overwrite, timestamp);
257262
}

scripts/OutfitSystem.reds

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,10 @@ public class OutfitSystem extends ScriptableSystem {
848848
return outfits;
849849
}
850850
851+
public func GetOutfitParts(name: CName) -> array<ref<OutfitPart>> {
852+
return this.m_state.GetOutfitParts(name);
853+
}
854+
851855
public func GiveItem(recordID: TweakDBID) -> ItemID {
852856
let itemID: ItemID;
853857
let itemData = this.m_transactionSystem.GetItemDataByTDBID(this.m_player, recordID);

0 commit comments

Comments
 (0)