Refactors unique_reskin, deletes retool kit (#93775)

## About The Pull Request

Closes #93635

`unique_reskin` is no longer a list on `/item`, now `/datum/atom_skin`

The actual reskinning behavior has been moved out to
`/datum/component/reskinable_item`

PKC reskinning is now handled via alt-click reskin, rather than via the
retooling kit. The retooling kit has been removed.
There's no limit on how many times you can reskin your PKC (though
perhaps we limit it to one reskin and keep the retooling kit as a way to
allow a miner to reskin it a second time?)

The Ashen Skull unique reskin is still a trophy, and instead unlocks its
unique reskin option in the alt-click radial.

## Why It's Good For The Game

I'm unsure why the retooling kit exists on its own, when it's relatively
cheap and just performs the behavior of alt-click reskinning.

So to keep it consistent with all other forms of reskinning I've just
made it baseline. To accomplish that I refactored reskinning.

The new form of reskinning allows for greater potential in adding
reskins, allowing far more than just an icon state change. Also we can
put it on turfs and mobs and structures now which is cool I guess

There's also the added benefit of being able to see an item's reskins
without needing to instantiate it, which the loadout menu uses to great
effect.

## Changelog

🆑 Melbert
refactor: Refactored item reskinning (the alt-click way), report any
oddities with that
del: Deleted the crusher retool kit, now you can just reskin your
crusher with alt-click. The Skull skin is still locked behind having the
Ashen Skull trophy applied.
fix: Stunswords no longer have an incorrect lore blurb
fix: Fixed loadout item reskinning's UI
/🆑
This commit is contained in:
MrMelbert
2025-11-30 19:31:29 -07:00
committed by GitHub
parent 693d94d930
commit 6ebfbccebb
34 changed files with 757 additions and 489 deletions
+18 -7
View File
@@ -1,3 +1,20 @@
// Clipboard skins
/datum/atom_skin/clipboard
abstract_type = /datum/atom_skin/clipboard
change_inhand_icon_state = TRUE
/datum/atom_skin/clipboard/brown
preview_name = "Brown"
new_icon_state = "clipboard"
/datum/atom_skin/clipboard/black
preview_name = "Black"
new_icon_state = "clipboard_black"
/datum/atom_skin/clipboard/white
preview_name = "White"
new_icon_state = "clipboard_white"
/**
* Clipboard
*/
@@ -14,13 +31,6 @@
slot_flags = ITEM_SLOT_BELT
resistance_flags = FLAMMABLE
unique_reskin = list(
"Brown" = "clipboard",
"Black" = "clipboard_black",
"White" = "clipboard_white",
)
unique_reskin_changes_inhand = TRUE
/// The stored pen
var/obj/item/pen/pen
/// Is the pen integrated?
@@ -39,6 +49,7 @@
/obj/item/clipboard/Initialize(mapload)
update_appearance()
. = ..()
AddComponent(/datum/component/reskinable_item, /datum/atom_skin/clipboard)
/obj/item/clipboard/Destroy()
QDEL_NULL(pen)
+46 -24
View File
@@ -177,6 +177,38 @@
time = 3 SECONDS
category = CAT_TOOLS
// Skins for captain's fountain pen
/datum/atom_skin/cap_pen
abstract_type = /datum/atom_skin/cap_pen
/datum/atom_skin/cap_pen/apply(atom/apply_to)
. = ..()
apply_to.desc = "It's an expensive [preview_name] fountain pen. The nib is quite sharp."
/datum/atom_skin/cap_pen/clear_skin(atom/clear_from)
. = ..()
clear_from.desc = initial(clear_from.desc)
/datum/atom_skin/cap_pen/oak
preview_name = "Oak"
new_icon_state = "pen-fountain-o"
/datum/atom_skin/cap_pen/gold
preview_name = "Gold"
new_icon_state = "pen-fountain-g"
/datum/atom_skin/cap_pen/rosewood
preview_name = "Rosewood"
new_icon_state = "pen-fountain-r"
/datum/atom_skin/cap_pen/black_silver
preview_name = "Black and Silver"
new_icon_state = "pen-fountain-b"
/datum/atom_skin/cap_pen/command_blue
preview_name = "Command Blue"
new_icon_state = "pen-fountain-cb"
/obj/item/pen/fountain/captain
name = "captain's fountain pen"
desc = "It's an expensive Oak fountain pen. The nib is quite sharp."
@@ -187,22 +219,15 @@
custom_materials = list(/datum/material/gold = SMALL_MATERIAL_AMOUNT*7.5)
sharpness = SHARP_EDGED
resistance_flags = FIRE_PROOF
unique_reskin = list(
"Oak" = "pen-fountain-o",
"Gold" = "pen-fountain-g",
"Rosewood" = "pen-fountain-r",
"Black and Silver" = "pen-fountain-b",
"Command Blue" = "pen-fountain-cb"
)
embed_type = /datum/embedding/pen/captain
dart_insert_casing_icon_state = "overlay_fountainpen_gold"
dart_insert_projectile_icon_state = "overlay_fountainpen_gold_proj"
var/list/overlay_reskin = list(
"Oak" = "overlay_fountainpen_gold",
"Gold" = "overlay_fountainpen_gold",
"Rosewood" = "overlay_fountainpen_gold",
"Black and Silver" = "overlay_fountainpen",
"Command Blue" = "overlay_fountainpen_gold"
/datum/atom_skin/cap_pen/black_silver::preview_name = "overlay_fountainpen",
/datum/atom_skin/cap_pen/command_blue::preview_name = "overlay_fountainpen_gold",
/datum/atom_skin/cap_pen/gold::preview_name = "overlay_fountainpen_gold",
/datum/atom_skin/cap_pen/oak::preview_name = "overlay_fountainpen_gold",
/datum/atom_skin/cap_pen/rosewood::preview_name = "overlay_fountainpen_gold",
)
/datum/embedding/pen/captain
@@ -210,24 +235,21 @@
/obj/item/pen/fountain/captain/Initialize(mapload)
. = ..()
AddComponent(/datum/component/butchering, \
speed = 20 SECONDS, \
effectiveness = 115, \
AddComponent( \
/datum/component/butchering, \
speed = 20 SECONDS, \
effectiveness = 115, \
)
AddComponent(/datum/component/reskinable_item, /datum/atom_skin/cap_pen)
//the pen is mightier than the sword
RegisterSignal(src, COMSIG_DART_INSERT_PARENT_RESKINNED, PROC_REF(reskin_dart_insert))
/obj/item/pen/fountain/captain/reskin_obj(mob/M)
..()
if(current_skin)
desc = "It's an expensive [current_skin] fountain pen. The nib is quite sharp."
/obj/item/pen/fountain/captain/proc/reskin_dart_insert(datum/component/dart_insert/insert_comp)
/obj/item/pen/fountain/captain/proc/reskin_dart_insert(datum/component/dart_insert/insert_comp, skin)
SIGNAL_HANDLER
if(!istype(insert_comp)) //You really shouldn't be sending this signal from anything other than a dart_insert component
return
insert_comp.casing_overlay_icon_state = overlay_reskin[current_skin]
insert_comp.projectile_overlay_icon_state = "[overlay_reskin[current_skin]]_proj"
insert_comp.casing_overlay_icon_state = overlay_reskin[skin]
insert_comp.projectile_overlay_icon_state = "[overlay_reskin[skin]]_proj"
/obj/item/pen/item_ctrl_click(mob/living/carbon/user)
if(loc != user)