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

Add user tracking to EGP HUD #2624

Merged
merged 7 commits into from
Jun 22, 2023
Merged

Add user tracking to EGP HUD #2624

merged 7 commits into from
Jun 22, 2023

Conversation

Denneisk
Copy link
Member

E2 functions:

  • xwl:egpConnectedUsers() - Returns an array of users connected to an EGP.
  • xwl:egpHudToggle(n) - xwl:egpHudToggle() but with a specified on-state.

E2 events:

  • egpHudConnect(Screen:wirelink, Player:entity, Connected:number) called globally when a player connects or disconnects to an EGP HUD.

Fixes #2620

Also included a few other cleanups for EGP HUDs:

  • Removes usermessages and other deprecated functions
  • Optimized/simplified some things

Also removed deprecated and other cleanup from EGP HUDs
@Denneisk
Copy link
Member Author

Also I don't have friends and I don't know how to do the dev thing so I didn't test having more than one user. Would appreciate if someone could do that.

@Denneisk
Copy link
Member Author

Ah fancy linter

@thegrb93
Copy link
Contributor

Looks much cleaner, thanks. You also have some print and PrintTable in there still.

@Denneisk
Copy link
Member Author

Denneisk commented Jun 21, 2023

Ah, right. Had trouble with that function before realizing that events triggering at the same time as an E2 function breaks things for the running E2 chip.

@Vurv78
Copy link
Contributor

Vurv78 commented Jun 21, 2023

I don't think egpHudEnableSilent should be a separate function, should just have an overload egpHudEnable(nn) where the second number is 0 or nonzero for silent.

@Denneisk
Copy link
Member Author

I thought so, too, but then I wondered, when would people ever use that overload without setting the second argument to 1?

@thegrb93
Copy link
Contributor

The silent option shouldn't have been added. The print is always there for a reason.

@Denneisk
Copy link
Member Author

Well it annoys me, but if it's too big of an issue, I'll get rid of it.
Do I have to fix all of those lints, by the way?

@thegrb93
Copy link
Contributor

No, probably only going to enforce them for changes someone introduces.

@thegrb93
Copy link
Contributor

thegrb93 commented Jun 21, 2023

Entering a vehicle linked to an egp shouldn't be silent

@Denneisk
Copy link
Member Author

That was its behavior before. How about we split it 50/50 and have a convar?

@thegrb93
Copy link
Contributor

Yeah I guess you can have a client cvar to hide egp messages.

@thegrb93 thegrb93 merged commit e208e31 into wiremod:master Jun 22, 2023
@Denneisk Denneisk deleted the egp-users branch November 16, 2023 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EGP Hud method/function to determine which players have the hud open.
3 participants