mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 23:16:21 +00:00
🆕 wf_act_send_signal & wf_trg_recv_signal
the signal sender can only be a max of 25 in a room
the signal receiver can only be a max of 5 in a room
one signal receiver can only accept a max of 5 senders (you can select the receivers with the senders)
Why : otherwise you can flood the rooms and let you CPU go 🍌
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ConditionDefinition, GetRoomEngine, GetSessionDataManager, OpenMessageComposer, RoomObjectCategory, RoomObjectVariable, Triggerable, TriggerDefinition, UpdateActionMessageComposer, UpdateConditionMessageComposer, UpdateTriggerMessageComposer, WiredActionDefinition, WiredFurniActionEvent, WiredFurniConditionEvent, WiredFurniTriggerEvent, WiredOpenEvent, WiredSaveSuccessEvent } from '@nitrots/nitro-renderer';
|
||||
import { ConditionDefinition, GetRoomEngine, GetSessionDataManager, OpenMessageComposer, RoomObjectCategory, RoomObjectVariable, Triggerable, TriggerDefinition, UpdateActionMessageComposer, UpdateConditionMessageComposer, UpdateTriggerMessageComposer, WiredActionDefinition, WiredFurniActionEvent, WiredFurniConditionEvent, WiredFurniTriggerEvent, WiredOpenEvent, WiredSaveSuccessEvent, WiredValidationErrorEvent } from '@nitrots/nitro-renderer';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useBetween } from 'use-between';
|
||||
import { GetRoomSession, IsOwnerOfFloorFurniture, LocalizeText, SendMessageComposer, WiredFurniType, WiredSelectionVisualizer } from '../../api';
|
||||
@@ -17,7 +17,7 @@ const useWiredState = () =>
|
||||
const [ invertSelection, setInvertSelection ] = useState<boolean>(false);
|
||||
const [ neighborhoodTiles, setNeighborhoodTiles ] = useState<{ x: number; y: number }[] | null>(null);
|
||||
const [ neighborhoodInvert, setNeighborhoodInvert ] = useState<boolean>(false);
|
||||
const { showConfirm = null } = useNotification();
|
||||
const { showConfirm = null, simpleAlert = null } = useNotification();
|
||||
|
||||
const saveWired = () =>
|
||||
{
|
||||
@@ -169,6 +169,16 @@ const useWiredState = () =>
|
||||
setTrigger(null);
|
||||
});
|
||||
|
||||
useMessageEvent<WiredValidationErrorEvent>(WiredValidationErrorEvent, event =>
|
||||
{
|
||||
const parser = event.getParser();
|
||||
|
||||
if(parser.info && parser.info.length)
|
||||
{
|
||||
simpleAlert(parser.info, null, null, null, LocalizeText('wiredfurni.title'));
|
||||
}
|
||||
});
|
||||
|
||||
useMessageEvent<WiredFurniActionEvent>(WiredFurniActionEvent, event =>
|
||||
{
|
||||
const parser = event.getParser();
|
||||
|
||||
Reference in New Issue
Block a user