Feature Request 1143: Added 'coordinate' arg type for ESX.RegisterCommand() #1154
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature Enhancement: Introducing 'coordinate' Argument Type for setcoords Command
Description
This pull request introduces a new argument type, 'coordinate', to the existing
setcoords
command. The 'coordinate' argument type allows more flexible input formats for specifying coordinates, accommodating user feedback and enhancing usability. The changes are made in response to a feature request discussed in GitHub Issue #1143.Changes Made
In this pull request, a new argument type 'coordinate' has been added to the
setcoords
command. The code snippet for handling this argument type has been enhanced as follows:This allows users to provide coordinates in various formats such as:
Reasoning
The motivation behind this change is to enhance the user experience when utilizing the setcoords command. The feature request (#1143) highlighted the need for a more permissive coordinate input format to make the command more versatile and user-friendly. The new 'coordinate' argument type accommodates a wider range of coordinate representations, allowing users to input coordinates in a format that suits their preference. This change seeks to improve the overall usability and flexibility of the command, promoting a more intuitive interaction for users working with coordinates.
Inspiration
These improvements draw inspiration from the setCoords handler in txAdmin, which has demonstrated exceptional effectiveness in facilitating the use of multiple coordinate formats, greatly enhancing user convenience. The provided test cases are directly sourced from the txAdmin codebase, which serves as a reliable reference for the proposed enhancements.
Thank you for considering this enhancement to the setcoords command. Your feedback and suggestions are appreciated.
Related GitHub Issue #1143