Deleting characters (#83989)

## About The Pull Request

Adds a button to delete characters, and when deleted it flips to the
nearest character, wow(the last character can't be deleted(I guess)).

### Video: 

https://github.com/tgstation/tgstation/assets/78199449/3ad1157a-6c1c-4fb2-9b0d-1da791cad989

## Why It's Good For The Game

Once you know how to create characters, you sometimes want to be able to
delete them.
The reasons for this can be... as simple as freeing up a slot, or
deleting them in order to remake them.
I think this is quite a useful feature that should have been there
before.

## Changelog

🆑 Vishenka0704
qol: Ability to delete characters(yourself)
/🆑
This commit is contained in:
Yaroslav Nurkov
2024-06-19 15:48:10 -06:00
committed by GitHub
parent 97a1d7a81f
commit b43ae13541
3 changed files with 60 additions and 4 deletions
@@ -368,6 +368,16 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
return TRUE
/datum/preferences/proc/remove_character(slot)
SHOULD_NOT_SLEEP(TRUE)
if(!slot)
return FALSE
slot = sanitize_integer(slot, 1, max_save_slots, initial(default_slot))
var/tree_key = "character[slot]"
savefile.remove_entry(tree_key)
return TRUE
/datum/preferences/proc/sanitize_be_special(list/input_be_special)
var/list/output = list()