Wired fix

This commit is contained in:
Bill 2022-07-27 10:16:56 -04:00
parent bdc912720c
commit 5cf49daaf8
2 changed files with 6 additions and 14 deletions

View File

@ -81,19 +81,6 @@ export const WiredBaseView: FC<PropsWithChildren<WiredBaseViewProps>> = props =>
return [];
});
}
return () =>
{
setNeedsSave(false);
setIntParams([]);
setStringParam(null);
setFurniIds(prevValue =>
{
if(prevValue && prevValue.length) WiredSelectionVisualizer.clearSelectionShaderFromFurni(prevValue);
return [];
});
}
}, [ trigger, hasSpecialInput, requiresFurni, setIntParams, setStringParam, setFurniIds ]);
return (

View File

@ -118,8 +118,13 @@ const useWiredState = () =>
{
setIntParams([]);
setStringParam('');
setFurniIds([]);
setActionDelay(0);
setFurniIds(prevValue =>
{
if(prevValue && prevValue.length) WiredSelectionVisualizer.clearSelectionShaderFromFurni(prevValue);
return [];
});
}
}, [ trigger ]);