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 request: Add a field or table for clan rights. #319

Open
BillTheBeast opened this issue Nov 4, 2024 · 2 comments
Open

Feature request: Add a field or table for clan rights. #319

BillTheBeast opened this issue Nov 4, 2024 · 2 comments
Assignees
Labels
feature New feature to add

Comments

@BillTheBeast
Copy link

BillTheBeast commented Nov 4, 2024

What do you want to see in the API?

One of the things currently missing from the Clan Data is the rights that each of the members of the clan has.
As it stands these rights are:
Ability a modify the SoulHome.
Ability to start a vote to sell an item to standard market.
Ability to start a vote to put an item to flea market.
Ability to modify the Clans logo.
Ability to change the clan motto. (Personally unsure about this, but this is what Helena wrote)
Creation of different roles and modification of the rights for these roles. (This can be done on a later date.)

Also the numbers of votes each role can start is set inside the rights.

How do you think this should work?

By default there are tree different roles, Leader, Elder and Member. By default Leader has all rights and the rest can be set while creating a clan.
These rights are effectively enums and the roles that has those rights are set as bitflags (integers). As such binary values determine if a role has a that right.

Ie. rights: {"SoulhomeModify": 3, (Leader and Elder has this right, binary:"011")
"ItemSellMarket": 7 (Everybody has this right, binary:"111"),
allowedVoteStart: {Leader: 10,
Elder: 6,
Member: 2}
}

Any additional info?

The method to add new roles can be figured out on a later date. Propably through some sort of binding names to enum values.

It can also be thought about if it would be easier to flip the rights and roles the other ways around. (Ie. Roles are normal enums and right fields are bitflags.)

@MikhailDeriabin
Copy link
Member

Ok, we will see what we can do. I am not sure how fast it will be implemented, but some in-between solution as storing these rights settings in DB, but ignoring them in API logic can be relatively fast task to do.

@BillTheBeast
Copy link
Author

This isn't currently in a massive hurry, I just gave you some info on the structure of how I would like it to be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature to add
Projects
Status: Backlog
Development

No branches or pull requests

2 participants