Robot upgrades now checks that the upgrade type is valid.

As opposed to the instance itself. Fixes #13652.
This commit is contained in:
PsiOmegaDelta
2016-07-23 16:13:29 +01:00
committed by Yoshax
parent d659dd9208
commit 76dc56bd2b
@@ -104,7 +104,7 @@
/obj/item/borg/upgrade/tasercooler/action(var/mob/living/silicon/robot/R)
if(..()) return 0
if(!R.module || !(src in R.module.supported_upgrades))
if(!R.module || !(type in R.module.supported_upgrades))
R << "Upgrade mounting error! No suitable hardpoint detected!"
usr << "There's no mounting point for the module!"
return 0
@@ -137,7 +137,7 @@
/obj/item/borg/upgrade/jetpack/action(var/mob/living/silicon/robot/R)
if(..()) return 0
if(!R.module || !(src in R.module.supported_upgrades))
if(!R.module || !(type in R.module.supported_upgrades))
R << "Upgrade mounting error! No suitable hardpoint detected!"
usr << "There's no mounting point for the module!"
return 0