This commit is contained in:
dank074 2023-01-03 01:12:07 -06:00
commit b9801431be
12 changed files with 124 additions and 60 deletions

View File

@ -11,6 +11,7 @@
"widget.dimmer.colorwheel": false, "widget.dimmer.colorwheel": false,
"avatar.wardrobe.max.slots": 10, "avatar.wardrobe.max.slots": 10,
"user.badges.max.slots": 5, "user.badges.max.slots": 5,
"user.tags.enabled": false,
"camera.publish.disabled": false, "camera.publish.disabled": false,
"hc.disabled": false, "hc.disabled": false,
"badge.descriptions.enabled": true, "badge.descriptions.enabled": true,

View File

@ -4,7 +4,7 @@ export interface IPurse
activityPoints: Map<number, number>; activityPoints: Map<number, number>;
clubDays: number; clubDays: number;
clubPeriods: number; clubPeriods: number;
_Str_13571: boolean; hasClubLeft: boolean;
isVip: boolean; isVip: boolean;
pastClubDays: number; pastClubDays: number;
pastVipDays: number; pastVipDays: number;

View File

@ -78,7 +78,7 @@ export class Purse implements IPurse
this._clubPeriods = k; this._clubPeriods = k;
} }
public get _Str_13571(): boolean public get hasClubLeft(): boolean
{ {
return (this._clubDays > 0) || (this._clubPeriods > 0); return (this._clubDays > 0) || (this._clubPeriods > 0);
} }

View File

@ -162,7 +162,7 @@ export class AvatarInfoUtilities
if(guildId !== 0) if(guildId !== 0)
{ {
furniInfo.groupId = guildId; furniInfo.groupId = guildId;
//this.container.connection.send(new _Str_2863(guildId, false)); //this.container.connection.send(new GroupInformationComposer(guildId, false));
} }
if(IsOwnerOfFurniture(roomObject)) furniInfo.isOwner = true; if(IsOwnerOfFurniture(roomObject)) furniInfo.isOwner = true;
@ -250,7 +250,7 @@ export class AvatarInfoUtilities
if(tradeMode !== RoomTradingLevelEnum.FREE_TRADING) userInfo.canTradeReason = AvatarInfoUser.TRADE_REASON_NO_TRADING; if(tradeMode !== RoomTradingLevelEnum.FREE_TRADING) userInfo.canTradeReason = AvatarInfoUser.TRADE_REASON_NO_TRADING;
// const _local_12 = GetSessionDataManager().userId; // const _local_12 = GetSessionDataManager().userId;
// _local_13 = GetSessionDataManager()._Str_18437(_local_12); // _local_13 = GetSessionDataManager().getUserTags(_local_12);
// this._Str_16287(_local_12, _local_13); // this._Str_16287(_local_12, _local_13);
} }
@ -259,10 +259,10 @@ export class AvatarInfoUtilities
userInfo.groupName = userData.groupName; userInfo.groupName = userData.groupName;
userInfo.badges = roomSession.userDataManager.getUserBadges(userData.webID); userInfo.badges = roomSession.userDataManager.getUserBadges(userData.webID);
userInfo.figure = userData.figure; userInfo.figure = userData.figure;
//var _local_8:Array = GetSessionDataManager()._Str_18437(userData.webID); //var _local_8:Array = GetSessionDataManager().getUserTags(userData.webID);
//this._Str_16287(userData._Str_2394, _local_8); //this._Str_16287(userData.webId, _local_8);
//this._container._Str_8097._Str_14387(userData.webID); //this._container.habboGroupsManager.updateVisibleExtendedProfile(userData.webID);
//this._container.connection.send(new _Str_8049(userData._Str_2394)); //this._container.connection.send(new GetRelationshipStatusInfoMessageComposer(userData.webId));
return userInfo; return userInfo;
} }

View File

