diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 3bd9bff6..77867600 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -393,6 +393,7 @@ BLIND // can't see anything 3 = Report location */ var/obj/item/clothing/tie/hastie = null + var/obj/item/clothing/tie/armband/aband = null var/displays_id = 1 var/rolled_down = 0 var/rolled_sleeves = 0 @@ -405,21 +406,32 @@ BLIND // can't see anything M.update_inv_w_uniform() /obj/item/clothing/under/attackby(obj/item/I, mob/user) + if(istype(I, /obj/item/clothing/tie)) + if(istype(I, /obj/item/clothing/tie/armband)) + if(!aband) + user.drop_item() + aband = I + aband.on_attached(src, user) + + if(istype(loc, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = loc + H.update_inv_w_uniform() + return + if(!hastie) + user.drop_item() + hastie = I + hastie.on_attached(src, user) + + if(istype(loc, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = loc + H.update_inv_w_uniform() + + return + if(hastie) hastie.attackby(I, user) return - if(!hastie && istype(I, /obj/item/clothing/tie)) - user.drop_item() - hastie = I - hastie.on_attached(src, user) - - if(istype(loc, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = loc - H.update_inv_w_uniform() - - return - ..() /obj/item/clothing/under/attack_hand(mob/user as mob) @@ -466,6 +478,8 @@ BLIND // can't see anything usr << "Its vital tracker and tracking beacon appear to be enabled." if(hastie) usr << "\A [hastie] is clipped to it." + if(aband) + usr << "\A [aband] is wrapped around the sleeve." /obj/item/clothing/under/proc/set_sensors(mob/usr as mob) var/mob/M = usr @@ -581,6 +595,23 @@ BLIND // can't see anything src.remove_accessory(usr) +/obj/item/clothing/under/proc/remove_armband(mob/user as mob) + if(!aband) + return + + aband.on_removed(user) + aband = null + update_clothing_icon() + +/obj/item/clothing/under/verb/removearmband() + set name = "Remove Armband" + set category = "Object" + set src in usr + if(!istype(usr, /mob/living)) return + if(usr.stat) return + + src.remove_armband(usr) + /obj/item/clothing/under/rank/New() sensor_mode = pick(0,1,2,3) ..() diff --git a/code/modules/clothing/under/armbands.dm b/code/modules/clothing/under/armbands.dm new file mode 100644 index 00000000..692b18d9 --- /dev/null +++ b/code/modules/clothing/under/armbands.dm @@ -0,0 +1,42 @@ +//Armbands +/obj/item/clothing/tie/armband + name = "red armband" + desc = "A fancy red armband!" + icon_state = "red" + item_color = "red" + +/obj/item/clothing/tie/armband/cargo + name = "cargo bay guard armband" + desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is brown." + icon_state = "cargo" + item_color = "cargo" + +/obj/item/clothing/tie/armband/engine + name = "engineering guard armband" + desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is orange with a reflective strip!" + icon_state = "engie" + item_color = "engie" + +/obj/item/clothing/tie/armband/science + name = "science guard armband" + desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is purple." + icon_state = "rnd" + item_color = "rnd" + +/obj/item/clothing/tie/armband/hydro + name = "hydroponics guard armband" + desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is green and blue." + icon_state = "hydro" + item_color = "hydro" + +/obj/item/clothing/tie/armband/med + name = "medical guard armband" + desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is white." + icon_state = "med" + item_color = "med" + +/obj/item/clothing/tie/armband/medgreen + name = "medical guard armband" + desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is white and green." + icon_state = "medgreen" + item_color = "medgreen" \ No newline at end of file diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index ed462f39..8712a74f 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -22,7 +22,7 @@ has_suit = S loc = has_suit has_suit.overlays += inv_overlay - + user << "You attach [src] to [has_suit]." src.add_fingerprint(user) @@ -149,49 +149,6 @@ name = "medal of exceptional heroism" desc = "An extremely rare golden medal awarded only by CentComm. To recieve such a medal is the highest honor and as such, very few exist. This medal is almost never awarded to anybody but commanders." -//Armbands -/obj/item/clothing/tie/armband - name = "red armband" - desc = "A fancy red armband!" - icon_state = "red" - item_color = "red" - -/obj/item/clothing/tie/armband/cargo - name = "cargo bay guard armband" - desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is brown." - icon_state = "cargo" - item_color = "cargo" - -/obj/item/clothing/tie/armband/engine - name = "engineering guard armband" - desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is orange with a reflective strip!" - icon_state = "engie" - item_color = "engie" - -/obj/item/clothing/tie/armband/science - name = "science guard armband" - desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is purple." - icon_state = "rnd" - item_color = "rnd" - -/obj/item/clothing/tie/armband/hydro - name = "hydroponics guard armband" - desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is green and blue." - icon_state = "hydro" - item_color = "hydro" - -/obj/item/clothing/tie/armband/med - name = "medical guard armband" - desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is white." - icon_state = "med" - item_color = "med" - -/obj/item/clothing/tie/armband/medgreen - name = "medical guard armband" - desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is white and green." - icon_state = "medgreen" - item_color = "medgreen" - //holsters /obj/item/clothing/tie/holster name = "shoulder holster" @@ -208,16 +165,16 @@ if(holstered) user << "\red There is already a [holstered] holstered here!" return - + if (!istype(I, /obj/item/weapon/gun)) user << "\red Only guns can be holstered!" return - + var/obj/item/weapon/gun/W = I if (!can_holster(W)) user << "\red This [W] won't fit in the [src]!" return - + holstered = W user.drop_from_inventory(holstered) holstered.loc = src @@ -227,7 +184,7 @@ /obj/item/clothing/tie/holster/proc/unholster(mob/user as mob) if(!holstered) return - + if(istype(user.get_active_hand(),/obj) && istype(user.get_inactive_hand(),/obj)) user << "\red You need an empty hand to draw the [holstered]!" else @@ -246,7 +203,7 @@ if (holstered) unholster(user) return - + ..(user) /obj/item/clothing/tie/holster/attackby(obj/item/W as obj, mob/user as mob) @@ -280,7 +237,7 @@ set src in usr if(!istype(usr, /mob/living)) return if(usr.stat) return - + var/obj/item/clothing/tie/holster/H = null if (istype(src, /obj/item/clothing/tie/holster)) H = src @@ -288,7 +245,7 @@ var/obj/item/clothing/under/S = src if (S.hastie) H = S.hastie - + if (!H) usr << "/red Something is very wrong." @@ -330,14 +287,14 @@ if (has_suit) //if we are part of a suit hold.open(user) return - + if (hold.handle_attack_hand(user)) //otherwise interact as a regular storage item ..(user) /obj/item/clothing/tie/storage/MouseDrop(obj/over_object as obj) if (has_suit) return - + if (hold.handle_mousedrop(usr, over_object)) ..(over_object) @@ -481,6 +438,6 @@ "/obj/item/weapon/kitchen/utensil/pknife",\ "/obj/item/weapon/kitchenknife",\ "/obj/item/weapon/kitchenknife/ritual") - + new /obj/item/weapon/hatchet/unathiknife(hold) new /obj/item/weapon/hatchet/unathiknife(hold)