Add pause functionality validation in scene document
This commit is contained in:
@@ -239,6 +239,7 @@ import {
|
|||||||
PLAYER_START_GAMEPAD_BINDINGS,
|
PLAYER_START_GAMEPAD_BINDINGS,
|
||||||
PLAYER_START_LOCOMOTION_ACTIONS,
|
PLAYER_START_LOCOMOTION_ACTIONS,
|
||||||
PLAYER_START_MOVEMENT_ACTIONS,
|
PLAYER_START_MOVEMENT_ACTIONS,
|
||||||
|
PLAYER_START_SYSTEM_ACTIONS,
|
||||||
PLAYER_START_NAVIGATION_MODES,
|
PLAYER_START_NAVIGATION_MODES,
|
||||||
DEFAULT_SPOT_LIGHT_ANGLE_DEGREES,
|
DEFAULT_SPOT_LIGHT_ANGLE_DEGREES,
|
||||||
DEFAULT_SPOT_LIGHT_COLOR_HEX,
|
DEFAULT_SPOT_LIGHT_COLOR_HEX,
|
||||||
@@ -279,6 +280,7 @@ import {
|
|||||||
type PlayerStartKeyboardBindingCode,
|
type PlayerStartKeyboardBindingCode,
|
||||||
type PlayerStartLocomotionAction,
|
type PlayerStartLocomotionAction,
|
||||||
type PlayerStartMovementAction,
|
type PlayerStartMovementAction,
|
||||||
|
type PlayerStartSystemAction,
|
||||||
type PlayerStartMovementTemplate,
|
type PlayerStartMovementTemplate,
|
||||||
type PlayerStartNavigationMode,
|
type PlayerStartNavigationMode,
|
||||||
type EntityInstance,
|
type EntityInstance,
|
||||||
@@ -543,6 +545,8 @@ function getPlayerStartInputActionLabel(
|
|||||||
return "Sprint";
|
return "Sprint";
|
||||||
case "crouch":
|
case "crouch":
|
||||||
return "Crouch";
|
return "Crouch";
|
||||||
|
case "pauseTime":
|
||||||
|
return "Pause";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -616,6 +620,8 @@ function formatPlayerStartGamepadActionBindingLabel(
|
|||||||
return "West Button";
|
return "West Button";
|
||||||
case "buttonNorth":
|
case "buttonNorth":
|
||||||
return "North Button";
|
return "North Button";
|
||||||
|
case "buttonMenu":
|
||||||
|
return "Menu / Start";
|
||||||
case "leftShoulder":
|
case "leftShoulder":
|
||||||
return "Left Shoulder";
|
return "Left Shoulder";
|
||||||
case "rightShoulder":
|
case "rightShoulder":
|
||||||
|
|||||||
@@ -2024,6 +2024,19 @@ function validatePlayerStartEntity(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
!isPlayerStartKeyboardBindingCode(entity.inputBindings?.keyboard.pauseTime)
|
||||||
|
) {
|
||||||
|
diagnostics.push(
|
||||||
|
createDiagnostic(
|
||||||
|
"error",
|
||||||
|
"invalid-player-start-pause-keyboard-binding",
|
||||||
|
"Player Start pause keyboard binding must be a supported key code.",
|
||||||
|
`${path}.inputBindings.keyboard.pauseTime`
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (!isPlayerStartGamepadBinding(entity.inputBindings?.gamepad.moveForward)) {
|
if (!isPlayerStartGamepadBinding(entity.inputBindings?.gamepad.moveForward)) {
|
||||||
diagnostics.push(
|
diagnostics.push(
|
||||||
createDiagnostic(
|
createDiagnostic(
|
||||||
@@ -2107,6 +2120,19 @@ function validatePlayerStartEntity(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
!isPlayerStartGamepadActionBinding(entity.inputBindings?.gamepad.pauseTime)
|
||||||
|
) {
|
||||||
|
diagnostics.push(
|
||||||
|
createDiagnostic(
|
||||||
|
"error",
|
||||||
|
"invalid-player-start-pause-gamepad-binding",
|
||||||
|
"Player Start pause gamepad binding must be a supported standard-gamepad action input.",
|
||||||
|
`${path}.inputBindings.gamepad.pauseTime`
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!isPlayerStartGamepadCameraLookBinding(
|
!isPlayerStartGamepadCameraLookBinding(
|
||||||
entity.inputBindings?.gamepad.cameraLook
|
entity.inputBindings?.gamepad.cameraLook
|
||||||
|
|||||||
Reference in New Issue
Block a user