This commit is contained in:
Bill 2022-03-16 16:27:01 -04:00
commit 21082763ca
5 changed files with 21 additions and 4 deletions

View File

@ -59,6 +59,10 @@
"catalog.buy": "habbo_club", "catalog.buy": "habbo_club",
"catalog.gifts": "club_gifts" "catalog.gifts": "club_gifts"
}, },
"respect.options": {
"enabled": false,
"sound": "sound_respect_received"
},
"currency.display.number.short": false, "currency.display.number.short": false,
"currency.asset.icon.url": "${images.url}/wallet/%type%.png", "currency.asset.icon.url": "${images.url}/wallet/%type%.png",
"catalog.asset.url": "${image.library.url}catalogue", "catalog.asset.url": "${image.library.url}catalogue",

View File

@ -1,5 +1,5 @@
import { AvatarFigurePartType, AvatarScaleType, AvatarSetType, IAvatarImageListener, INitroPoint, IVector3D, NitroEvent, NitroPoint, PetFigureData, RoomObjectCategory, RoomObjectType, RoomObjectVariable, RoomSessionChatEvent, RoomWidgetEnum, SystemChatStyleEnum, TextureUtils, Vector3d } from '@nitrots/nitro-renderer'; import { AvatarFigurePartType, AvatarScaleType, AvatarSetType, IAvatarImageListener, INitroPoint, IVector3D, NitroEvent, NitroPoint, PetFigureData, RoomObjectCategory, RoomObjectType, RoomObjectVariable, RoomSessionChatEvent, RoomWidgetEnum, SystemChatStyleEnum, TextureUtils, Vector3d } from '@nitrots/nitro-renderer';
import { GetAvatarRenderManager, GetRoomEngine } from '../../../..'; import { GetAvatarRenderManager, GetConfigurationManager, GetRoomEngine, PlaySound } from '../../../..';
import { LocalizeText } from '../../../../utils/LocalizeText'; import { LocalizeText } from '../../../../utils/LocalizeText';
import { RoomWidgetUpdateChatEvent, RoomWidgetUpdateEvent } from '../events'; import { RoomWidgetUpdateChatEvent, RoomWidgetUpdateEvent } from '../events';
import { RoomWidgetMessage } from '../messages'; import { RoomWidgetMessage } from '../messages';
@ -64,6 +64,8 @@ export class RoomWidgetChatHandler extends RoomWidgetHandler implements IAvatarI
{ {
case RoomSessionChatEvent.CHAT_TYPE_RESPECT: case RoomSessionChatEvent.CHAT_TYPE_RESPECT:
text = LocalizeText('widgets.chatbubble.respect', [ 'username' ], [ username ]); text = LocalizeText('widgets.chatbubble.respect', [ 'username' ], [ username ]);
if(GetConfigurationManager().getValue('respect.options')['enabled'])
PlaySound(GetConfigurationManager().getValue('respect.options')['sound'])
break; break;
case RoomSessionChatEvent.CHAT_TYPE_PETRESPECT: case RoomSessionChatEvent.CHAT_TYPE_PETRESPECT:
text = LocalizeText('widget.chatbubble.petrespect', [ 'petname' ], [ username ]); text = LocalizeText('widget.chatbubble.petrespect', [ 'petname' ], [ username ]);

View File

@ -1,5 +1,5 @@
import { HabboWebTools, RoomEnterEffect } from '@nitrots/nitro-renderer'; import { HabboWebTools, RoomEnterEffect } from '@nitrots/nitro-renderer';
import { CreateLinkEvent, GetConfiguration, GetNitroInstance, LocalizeText } from '..'; import { CreateLinkEvent, GetConfiguration, GetNitroInstance, LocalizeText, PlaySound } from '..';
import { NotificationAlertEvent, NotificationConfirmEvent } from '../../events'; import { NotificationAlertEvent, NotificationConfirmEvent } from '../../events';
import { NotificationBubbleEvent } from '../../events/notification-center/NotificationBubbleEvent'; import { NotificationBubbleEvent } from '../../events/notification-center/NotificationBubbleEvent';
import { DispatchUiEvent } from '../../hooks'; import { DispatchUiEvent } from '../../hooks';
@ -85,6 +85,8 @@ export class NotificationUtilities
{ {
this.simpleAlert(message, NotificationAlertType.EVENT, linkUrl, linkTitle, title, image); this.simpleAlert(message, NotificationAlertType.EVENT, linkUrl, linkTitle, title, image);
} }
if(options.get('sound')) PlaySound(options.get('sound'));
} }
public static showSingleBubble(message: string, type: string, imageUrl: string = null, internalLink: string = null): void public static showSingleBubble(message: string, type: string, imageUrl: string = null, internalLink: string = null): void

View File

