first commit with everything

This commit is contained in:
SandPoot
2023-01-08 21:36:57 -03:00
parent e292452aae
commit f2a49bc319
14 changed files with 144 additions and 113 deletions
+16 -17
View File
@@ -193,7 +193,10 @@
/obj/item/melee/transforming/energy/sword/saber
possible_colors = list("red" = LIGHT_COLOR_RED, "blue" = LIGHT_COLOR_LIGHT_CYAN, "green" = LIGHT_COLOR_GREEN, "purple" = LIGHT_COLOR_LAVENDER)
unique_reskin = list("Sword" = "sword0", "Saber" = "esaber0")
unique_reskin = list(
"Sword" = list("icon_state" = "sword0"),
"Saber" = list("icon_state" = "esaber0")
)
var/hacked = FALSE
var/saber = FALSE
@@ -201,26 +204,22 @@
. = ..()
if(.)
if(active)
if(sword_color)
if(saber)
icon_state = "esaber[sword_color]"
else
icon_state = "sword[sword_color]"
else
if(saber)
icon_state = "esaber0"
else
icon_state = "sword0"
switch(current_skin)
if("Sword")
icon_state = "sword[sword_color ? sword_color : "0"]"
if("Saber")
icon_state = "esaber[sword_color ? sword_color : "0"]"
/obj/item/melee/transforming/energy/sword/saber/reskin_obj(mob/M)
. = ..()
if(icon_state == "esaber0")
saber = TRUE
if(!.)
return
if(active)
if(saber)
icon_state = "esaber[sword_color]"
else
icon_state = "sword[sword_color]"
switch(current_skin)
if("Sword")
icon_state = "sword[sword_color]"
if("Saber")
icon_state = "esaber[sword_color]"
/obj/item/melee/transforming/energy/sword/saber/set_sword_color(var/color_forced)
if(color_forced) // wow i really do not like this at fucking all holy SHIT