Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(spawn-manager): add spawn index show in menu #83

Merged
merged 1 commit into from
Jan 28, 2024

Conversation

SergeyShorokhov
Copy link
Collaborator

resolve #82

This commit refactors the menu creation in the "Menu_Editor" function of the "redm_spawns.sma" script. It improves readability by extracting the focus entity and spawn index calculations into separate variables. Additionally, a new helper function, "GetSpawnIndexByViewEntityIndex," is added to find the spawn index based on the view entity index. This function iterates through the entities and returns the spawn index if a match is found. Otherwise, it returns -1.

These changes enhance the code's clarity and maintainability while adding functionality for determining the spawn index by the view entity index.

…yViewEntityIndex

This commit refactors the menu creation in the "Menu_Editor" function of the "redm_spawns.sma" script. It improves readability by extracting the focus entity and spawn index calculations into separate variables. Additionally, a new helper function, "GetSpawnIndexByViewEntityIndex," is added to find the spawn index based on the view entity index. This function iterates through the entities and returns the spawn index if a match is found. Otherwise, it returns -1.

These changes enhance the code's clarity and maintainability while adding functionality for determining the spawn index by the view entity index.
@SergeyShorokhov SergeyShorokhov added enhancement New feature or request good first issue Good for newcomers labels Jan 28, 2024
@SergeyShorokhov SergeyShorokhov added this to the 1.0.0 milestone Jan 28, 2024
@SergeyShorokhov SergeyShorokhov self-assigned this Jan 28, 2024
@SergeyShorokhov SergeyShorokhov merged commit 1a858a1 into master Jan 28, 2024
1 check passed
@SergeyShorokhov SergeyShorokhov deleted the feature/spawns-editor-index-spawn branch January 28, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add spawn index show on spawns editor
1 participant