Makes do_surgery() into an item proc, refactors medical stack application

Surgery is now handled before attack() is called, no need to check that in attack()
This commit is contained in:
HarpyEagle
2016-06-01 21:04:41 -04:00
committed by Yoshax
parent cf74b43f20
commit fc063115df
5 changed files with 147 additions and 155 deletions

View File

@@ -39,7 +39,7 @@ avoid code duplication. This includes items that may sometimes act as a standard
/mob/living/attackby(obj/item/I, mob/user)
if(!ismob(user))
return 0
if(can_operate(src) && do_surgery(src,user,I)) //Surgery
if(can_operate(src) && I.do_surgery(src,user)) //Surgery
return 1
return I.attack(src, user, user.zone_sel.selecting)