Fix WiredFurniType names

This commit is contained in:
MyNameIsBatman 2021-06-28 19:10:42 -03:00
parent 2e5478481d
commit 056deea4cb
22 changed files with 26 additions and 26 deletions

View File

@ -10,10 +10,10 @@ export class WiredLayoutViewProps
export class WiredFurniType
{
public static _Str_5431: number = 0;
public static _Str_4873: number = 1;
public static _Str_4991: number = 2;
public static _Str_5430: number = 3;
public static STUFF_SELECTION_OPTION_NONE: number = 0;
public static STUFF_SELECTION_OPTION_BY_ID: number = 1;
public static STUFF_SELECTION_OPTION_BY_ID_OR_BY_TYPE: number = 2;
public static STUFF_SELECTION_OPTION_BY_ID_BY_TYPE_OR_FROM_CONTEXT: number = 3;
}
export const WIRED_STRING_DELIMETER: string = '\t';

View File

@ -10,7 +10,7 @@ import { WiredActionBaseViewProps } from './WiredActionBaseView.types';
export const WiredActionBaseView: FC<WiredActionBaseViewProps> = props =>
{
const { requiresFurni = WiredFurniType._Str_5431, save = null, children = null } = props;
const { requiresFurni = WiredFurniType.STUFF_SELECTION_OPTION_NONE, save = null, children = null } = props;
const [ delay, setDelay ] = useState(-1);
const { trigger = null, setActionDelay = null } = useWiredContext();

View File

@ -33,7 +33,7 @@ export const WiredActionBotChangeFigureView: FC<{}> = props =>
}, [ botName, figure, setStringParam ]);
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_5431 } save={ save }>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_NONE } save={ save }>
<div className="form-group">
<label>{ LocalizeText('wiredfurni.params.bot.name') }</label>
<input type="text" className="form-control form-control-sm" maxLength={ 32 } value={ botName } onChange={ event => setBotName(event.target.value) } />

View File

@ -23,7 +23,7 @@ export const WiredActionBotFollowAvatarView: FC<{}> = props =>
}, [ followMode, botName, setStringParam, setIntParams ]);
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_5431 } save={ save }>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_NONE } save={ save }>
<div className="form-group mb-2">
<label>{ LocalizeText('wiredfurni.params.bot.name') }</label>
<input type="text" className="form-control form-control-sm" maxLength={ 32 } value={ botName } onChange={ event => setBotName(event.target.value) } />

View File

@ -25,7 +25,7 @@ export const WiredActionBotGiveHandItemView: FC<{}> = props =>
}, [ handItemId, botName, setStringParam, setIntParams ]);
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_5431 } save={ save }>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_NONE } save={ save }>
<div className="form-group mb-2">
<label>{ LocalizeText('wiredfurni.params.bot.name') }</label>
<input type="text" className="form-control form-control-sm" maxLength={ 32 } value={ botName } onChange={ event => setBotName(event.target.value) } />

View File

@ -20,7 +20,7 @@ export const WiredActionBotMoveView: FC<{}> = props =>
}, [ botName, setStringParam ]);
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_4873 } save={ save }>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_BY_ID } save={ save }>
<div className="form-group">
<label>{ LocalizeText('wiredfurni.params.bot.name') }</label>
<input type="text" className="form-control form-control-sm" maxLength={ 32 } value={ botName } onChange={ event => setBotName(event.target.value) } />

View File

@ -28,7 +28,7 @@ export const WiredActionBotTalkToAvatarView: FC<{}> = props =>
}, [ botName, message, talkMode, setStringParam, setIntParams ]);
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_5431 } save={ save }>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_NONE } save={ save }>
<div className="form-group mb-2">
<label>{ LocalizeText('wiredfurni.params.bot.name') }</label>
<input type="text" className="form-control form-control-sm" maxLength={ 32 } value={ botName } onChange={ event => setBotName(event.target.value) } />

View File

@ -28,7 +28,7 @@ export const WiredActionBotTalkView: FC<{}> = props =>
}, [ botName, message, talkMode, setStringParam, setIntParams ]);
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_5431 } save={ save }>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_NONE } save={ save }>
<div className="form-group mb-2">
<label>{ LocalizeText('wiredfurni.params.bot.name') }</label>
<input type="text" className="form-control form-control-sm" maxLength={ 32 } value={ botName } onChange={ event => setBotName(event.target.value) } />

View File

@ -20,7 +20,7 @@ export const WiredActionBotTeleportView: FC<{}> = props =>
}, [ botName, setStringParam ]);
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_4873 } save={ save }>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_BY_ID } save={ save }>
<div className="form-group">
<label>{ LocalizeText('wiredfurni.params.bot.name') }</label>
<input type="text" className="form-control form-control-sm" maxLength={ 32 } value={ botName } onChange={ event => setBotName(event.target.value) } />

View File

@ -5,6 +5,6 @@ import { WiredActionBaseView } from '../base/WiredActionBaseView';
export const WiredActionCallAnotherStackView: FC<{}> = props =>
{
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_5430 } save={ null }></WiredActionBaseView>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_BY_ID_BY_TYPE_OR_FROM_CONTEXT } save={ null }></WiredActionBaseView>
);
}

View File

