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

Suggestion: Add maximum jail time #3232

Closed
KarlOfDuty opened this issue Apr 27, 2019 · 5 comments
Closed

Suggestion: Add maximum jail time #3232

KarlOfDuty opened this issue Apr 27, 2019 · 5 comments

Comments

@KarlOfDuty
Copy link
Contributor

Basically players are keeping others locked up indefinitely as they cannot get currency if they are repeatedly killed in jail. If residents were for instance automatically freed after one day if they cannot pay their bail this issue would be lessened.

@LlmDl
Copy link
Member

LlmDl commented Apr 28, 2019

Related: #2869

@DeadGlamour
Copy link

Yeah this is super needed and I think will be really nice to have

@LlmDl
Copy link
Member

LlmDl commented Aug 8, 2019

Agreed, the main thing is how it's implemented.

We cannot have a timer that runs to free players because if the time is set for too long it will fail after a server restart.

The alternative is that we have to store something on the resident itself, either a time or a number (of days/hours) after which the resident is freed.

I've been thinking of doing this and using towny days as the count. When a newday happens we cycle through the jailed residents and drop their day count by one, if they hit zero when a newday happens they go free. The downside to this is they cannot be jailed for shorter amounts of time and be auto-released. This isn't so much of an issue as mayors can free players if they want them to serve less than a day. It also means that if someone is jailed for a day right before a newday, that person goes free having served less than a day.

The other alternative is we have a timer that runs hourly or something which checks all jailed players and sees if enough time has passed since they were jailed. Which means we have to store the time they were jailed as well as how many hours/days they were jailed for.

Short answer is it will happen, long answer is I haven't decided which way to implement it that will be light-weight and still be fun.

@DeadGlamour
Copy link

It would also be nice if there was an option to make some players like new players immune to it

LlmDl added a commit that referenced this issue Oct 25, 2019
    - Town mayors may now jail for an optional amount of days.
    - On Towny newdays (when taxes/upkeep are collected) jailed players
who have a day amount set will have their day amount lowered by one.
    - Players who have served their sentence will be unjailed.
    - When the days amount is not used the player will be jailed
indefinetly as usual.
    - Remaining days are shown on a player's /res screen.
    - Closes ticket #3232
@LlmDl
Copy link
Member

LlmDl commented Oct 25, 2019

Done as of f887be8 will be a part of 0.95.0.4

  - Changed Command: /town toggle jail [jailnumber] [resident] (days)
    - Town mayors may now jail for an optional amount of days.
    - On Towny newdays (when taxes/upkeep are collected) jailed players who have a day amount set will have their day amount lowered by one.
    - Players who have served their sentence will be unjailed.
    - When the days amount is not used the player will be jailed indefinetly as usual.
    - Remaining days are shown on a player's /res screen. 
    - Closes ticket #3232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants