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

Feature/tp2squadmate #24

Merged
merged 11 commits into from
Jul 22, 2023
Merged

Feature/tp2squadmate #24

merged 11 commits into from
Jul 22, 2023

Conversation

Crowdedlight
Copy link
Contributor

Pull request adds the Teleport To Squadmate feature together with some helpers used in this feature:

Teleport to squadmate allow GM to right-click a player and select what squadmate to teleport the player to. Makes it easy to move a lost or respawned player back to his squad.

  1. Adds ListBox dialog GUI. Can be re-used if a single-select listbox is needed elsewhere.
  2. Adds loghelper, to try and standardize format for error prints. (Only this PR is using is. If you agree it makes sense I can do another PR after this, that changes existing errorprints to use it).
  3. Adds GroupHelper to get group from player entity. (Thanks Kex! Using your RSA helper)

This feature does not work on AI or AI groups as it would require specific handling and at this point, AI can't be in groups with players anyway.

billede
billede

@Crowdedlight Crowdedlight added the feature Adds a new feature label Jul 2, 2023
Copy link
Member

@Kexanone Kexanone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to use this action while a team mate is in the respawn menu, produces a script error.

@Crowdedlight
Copy link
Contributor Author

Trying to use this action while a team mate is in the respawn menu, produces a script error.

I had forgotten a null check for dead players. Added now. Although if all squadmembers are dead now, so the list is empty, it just shows the empty list. Maybe would be better if empty list, to close the list and show hint to GM that there is no valid squadmembers to TP to?

@Kexanone
Copy link
Member

Trying to use this action while a team mate is in the respawn menu, produces a script error.

I had forgotten a null check for dead players. Added now. Although if all squadmembers are dead now, so the list is empty, it just shows the empty list. Maybe would be better if empty list, to close the list and show hint to GM that there is no valid squadmembers to TP to?

I would say either way is fine.

@Crowdedlight
Copy link
Contributor Author

Trying to use this action while a team mate is in the respawn menu, produces a script error.

I had forgotten a null check for dead players. Added now. Although if all squadmembers are dead now, so the list is empty, it just shows the empty list. Maybe would be better if empty list, to close the list and show hint to GM that there is no valid squadmembers to TP to?

I would say either way is fine.

I think I am just going to leave it be an empty menu for now. Only in rare cases it would happen. The other approach would require making some hint helper, to send localized hints to specific players over Rpl. As the context-action is run with IsServer so would need to somehow get dynamic playerID of the current zeus, and then rpc the show-hint function to that player_id. And not quite sure how to actually get current zeus, from a function run on the server.

@Crowdedlight Crowdedlight merged commit 4133b20 into develop Jul 22, 2023
@Kexanone Kexanone deleted the feature/tp2squadmate branch July 23, 2023 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants