Merge pull request #4807 from Citadel-Station-13/upstream-merge-34358

[MIRROR] Cleans up a nesting level in pet attackby
This commit is contained in:
deathride58
2018-01-13 20:27:12 +00:00
committed by GitHub
@@ -7,17 +7,16 @@
blood_volume = BLOOD_VOLUME_NORMAL blood_volume = BLOOD_VOLUME_NORMAL
/mob/living/simple_animal/pet/attackby(obj/item/O, mob/user, params) /mob/living/simple_animal/pet/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/clothing/neck/petcollar) && !pcollar) if(istype(O, /obj/item/clothing/neck/petcollar) && !pcollar && collar_type)
if(collar_type) var/obj/item/clothing/neck/petcollar/P = O
var/obj/item/clothing/neck/petcollar/P = O pcollar = P.type
pcollar = P.type regenerate_icons()
regenerate_icons() to_chat(user, "<span class='notice'>You put the [P] around [src]'s neck.</span>")
to_chat(user, "<span class='notice'>You put the [P] around [src]'s neck.</span>") if(P.tagname && !unique_pet)
if(P.tagname && !unique_pet) real_name = "\proper [P.tagname]"
real_name = "\proper [P.tagname]" name = real_name
name = real_name qdel(P)
qdel(P) return
return
if(istype(O, /obj/item/newspaper)) if(istype(O, /obj/item/newspaper))
if(!stat) if(!stat)