server: allow the permission level a client displays for itself to be set - #1431
server: allow the permission level a client displays for itself to be set#1431xRookieFight wants to merge 5 commits into
Conversation
func (p *Player) SetPermissionLevel(level session.PermissionLevel) {I believe this shouldn't be exposing the session package |
|
It's PermissionLevel on the official protocol docs, however I can rename it as ClientPermissionLevel or something if it is misleading. |
|
@HashimTheArab @didntpot @RestartFU is this the best way to do this? |
|
Should PermissionLevel be included in Data() as well? Since Config.Apply() now reads it back into the player, it seems like a level set with SetPermissionLevel() would be lost when the player data is saved/reloaded. |
|
One other small thing I noticed: StartGame still always sends PlayerPermissions as PermissionLevelMember in server.go. Should that initial value use the configured permission level too, or is it expected to be corrected later by UpdateAbilities? |
|
@schphe - exposing On the naming: I kept @cjmustard - @cjmustard - data.PlayerPermissions, _ = d.PermissionLevel.Permissions()
|
No description provided.