From 8643aee84f6fd7767523ca2c2bd798082749fbdb Mon Sep 17 00:00:00 2001 From: PKPenguin321 Date: Fri, 22 Jan 2016 10:33:52 -0800 Subject: [PATCH] adds a safety check to prevent runtimes if the dummy parent item somehow gets spawned and an idiot player tries to use it, this stops them from runtiming/crashing the server. written in my free time so i may have done the "holder == null" part wrong, if it breaks ill fix it in a bit. --- code/modules/surgery/organs/augments_internal.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 1a62e30d662..05d5b39c339 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -269,6 +269,9 @@ if(overloaded)//ensure the implant isn't broken owner << "The implant doesn't respond. It seems to be broken..." return + if(holder == null) + owner << "You should not be attempting to use this implant, as it is a dummy item that should never appear. Please adminhelp and report this as an issue on github." + return if(out)//check if the owner has the item out already owner.unEquip(holder, 1)//if he does, take it away. then, holder.loc = null//stash it in nullspace