mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 11:07:12 +01:00
Add new sprites and coloring methods for basic jumpsuits. (#31568)
* Add new sprites and coloring methods for basic jumpsuits. * Move palettes to dye_registry.dm. Add palette keys to jumpskirts. * Add colored inhands, inventory sprites, icon and palette updates. * Add jumpskirt item sprite. * Add prisoner jumpsuit, psychedelic jumpsuit, random jumpskirt. - Add new sprites for prisoner jumpsuits, skirts, and their rolldowns. - Generate psychedelic jumpsuit icon in code, using colors it was originally composed of overlayed on the white jumpsuit. - Add psychedelic jumpskirt, rolldowns, and inhands, since they are now easy to generate. - Add a subtype for random jumpskirts patterned after random jumpsuits. - Tweak orange color palette. - Ensure randomized jumpsuits and skirts get the proper names and descriptions. * Add dummy psychedelic suit sprites to satisfy linters. * Attempt dyeing. Cleanup icon states. Update references. - Moves jumpsuit coloring out of human_update_icons.dm to color.dm and updates dyeing.dm to hopefully enable dyeing. In the current state it only colors object sprites properly. - Deletes icon states that will no longer be used for each solid color jumpsuit. - Updates references to old icon states in datacore.dm, character.dm, and chameleon.dm to the white icon with a swapped palette where possible. * Thanks, linters. * Thanks, linters. part 2 * Fix dyeing. Add misc prison jumpsuit sprites. * Dye chameleon jumpsuit when it mimics colored jumpsuit. * Eliminate chameleon lag by caching jumpsuit icons. * Add missing keyword args. Thanks, linters. * Replace resistance flags in black jumpsuit. Signed-off-by: Alan <alfalfascout@users.noreply.github.com> * Tweak jumpskirt shading on south humans and greys. --------- Signed-off-by: Alan <alfalfascout@users.noreply.github.com>
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
worn_icon_state = initial(target_obj.worn_icon_state)
|
||||
inhand_icon_state = initial(target_obj.inhand_icon_state)
|
||||
sprite_sheets = target_obj.sprite_sheets
|
||||
desc = target_obj.desc
|
||||
base_icon_state = target_obj.base_icon_state
|
||||
|
||||
// update inhand sprites
|
||||
@@ -41,11 +40,41 @@
|
||||
|
||||
// update the name/description
|
||||
name = initial(target_obj.name)
|
||||
desc += "\nThe colors look a little dodgy."
|
||||
desc = target_obj.desc + "\nThe colors look a little dodgy."
|
||||
qdel(target_obj)
|
||||
|
||||
update_appearance(ALL)
|
||||
return target_type
|
||||
|
||||
/// Because of jumpsuit palettes, we have to do some extra icon shenanigans.
|
||||
/obj/item/clothing/under/dye_item(dye_color, dye_key_override)
|
||||
if(!dyeable || !dye_color)
|
||||
return
|
||||
var/dye_key_selector = dye_key_override ? dye_key_override : dyeing_key
|
||||
var/obj/item/clothing/under/target_type = GLOB.dye_registry[dye_key_selector][dye_color]
|
||||
|
||||
// If we're dying it to a colored jumpsuit...
|
||||
if(target_type in typesof(/obj/item/clothing/under/color))
|
||||
var/obj/item/clothing/under/color/target_obj = new target_type(null)
|
||||
set_icon_from_cache(palette_key = target_obj.icon_palette_key, dye_key = target_obj.dyeing_key)
|
||||
// update the name/description
|
||||
name = initial(target_obj.name)
|
||||
desc = target_obj.desc + "\nThe colors look a little dodgy."
|
||||
qdel(target_obj)
|
||||
|
||||
// If it also started as a colored jumpsuit, change the palette key
|
||||
if("icon_palette_key" in vars)
|
||||
var/obj/item/clothing/under/color/dyed_item = src
|
||||
dyed_item.icon_palette_key = dye_color
|
||||
return
|
||||
|
||||
// If we're not, but it started as a colored jumpsuit, unset the palette key so icon updates don't mess it up
|
||||
else if("icon_palette_key" in vars)
|
||||
var/obj/item/clothing/under/color/dyed_item = src
|
||||
dyed_item.icon_palette_key = null
|
||||
|
||||
return ..()
|
||||
|
||||
/// Beanies use the color var for their appearance, we don't normally copy this over but we have to for beanies
|
||||
/obj/item/clothing/head/beanie/dye_item(dye_color, dye_key_override)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user