mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Loadout item definitions can now also take a list of tweaks, which will adjust the item after spawn. Currently includes color and icon state changes.
29 lines
526 B
Plaintext
29 lines
526 B
Plaintext
/datum/gear_tweak/proc/apply_tweak(var/obj/item/I)
|
|
return
|
|
|
|
/*
|
|
* Color adjustment
|
|
*/
|
|
/datum/gear_tweak/color
|
|
var/item_color
|
|
|
|
/datum/gear_tweak/color/New(var/item_color)
|
|
src.item_color = item_color
|
|
..()
|
|
|
|
/datum/gear_tweak/color/apply_tweak(var/obj/item/I)
|
|
I.color = item_color
|
|
|
|
/*
|
|
* Icon state adjustment
|
|
*/
|
|
/datum/gear_tweak/icon_state
|
|
var/icon_state
|
|
|
|
/datum/gear_tweak/icon_state/New(var/icon_state)
|
|
src.icon_state = icon_state
|
|
..()
|
|
|
|
/datum/gear_tweak/icon_state/apply_tweak(var/obj/item/I)
|
|
I.icon_state = icon_state
|