🆕 Added wired wf_slc_furni_bytype

This commit is contained in:
duckietm
2026-03-05 10:52:40 +01:00
parent f7737c0d6b
commit a53d788daf
5 changed files with 213 additions and 7 deletions
@@ -11,11 +11,12 @@ export interface WiredActionBaseViewProps
requiresFurni: number;
save: () => void;
cardStyle?: CSSProperties;
hideDelay?: boolean;
}
export const WiredActionBaseView: FC<PropsWithChildren<WiredActionBaseViewProps>> = props =>
{
const { requiresFurni = WiredFurniType.STUFF_SELECTION_OPTION_NONE, save = null, hasSpecialInput = false, children = null, cardStyle = undefined } = props;
const { requiresFurni = WiredFurniType.STUFF_SELECTION_OPTION_NONE, save = null, hasSpecialInput = false, children = null, cardStyle = undefined, hideDelay = false } = props;
const { trigger = null, actionDelay = 0, setActionDelay = null } = useWired();
useEffect(() =>
@@ -26,15 +27,15 @@ export const WiredActionBaseView: FC<PropsWithChildren<WiredActionBaseViewProps>
return (
<WiredBaseView hasSpecialInput={ hasSpecialInput } requiresFurni={ requiresFurni } save={ save } wiredType="action" cardStyle={ cardStyle }>
{ children }
{ !!children && <hr className="m-0 bg-dark" /> }
<div className="flex flex-col">
{ !hideDelay && !!children && <hr className="m-0 bg-dark" /> }
{ !hideDelay && <div className="flex flex-col">
<Text bold>{ LocalizeText('wiredfurni.params.delay', [ 'seconds' ], [ GetWiredTimeLocale(actionDelay) ]) }</Text>
<Slider
max={ 20 }
min={ 0 }
value={ actionDelay }
onChange={ event => setActionDelay(event) } />
</div>
</div> }
</WiredBaseView>
);
};
@@ -2,6 +2,7 @@ import { WiredActionLayoutCode } from '../../../../api';
import { WiredActionBotChangeFigureView } from './WiredActionBotChangeFigureView';
import { WiredActionFurniAreaView } from '../selectors/WiredActionFurniAreaView';
import { WiredSelectorFurniNeighborhoodView } from '../selectors/WiredSelectorFurniNeighborhoodView';
import { WiredSelectorFurniByTypeView } from '../selectors/WiredSelectorFurniByTypeView';
import { WiredActionBotFollowAvatarView } from './WiredActionBotFollowAvatarView';
import { WiredActionBotGiveHandItemView } from './WiredActionBotGiveHandItemView';
import { WiredActionBotMoveView } from './WiredActionBotMoveView';
@@ -85,6 +86,8 @@ export const WiredActionLayoutView = (code: number) =>
return <WiredActionFurniAreaView />;
case WiredActionLayoutCode.FURNI_NEIGHBORHOOD_SELECTOR:
return <WiredSelectorFurniNeighborhoodView />;
case WiredActionLayoutCode.FURNI_BYTYPE_SELECTOR:
return <WiredSelectorFurniByTypeView />;
}
return null;