From 3b9177152e99965a453053a5d25e2917364cbcef Mon Sep 17 00:00:00 2001 From: Julimar Melo Date: Wed, 12 Jul 2023 16:38:20 -0300 Subject: [PATCH] fix: continues #115, song disk bug --- src/api/inventory/GroupItem.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/api/inventory/GroupItem.ts b/src/api/inventory/GroupItem.ts index 8569321e..1fd35a88 100644 --- a/src/api/inventory/GroupItem.ts +++ b/src/api/inventory/GroupItem.ts @@ -1,4 +1,4 @@ -import { IObjectData, IRoomEngine } from '@nitrots/nitro-renderer'; +import { IObjectData, IRoomEngine, LegacyDataType } from '@nitrots/nitro-renderer'; import { LocalizeText } from '../utils'; import { FurniCategory } from './FurniCategory'; import { FurnitureItem } from './FurnitureItem'; @@ -322,7 +322,15 @@ export class GroupItem key = (('poster_' + k.stuffData.getLegacyString()) + '_name'); break; case FurniCategory.TRAX_SONG: - this._name = 'SONG_NAME'; + if(k.stuffData instanceof LegacyDataType) + { + let stuffName = k.stuffData.getLegacyStringWithOffset(5); + // Just checking if not undefined + if(stuffName) + this._name = stuffName; + } + else + this._name = 'SONG_NAME' return; default: if(this.isWallItem)