@ -59,12 +59,13 @@ export const ModToolsRoomView: FC<ModToolsRoomViewProps> = props =>
if(message.trim().length === 0) return; if(message.trim().length === 0) return;
SendMessageComposer(new ModeratorActionMessageComposer(ModeratorActionMessageComposer.ACTION_ALERT, message, '')); SendMessageComposer(new ModeratorActionMessageComposer(ModeratorActionMessageComposer.ACTION_ALERT, message, ''));
SendMessageComposer(new ModerateRoomMessageComposer(roomId, lockRoom ? 1 : 0, changeRoomName ? 1 : 0, kickUsers ? 1 : 0));
return; return;
case 'send_message': case 'send_message':
if(message.trim().length === 0) return; if(message.trim().length === 0) return;
SendMessageComposer(new ModeratorActionMessageComposer(ModeratorActionMessageComposer.ACTION_MESSAGE, message, '')); SendMessageComposer(new ModeratorActionMessageComposer(ModeratorActionMessageComposer.ACTION_MESSAGE, message, ''));
SendMessageComposer(new ModerateRoomMessageComposer(roomId, lockRoom ? 1 : 0, changeRoomName ? 1 : 0, kickUsers ? 1 : 0)) SendMessageComposer(new ModerateRoomMessageComposer(roomId, lockRoom ? 1 : 0, changeRoomName ? 1 : 0, kickUsers ? 1 : 0));
return; return;
} }
}, [ changeRoomName, kickUsers, lockRoom, message, roomId ]); }, [ changeRoomName, kickUsers, lockRoom, message, roomId ]);

View File

@ -33,6 +33,7 @@ export const InfoStandWidgetFurniView: FC<InfoStandWidgetFurniViewProps> = props
const [ crackableHits, setCrackableHits ] = useState(0); const [ crackableHits, setCrackableHits ] = useState(0);
const [ crackableTarget, setCrackableTarget ] = useState(0); const [ crackableTarget, setCrackableTarget ] = useState(0);
const [ godMode, setGodMode ] = useState(false); const [ godMode, setGodMode ] = useState(false);
const [ canSeeFurniId, setCanSeeFurniId ] = useState(false);
const [ groupName, setGroupName ] = useState<string>(null); const [ groupName, setGroupName ] = useState<string>(null);
useEffect(() => useEffect(() =>
@ -49,6 +50,7 @@ export const InfoStandWidgetFurniView: FC<InfoStandWidgetFurniViewProps> = props
let crackableHits = 0; let crackableHits = 0;
let crackableTarget = 0; let crackableTarget = 0;
let godMode = false; let godMode = false;
let canSeeFurniId = false;
const isValidController = (furniData.roomControllerLevel >= RoomControllerLevel.GUEST); const isValidController = (furniData.roomControllerLevel >= RoomControllerLevel.GUEST);
@ -60,6 +62,11 @@ export const InfoStandWidgetFurniView: FC<InfoStandWidgetFurniViewProps> = props
if(furniData.roomControllerLevel >= RoomControllerLevel.MODERATOR) godMode = true; if(furniData.roomControllerLevel >= RoomControllerLevel.MODERATOR) godMode = true;
} }
if(furniData.isAnyRoomController)
{
canSeeFurniId = true;
}
if((((furniData.usagePolicy === RoomWidgetFurniInfoUsagePolicyEnum.EVERYBODY) || ((furniData.usagePolicy === RoomWidgetFurniInfoUsagePolicyEnum.CONTROLLER) && isValidController)) || ((furniData.extraParam === RoomWidgetEnumItemExtradataParameter.JUKEBOX) && isValidController)) || ((furniData.extraParam === RoomWidgetEnumItemExtradataParameter.USABLE_PRODUCT) && isValidController)) canUse = true; if((((furniData.usagePolicy === RoomWidgetFurniInfoUsagePolicyEnum.EVERYBODY) || ((furniData.usagePolicy === RoomWidgetFurniInfoUsagePolicyEnum.CONTROLLER) && isValidController)) || ((furniData.extraParam === RoomWidgetEnumItemExtradataParameter.JUKEBOX) && isValidController)) || ((furniData.extraParam === RoomWidgetEnumItemExtradataParameter.USABLE_PRODUCT) && isValidController)) canUse = true;
if(furniData.extraParam) if(furniData.extraParam)
@ -133,6 +140,7 @@ export const InfoStandWidgetFurniView: FC<InfoStandWidgetFurniViewProps> = props
setCrackableHits(crackableHits); setCrackableHits(crackableHits);
setCrackableTarget(crackableTarget); setCrackableTarget(crackableTarget);
setGodMode(godMode); setGodMode(godMode);
setCanSeeFurniId(canSeeFurniId);
setGroupName(null); setGroupName(null);
}); });
@ -312,7 +320,7 @@ export const InfoStandWidgetFurniView: FC<InfoStandWidgetFurniViewProps> = props
{ godMode && { godMode &&
<> <>
<hr className="m-0" /> <hr className="m-0" />
<Text small wrap variant="white">ID: { furniData.id }</Text> { canSeeFurniId && <Text small wrap variant="white">ID: { furniData.id }</Text> }
{ (furniKeys.length > 0) && { (furniKeys.length > 0) &&
<> <>
<hr className="m-0"/> <hr className="m-0"/>