mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-25 07:56:58 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user