Insprill / dv-multiplayer

A Derail Valley mod adding multiplayer to the game.
Apache License 2.0
33 stars 16 forks source link

Implement a permission system #18

Open Insprill opened 11 months ago

Insprill commented 11 months ago

A permission system should be implemented to allow for more open lobbies while preventing people from trolling.

Permission should be broken down into groups, with two by default. The 'Admin' group has all permissions, and the 'Default' group has limited permissions.

The admin group should not be able to be modified or deleted. The default group can be modified but cannot be deleted. Other groups can be added, modified, and deleted at will.

The UI for selecting what group a player is in would look something like the following.

Players Group
Insprill [x] Admin [ ] Default [ ] MyCustomGroup
ChaoticWagon [ ] Admin [x] Default [ ] MyCustomGroup
Wiz [x] Admin [ ] Default [x] MyCustomGroup

The UI for creating and deleting groups would look something like the following.

Groups
Admin
[x] Manual Switches
[x] Remote Switches
[x] Delete Cars
[x] Rerail Cars
Default
[x] Manual Switches
[ ] Remote Switches
[ ] Delete Cars
[x] Rerail Cars
+ Create Group

Permissions would exist for the following.

fauxnik commented 2 months ago

I might suggesting including an API that other mods can use to add additional permissions, ex: Rolling Stock Ownership adding a Purchase Cars permission.