diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 38bb1173ce4..7e7a4f544a1 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -504,6 +504,10 @@ hud_used.item_action_list = list() for(var/obj/item/I in src) + if(istype(I,/obj/item/clothing/under)) + var/obj/item/clothing/under/U = I + if(U.hastie) + I = U.hastie if(I.icon_action_button) var/obj/screen/item_action/A = new(hud_used) //A.icon = 'icons/mob/screen1_action.dmi' diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 7283b735ed6..41d8a7819d0 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -55,9 +55,11 @@ if(usr.stat || usr.restrained() || usr.stunned || usr.lying) return 1 - if(!(owner in usr)) + + if(!(owner in usr) && !(owner.loc.loc == usr)) return 1 + owner.ui_action_click() return 1 diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 40fb6f45c9f..01ac8932762 100755 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -1070,7 +1070,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee name = "Mafia Supply crate" contains = list(/obj/item/clothing/suit/browntrenchcoat =1,/obj/item/clothing/suit/blacktrenchcoat =1,/obj/item/clothing/head/fedora/whitefedora =1, /obj/item/clothing/head/fedora/brownfedora =1,/obj/item/clothing/head/fedora =1,/obj/item/clothing/under/flappers =1,/obj/item/clothing/under/mafia =1,/obj/item/clothing/under/mafia/vest =1,/obj/item/clothing/under/mafia/white =1, - /obj/item/clothing/under/mafia/sue =1,/obj/item/clothing/under/mafia/tan =1, /obj/item/toy/crossbow/tommygun =2,/obj/item/clothing/tie/accessory/gunholster =1,) + /obj/item/clothing/under/mafia/sue =1,/obj/item/clothing/under/mafia/tan =1, /obj/item/toy/crossbow/tommygun =2) cost = 15 containertype = /obj/structure/closet/crate containername = "mafia supply crate" diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 8b508553f43..b607cc3da62 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -546,6 +546,10 @@ /obj/item/proc/ui_action_click() if( src in usr ) attack_self(usr) + return + else if(istype(src, /obj/item/clothing/tie)) + if(istype(src.loc,/obj/item/clothing/under)) + attack_self(usr) /obj/item/proc/IsShield() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 0ebba4e8bd4..909c9573db5 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -123,7 +123,7 @@ new /obj/item/device/flash(src) new /obj/item/weapon/melee/baton/loaded(src) new /obj/item/weapon/gun/energy/gun(src) - new /obj/item/clothing/tie/holster/waist(src) + new /obj/item/clothing/tie/holster/armpit(src) new /obj/item/weapon/melee/telebaton(src) return @@ -281,7 +281,6 @@ new /obj/item/clothing/gloves/black(src) new /obj/item/clothing/head/det_hat(src) new /obj/item/clothing/shoes/brown(src) - new /obj/item/clothing/tie/accessory/gunholster(src) new /obj/item/weapon/storage/box/evidence(src) new /obj/item/device/radio/headset/headset_sec(src) new /obj/item/device/detective_scanner(src) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 9e54361ab63..4d4a50c83cd 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -267,12 +267,6 @@ BLIND // can't see anything I.loc = src user << "You attach [I] to [src]." - if (istype(hastie,/obj/item/clothing/tie/holster)) - verbs += /obj/item/clothing/under/proc/holster - - if (istype(hastie,/obj/item/clothing/tie/storage)) - verbs += /obj/item/clothing/under/proc/storage - if(istype(loc, /mob/living/carbon/human)) var/mob/living/carbon/human/H = loc H.update_inv_w_uniform() @@ -284,7 +278,7 @@ BLIND // can't see anything /obj/item/clothing/under/attack_hand(mob/user as mob) //only forward to the attached accessory if the clothing is equipped (not in a storage) if(hastie && src.loc == user) - hastie.attack_hand(user) + removetie() return if ((ishuman(usr) || ismonkey(usr)) && src.loc == user) //make it harder to accidentally undress yourself @@ -368,9 +362,7 @@ BLIND // can't see anything else usr << "You cannot roll down the uniform!" -/obj/item/clothing/under/verb/removetie() - set name = "Remove Accessory" - set category = "Object" +/obj/item/clothing/under/proc/removetie() set src in usr if(!istype(usr, /mob/living)) return if(usr.stat) return @@ -379,11 +371,7 @@ BLIND // can't see anything usr.put_in_hands(hastie) hastie = null - if (istype(hastie,/obj/item/clothing/tie/holster)) - verbs -= /obj/item/clothing/under/proc/holster - if (istype(hastie,/obj/item/clothing/tie/storage)) - verbs -= /obj/item/clothing/under/proc/storage var/obj/item/clothing/tie/storage/W = hastie if (W.hold) W.hold.loc = hastie @@ -396,59 +384,4 @@ BLIND // can't see anything sensor_mode = pick(0,1,2,3) ..() -/obj/item/clothing/under/proc/holster() - set name = "Holster" - set category = "Object" - set src in usr - if(!istype(usr, /mob/living)) return - if(usr.stat) return - - if (!hastie || !istype(hastie,/obj/item/clothing/tie/holster)) - usr << "\red You need a holster for that!" - return - var/obj/item/clothing/tie/holster/H = hastie - - if(!H.holstered) - if(!istype(usr.get_active_hand(), /obj/item/weapon/gun)) - usr << "\blue You need your gun equiped to holster it." - return - var/obj/item/weapon/gun/W = usr.get_active_hand() - if (!W.isHandgun()) - usr << "\red This gun won't fit in \the [H]!" - return - H.holstered = usr.get_active_hand() - usr.drop_item() - H.holstered.loc = src - usr.visible_message("\blue \The [usr] holsters \the [H.holstered].", "You holster \the [H.holstered].") - else - if(istype(usr.get_active_hand(),/obj) && istype(usr.get_inactive_hand(),/obj)) - usr << "\red You need an empty hand to draw the gun!" - else - if(usr.a_intent == "harm") - usr.visible_message("\red \The [usr] draws \the [H.holstered], ready to shoot!", \ - "\red You draw \the [H.holstered], ready to shoot!") - else - usr.visible_message("\blue \The [usr] draws \the [H.holstered], pointing it at the ground.", \ - "\blue You draw \the [H.holstered], pointing it at the ground.") - usr.put_in_hands(H.holstered) - H.holstered = null - -/obj/item/clothing/under/proc/storage() - set name = "Look in storage" - set category = "Object" - set src in usr - if(!istype(usr, /mob/living)) return - if(usr.stat) return - - if (!hastie || !istype(hastie,/obj/item/clothing/tie/storage)) - usr << "\red You need something to store items in for that!" - return - var/obj/item/clothing/tie/storage/W = hastie - - if (!istype(W.hold)) - return - - W.hold.loc = usr - W.hold.attack_hand(usr) - diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 1530b8a8a12..c071a0b77e1 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -34,9 +34,7 @@ toggle() -/obj/item/clothing/head/welding/verb/toggle() - set category = "Object" - set name = "Adjust welding mask" +/obj/item/clothing/head/welding/proc/toggle() set src in usr if(usr.canmove && !usr.stat && !usr.restrained()) diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index e5f7683b65e..932e96b60ee 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -162,6 +162,39 @@ icon_state = "holster" _color = "holster" var/obj/item/weapon/gun/holstered = null + icon_action_button = "action_holster" + +/obj/item/clothing/tie/holster/attack_self() + holster() + +/obj/item/clothing/tie/holster/proc/holster() + if(!istype(usr, /mob/living)) return + if(usr.stat) return + + if(!holstered) + if(!istype(usr.get_active_hand(), /obj/item/weapon/gun)) + usr << "\blue You need your gun equiped to holster it." + return + var/obj/item/weapon/gun/W = usr.get_active_hand() + if (!W.isHandgun()) + usr << "\red This gun won't fit in \the [src]!" + return + holstered = usr.get_active_hand() + usr.drop_item() + holstered.loc = src + usr.visible_message("\blue \The [usr] holsters \the [holstered].", "You holster \the [holstered].") + else + if(istype(usr.get_active_hand(),/obj) && istype(usr.get_inactive_hand(),/obj)) + usr << "\red You need an empty hand to draw the gun!" + else + if(usr.a_intent == "harm") + usr.visible_message("\red \The [usr] draws \the [holstered], ready to shoot!", \ + "\red You draw \the [holstered], ready to shoot!") + else + usr.visible_message("\blue \The [usr] draws \the [holstered], pointing it at the ground.", \ + "\blue You draw \the [holstered], pointing it at the ground.") + usr.put_in_hands(holstered) + holstered = null /obj/item/clothing/tie/holster/armpit name = "shoulder holster" @@ -169,12 +202,6 @@ icon_state = "holster" _color = "holster" -/obj/item/clothing/tie/holster/waist - name = "shoulder holster" - desc = "A handgun holster. Made of expensive leather." - icon_state = "holster" - _color = "holster_low" - /obj/item/clothing/tie/storage name = "load bearing equipment" desc = "Used to hold things when you don't have enough hands for that." @@ -182,19 +209,20 @@ _color = "webbing" var/slots = 3 var/obj/item/weapon/storage/pockets/hold + icon_action_button = "action_storage" /obj/item/clothing/tie/storage/New() hold = new /obj/item/weapon/storage/pockets(src) hold.master_item = src hold.storage_slots = slots + /obj/item/clothing/tie/storage/attack_self(mob/user as mob) - user << "You empty [src]." - var/turf/T = get_turf(src) - hold.hide_from(usr) - for(var/obj/item/I in hold.contents) - hold.remove_from_storage(I, T) - src.add_fingerprint(user) + if (!istype(hold)) + return + + hold.loc = user + hold.attack_hand(user) /obj/item/clothing/tie/storage/attackby(obj/item/weapon/W as obj, mob/user as mob) hold.attackby(W,user) @@ -335,14 +363,3 @@ ..() new /obj/item/weapon/hatchet/unathiknife(hold) new /obj/item/weapon/hatchet/unathiknife(hold) - - -///////////////// -//Miscellaneous// -///////////////// - -/obj/item/clothing/tie/accessory/gunholster - name = "gun holster" - desc = "When you just HAVE to show off your guns" - icon_state = "gunhulster" - _color = "gunhulster" \ No newline at end of file diff --git a/icons/mob/screen1_action.dmi b/icons/mob/screen1_action.dmi index ac3232918eb..e051125fd01 100644 Binary files a/icons/mob/screen1_action.dmi and b/icons/mob/screen1_action.dmi differ