@ -10,7 +10,7 @@ export const OfferBubbleView = (props: { offer: TargetedOfferData, setOpen: Disp
if (!offer) return; if (!offer) return;
return <LayoutNotificationBubbleView fadesOut={ false } onClose={ null } onClick={ evt => setOpen(true) } gap={ 2 }> return <LayoutNotificationBubbleView fadesOut={ false } onClose={ null } onClick={ evt => setOpen(true) } gap={ 2 }>
<Base className="nitro-targeted-offer-icon" style={ { backgroundImage: `url(${ GetConfiguration('image.library.url') + offer._Str_13452 })` } }/> <Base className="nitro-targeted-offer-icon" style={ { backgroundImage: `url(${ GetConfiguration('image.library.url') + offer.iconImageUrl })` } }/>
<Text variant="light" className="ubuntu-bold">{ offer.title }</Text> <Text variant="light" className="ubuntu-bold">{ offer.title }</Text>
</LayoutNotificationBubbleView>; </LayoutNotificationBubbleView>;
} }

View File

@ -10,19 +10,19 @@ interface AvatarInfoUseProductConfirmViewProps
onClose: () => void; onClose: () => void;
} }
const _Str_5091: number = -1; const PRODUCT_PAGE_UKNOWN: number = -1;
const _Str_11906: number = 0; const PRODUCT_PAGE_SHAMPOO: number = 0;
const _Str_11214: number = 1; const PRODUCT_PAGE_CUSTOM_PART: number = 1;
const _Str_11733: number = 2; const PRODUCT_PAGE_CUSTOM_PART_SHAMPOO: number = 2;
const _Str_11369: number = 3; const PRODUCT_PAGE_SADDLE: number = 3;
const _Str_8759: number = 4; const PRODUCT_PAGE_REVIVE: number = 4;
const _Str_8432: number = 5; const PRODUCT_PAGE_REBREED: number = 5;
const _Str_9653: number = 6; const PRODUCT_PAGE_FERTILIZE: number = 6;
export const AvatarInfoUseProductConfirmView: FC<AvatarInfoUseProductConfirmViewProps> = props => export const AvatarInfoUseProductConfirmView: FC<AvatarInfoUseProductConfirmViewProps> = props =>
{ {
const { item = null, onClose = null } = props; const { item = null, onClose = null } = props;
const [ mode, setMode ] = useState(_Str_5091); const [ mode, setMode ] = useState(PRODUCT_PAGE_UKNOWN);
const [ petData, setPetData ] = useState<IRoomUserData>(null); const [ petData, setPetData ] = useState<IRoomUserData>(null);
const [ furniData, setFurniData ] = useState<IFurnitureData>(null); const [ furniData, setFurniData ] = useState<IFurnitureData>(null);
const { roomSession = null } = useRoom(); const { roomSession = null } = useRoom();
@ -189,30 +189,30 @@ export const AvatarInfoUseProductConfirmView: FC<AvatarInfoUseProductConfirmView
setFurniData(furniData); setFurniData(furniData);
let mode = _Str_5091; let mode = PRODUCT_PAGE_UKNOWN;
switch(furniData.specialType) switch(furniData.specialType)
{ {
case FurniCategory.PET_SHAMPOO: case FurniCategory.PET_SHAMPOO:
mode = _Str_11906; mode = PRODUCT_PAGE_SHAMPOO;
break; break;
case FurniCategory.PET_CUSTOM_PART: case FurniCategory.PET_CUSTOM_PART:
mode = _Str_11214; mode = PRODUCT_PAGE_CUSTOM_PART;
break; break;
case FurniCategory.PET_CUSTOM_PART_SHAMPOO: case FurniCategory.PET_CUSTOM_PART_SHAMPOO:
mode = _Str_11733; mode = PRODUCT_PAGE_CUSTOM_PART_SHAMPOO;
break; break;
case FurniCategory.PET_SADDLE: case FurniCategory.PET_SADDLE:
mode = _Str_11369; mode = PRODUCT_PAGE_SADDLE;
break; break;
case FurniCategory.MONSTERPLANT_REVIVAL: case FurniCategory.MONSTERPLANT_REVIVAL:
mode = _Str_8759; mode = PRODUCT_PAGE_REVIVE;
break; break;
case FurniCategory.MONSTERPLANT_REBREED: case FurniCategory.MONSTERPLANT_REBREED:
mode = _Str_8432; mode = PRODUCT_PAGE_REBREED;
break; break;
case FurniCategory.MONSTERPLANT_FERTILIZE: case FurniCategory.MONSTERPLANT_FERTILIZE:
mode = _Str_9653; mode = PRODUCT_PAGE_FERTILIZE;
break; break;
} }
@ -233,37 +233,37 @@ export const AvatarInfoUseProductConfirmView: FC<AvatarInfoUseProductConfirmView
</Column> </Column>
<Column justifyContent="between" overflow="auto"> <Column justifyContent="between" overflow="auto">
<Column gap={ 2 }> <Column gap={ 2 }>
{ (mode === _Str_11906) && { (mode === PRODUCT_PAGE_SHAMPOO) &&
<> <>
<Text>{ LocalizeText('useproduct.widget.text.shampoo', [ 'productName' ], [ furniData.name ] ) }</Text> <Text>{ LocalizeText('useproduct.widget.text.shampoo', [ 'productName' ], [ furniData.name ] ) }</Text>
<Text>{ LocalizeText('useproduct.widget.info.shampoo') }</Text> <Text>{ LocalizeText('useproduct.widget.info.shampoo') }</Text>
</> } </> }
{ (mode === _Str_11214) && { (mode === PRODUCT_PAGE_CUSTOM_PART) &&
<> <>
<Text>{ LocalizeText('useproduct.widget.text.custompart', [ 'productName' ], [ furniData.name ] ) }</Text> <Text>{ LocalizeText('useproduct.widget.text.custompart', [ 'productName' ], [ furniData.name ] ) }</Text>
<Text>{ LocalizeText('useproduct.widget.info.custompart') }</Text> <Text>{ LocalizeText('useproduct.widget.info.custompart') }</Text>
</> } </> }
{ (mode === _Str_11733) && { (mode === PRODUCT_PAGE_CUSTOM_PART_SHAMPOO) &&
<> <>
<Text>{ LocalizeText('useproduct.widget.text.custompartshampoo', [ 'productName' ], [ furniData.name ] ) }</Text> <Text>{ LocalizeText('useproduct.widget.text.custompartshampoo', [ 'productName' ], [ furniData.name ] ) }</Text>
<Text>{ LocalizeText('useproduct.widget.info.custompartshampoo') }</Text> <Text>{ LocalizeText('useproduct.widget.info.custompartshampoo') }</Text>
</> } </> }
{ (mode === _Str_11369) && { (mode === PRODUCT_PAGE_SADDLE) &&
<> <>
<Text>{ LocalizeText('useproduct.widget.text.saddle', [ 'productName' ], [ furniData.name ] ) }</Text> <Text>{ LocalizeText('useproduct.widget.text.saddle', [ 'productName' ], [ furniData.name ] ) }</Text>
<Text>{ LocalizeText('useproduct.widget.info.saddle') }</Text> <Text>{ LocalizeText('useproduct.widget.info.saddle') }</Text>
</> } </> }
{ (mode === _Str_8759) && { (mode === PRODUCT_PAGE_REVIVE) &&
<> <>
<Text>{ LocalizeText('useproduct.widget.text.revive_monsterplant', [ 'productName' ], [ furniData.name ] ) }</Text> <Text>{ LocalizeText('useproduct.widget.text.revive_monsterplant', [ 'productName' ], [ furniData.name ] ) }</Text>
<Text>{ LocalizeText('useproduct.widget.info.revive_monsterplant') }</Text> <Text>{ LocalizeText('useproduct.widget.info.revive_monsterplant') }</Text>
</> } </> }
{ (mode === _Str_8432) && { (mode === PRODUCT_PAGE_REBREED) &&
<> <>
<Text>{ LocalizeText('useproduct.widget.text.rebreed_monsterplant', [ 'productName' ], [ furniData.name ] ) }</Text> <Text>{ LocalizeText('useproduct.widget.text.rebreed_monsterplant', [ 'productName' ], [ furniData.name ] ) }</Text>
<Text>{ LocalizeText('useproduct.widget.info.rebreed_monsterplant') }</Text> <Text>{ LocalizeText('useproduct.widget.info.rebreed_monsterplant') }</Text>
</> } </> }
{ (mode === _Str_9653) && { (mode === PRODUCT_PAGE_FERTILIZE) &&
<> <>
<Text>{ LocalizeText('useproduct.widget.text.fertilize_monsterplant', [ 'productName' ], [ furniData.name ] ) }</Text> <Text>{ LocalizeText('useproduct.widget.text.fertilize_monsterplant', [ 'productName' ], [ furniData.name ] ) }</Text>
<Text>{ LocalizeText('useproduct.widget.info.fertilize_monsterplant') }</Text> <Text>{ LocalizeText('useproduct.widget.info.fertilize_monsterplant') }</Text>

View File

@ -106,6 +106,22 @@
font-style: italic; font-style: italic;
} }
} }
.flex-tags
{
flex-wrap: wrap;
margin-bottom: -10px;
.text-tags
{
padding: 2px;
border-radius: 3px;
background: #333;
margin-right: 5px;
margin-bottom: 10px;
cursor: pointer;
}
}
} }
.button-container { .button-container {

View File

@ -1,6 +1,6 @@
import { RoomEngineEvent, RoomEnterEffect, RoomSessionDanceEvent } from '@nitrots/nitro-renderer'; import { RoomEngineEvent, RoomEnterEffect, RoomSessionDanceEvent } from '@nitrots/nitro-renderer';
import { FC, useState } from 'react'; import { FC, useState } from 'react';
import { AvatarInfoFurni, AvatarInfoPet, AvatarInfoRentableBot, AvatarInfoUser, GetSessionDataManager, RoomWidgetUpdateRentableBotChatEvent } from '../../../../api'; import { AvatarInfoFurni, AvatarInfoPet, AvatarInfoRentableBot, AvatarInfoUser, GetConfiguration, GetSessionDataManager, RoomWidgetUpdateRentableBotChatEvent } from '../../../../api';
import { Column } from '../../../../common'; import { Column } from '../../../../common';
import { useAvatarInfoWidget, useRoom, useRoomEngineEvent, useRoomSessionManagerEvent, useUiEvent } from '../../../../hooks'; import { useAvatarInfoWidget, useRoom, useRoomEngineEvent, useRoomSessionManagerEvent, useUiEvent } from '../../../../hooks';
import { AvatarInfoRentableBotChatView } from './AvatarInfoRentableBotChatView'; import { AvatarInfoRentableBotChatView } from './AvatarInfoRentableBotChatView';
@ -67,6 +67,7 @@ export const AvatarInfoWidgetView: FC<{}> = props =>
case AvatarInfoUser.OWN_USER: case AvatarInfoUser.OWN_USER:
case AvatarInfoUser.PEER: { case AvatarInfoUser.PEER: {
const info = (avatarInfo as AvatarInfoUser); const info = (avatarInfo as AvatarInfoUser);
if (GetConfiguration('user.tags.enabled')) GetSessionDataManager().getUserTags(info.roomIndex);
if(info.isSpectatorMode) return null; if(info.isSpectatorMode) return null;
@ -111,7 +112,7 @@ export const AvatarInfoWidgetView: FC<{}> = props =>
case AvatarInfoRentableBot.RENTABLE_BOT: case AvatarInfoRentableBot.RENTABLE_BOT:
return <InfoStandWidgetRentableBotView avatarInfo={ (avatarInfo as AvatarInfoRentableBot) } onClose={ () => setAvatarInfo(null) } />; return <InfoStandWidgetRentableBotView avatarInfo={ (avatarInfo as AvatarInfoRentableBot) } onClose={ () => setAvatarInfo(null) } />;
case AvatarInfoPet.PET_INFO: case AvatarInfoPet.PET_INFO:
return <InfoStandWidgetPetView avatarInfo={ (avatarInfo as AvatarInfoPet) } onClose={ () => setAvatarInfo(null) } /> return <InfoStandWidgetPetView avatarInfo={ (avatarInfo as AvatarInfoPet) } onClose={ () => setAvatarInfo(null) } />
} }
} }

