Skip to content

Commit

Permalink
QoL: Worn headset interaction.
Browse files Browse the repository at this point in the history
  • Loading branch information
Segrain authored and Neth Iafin committed Nov 8, 2020
1 parent 97312f2 commit e559813
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,32 @@
return ..(freq, level)
return -1

/obj/item/device/radio/headset/attack_hand(mob/user as mob)
if(!ishuman(user) || loc != user)
return ..()
var/mob/living/carbon/human/H = user
if (H.wear_ear != src)
return ..()
user.set_interaction(src)
interact(user)

/obj/item/device/radio/headset/MouseDrop(obj/over_object as obj)
if(!CAN_PICKUP(usr, src))
return ..()
if(!istype(over_object, /obj/screen))
return ..()
if(loc != usr) //Makes sure that the headset is equipped, so that we can't drag it into our hand from miles away.
return ..()

switch(over_object.name)
if("r_hand")
usr.drop_inv_item_on_ground(src)
usr.put_in_r_hand(src)
if("l_hand")
usr.drop_inv_item_on_ground(src)
usr.put_in_l_hand(src)
add_fingerprint(usr)

/obj/item/device/radio/headset/attackby(obj/item/W as obj, mob/user as mob)
// ..()
user.set_interaction(src)
Expand Down

0 comments on commit e559813

Please sign in to comment.