Add validation for player start entity input bindings (keyboard and gamepad)
This commit is contained in:
@@ -2996,6 +2996,19 @@ function validatePlayerStartEntity(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
!isPlayerStartKeyboardBindingCode(entity.inputBindings?.keyboard.interact)
|
||||||
|
) {
|
||||||
|
diagnostics.push(
|
||||||
|
createDiagnostic(
|
||||||
|
"error",
|
||||||
|
"invalid-player-start-interact-keyboard-binding",
|
||||||
|
"Player Start interact keyboard binding must be a supported key or mouse code.",
|
||||||
|
`${path}.inputBindings.keyboard.interact`
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!isPlayerStartKeyboardBindingCode(entity.inputBindings?.keyboard.pauseTime)
|
!isPlayerStartKeyboardBindingCode(entity.inputBindings?.keyboard.pauseTime)
|
||||||
) {
|
) {
|
||||||
@@ -3092,6 +3105,19 @@ function validatePlayerStartEntity(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
!isPlayerStartGamepadActionBinding(entity.inputBindings?.gamepad.interact)
|
||||||
|
) {
|
||||||
|
diagnostics.push(
|
||||||
|
createDiagnostic(
|
||||||
|
"error",
|
||||||
|
"invalid-player-start-interact-gamepad-binding",
|
||||||
|
"Player Start interact gamepad binding must be a supported standard-gamepad action input.",
|
||||||
|
`${path}.inputBindings.gamepad.interact`
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!isPlayerStartGamepadActionBinding(entity.inputBindings?.gamepad.pauseTime)
|
!isPlayerStartGamepadActionBinding(entity.inputBindings?.gamepad.pauseTime)
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user