Merge pull request #3738 from Michiyamenotehifunana/recolorables-polish
Polishes code for cit's recolorable assets
This commit is contained in:
@@ -1068,6 +1068,7 @@ obj/item/projectile/bullet/c10mm/soporific
|
||||
if(arm_color_input)
|
||||
arm_color = sanitize_hexcolor(arm_color_input, desired_format=6, include_crunch=1)
|
||||
update_icon()
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
else
|
||||
..()
|
||||
@@ -1210,6 +1211,10 @@ obj/item/gun/energy/e_gun/cx/update_icon()
|
||||
body_overlay.color = body_color
|
||||
add_overlay(body_overlay)
|
||||
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_hands()
|
||||
|
||||
obj/item/gun/energy/e_gun/cx/ui_action_click(mob/user, var/datum/action/A)
|
||||
if(istype(A, /datum/action/item_action/pick_color))
|
||||
if(alert("Are you sure you want to repaint your gun?", "Confirm Repaint", "Yes", "No") == "Yes")
|
||||
@@ -1217,6 +1222,7 @@ obj/item/gun/energy/e_gun/cx/ui_action_click(mob/user, var/datum/action/A)
|
||||
if(body_color_input)
|
||||
body_color = sanitize_hexcolor(body_color_input, desired_format=6, include_crunch=1)
|
||||
update_icon()
|
||||
A.UpdateButtonIcon()
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
set_light(0)
|
||||
update_icon()
|
||||
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/toy/sword/cx/update_icon()
|
||||
@@ -49,6 +53,10 @@
|
||||
if(active)
|
||||
add_overlay(blade_overlay)
|
||||
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_hands()
|
||||
|
||||
/obj/item/toy/sword/cx/ui_action_click(mob/user, var/datum/action/A)
|
||||
if(istype(A, /datum/action/item_action/pick_color))
|
||||
if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes")
|
||||
@@ -56,10 +64,8 @@
|
||||
if(energy_color_input)
|
||||
light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
|
||||
update_icon()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_hands()
|
||||
update_light()
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
else
|
||||
..()
|
||||
@@ -146,6 +152,9 @@
|
||||
update_icon()
|
||||
transform_messages(user, supress_message_text)
|
||||
add_fingerprint(user)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
return TRUE
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/transform_messages(mob/living/user, supress_message_text)
|
||||
@@ -168,6 +177,10 @@
|
||||
if(active)
|
||||
add_overlay(blade_overlay)
|
||||
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_hands()
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/ui_action_click(mob/user, var/datum/action/A)
|
||||
if(istype(A, /datum/action/item_action/pick_color))
|
||||
if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes")
|
||||
@@ -175,10 +188,8 @@
|
||||
if(energy_color_input)
|
||||
light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
|
||||
update_icon()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_hands()
|
||||
update_light()
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
else
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user