From db702e13b665c39cdbdaf908dd7d78ba3f2ff8dc Mon Sep 17 00:00:00 2001 From: emmanuelbassil Date: Fri, 20 Feb 2015 23:33:22 +0200 Subject: [PATCH 1/8] Fixes #8174 --- code/modules/reagents/Chemistry-Reagents.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 2de5abcba3..f00cb2a259 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -3116,7 +3116,7 @@ datum M.stuttering += 3 else if(data >= 45 && prob(50) && data <55) M.confused = max(M.confused+3,0) - else if(data >=55) + else if(data >=55 && data <200) M.druggy = max(M.druggy, 55) else if(data >=200) M.adjustToxLoss(2) @@ -3146,7 +3146,7 @@ datum M.stuttering += 3 else if(data >= 45 && prob(50) && data <55) M.confused = max(M.confused+3,0) - else if(data >=55) + else if(data >=55 && data <200) M.druggy = max(M.druggy, 55) else if(data >=200) M.adjustToxLoss(2) From 88dd80088c24e34ee5b6ce9cabb9efa7ab4a5adb Mon Sep 17 00:00:00 2001 From: emmanuelbassil Date: Sat, 21 Feb 2015 08:43:43 +0200 Subject: [PATCH 2/8] Using switch statement --- code/modules/reagents/Chemistry-Reagents.dm | 44 ++++++++++++--------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index f00cb2a259..c5a5080a4a 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -3111,15 +3111,19 @@ datum if(!data) data = 1 data++ M.dizziness +=6 - if(data >= 15 && data <45) - if (!M.stuttering) M.stuttering = 1 - M.stuttering += 3 - else if(data >= 45 && prob(50) && data <55) - M.confused = max(M.confused+3,0) - else if(data >=55 && data <200) - M.druggy = max(M.druggy, 55) - else if(data >=200) - M.adjustToxLoss(2) + switch(data) + if(15 to 45) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + if(45 to 55) + if (prob(50)) + M.confused = max(M.confused+3,0) + else + return + if(55 to 200) + M.druggy = max(M.druggy, 55) + if(200 to INFINITY) + M.adjustToxLoss(2) ..() return @@ -3141,15 +3145,19 @@ datum if(!data) data = 1 data++ M.dizziness +=6 - if(data >= 15 && data <45) - if (!M.stuttering) M.stuttering = 1 - M.stuttering += 3 - else if(data >= 45 && prob(50) && data <55) - M.confused = max(M.confused+3,0) - else if(data >=55 && data <200) - M.druggy = max(M.druggy, 55) - else if(data >=200) - M.adjustToxLoss(2) + switch(data) + if(15 to 45) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + if(45 to 55) + if (prob(50)) + M.confused = max(M.confused+3,0) + else + return + if(55 to 200) + M.druggy = max(M.druggy, 55) + if(200 to INFINITY) + M.adjustToxLoss(2) ..() return From ec8b3fe19586a22ae4857e06cd701ee6272b9ad4 Mon Sep 17 00:00:00 2001 From: emmanuelbassil Date: Sat, 21 Feb 2015 10:14:33 +0200 Subject: [PATCH 3/8] Forgot the else! --- code/modules/reagents/Chemistry-Reagents.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index c5a5080a4a..8a4b2297e7 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -3122,7 +3122,7 @@ datum return if(55 to 200) M.druggy = max(M.druggy, 55) - if(200 to INFINITY) + else if(200 to INFINITY) M.adjustToxLoss(2) ..() return @@ -3156,7 +3156,7 @@ datum return if(55 to 200) M.druggy = max(M.druggy, 55) - if(200 to INFINITY) + else if(200 to INFINITY) M.adjustToxLoss(2) ..() return From 0621e6adea9184bd6f1f729b7e5c59747955d6a0 Mon Sep 17 00:00:00 2001 From: emmanuelbassil Date: Sat, 21 Feb 2015 11:39:36 +0200 Subject: [PATCH 4/8] Adding ..() --- code/modules/reagents/Chemistry-Reagents.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 8a4b2297e7..368bea867a 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -3111,6 +3111,7 @@ datum if(!data) data = 1 data++ M.dizziness +=6 + ..() switch(data) if(15 to 45) if (!M.stuttering) M.stuttering = 1 @@ -3145,6 +3146,7 @@ datum if(!data) data = 1 data++ M.dizziness +=6 + ..() switch(data) if(15 to 45) if (!M.stuttering) M.stuttering = 1 From feb335c17264dbd4bdfefa5b4e8978ce3d125465 Mon Sep 17 00:00:00 2001 From: emmanuelbassil Date: Sat, 21 Feb 2015 11:56:01 +0200 Subject: [PATCH 5/8] Goddamnit. --- code/modules/reagents/Chemistry-Reagents.dm | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 368bea867a..5c3bac75f2 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -3125,7 +3125,6 @@ datum M.druggy = max(M.druggy, 55) else if(200 to INFINITY) M.adjustToxLoss(2) - ..() return neurotoxin @@ -3160,7 +3159,6 @@ datum M.druggy = max(M.druggy, 55) else if(200 to INFINITY) M.adjustToxLoss(2) - ..() return hippies_delight From ca6448fa4ce232b337fca87905cee2da1ffdb3c4 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Sat, 21 Feb 2015 12:11:40 +0000 Subject: [PATCH 6/8] Fixes #8192 --- code/game/machinery/portable_turret.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index c531e53f96..3192897718 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -297,7 +297,7 @@ else if((istype(I, /obj/item/weapon/wrench))) if(on || raised) - user << "" + user << "You cannot unsecure an active turret!" return if(wrenching) user << "Someone is already [anchored ? "un" : ""]securing the turret!" From a46540ecd77b11aefb92bb7340c1609af7500dad Mon Sep 17 00:00:00 2001 From: emmanuelbassil Date: Sat, 21 Feb 2015 14:53:33 +0200 Subject: [PATCH 7/8] Damn you space --- code/modules/reagents/Chemistry-Reagents.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 5c3bac75f2..56a94d9c90 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -3117,7 +3117,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 if(45 to 55) - if (prob(50)) + if (prob(50)) M.confused = max(M.confused+3,0) else return From 5d627d4b240bbe73bb4b92d9b764f4aa42289a60 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sat, 21 Feb 2015 15:31:01 -0500 Subject: [PATCH 8/8] Fixes compile warning, cleanup --- code/modules/reagents/Chemistry-Reagents.dm | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 56a94d9c90..8fea9c74c6 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -3111,21 +3111,17 @@ datum if(!data) data = 1 data++ M.dizziness +=6 - ..() switch(data) if(15 to 45) - if (!M.stuttering) M.stuttering = 1 - M.stuttering += 3 + M.stuttering = max(M.stuttering+3,0) if(45 to 55) if (prob(50)) M.confused = max(M.confused+3,0) - else - return if(55 to 200) M.druggy = max(M.druggy, 55) - else if(200 to INFINITY) + if(200 to INFINITY) M.adjustToxLoss(2) - return + ..() neurotoxin name = "Neurotoxin" @@ -3145,21 +3141,17 @@ datum if(!data) data = 1 data++ M.dizziness +=6 - ..() switch(data) if(15 to 45) - if (!M.stuttering) M.stuttering = 1 - M.stuttering += 3 + M.stuttering = max(M.stuttering+3,0) if(45 to 55) if (prob(50)) M.confused = max(M.confused+3,0) - else - return if(55 to 200) M.druggy = max(M.druggy, 55) - else if(200 to INFINITY) + if(200 to INFINITY) M.adjustToxLoss(2) - return + ..() hippies_delight name = "Hippies' Delight"