adds a limit to the number of markings you can have (30) (#5638)

## About The Pull Request
please don't give yourself 184 markings

## Why It's Good For The Game
please don't give yourself 184 markings

## Changelog
🆑
add: adds a limit to the number of markings you can have (30)
/🆑
This commit is contained in:
Timothy Teakettle
2023-06-22 10:08:14 -07:00
committed by GitHub
parent b55c9fcce9
commit 7d67a5f610
2 changed files with 7 additions and 0 deletions
@@ -571,6 +571,10 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
var/datum/sprite_accessory/S = GLOB.sprite_accessory_markings[id]
translated[S.name] = id
var/new_marking = tgui_input_list(user, "Choose a body marking:", "Character Preference", translated)
var/marking_count = length(pref.body_marking_ids)
if(marking_count >= MAXIMUM_MARKINGS)
to_chat(user, "<span class='warning'>You may only select up to [MAXIMUM_MARKINGS] markings!</span>")
return
if(new_marking && CanUseTopic(user))
pref.body_marking_ids[translated[new_marking]] = "#000000" //New markings start black
return PREFERENCES_REFRESH_UPDATE_PREVIEW