From 039f4a766fc59904fa4b0a1d33cd988953a08b2e Mon Sep 17 00:00:00 2001 From: dank074 Date: Tue, 13 Dec 2022 19:38:04 -0600 Subject: [PATCH] clean up some variable names --- ...dersClubSubscriptionStatusMessageParser.ts | 42 +++++------ .../parser/catalog/BundleDiscountRuleset.ts | 42 +++++------ .../catalog/CatalogPageExpirationParser.ts | 10 +-- ...alogPageWithEarliestExpiryMessageParser.ts | 10 +-- .../parser/catalog/ClubOfferExtendData.ts | 50 +++++++++++++ .../parser/catalog/ClubOfferExtendedData.ts | 50 ------------- .../DirectSMSClubBuyAvailableMessageParser.ts | 32 ++++---- .../HabboClubExtendOfferMessageParser.ts | 8 +- .../catalog/IsOfferGiftableMessageParser.ts | 10 +-- .../LimitedOfferAppearingNextMessageParser.ts | 10 +-- .../catalog/NotEnoughBalanceMessageParser.ts | 18 ++--- .../messages/parser/catalog/index.ts | 2 +- .../IsUserPartOfCompetitionMessageParser.ts | 20 ++--- .../competition/SecondsUntilMessageParser.ts | 20 ++--- .../parser/groupforums/ExtendedForumData.ts | 2 +- .../messages/parser/groupforums/ForumData.ts | 8 +- .../utils/GuestRoomSearchResultData.ts | 2 +- .../navigator/utils/OfficialRoomEntryData.ts | 74 +++++++++---------- .../parser/roomsettings/RoomSettingsData.ts | 38 +++++----- .../messages/parser/user/RoomEntryData.ts | 2 +- .../localization/NitroLocalizationManager.ts | 6 +- .../FurnitureFireworksVisualization.ts | 6 +- .../furniture/FurnitureParticleSystem.ts | 2 +- 23 files changed, 232 insertions(+), 232 deletions(-) create mode 100644 src/nitro/communication/messages/parser/catalog/ClubOfferExtendData.ts delete mode 100644 src/nitro/communication/messages/parser/catalog/ClubOfferExtendedData.ts diff --git a/src/nitro/communication/messages/parser/catalog/BuildersClubSubscriptionStatusMessageParser.ts b/src/nitro/communication/messages/parser/catalog/BuildersClubSubscriptionStatusMessageParser.ts index c8283f19..d96546ba 100644 --- a/src/nitro/communication/messages/parser/catalog/BuildersClubSubscriptionStatusMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/BuildersClubSubscriptionStatusMessageParser.ts @@ -2,17 +2,17 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class BuildersClubSubscriptionStatusMessageParser implements IMessageParser { - private _Str_16456: number; - private _Str_12494: number; - private _Str_19123: number; - private _Str_17298: number; + private _secondsLeft: number; + private _furniLimit: number; + private _maxFurniLimit: number; + private _secondsLeftWithGrace: number; public flush(): boolean { - this._Str_16456 = 0; - this._Str_12494 = 0; - this._Str_19123 = 0; - this._Str_17298 = 0; + this._secondsLeft = 0; + this._furniLimit = 0; + this._maxFurniLimit = 0; + this._secondsLeftWithGrace = 0; return true; } @@ -21,33 +21,33 @@ export class BuildersClubSubscriptionStatusMessageParser implements IMessagePars { if(!wrapper) return false; - this._Str_16456 = wrapper.readInt(); - this._Str_12494 = wrapper.readInt(); - this._Str_19123 = wrapper.readInt(); + this._secondsLeft = wrapper.readInt(); + this._furniLimit = wrapper.readInt(); + this._maxFurniLimit = wrapper.readInt(); - if(wrapper.bytesAvailable) this._Str_17298 = wrapper.readInt(); - else this._Str_17298 = this._Str_16456; + if(wrapper.bytesAvailable) this._secondsLeftWithGrace = wrapper.readInt(); + else this._secondsLeftWithGrace = this._secondsLeft; return true; } - public get _Str_3709(): number + public get secondsLeft(): number { - return this._Str_16456; + return this._secondsLeft; } - public get _Str_15864(): number + public get furniLimit(): number { - return this._Str_12494; + return this._furniLimit; } - public get _Str_24094(): number + public get maxFurniLimit(): number { - return this._Str_19123; + return this._maxFurniLimit; } - public get _Str_24379(): number + public get secondsLeftWithGrace(): number { - return this._Str_17298; + return this._secondsLeftWithGrace; } } diff --git a/src/nitro/communication/messages/parser/catalog/BundleDiscountRuleset.ts b/src/nitro/communication/messages/parser/catalog/BundleDiscountRuleset.ts index 0eaeaaab..ef61fe09 100644 --- a/src/nitro/communication/messages/parser/catalog/BundleDiscountRuleset.ts +++ b/src/nitro/communication/messages/parser/catalog/BundleDiscountRuleset.ts @@ -2,52 +2,52 @@ export class BundleDiscountRuleset { - private _Str_20535: number; - private _Str_19937: number; - private _Str_20951: number; - private _Str_20460: number; - private _Str_16144: number[]; + private _maxPurchaseSize: number; + private _bundleSize: number; + private _bundleDiscountSize: number; + private _bonusThreshold: number; + private _additionalBonusDiscountThresholdQuantities: number[]; constructor(wrapper: IMessageDataWrapper) { - this._Str_20535 = wrapper.readInt(); - this._Str_19937 = wrapper.readInt(); - this._Str_20951 = wrapper.readInt(); - this._Str_20460 = wrapper.readInt(); - this._Str_16144 = []; + this._maxPurchaseSize = wrapper.readInt(); + this._bundleSize = wrapper.readInt(); + this._bundleDiscountSize = wrapper.readInt(); + this._bonusThreshold = wrapper.readInt(); + this._additionalBonusDiscountThresholdQuantities = []; let count = wrapper.readInt(); while(count > 0) { - this._Str_16144.push(wrapper.readInt()); + this._additionalBonusDiscountThresholdQuantities.push(wrapper.readInt()); count--; } } - public get _Str_22802(): number + public get maxPurchaseSize(): number { - return this._Str_20535; + return this._maxPurchaseSize; } - public get _Str_9227(): number + public get bundleSize(): number { - return this._Str_19937; + return this._bundleSize; } - public get _Str_23802(): number + public get bundleDiscountSize(): number { - return this._Str_20951; + return this._bundleDiscountSize; } - public get _Str_21500(): number + public get bonusThreshold(): number { - return this._Str_20460; + return this._bonusThreshold; } - public get _Str_25155(): number[] + public get additionalBonusDiscountThresholdQuantities(): number[] { - return this._Str_16144; + return this._additionalBonusDiscountThresholdQuantities; } } diff --git a/src/nitro/communication/messages/parser/catalog/CatalogPageExpirationParser.ts b/src/nitro/communication/messages/parser/catalog/CatalogPageExpirationParser.ts index d84faea3..b5d8a811 100644 --- a/src/nitro/communication/messages/parser/catalog/CatalogPageExpirationParser.ts +++ b/src/nitro/communication/messages/parser/catalog/CatalogPageExpirationParser.ts @@ -4,14 +4,14 @@ export class CatalogPageExpirationParser implements IMessageParser { private _pageName: string; private _pageId: number; - private _Str_5158: number; + private _secondsToExpiry: number; private _image: string; public flush(): boolean { this._pageName = null; this._pageId = 0; - this._Str_5158 = 0; + this._secondsToExpiry = 0; this._image = null; return true; @@ -23,7 +23,7 @@ export class CatalogPageExpirationParser implements IMessageParser this._pageId = wrapper.readInt(); this._pageName = wrapper.readString(); - this._Str_5158 = wrapper.readInt(); + this._secondsToExpiry = wrapper.readInt(); this._image = wrapper.readString(); return true; @@ -39,9 +39,9 @@ export class CatalogPageExpirationParser implements IMessageParser return this._pageId; } - public get _Str_17123(): number + public get secondsToExpiry(): number { - return this._Str_5158; + return this._secondsToExpiry; } public get image(): string diff --git a/src/nitro/communication/messages/parser/catalog/CatalogPageWithEarliestExpiryMessageParser.ts b/src/nitro/communication/messages/parser/catalog/CatalogPageWithEarliestExpiryMessageParser.ts index 271e6c56..6cfc5a60 100644 --- a/src/nitro/communication/messages/parser/catalog/CatalogPageWithEarliestExpiryMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/CatalogPageWithEarliestExpiryMessageParser.ts @@ -3,13 +3,13 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class CatalogPageWithEarliestExpiryMessageParser implements IMessageParser { private _pageName: string; - private _Str_5158: number; + private _secondsToExpiry: number; private _image: string; public flush(): boolean { this._pageName = null; - this._Str_5158 = 0; + this._secondsToExpiry = 0; this._image = null; return true; @@ -20,7 +20,7 @@ export class CatalogPageWithEarliestExpiryMessageParser implements IMessageParse if(!wrapper) return false; this._pageName = wrapper.readString(); - this._Str_5158 = wrapper.readInt(); + this._secondsToExpiry = wrapper.readInt(); this._image = wrapper.readString(); return true; @@ -31,9 +31,9 @@ export class CatalogPageWithEarliestExpiryMessageParser implements IMessageParse return this._pageName; } - public get _Str_17123(): number + public get secondsToExpiry(): number { - return this._Str_5158; + return this._secondsToExpiry; } public get image(): string diff --git a/src/nitro/communication/messages/parser/catalog/ClubOfferExtendData.ts b/src/nitro/communication/messages/parser/catalog/ClubOfferExtendData.ts new file mode 100644 index 00000000..1d6710e0 --- /dev/null +++ b/src/nitro/communication/messages/parser/catalog/ClubOfferExtendData.ts @@ -0,0 +1,50 @@ +import { IMessageDataWrapper } from '../../../../../api'; +import { ClubOfferData } from './ClubOfferData'; + +export class ClubOfferExtendData extends ClubOfferData +{ + private _originalPrice: number; + private _originalActivityPointPrice: number; + private _originalActivityPointType: number; + private _subscriptionDaysLeft: number; + + constructor(wrapper: IMessageDataWrapper) + { + super(wrapper); + + this._originalPrice = wrapper.readInt(); + this._originalActivityPointPrice = wrapper.readInt(); + this._originalActivityPointType = wrapper.readInt(); + this._subscriptionDaysLeft = wrapper.readInt(); + } + + public get originalPrice(): number + { + return this._originalPrice * this.months; + } + + public get originalActivityPointPrice(): number + { + return this._originalActivityPointPrice * this.months; + } + + public get originalActivityPointType(): number + { + return this._originalActivityPointType; + } + + public get discountCreditAmount(): number + { + return (this._originalPrice * this.months) - this.priceCredits; + } + + public get discountActivityPointAmount(): number + { + return (this.originalActivityPointPrice * this.months) - this.priceActivityPoints; + } + + public get subscriptionDaysLeft(): number + { + return this._subscriptionDaysLeft; + } +} diff --git a/src/nitro/communication/messages/parser/catalog/ClubOfferExtendedData.ts b/src/nitro/communication/messages/parser/catalog/ClubOfferExtendedData.ts deleted file mode 100644 index f07bc961..00000000 --- a/src/nitro/communication/messages/parser/catalog/ClubOfferExtendedData.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { IMessageDataWrapper } from '../../../../../api'; -import { ClubOfferData } from './ClubOfferData'; - -export class ClubOfferExtendedData extends ClubOfferData -{ - private _Str_16193: number; - private _Str_22071: number; - private _Str_21178: number; - private _Str_21024: number; - - constructor(wrapper: IMessageDataWrapper) - { - super(wrapper); - - this._Str_16193 = wrapper.readInt(); - this._Str_22071 = wrapper.readInt(); - this._Str_21178 = wrapper.readInt(); - this._Str_21024 = wrapper.readInt(); - } - - public get _Str_23477(): number - { - return this._Str_16193 * this.months; - } - - public get _Str_21585(): number - { - return this._Str_22071 * this.months; - } - - public get _Str_22469(): number - { - return this._Str_21178; - } - - public get _Str_24050(): number - { - return (this._Str_16193 * this.months) - this.priceCredits; - } - - public get _Str_22280(): number - { - return (this._Str_21585 * this.months) - this.priceActivityPoints; - } - - public get _Str_21229(): number - { - return this._Str_21024; - } -} diff --git a/src/nitro/communication/messages/parser/catalog/DirectSMSClubBuyAvailableMessageParser.ts b/src/nitro/communication/messages/parser/catalog/DirectSMSClubBuyAvailableMessageParser.ts index bf768e2a..c812d769 100644 --- a/src/nitro/communication/messages/parser/catalog/DirectSMSClubBuyAvailableMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/DirectSMSClubBuyAvailableMessageParser.ts @@ -3,16 +3,16 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class DirectSMSClubBuyAvailableMessageParser implements IMessageParser { private _available: boolean; - private _Str_16515: string; - private _Str_22121: string; - private _Str_21897: number; + private _pricePointUrl: string; + private _market: string; + private _lengthInDays: number; public flush(): boolean { this._available = false; - this._Str_16515 = null; - this._Str_22121 = null; - this._Str_21897 = 0; + this._pricePointUrl = null; + this._market = null; + this._lengthInDays = 0; return true; } @@ -21,12 +21,12 @@ export class DirectSMSClubBuyAvailableMessageParser implements IMessageParser { if(!wrapper) return false; - this._Str_16515 = wrapper.readString(); + this._pricePointUrl = wrapper.readString(); - if(this._Str_16515 !== '') this._available = true; + if(this._pricePointUrl !== '') this._available = true; - this._Str_22121 = wrapper.readString(); - this._Str_21897 = wrapper.readInt(); + this._market = wrapper.readString(); + this._lengthInDays = wrapper.readInt(); return true; } @@ -36,18 +36,18 @@ export class DirectSMSClubBuyAvailableMessageParser implements IMessageParser return this._available; } - public get _Str_26301(): string + public get pricePointUrl(): string { - return this._Str_16515; + return this._pricePointUrl; } - public get _Str_26118(): string + public get market(): string { - return this._Str_22121; + return this._market; } - public get _Str_26380(): number + public get lengthInDays(): number { - return this._Str_21897; + return this._lengthInDays; } } diff --git a/src/nitro/communication/messages/parser/catalog/HabboClubExtendOfferMessageParser.ts b/src/nitro/communication/messages/parser/catalog/HabboClubExtendOfferMessageParser.ts index d86606f0..e3a5684f 100644 --- a/src/nitro/communication/messages/parser/catalog/HabboClubExtendOfferMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/HabboClubExtendOfferMessageParser.ts @@ -1,9 +1,9 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; -import { ClubOfferExtendedData } from './ClubOfferExtendedData'; +import { ClubOfferExtendData } from './ClubOfferExtendData'; export class HabboClubExtendOfferMessageParser implements IMessageParser { - private _offer: ClubOfferExtendedData; + private _offer: ClubOfferExtendData; public flush(): boolean { @@ -16,12 +16,12 @@ export class HabboClubExtendOfferMessageParser implements IMessageParser { if(!wrapper) return false; - this._offer = new ClubOfferExtendedData(wrapper); + this._offer = new ClubOfferExtendData(wrapper); return true; } - public get offer(): ClubOfferExtendedData + public get offer(): ClubOfferExtendData { return this._offer; } diff --git a/src/nitro/communication/messages/parser/catalog/IsOfferGiftableMessageParser.ts b/src/nitro/communication/messages/parser/catalog/IsOfferGiftableMessageParser.ts index 0d874d5b..a3588cbe 100644 --- a/src/nitro/communication/messages/parser/catalog/IsOfferGiftableMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/IsOfferGiftableMessageParser.ts @@ -3,12 +3,12 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class IsOfferGiftableMessageParser implements IMessageParser { private _offerId: number; - private _Str_21271: boolean; + private _isGiftable: boolean; public flush(): boolean { this._offerId = 0; - this._Str_21271 = false; + this._isGiftable = false; return true; } @@ -18,7 +18,7 @@ export class IsOfferGiftableMessageParser implements IMessageParser if(!wrapper) return false; this._offerId = wrapper.readInt(); - this._Str_21271 = wrapper.readBoolean(); + this._isGiftable = wrapper.readBoolean(); return true; } @@ -28,8 +28,8 @@ export class IsOfferGiftableMessageParser implements IMessageParser return this._offerId; } - public get _Str_18028(): boolean + public get isGiftable(): boolean { - return this._Str_21271; + return this._isGiftable; } } diff --git a/src/nitro/communication/messages/parser/catalog/LimitedOfferAppearingNextMessageParser.ts b/src/nitro/communication/messages/parser/catalog/LimitedOfferAppearingNextMessageParser.ts index 0202cbbf..8baa509f 100644 --- a/src/nitro/communication/messages/parser/catalog/LimitedOfferAppearingNextMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/LimitedOfferAppearingNextMessageParser.ts @@ -2,14 +2,14 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class LimitedOfferAppearingNextMessageParser implements IMessageParser { - private _Str_6800: number; + private _appearsInSeconds: number; private _pageId: number; private _offerId: number; private _productType: string; public flush(): boolean { - this._Str_6800 = -1; + this._appearsInSeconds = -1; this._pageId = -1; this._offerId = -1; this._productType = ''; @@ -21,7 +21,7 @@ export class LimitedOfferAppearingNextMessageParser implements IMessageParser { if(!wrapper) return false; - this._Str_6800 = wrapper.readInt(); + this._appearsInSeconds = wrapper.readInt(); this._pageId = wrapper.readInt(); this._offerId = wrapper.readInt(); this._productType = wrapper.readString(); @@ -29,9 +29,9 @@ export class LimitedOfferAppearingNextMessageParser implements IMessageParser return true; } - public get _Str_23051(): number + public get appearsInSeconds(): number { - return this._Str_6800; + return this._appearsInSeconds; } public get pageId(): number diff --git a/src/nitro/communication/messages/parser/catalog/NotEnoughBalanceMessageParser.ts b/src/nitro/communication/messages/parser/catalog/NotEnoughBalanceMessageParser.ts index 06ebe50c..69a6ac57 100644 --- a/src/nitro/communication/messages/parser/catalog/NotEnoughBalanceMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/NotEnoughBalanceMessageParser.ts @@ -2,14 +2,14 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class NotEnoughBalanceMessageParser implements IMessageParser { - private _Str_17433: boolean = false; - private _Str_19031: boolean = false; + private _notEnoughCredits: boolean = false; + private _notEnoughActivityPoints: boolean = false; private _activityPointType: number = 0; public flush(): boolean { - this._Str_17433 = false; - this._Str_19031 = false; + this._notEnoughCredits = false; + this._notEnoughActivityPoints = false; this._activityPointType = 0; return true; @@ -19,8 +19,8 @@ export class NotEnoughBalanceMessageParser implements IMessageParser { if(!wrapper) return false; - this._Str_17433 = wrapper.readBoolean(); - this._Str_19031 = wrapper.readBoolean(); + this._notEnoughCredits = wrapper.readBoolean(); + this._notEnoughActivityPoints = wrapper.readBoolean(); if(wrapper.bytesAvailable) this._activityPointType = wrapper.readInt(); @@ -29,12 +29,12 @@ export class NotEnoughBalanceMessageParser implements IMessageParser public get notEnoughCredits(): boolean { - return this._Str_17433; + return this._notEnoughCredits; } - public get _Str_24352(): boolean + public get notEnoughActivityPoints(): boolean { - return this._Str_19031; + return this._notEnoughActivityPoints; } public get activityPointType(): number diff --git a/src/nitro/communication/messages/parser/catalog/index.ts b/src/nitro/communication/messages/parser/catalog/index.ts index b5c41cd2..1ebbe6e1 100644 --- a/src/nitro/communication/messages/parser/catalog/index.ts +++ b/src/nitro/communication/messages/parser/catalog/index.ts @@ -15,7 +15,7 @@ export * from './ClubGiftData'; export * from './ClubGiftInfoParser'; export * from './ClubGiftSelectedParser'; export * from './ClubOfferData'; -export * from './ClubOfferExtendedData'; +export * from './ClubOfferExtendData'; export * from './DirectSMSClubBuyAvailableMessageParser'; export * from './FrontPageItem'; export * from './GiftReceiverNotFoundParser'; diff --git a/src/nitro/communication/messages/parser/competition/IsUserPartOfCompetitionMessageParser.ts b/src/nitro/communication/messages/parser/competition/IsUserPartOfCompetitionMessageParser.ts index bdaa14a5..d8a0e1f8 100644 --- a/src/nitro/communication/messages/parser/competition/IsUserPartOfCompetitionMessageParser.ts +++ b/src/nitro/communication/messages/parser/competition/IsUserPartOfCompetitionMessageParser.ts @@ -2,32 +2,32 @@ export class IsUserPartOfCompetitionMessageParser implements IMessageParser { - private _Str_8579: boolean; - private _Str_6987: number; + private _isPartOf: boolean; + private _targetId: number; public flush(): boolean { - this._Str_8579 = false; - this._Str_6987 = 0; + this._isPartOf = false; + this._targetId = 0; return true; } public parse(wrapper: IMessageDataWrapper): boolean { - this._Str_8579 = wrapper.readBoolean(); - this._Str_6987 = wrapper.readInt(); + this._isPartOf = wrapper.readBoolean(); + this._targetId = wrapper.readInt(); return true; } - public get _Str_25348(): boolean + public get isPartOf(): boolean { - return this._Str_8579; + return this._isPartOf; } - public get _Str_10760(): number + public get targetId(): number { - return this._Str_6987; + return this._targetId; } } diff --git a/src/nitro/communication/messages/parser/competition/SecondsUntilMessageParser.ts b/src/nitro/communication/messages/parser/competition/SecondsUntilMessageParser.ts index 3ca85985..ed4b84cf 100644 --- a/src/nitro/communication/messages/parser/competition/SecondsUntilMessageParser.ts +++ b/src/nitro/communication/messages/parser/competition/SecondsUntilMessageParser.ts @@ -2,32 +2,32 @@ export class SecondsUntilMessageParser implements IMessageParser { - private _Str_8997: string; - private _Str_21095: number; + private _timeStr: string; + private _secondsUntil: number; public flush(): boolean { - this._Str_8997 = null; - this._Str_21095 = 0; + this._timeStr = null; + this._secondsUntil = 0; return true; } public parse(wrapper: IMessageDataWrapper): boolean { - this._Str_8997 = wrapper.readString(); - this._Str_21095 = wrapper.readInt(); + this._timeStr = wrapper.readString(); + this._secondsUntil = wrapper.readInt(); return true; } - public get _Str_23288(): string + public get timeStr(): string { - return this._Str_8997; + return this._timeStr; } - public get _Str_25497(): number + public get secondsUntil(): number { - return this._Str_21095; + return this._secondsUntil; } } diff --git a/src/nitro/communication/messages/parser/groupforums/ExtendedForumData.ts b/src/nitro/communication/messages/parser/groupforums/ExtendedForumData.ts index 8ce2c82f..903d78db 100644 --- a/src/nitro/communication/messages/parser/groupforums/ExtendedForumData.ts +++ b/src/nitro/communication/messages/parser/groupforums/ExtendedForumData.ts @@ -61,7 +61,7 @@ export class ExtendedForumData extends ForumData return (this._readPermissionError.length === 0); } - public get _Str_21331(): boolean + public get canReport(): boolean { return true; } diff --git a/src/nitro/communication/messages/parser/groupforums/ForumData.ts b/src/nitro/communication/messages/parser/groupforums/ForumData.ts index 543536f8..02b96109 100644 --- a/src/nitro/communication/messages/parser/groupforums/ForumData.ts +++ b/src/nitro/communication/messages/parser/groupforums/ForumData.ts @@ -99,7 +99,7 @@ export class ForumData return this._lastMessageTimeAsSecondsAgo; } - public _Str_25309(forum: ForumData): void + public updateFrom(forum: ForumData): void { this._totalThreads = forum._totalThreads; this._totalMessages = forum._totalMessages; @@ -110,19 +110,19 @@ export class ForumData this._lastMessageTimeAsSecondsAgo = forum._lastMessageTimeAsSecondsAgo; } - public get _Str_12786(): number + public get lastReadMessageId(): number { return (this._totalMessages - this._unreadMessages); } - public set _Str_12786(k: number) + public set lastReadMessageId(k: number) { this._unreadMessages = (this._totalMessages - k); if(this._unreadMessages < 0) this._unreadMessages = 0; } - public _Str_23783(thread: GuildForumThread): void + public addNewThread(thread: GuildForumThread): void { this._lastMessageAuthorId = thread.lastUserId; this._lastMessageAuthorName = thread.lastUserName; diff --git a/src/nitro/communication/messages/parser/navigator/utils/GuestRoomSearchResultData.ts b/src/nitro/communication/messages/parser/navigator/utils/GuestRoomSearchResultData.ts index b42582de..a8b4955c 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/GuestRoomSearchResultData.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/GuestRoomSearchResultData.ts @@ -59,7 +59,7 @@ export class GuestRoomSearchResultData return this._searchType; } - public get _Str_25185(): string + public get searchParam(): string { return this._searchParam; } diff --git a/src/nitro/communication/messages/parser/navigator/utils/OfficialRoomEntryData.ts b/src/nitro/communication/messages/parser/navigator/utils/OfficialRoomEntryData.ts index d9a32175..bbaa75d3 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/OfficialRoomEntryData.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/OfficialRoomEntryData.ts @@ -3,44 +3,44 @@ import { RoomDataParser } from '../../room'; export class OfficialRoomEntryData { - public static readonly _Str_14955 = 1; - public static readonly _Str_12025 = 2; - public static readonly _Str_16098 = 4; + public static readonly TYPE_TAG = 1; + public static readonly TYPE_GUEST_ROOM = 2; + public static readonly TYPE_FOLDER = 4; private _index: number; - private _Str_20260: string; - private _Str_21337: string; - private _Str_21113: boolean; + private _popupCaption: string; + private _popupDesc: string; + private _showDetails: boolean; private _picText: string; - private _Str_6192: string; - private _Str_22099: number; + private _picRef: string; + private _folderId: number; private _userCount: number; private _type: number; private _tag: string; - private _Str_2567: RoomDataParser; + private _guestRoomData: RoomDataParser; private _open: boolean; private _disposed: boolean; constructor(k: IMessageDataWrapper) { this._index = k.readInt(); - this._Str_20260 = k.readString(); - this._Str_21337 = k.readString(); - this._Str_21113 = k.readInt() == 1; + this._popupCaption = k.readString(); + this._popupDesc = k.readString(); + this._showDetails = k.readInt() == 1; this._picText = k.readString(); - this._Str_6192 = k.readString(); - this._Str_22099 = k.readInt(); + this._picRef = k.readString(); + this._folderId = k.readInt(); this._userCount = k.readInt(); this._type = k.readInt(); - if(this._type == OfficialRoomEntryData._Str_14955) + if(this._type == OfficialRoomEntryData.TYPE_TAG) { this._tag = k.readString(); } else { - if(this._type == OfficialRoomEntryData._Str_12025) + if(this._type == OfficialRoomEntryData.TYPE_GUEST_ROOM) { - this._Str_2567 = new RoomDataParser(k); + this._guestRoomData = new RoomDataParser(k); } else { @@ -56,10 +56,10 @@ export class OfficialRoomEntryData return; } this._disposed = true; - if(this._Str_2567 != null) + if(this._guestRoomData != null) { - this._Str_2567.flush(); - this._Str_2567 = null; + this._guestRoomData.flush(); + this._guestRoomData = null; } } @@ -78,19 +78,19 @@ export class OfficialRoomEntryData return this._index; } - public get _Str_9428(): string + public get popupCaption(): string { - return this._Str_20260; + return this._popupCaption; } - public get _Str_22426(): string + public get popupDesc(): string { - return this._Str_21337; + return this._popupDesc; } - public get _Str_5386(): boolean + public get showDetails(): boolean { - return this._Str_21113; + return this._showDetails; } public get picText(): string @@ -98,14 +98,14 @@ export class OfficialRoomEntryData return this._picText; } - public get _Str_10304(): string + public get picRef(): string { - return this._Str_6192; + return this._picRef; } - public get _Str_22186(): number + public get folderId(): number { - return this._Str_22099; + return this._folderId; } public get tag(): string @@ -118,9 +118,9 @@ export class OfficialRoomEntryData return this._userCount; } - public get _Str_5019(): RoomDataParser + public get guestRoomData(): RoomDataParser { - return this._Str_2567; + return this._guestRoomData; } public get open(): boolean @@ -128,20 +128,20 @@ export class OfficialRoomEntryData return this._open; } - public _Str_16147(): void + public toggleOpen(): void { this._open = !this._open; } - public get _Str_23003(): number + public get maxUsers(): number { - if(this.type == OfficialRoomEntryData._Str_14955) + if(this.type == OfficialRoomEntryData.TYPE_TAG) { return 0; } - if(this.type == OfficialRoomEntryData._Str_12025) + if(this.type == OfficialRoomEntryData.TYPE_GUEST_ROOM) { - return this._Str_2567.maxUserCount; + return this._guestRoomData.maxUserCount; } return 0; } diff --git a/src/nitro/communication/messages/parser/roomsettings/RoomSettingsData.ts b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsData.ts index aa7a65c9..4384e5e1 100644 --- a/src/nitro/communication/messages/parser/roomsettings/RoomSettingsData.ts +++ b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsData.ts @@ -69,23 +69,23 @@ export class RoomSettingsData return instance; } - // public static _Str_26097(k: number): string - // { - // switch (k) - // { - // case RoomSettingsData.DOORMODE_OPEN: - // return "${navigator.door.mode.open}"; - // case RoomSettingsData.DOORMODE_CLOSED: - // return "${navigator.door.mode.closed}"; - // case RoomSettingsData.DOORMODE_PASSWORD: - // return "${navigator.door.mode.password}"; - // case RoomSettingsData.DOORMODE_INVISIBLE: - // return "${navigator.door.mode.invisible}"; - // case RoomSettingsData.DOORMODE_NOOBS_ONLY: - // return "${navigator.door.mode.noobs_only}"; - // } - // return ""; - // } + public static getDoorModeLocalizationKey(k: number): string + { + switch(k) + { + case RoomSettingsData.DOORMODE_OPEN: + return '${navigator.door.mode.open}'; + case RoomSettingsData.DOORMODE_CLOSED: + return '${navigator.door.mode.closed}'; + case RoomSettingsData.DOORMODE_PASSWORD: + return '${navigator.door.mode.password}'; + case RoomSettingsData.DOORMODE_INVISIBLE: + return '${navigator.door.mode.invisible}'; + case RoomSettingsData.DOORMODE_NOOBS_ONLY: + return '${navigator.door.mode.noobs_only}'; + } + return ''; + } public get tradeMode(): number { @@ -237,7 +237,7 @@ export class RoomSettingsData this._tags = tags; } - public _Str_17474(id: number, data: FlatControllerData): void + public setFlatController(id: number, data: FlatControllerData): void { this._controllersById.set(id, data); @@ -284,7 +284,7 @@ export class RoomSettingsData return this._highlightedUserId; } - public _Str_22019(id: number, data: BannedUserData): void + public setBannedUser(id: number, data: BannedUserData): void { this._bannedUsersById.set(id, data); diff --git a/src/nitro/communication/messages/parser/user/RoomEntryData.ts b/src/nitro/communication/messages/parser/user/RoomEntryData.ts index 2a1da927..4f9ee0b2 100644 --- a/src/nitro/communication/messages/parser/user/RoomEntryData.ts +++ b/src/nitro/communication/messages/parser/user/RoomEntryData.ts @@ -21,7 +21,7 @@ return this._roomName; } - public get _Str_22776(): boolean + public get hasControllers(): boolean { return this._hasControllers; } diff --git a/src/nitro/localization/NitroLocalizationManager.ts b/src/nitro/localization/NitroLocalizationManager.ts index 97856b42..2721d250 100644 --- a/src/nitro/localization/NitroLocalizationManager.ts +++ b/src/nitro/localization/NitroLocalizationManager.ts @@ -302,7 +302,7 @@ export class NitroLocalizationManager extends NitroManager implements INitroLoca const badge = new BadgeBaseAndLevel(key); const keys = ['badge_name_' + key, 'badge_name_' + badge.base]; - let name = this._Str_2103(this.getExistingKey(keys)); + let name = this.fixBadLocalization(this.getExistingKey(keys)); name = name.replace('%roman%', this.getRomanNumeral(badge.level)); @@ -314,7 +314,7 @@ export class NitroLocalizationManager extends NitroManager implements INitroLoca const badge = new BadgeBaseAndLevel(key); const keys = ['badge_desc_' + key, 'badge_desc_' + badge.base]; - let desc = this._Str_2103(this.getExistingKey(keys)); + let desc = this.fixBadLocalization(this.getExistingKey(keys)); const limit = this.getBadgePointLimit(key); @@ -336,7 +336,7 @@ export class NitroLocalizationManager extends NitroManager implements INitroLoca return ''; } - private _Str_2103(k: string): string + private fixBadLocalization(k: string): string { return k.replace('${', '$') .replace('{', '$') diff --git a/src/nitro/room/object/visualization/furniture/FurnitureFireworksVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureFireworksVisualization.ts index 93cc2d2a..a5d7bea1 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureFireworksVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureFireworksVisualization.ts @@ -27,7 +27,7 @@ export class FurnitureFireworksVisualization extends FurnitureAnimatedVisualizat { if(!this._particleSystems) { - this._Str_18684(); + this.readDefinition(); if(this._particleSystems) this._currentParticleSystem = this._particleSystems.getValue(scale); @@ -39,7 +39,7 @@ export class FurnitureFireworksVisualization extends FurnitureAnimatedVisualizat { const particleSystem = this._particleSystems.getValue(scale); - particleSystem._Str_17988(this._currentParticleSystem); + particleSystem.copyStateFrom(this._currentParticleSystem); if(this._currentParticleSystem) this._currentParticleSystem.reset(); @@ -84,7 +84,7 @@ export class FurnitureFireworksVisualization extends FurnitureAnimatedVisualizat return super.getLayerYOffset(scale, direction, layerId); } - private _Str_18684(): boolean + private readDefinition(): boolean { if(!this.object || !this.object.model) return false; diff --git a/src/nitro/room/object/visualization/furniture/FurnitureParticleSystem.ts b/src/nitro/room/object/visualization/furniture/FurnitureParticleSystem.ts index 1b1ef4bc..1c8ec0f8 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureParticleSystem.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureParticleSystem.ts @@ -290,7 +290,7 @@ export class FurnitureParticleSystem } } - public _Str_17988(particleSystem: FurnitureParticleSystem): void + public copyStateFrom(particleSystem: FurnitureParticleSystem): void { let emitterId = 0;