color editing

This commit is contained in:
timothyteakettle
2020-10-26 00:47:40 +00:00
parent 926b63ba06
commit e35b3e4a33
2 changed files with 12 additions and 7 deletions
+8
View File
@@ -705,6 +705,14 @@ SUBSYSTEM_DEF(job)
I.forceMove(get_turf(M)) // If everything fails, just put it on the floor under the mob.
else
qdel(I)
if(I) //handle loadout colors last
if((G.loadout_flags & LOADOUT_CAN_COLOR_POLYCHROMIC) && length(G.loadout_initial_colors))
var/datum/element/polychromic/polychromic = SSdcs.GetElement(list(/datum/element/polychromic))
if(polychromic)
var/list/polychromic_entry = polychromic.colors_by_atom[I]
if(polychromic_entry)
polychromic.colors_by_atom[I] = I[LOADOUT_COLOR]
/datum/controller/subsystem/job/proc/FreeRole(rank)
if(!rank)
+4 -7
View File
@@ -2666,17 +2666,14 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/user_gear = has_loadout_gear(loadout_slot, G.type)
if(!user_gear)
return
message_admins("the gear is of length [length(user_gear)]")
message_admins("the color list is of length [length(user_gear[LOADOUT_COLOR])]")
var/list/color_options = list()
var/list/color_option_format = list("Primary", "Secondary", "Tertiary") //could make this a define and use it everywhere
for(var/i=1, i<=length(G.loadout_initial_colors), i++)
var/option = color_option_format[i]
if(option)
color_options += option
else
color_options += "Color [i]"
color_options += "Color [i]"
var/color_to_change = input(user, "Polychromic options", "Recolor [name]") as null|anything in color_options
if(color_to_change)
var/color_index = color_options[color_to_change]
var/color_index = text2num(copytext(color_to_change, 7))
message_admins("chosen index is [color_index]")
var/current_color = user_gear[LOADOUT_COLOR][color_index]
message_admins("current color is [current_color]")