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

Add TTTSelectRoles Hook #1341

Merged
merged 2 commits into from Mar 15, 2017

Conversation

Projects
None yet
6 participants
@GamefreakDE
Contributor

GamefreakDE commented Mar 14, 2017

Useful for addons that want to do custom calculations or stuff before the roles are selected.

@svdm

This comment has been minimized.

Collaborator

svdm commented Mar 14, 2017

I don't want addons to influence traitor selection, so you should either remove the choices and prev_roles tables, or make copies and pass those to the hook.

@GamefreakDE

This comment has been minimized.

Contributor

GamefreakDE commented Mar 14, 2017

Is there a bigger reason for this or do you just dislike addons modifying base game mode parts? I wanted to add a new Role and didn't want to override functions too much. I am still happy with the table copies, just wondering why you don't like that addons get the raw tables.

@markusmarkusz

This comment has been minimized.

Contributor

markusmarkusz commented Mar 15, 2017

He doesn't

like that addons get the raw tables

because he doesn't

want addons to influence traitor selection

@svdm svdm merged commit 6e91c9c into Facepunch:master Mar 15, 2017

@GamefreakDE

This comment has been minimized.

Contributor

GamefreakDE commented Apr 19, 2017

I know that its not good to ask you, svdm, here,and maybe you wont even read this, but I realized that my choice to add the hook at this place was a wrong decision, could I make another Pull request to move to hook under line 933? And would I be allowed to take the normal tables then because it doesnt influence traitor selecting anywhere? I made a dumb decision and I dont think that this hook as any use there.

@svdm

This comment has been minimized.

Collaborator

svdm commented Apr 19, 2017

What is the goal of the hook exactly? If it was called at the end of SelectRoles, you could pretty much just use TTTBeginRound instead.

@GamefreakDE

This comment has been minimized.

Contributor

GamefreakDE commented Apr 19, 2017

I wanted to add new roles to TTT, but now I realize how dumb that was because it's such a hard thing to do and it would require to change nearly the whole gamemode. Tbh I don't think this hook has any use so it can be deleted imo. Sorry, but I didn't though about my idea and just created this pull request without thinking about the result.

@xxx0365

This comment has been minimized.

xxx0365 commented Apr 20, 2017

About not wanting addons to influence traitor selection, they already can, so why not have a cleaner way of doing it?

svdm added a commit that referenced this pull request Apr 20, 2017

@monster010

This comment has been minimized.

monster010 commented Apr 24, 2017

@xxx0365 Because a cleaner was is better than a way that is dirty. Good Example: You shoot at a player, blood splashed, but he gets not damage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment