mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 20:47:10 +01:00
Alt-clicking a jumpsuit removes accessories from it
This commit is contained in:
@@ -584,6 +584,10 @@ BLIND // can't see anything
|
||||
var/rolled_down = 0
|
||||
var/basecolor
|
||||
|
||||
/obj/item/clothing/under/rank/New()
|
||||
sensor_mode = pick(0,1,2,3)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/Destroy()
|
||||
QDEL_LIST(accessories)
|
||||
return ..()
|
||||
@@ -687,34 +691,47 @@ BLIND // can't see anything
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You cannot roll down the uniform!</span>")
|
||||
|
||||
/obj/item/clothing/under/proc/remove_accessory(mob/user, obj/item/clothing/accessory/A)
|
||||
if(!(A in accessories))
|
||||
return
|
||||
|
||||
A.on_removed(user)
|
||||
accessories -= A
|
||||
usr.update_inv_w_uniform()
|
||||
|
||||
/obj/item/clothing/under/verb/removetie()
|
||||
set name = "Remove Accessory"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(!istype(usr, /mob/living)) return
|
||||
if(usr.stat) return
|
||||
if(!accessories.len) return
|
||||
handle_accessories_removal()
|
||||
|
||||
/obj/item/clothing/under/proc/handle_accessories_removal()
|
||||
if(!isliving(usr))
|
||||
return
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
if(!Adjacent(usr))
|
||||
return
|
||||
if(!accessories.len)
|
||||
return
|
||||
var/obj/item/clothing/accessory/A
|
||||
if(accessories.len > 1)
|
||||
A = input("Select an accessory to remove from [src]") as null|anything in accessories
|
||||
else
|
||||
A = accessories[1]
|
||||
src.remove_accessory(usr,A)
|
||||
remove_accessory(usr,A)
|
||||
|
||||
/obj/item/clothing/under/rank/New()
|
||||
sensor_mode = pick(0,1,2,3)
|
||||
..()
|
||||
/obj/item/clothing/under/proc/remove_accessory(mob/user, obj/item/clothing/accessory/A)
|
||||
if(!(A in accessories))
|
||||
return
|
||||
if(!isliving(user))
|
||||
return
|
||||
if(user.incapacitated())
|
||||
return
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
A.on_removed(user)
|
||||
accessories -= A
|
||||
to_chat(user, "<span class='notice'>You remove [A] from [src].</span>")
|
||||
usr.update_inv_w_uniform()
|
||||
|
||||
/obj/item/clothing/under/emp_act(severity)
|
||||
if(accessories.len)
|
||||
for(var/obj/item/clothing/accessory/A in accessories)
|
||||
A.emp_act(severity)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/AltClick()
|
||||
handle_accessories_removal()
|
||||
|
||||
Reference in New Issue
Block a user