mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-23 16:42:13 +00:00
Color Rotation Gear Tweak (#11571)
This commit is contained in:
@@ -2,3 +2,4 @@
|
||||
#define GEAR_HAS_COLOR_SELECTION 1
|
||||
#define GEAR_HAS_NAME_SELECTION 2
|
||||
#define GEAR_HAS_DESC_SELECTION 4
|
||||
#define GEAR_HAS_COLOR_ROTATION_SELECTION 8
|
||||
@@ -46,6 +46,23 @@ Color adjustment
|
||||
return
|
||||
I.color = sanitize_hexcolor(metadata, I.color)
|
||||
|
||||
/*
|
||||
Color Rotation adjustment
|
||||
*/
|
||||
var/datum/gear_tweak/color_rotation/gear_tweak_color_rotation = new()
|
||||
|
||||
/datum/gear_tweak/color_rotation/get_contents(var/metadata)
|
||||
return "Color Rotation: [metadata]"
|
||||
|
||||
/datum/gear_tweak/color_rotation/get_default()
|
||||
return 0
|
||||
|
||||
/datum/gear_tweak/color_rotation/get_metadata(var/user, var/metadata, var/title = "Color Rotation")
|
||||
return clamp(input(user, "Choose the amount of degrees to rotate the hue around the color wheel. (-180 - 180)", title, metadata) as num, -180, 180)
|
||||
|
||||
/datum/gear_tweak/color_rotation/tweak_item(var/obj/item/I, var/metadata)
|
||||
I.color = color_rotation(metadata)
|
||||
|
||||
/*
|
||||
Path adjustment
|
||||
*/
|
||||
|
||||
@@ -298,6 +298,8 @@ var/list/gear_datums = list()
|
||||
gear_tweaks += list(gear_tweak_free_name)
|
||||
if(flags & GEAR_HAS_DESC_SELECTION)
|
||||
gear_tweaks += list(gear_tweak_free_desc)
|
||||
if(flags & GEAR_HAS_COLOR_ROTATION_SELECTION)
|
||||
gear_tweaks += list(gear_tweak_color_rotation)
|
||||
|
||||
/datum/gear_data
|
||||
var/path
|
||||
|
||||
Reference in New Issue
Block a user