@ -5,6 +5,6 @@ import { WiredActionBaseView } from '../base/WiredActionBaseView';
export const WiredActionChaseView: FC<{}> = props =>
{
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_5430 } save={ null }></WiredActionBaseView>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_BY_ID_BY_TYPE_OR_FROM_CONTEXT } save={ null }></WiredActionBaseView>
);
}

View File

@ -20,7 +20,7 @@ export const WiredActionChatView: FC<{}> = props =>
}, [ message, setStringParam ]);
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_5431 } save={ save }>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_NONE } save={ save }>
<div className="form-group">
<label>{ LocalizeText('wiredfurni.params.message') }</label>
<input type="text" className="form-control form-control-sm" value={ message } onChange={ event => setMessage(event.target.value) } />

View File

@ -5,6 +5,6 @@ import { WiredActionBaseView } from '../base/WiredActionBaseView';
export const WiredActionFleeView: FC<{}> = props =>
{
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_5430 } save={ null }></WiredActionBaseView>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_BY_ID_BY_TYPE_OR_FROM_CONTEXT } save={ null }></WiredActionBaseView>
);
}

View File

@ -20,7 +20,7 @@ export const WiredActionJoinTeamView: FC<{}> = props =>
}, [ selectedTeam, setIntParams ]);
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_5431 } save={ save }>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_NONE } save={ save }>
{ [1, 2, 3, 4].map(team =>
{
return (

View File

@ -20,7 +20,7 @@ export const WiredActionKickFromRoomView: FC<{}> = props =>
}, [ message, setStringParam ]);
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_5431 } save={ save }>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_NONE } save={ save }>
<div className="form-group">
<label>{ LocalizeText('wiredfurni.params.message') }</label>
<input type="text" className="form-control form-control-sm" value={ message } onChange={ event => setMessage(event.target.value) } />

View File

@ -5,6 +5,6 @@ import { WiredActionBaseView } from '../base/WiredActionBaseView';
export const WiredActionLeaveTeamView: FC<{}> = props =>
{
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_5431 } save={ null }></WiredActionBaseView>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_NONE } save={ null }></WiredActionBaseView>
);
}

View File

@ -56,7 +56,7 @@ export const WiredActionMoveFurniView: FC<{}> = props =>
}, [ movement, rotation, setIntParams ]);
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_4873 } save={ save }>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_BY_ID } save={ save }>
<div className="fw-bold">{ LocalizeText('wiredfurni.params.movefurni') }</div>
<div className="form-check">
<input className="form-check-input" type="radio" name="selectedTeam" id="movement0" checked={ movement === 0 } onChange={() => setMovement(0)} />

View File

@ -5,6 +5,6 @@ import { WiredActionBaseView } from '../base/WiredActionBaseView';
export const WiredActionResetView: FC<{}> = props =>
{
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_5431 } save={ null }></WiredActionBaseView>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_NONE } save={ null }></WiredActionBaseView>
);
}

View File

@ -24,7 +24,7 @@ export const WiredActionSetFurniStateToView: FC<{}> = props =>
}, [ directionFlag, positionFlag, setIntParams, stateFlag ]);
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_4873 } save={ save }>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_BY_ID } save={ save }>
<div className="form-check">
<input className="form-check-input" type="checkbox" id="stateFlag" onChange={(e) => setStateFlag(e.target.checked ? 1 : 0)} />
<label className="form-check-label" htmlFor="stateFlag">

View File

@ -5,6 +5,6 @@ import { WiredActionBaseView } from '../base/WiredActionBaseView';
export const WiredActionTeleportView: FC<{}> = props =>
{
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_5430 } save={ null }></WiredActionBaseView>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_BY_ID_BY_TYPE_OR_FROM_CONTEXT } save={ null }></WiredActionBaseView>
);
}

View File

@ -5,6 +5,6 @@ import { WiredActionBaseView } from '../base/WiredActionBaseView';
export const WiredActionToggleFurniStateView: FC<{}> = props =>
{
return (
<WiredActionBaseView requiresFurni={ WiredFurniType._Str_5430 } save={ null }></WiredActionBaseView>
<WiredActionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_BY_ID_BY_TYPE_OR_FROM_CONTEXT } save={ null }></WiredActionBaseView>
);
}

View File

@ -10,7 +10,7 @@ import { WiredBaseViewProps } from './WiredBaseView.types';
export const WiredBaseView: FC<WiredBaseViewProps> = props =>
{
const { wiredType = '', requiresFurni = WiredFurniType._Str_5431, save = null, children = null } = props;
const { wiredType = '', requiresFurni = WiredFurniType.STUFF_SELECTION_OPTION_NONE, save = null, children = null } = props;
const [ wiredName, setWiredName ] = useState<string>(null);
const [ wiredDescription, setWiredDescription ] = useState<string>(null);
const { trigger = null, setTrigger = null, setIntParams = null, setStringParam = null, setFurniIds = null } = useWiredContext();
@ -64,7 +64,7 @@ export const WiredBaseView: FC<WiredBaseViewProps> = props =>
<div>
{ children }
</div>
{ (requiresFurni !== WiredFurniType._Str_5431) &&
{ (requiresFurni !== WiredFurniType.STUFF_SELECTION_OPTION_NONE) &&
<>
<hr className="my-1 mb-2 bg-dark" />
<div className="fw-bold">{ LocalizeText('wiredfurni.pickfurnis.caption', [ 'count', 'limit' ], [ '0', '0' ]) }</div>