mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-25 09:01:40 +00:00
* Fixes greyscale colors not updating when changing their colors via VV, and fixes some issues with accessories (#77806) ## About The Pull Request Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/23214 This fixes a few bugs and cleans up code a bit: 1) Greyscale colors that were changed via the VV modify greyscale menu will now update the mob's worn clothing accordingly. It wasn't doing this before. Accessories in particular needed a bit of extra work to update in this way because it wasn't coded with this case in mind. 2) Accessories will call `equipped()` and `dropped()` when they get added/removed. This will fix issues like item flags being incorrectly set, action bars not being added, etc. 3) Accessories will now be returned by `get_all_gear()`. This will probably fix a few issues I'm not aware of. ## Why It's Good For The Game <details><summary>Works</summary>  </details> <details><summary>get_all_gear()</summary>  </details> <details><summary>get_equipped_items()</summary>  </details> <details><summary>item_flags get set now, hopefully preventing future issues related to that</summary>  </details> ## Changelog 🆑 fix: greyscale colors will now update on the mob when modifying them via the VV menu /🆑 --------- Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com> * Fixes greyscale colors not updating when changing their colors via VV, and fixes some issues with accessories --------- Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>
43 lines
1.3 KiB
Plaintext
43 lines
1.3 KiB
Plaintext
/datum/buildmode_mode/outfit
|
|
key = "outfit"
|
|
var/datum/outfit/dressuptime
|
|
|
|
/datum/buildmode_mode/outfit/Destroy()
|
|
dressuptime = null
|
|
return ..()
|
|
|
|
/datum/buildmode_mode/outfit/show_help(client/builder)
|
|
to_chat(builder, span_purple(examine_block(
|
|
"[span_bold("Select outfit to equip")] -> Right Mouse Button on buildmode button\n\
|
|
[span_bold("Equip the selected outfit")] -> Left Mouse Button on mob/living/carbon/human\n\
|
|
[span_bold("Strip and delete current outfit")] -> Right Mouse Button on mob/living/carbon/human"))
|
|
)
|
|
|
|
/datum/buildmode_mode/outfit/Reset()
|
|
. = ..()
|
|
dressuptime = null
|
|
|
|
/datum/buildmode_mode/outfit/change_settings(client/c)
|
|
dressuptime = c.robust_dress_shop()
|
|
|
|
/datum/buildmode_mode/outfit/handle_click(client/c, params, object)
|
|
var/list/modifiers = params2list(params)
|
|
|
|
if(!ishuman(object))
|
|
return
|
|
var/mob/living/carbon/human/dollie = object
|
|
|
|
if(LAZYACCESS(modifiers, LEFT_CLICK))
|
|
if(isnull(dressuptime))
|
|
to_chat(c, span_warning("Pick an outfit first."))
|
|
return
|
|
|
|
for (var/item in dollie.get_equipped_items(include_pockets = TRUE))
|
|
qdel(item)
|
|
if(dressuptime != "Naked")
|
|
dollie.equipOutfit(dressuptime)
|
|
|
|
if(LAZYACCESS(modifiers, RIGHT_CLICK))
|
|
for (var/item in dollie.get_equipped_items(include_pockets = TRUE))
|
|
qdel(item)
|