From e1f63b1c6c2ec8184d015dc741804ae34196f0a7 Mon Sep 17 00:00:00 2001 From: Xhuis Date: Mon, 4 May 2015 09:12:57 -0400 Subject: [PATCH 1/3] Fixes autolathe accepting borg modules --- code/game/machinery/autolathe.dm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 88fa45990a7..dcf8b853694 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -118,13 +118,19 @@ return 1 if (src.m_amount + O.m_amt > max_m_amount) - user << "The autolathe is full. Please remove metal from the autolathe in order to insert more." + user << "The autolathe is full. Please remove metal from the autolathe in order to insert more." return 1 if (src.g_amount + O.g_amt > max_g_amount) - user << "The autolathe is full. Please remove glass from the autolathe in order to insert more." + user << "The autolathe is full. Please remove glass from the autolathe in order to insert more." return 1 if (O.m_amt == 0 && O.g_amt == 0) - user << "This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials." + user << "This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials." + return 1 + if(istype(user, /mob/living/silicon)) + user << "You can't detach one of your modules!" + return 1 + if(O.flags & NODROP) + user << "\The [O] is stuck to your hand - you can't put it into the autolathe." return 1 var/amount = 1 From a7d75ceef064753633bc44fcb08f9ba3cf05d665 Mon Sep 17 00:00:00 2001 From: Xhuis Date: Mon, 4 May 2015 09:15:26 -0400 Subject: [PATCH 2/3] Makes glass/metal checking more smooth --- code/game/machinery/autolathe.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index dcf8b853694..865c342b50f 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -123,8 +123,8 @@ if (src.g_amount + O.g_amt > max_g_amount) user << "The autolathe is full. Please remove glass from the autolathe in order to insert more." return 1 - if (O.m_amt == 0 && O.g_amt == 0) - user << "This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials." + if (!O.m_amt && !O.g_amt) + user << "This object does not contain sufficient amounts of metal or glass to be accepted by the autolathe." return 1 if(istype(user, /mob/living/silicon)) user << "You can't detach one of your modules!" From 0b446674a0567ce9d3ba63c832758f6391714be8 Mon Sep 17 00:00:00 2001 From: Xhuis Date: Sun, 10 May 2015 13:42:27 -0400 Subject: [PATCH 3/3] Cleans up the checks to just an unEquip check --- code/game/machinery/autolathe.dm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 865c342b50f..13b177762b0 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -126,11 +126,8 @@ if (!O.m_amt && !O.g_amt) user << "This object does not contain sufficient amounts of metal or glass to be accepted by the autolathe." return 1 - if(istype(user, /mob/living/silicon)) - user << "You can't detach one of your modules!" - return 1 - if(O.flags & NODROP) - user << "\The [O] is stuck to your hand - you can't put it into the autolathe." + if(!user.unEquip(O)) + user << "\The [O] is stuck to you and cannot be placed into the autolathe." return 1 var/amount = 1