View File

@ -0,0 +1,31 @@
import { NavigatorSearchComposer } from '@nitrots/nitro-renderer';
import { FC } from 'react';
import { CreateLinkEvent, SendMessageComposer } from '../../../../../api';
import { Flex, Text } from '../../../../../common';
interface InfoStandWidgetUserTagsViewProps
{
tags: string[];
}
const processAction = (tag: string) =>
{
CreateLinkEvent(`navigator/search/${ tag }`);
SendMessageComposer(new NavigatorSearchComposer('hotel_view', `tag:${ tag }`));
}
export const InfoStandWidgetUserTagsView: FC<InfoStandWidgetUserTagsViewProps> = props =>
{
const { tags = null } = props;
if(!tags || !tags.length) return null;
return (
<>
<hr className="m-0" />
<Flex className="flex-tags">
{ tags && (tags.length > 0) && tags.map((tag, index) => <Text key={ index } variant="white" className="text-tags" onClick={ event => processAction(tag) }>{ tag }</Text>) }
</Flex>
</>
);
}

View File

@ -5,6 +5,7 @@ import { AvatarInfoUser, CloneObject, GetConfiguration, GetGroupInformation, Get
import { Column, Flex, LayoutAvatarImageView, LayoutBadgeImageView, Text, UserProfileIconView } from '../../../../../common'; import { Column, Flex, LayoutAvatarImageView, LayoutBadgeImageView, Text, UserProfileIconView } from '../../../../../common';
import { useMessageEvent, useRoom, useRoomSessionManagerEvent } from '../../../../../hooks'; import { useMessageEvent, useRoom, useRoomSessionManagerEvent } from '../../../../../hooks';
import { InfoStandWidgetUserRelationshipsView } from './InfoStandWidgetUserRelationshipsView'; import { InfoStandWidgetUserRelationshipsView } from './InfoStandWidgetUserRelationshipsView';
import { InfoStandWidgetUserTagsView } from './InfoStandWidgetUserTagsView';
interface InfoStandWidgetUserViewProps interface InfoStandWidgetUserViewProps
{ {
@ -35,7 +36,7 @@ export const InfoStandWidgetUserView: FC<InfoStandWidgetUserViewProps> = props =
const onMottoKeyDown = (event: KeyboardEvent<HTMLInputElement>) => const onMottoKeyDown = (event: KeyboardEvent<HTMLInputElement>) =>
{ {
event.stopPropagation(); event.stopPropagation();
switch(event.key) switch(event.key)
{ {
case 'Enter': case 'Enter':
@ -49,7 +50,7 @@ export const InfoStandWidgetUserView: FC<InfoStandWidgetUserViewProps> = props =
if(!avatarInfo || (avatarInfo.webID !== event.userId)) return; if(!avatarInfo || (avatarInfo.webID !== event.userId)) return;
const oldBadges = avatarInfo.badges.join(''); const oldBadges = avatarInfo.badges.join('');
if(oldBadges === event.badges.join('')) return; if(oldBadges === event.badges.join('')) return;
setAvatarInfo(prevValue => setAvatarInfo(prevValue =>
@ -108,10 +109,10 @@ export const InfoStandWidgetUserView: FC<InfoStandWidgetUserViewProps> = props =
{ {
setIsEditingMotto(false); setIsEditingMotto(false);
setMotto(avatarInfo.motto); setMotto(avatarInfo.motto);
SendMessageComposer(new UserRelationshipsComposer(avatarInfo.webID)); SendMessageComposer(new UserRelationshipsComposer(avatarInfo.webID));
return () => return () =>
{ {
setIsEditingMotto(false); setIsEditingMotto(false);
setMotto(null); setMotto(null);
@ -203,6 +204,11 @@ export const InfoStandWidgetUserView: FC<InfoStandWidgetUserViewProps> = props =
<Column gap={ 1 }> <Column gap={ 1 }>
<InfoStandWidgetUserRelationshipsView relationships={ relationships } /> <InfoStandWidgetUserRelationshipsView relationships={ relationships } />
</Column> </Column>
{ GetConfiguration('user.tags.enabled') &&
<Column gap={ 1 } className="mt-1">
<InfoStandWidgetUserTagsView tags={ GetSessionDataManager().tags } />
</Column>
}
</Column> </Column>
</Column> </Column>
); );

View File

@ -1,4 +1,4 @@
import { RelationshipStatusInfoEvent, RelationshipStatusInfoMessageParser, RoomEngineObjectEvent, RoomObjectCategory, RoomObjectType, UserCurrentBadgesComposer, UserCurrentBadgesEvent, UserProfileEvent, UserProfileParser, UserRelationshipsComposer } from '@nitrots/nitro-renderer'; import { ExtendedProfileChangedMessageEvent, RelationshipStatusInfoEvent, RelationshipStatusInfoMessageParser, RoomEngineObjectEvent, RoomObjectCategory, RoomObjectType, UserCurrentBadgesComposer, UserCurrentBadgesEvent, UserProfileEvent, UserProfileParser, UserRelationshipsComposer } from '@nitrots/nitro-renderer';
import { FC, useState } from 'react'; import { FC, useState } from 'react';
import { CreateLinkEvent, GetRoomSession, GetSessionDataManager, GetUserProfile, LocalizeText, SendMessageComposer } from '../../api'; import { CreateLinkEvent, GetRoomSession, GetSessionDataManager, GetUserProfile, LocalizeText, SendMessageComposer } from '../../api';
import { Column, Flex, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../common'; import { Column, Flex, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../common';
@ -24,7 +24,7 @@ export const UserProfileView: FC<{}> = props =>
const onLeaveGroup = () => const onLeaveGroup = () =>
{ {
if(!userProfile || (userProfile.id !== GetSessionDataManager().userId)) return; if(!userProfile || (userProfile.id !== GetSessionDataManager().userId)) return;
GetUserProfile(userProfile.id); GetUserProfile(userProfile.id);
} }
@ -33,7 +33,7 @@ export const UserProfileView: FC<{}> = props =>
const parser = event.getParser(); const parser = event.getParser();
if(!userProfile || (parser.userId !== userProfile.id)) return; if(!userProfile || (parser.userId !== userProfile.id)) return;
setUserBadges(parser.badges); setUserBadges(parser.badges);
}); });
@ -42,7 +42,7 @@ export const UserProfileView: FC<{}> = props =>
const parser = event.getParser(); const parser = event.getParser();
if(!userProfile || (parser.userId !== userProfile.id)) return; if(!userProfile || (parser.userId !== userProfile.id)) return;
setUserRelationships(parser); setUserRelationships(parser);
}); });
@ -51,7 +51,7 @@ export const UserProfileView: FC<{}> = props =>
const parser = event.getParser(); const parser = event.getParser();
let isSameProfile = false; let isSameProfile = false;
setUserProfile(prevValue => setUserProfile(prevValue =>
{ {
if(prevValue && prevValue.id) isSameProfile = (prevValue.id === parser.id); if(prevValue && prevValue.id) isSameProfile = (prevValue.id === parser.id);
@ -69,10 +69,19 @@ export const UserProfileView: FC<{}> = props =>
SendMessageComposer(new UserRelationshipsComposer(parser.id)); SendMessageComposer(new UserRelationshipsComposer(parser.id));
}); });
useMessageEvent<ExtendedProfileChangedMessageEvent>(ExtendedProfileChangedMessageEvent, event =>
{
const parser = event.getParser();
if(parser.userId != userProfile?.id) return;
GetUserProfile(parser.userId);
});
useRoomEngineEvent<RoomEngineObjectEvent>(RoomEngineObjectEvent.SELECTED, event => useRoomEngineEvent<RoomEngineObjectEvent>(RoomEngineObjectEvent.SELECTED, event =>
{ {
if(!userProfile) return; if(!userProfile) return;
if(event.category !== RoomObjectCategory.UNIT) return; if(event.category !== RoomObjectCategory.UNIT) return;
const userData = GetRoomSession().userDataManager.getUserDataByIndex(event.objectId); const userData = GetRoomSession().userDataManager.getUserDataByIndex(event.objectId);

View File

@ -265,7 +265,7 @@ const useCatalogState = () =>
const loadCatalogPage = useCallback((pageId: number, offerId: number) => const loadCatalogPage = useCallback((pageId: number, offerId: number) =>
{ {
if(pageId < 0) return; if(pageId < 0) return;
setIsBusy(true); setIsBusy(true);
setPageId(pageId); setPageId(pageId);
@ -285,9 +285,9 @@ const useCatalogState = () =>
for(const offer of catalogPage.offers) for(const offer of catalogPage.offers)
{ {
if(offer.offerId !== offerId) continue; if(offer.offerId !== offerId) continue;
setCurrentOffer(offer) setCurrentOffer(offer)
break; break;
} }
} }
@ -351,7 +351,7 @@ const useCatalogState = () =>
return nodes; return nodes;
}); });
if(targetNode.pageId > -1) loadCatalogPage(targetNode.pageId, offerId); if(targetNode.pageId > -1) loadCatalogPage(targetNode.pageId, offerId);
}, [ setActiveNodes, loadCatalogPage, cancelObjectMover ]); }, [ setActiveNodes, loadCatalogPage, cancelObjectMover ]);
@ -544,9 +544,9 @@ const useCatalogState = () =>
setPurchaseOptions(prevValue => setPurchaseOptions(prevValue =>
{ {
const newValue = { ...prevValue }; const newValue = { ...prevValue };
newValue.extraData =( offer.product.extraParam || null); newValue.extraData =( offer.product.extraParam || null);
return newValue; return newValue;
}); });
} }
@ -576,7 +576,7 @@ const useCatalogState = () =>
break; break;
} }
} }
petPalettes.push(petPalette); petPalettes.push(petPalette);
return { ...prevValue, petPalettes }; return { ...prevValue, petPalettes };
@ -636,7 +636,7 @@ const useCatalogState = () =>
} }
const message = LocalizeText(`inventory.marketplace.result.${ parser.result }`); const message = LocalizeText(`inventory.marketplace.result.${ parser.result }`);
simpleAlert(message, NotificationAlertType.DEFAULT, null, null, title); simpleAlert(message, NotificationAlertType.DEFAULT, null, null, title);
}); });
@ -674,11 +674,11 @@ const useCatalogState = () =>
{ {
const parser = event.getParser(); const parser = event.getParser();
setFurniLimit(parser._Str_15864); setFurniLimit(parser.furniLimit);
setMaxFurniLimit(parser._Str_24094); setMaxFurniLimit(parser.maxFurniLimit);
setSecondsLeft(parser._Str_3709); setSecondsLeft(parser.secondsLeft);
setUpdateTime(GetTickerTime()); setUpdateTime(GetTickerTime());
setSecondsLeftWithGrace(parser._Str_24379); setSecondsLeftWithGrace(parser.secondsLeftWithGrace);
refreshBuilderStatus(); refreshBuilderStatus();
}); });
@ -757,7 +757,7 @@ const useCatalogState = () =>
if(roomObject) roomObject.model.setValue(RoomObjectVariable.FURNITURE_ALPHA_MULTIPLIER, 0.5); if(roomObject) roomObject.model.setValue(RoomObjectVariable.FURNITURE_ALPHA_MULTIPLIER, 0.5);
if(catalogSkipPurchaseConfirmation) if(catalogSkipPurchaseConfirmation)
{ {
SendMessageComposer(new PurchaseFromCatalogComposer(pageId, purchasableOffer.offerId, product.extraParam, 1)); SendMessageComposer(new PurchaseFromCatalogComposer(pageId, purchasableOffer.offerId, product.extraParam, 1));
@ -832,7 +832,7 @@ const useCatalogState = () =>
{ {
return () => setCurrentOffer(null); return () => setCurrentOffer(null);
}, [ currentPage ]); }, [ currentPage ]);
useEffect(() => useEffect(() =>
{ {
if(!isVisible || !rootNode || !offersToNodes || !requestedPage.current) return; if(!isVisible || !rootNode || !offersToNodes || !requestedPage.current) return;
@ -881,7 +881,7 @@ const useCatalogState = () =>
setPurchaseOptions({ quantity: 1, extraData: null, extraParamRequired: false, previewStuffData: null }); setPurchaseOptions({ quantity: 1, extraData: null, extraParamRequired: false, previewStuffData: null });
}, [ currentOffer ]); }, [ currentOffer ]);
useEffect(() => useEffect(() =>
{ {
if(!isVisible || rootNode) return; if(!isVisible || rootNode) return;