-
-
Notifications
You must be signed in to change notification settings - Fork 389
Description
Please explain your feature request to the best of your abilities:
I'd like to be able to demote mayors of a town with a certain logic that takes the play_one_minute statistic into consideration as well as the last online time. This would take the order of mayoral succession into account and delete the town if no successor was found.
Basically I imagine it to work a little something like this:
- Mayors of all towns are being checked for the following criteria: play_one_minute statistic and last online time
- The config would give certain boundaries of the two things checked above (like if you've played less than 4 hours and have been last online more than 14 days ago)
- If the criteria both match, a new mayor is declared based on the
order_of_mayoral_succession - If no successor to the mayor is found above, the town is deleted
LlmDl also realized that he though the order of mayoral succession took into account when a resident joined the town but it turns out that's not the case, perhaps it's something that could be fixed within this issue as well
Edit 1:
The config should also allow for multiple sets of criteria. A little something like this:
mayor_settings:
delete_old_mayors:
enable: 'true'
deleted_after:
- time_played: 4h
delete_town_after: 14d
- time_played: 12h
delete_town_after: 30d
- time_played: 36h
delete_town_after: 60d
- time_played: infinite
delete_town_after: 100dWhich would result in any mayor being demoted that has:
- play_one_minute statistic <= 4 hours AND was last online 14 days ago or more
- play_one_minute statistic > 4 hours AND play_one_minute statistic <= 12 hours AND was last online 30 days ago or more
- play_one_minute statistic > 12 hours AND play_one_minute statistic <= 36 hours AND was last online 60 days ago or more
- play_one_minute statistic > 36 hours days AND was last online 100 days ago or more
Another thing to take into consideration is successors. They should also be checked for these criteria before being promoted so it doesn't take an extra day for the successor to then be demoted and the next successor taking over (or the town being deleted).
If more details are needed, don't hesitate to ask :)