diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 3d803ab8259..0344c789cf3 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -144,7 +144,22 @@ BLIND // can't see anything 2 = Report detailed damages 3 = Report location */ + var/obj/item/clothing/tie/hastie = null +/obj/item/clothing/under/attackby(obj/item/I, mob/user) + if(!hastie && istype(I, /obj/item/clothing/tie)) + user.drop_item() + hastie = I + I.loc = src + user << "You attach [I] to [src]." + + if(istype(loc, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = loc + H.update_inv_w_uniform() + + return + + ..() /obj/item/clothing/under/examine() set src in view() @@ -158,6 +173,8 @@ BLIND // can't see anything usr << "Its vital tracker appears to be enabled." if(3) usr << "Its vital tracker and tracking beacon appear to be enabled." + if(hastie) + usr << "[hastie] is clipped to it." /obj/item/clothing/under/verb/toggle() set name = "Toggle Suit Sensors" @@ -170,7 +187,7 @@ BLIND // can't see anything usr << "The controls are locked." return 0 if(src.has_sensor <= 0) - usr << "This suit does not have any sensors" + usr << "This suit does not have any sensors." return 0 src.sensor_mode += 1 if(src.sensor_mode > 3) @@ -186,6 +203,22 @@ BLIND // can't see anything usr << "Your suit will now report your vital lifesigns as well as your coordinate position." ..() +/obj/item/clothing/under/verb/removetie() + set name = "Remove Tie" + set category = "Object" + set src in usr + var/mob/M = usr + if (istype(M, /mob/dead/)) return + if (usr.stat) return + + if(hastie) + hastie.loc = get_turf(src.loc) + hastie = null + + if(istype(loc, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = loc + H.update_inv_w_uniform() + /obj/item/clothing/under/rank/New() sensor_mode = pick(0,1,2,3) ..() diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm new file mode 100644 index 00000000000..c7a08f5c9d1 --- /dev/null +++ b/code/modules/clothing/under/ties.dm @@ -0,0 +1,26 @@ +/obj/item/clothing/tie + name = "tie" + desc = "A neosilk clip-on tie." + icon = 'icons/obj/clothing/ties.dmi' + icon_state = "bluetie" + item_state = "" //no inhands + color = "bluetie" + flags = FPRINT | TABLEPASS + slot_flags = SLOT_ICLOTHING | SLOT_HEAD + w_class = 2.0 + +/obj/item/clothing/tie/blue + name = "blue tie" + icon_state = "bluetie" + color = "bluetie" + +/obj/item/clothing/tie/red + name = "red tie" + icon_state = "redtie" + color = "redtie" + +/obj/item/clothing/tie/horrible + name = "horrible tie" + desc = "A neosilk clip-on tie. This one is disgusting." + icon_state = "horribletie" + color = "horribletie" \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index e97971c5dbf..f1a97cfc174 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -378,6 +378,13 @@ Please contact me on #coderbus IRC. ~Carn x if(w_uniform.blood_DNA) lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "uniformblood2") standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "uniformblood") + + if(w_uniform:hastie) //WE CHECKED THE TYPE ABOVE. THIS REALLY SHOULD BE FINE. + var/tie_color = w_uniform:hastie.color + if(!tie_color) tie_color = w_uniform:hastie.icon_state + lying.overlays += image("icon" = 'icons/mob/ties.dmi', "icon_state" = "[tie_color]2") + standing.overlays += image("icon" = 'icons/mob/ties.dmi', "icon_state" = "[tie_color]") + overlays_lying[UNIFORM_LAYER] = lying overlays_standing[UNIFORM_LAYER] = standing else diff --git a/tgstation.dme b/tgstation.dme index 06d41f30911..cadbd3978aa 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -889,6 +889,7 @@ #include "code\modules\clothing\under\miscellaneous.dm" #include "code\modules\clothing\under\shorts.dm" #include "code\modules\clothing\under\syndicate.dm" +#include "code\modules\clothing\under\ties.dm" #include "code\modules\clothing\under\jobs\civilian.dm" #include "code\modules\clothing\under\jobs\engineering.dm" #include "code\modules\clothing\under\jobs\medsci.dm"