From 811dd2c454865937db14796a003fe016119883fe Mon Sep 17 00:00:00 2001 From: Kugamo Date: Sat, 29 Aug 2020 18:31:21 -0500 Subject: [PATCH 1/4] fix --- code/game/objects/items/devices/scanners.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index f20a2cc5875..41130d8a6fb 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -73,6 +73,8 @@ REAGENT SCANNER if(U && U.intact) O.invisibility = 101 O.alpha = 255 + if(O.alpha != 255) + O.alpha = 255 for(var/mob/living/M in T.contents) var/oldalpha = M.alpha if(M.alpha < 255 && istype(M)) From 702fbbfdb3c8cd8579ae9db3916b02cedfd97357 Mon Sep 17 00:00:00 2001 From: Kugamo Date: Sat, 29 Aug 2020 19:03:27 -0500 Subject: [PATCH 2/4] this is acutally is a better fix my first commit didnt account for the possibility that the revealed item could be destroyed, this way also eliminates another if statement. BUT it still goes through the full cycle for the objects(they still appear translucent for a time) --- code/game/objects/items/devices/scanners.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 41130d8a6fb..43697ac4776 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -72,9 +72,7 @@ REAGENT SCANNER var/turf/U = O.loc if(U && U.intact) O.invisibility = 101 - O.alpha = 255 - if(O.alpha != 255) - O.alpha = 255 + O.alpha = 255 for(var/mob/living/M in T.contents) var/oldalpha = M.alpha if(M.alpha < 255 && istype(M)) From c340e71999b3eef6103ef99ab31ae26c1b887dfb Mon Sep 17 00:00:00 2001 From: Kugamo Date: Sat, 29 Aug 2020 19:07:55 -0500 Subject: [PATCH 3/4] ok this is the best solution A single if statement, how elegant --- code/game/objects/items/devices/scanners.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 43697ac4776..88ab27a150f 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -72,7 +72,7 @@ REAGENT SCANNER var/turf/U = O.loc if(U && U.intact) O.invisibility = 101 - O.alpha = 255 + if(O) O.alpha = 255 for(var/mob/living/M in T.contents) var/oldalpha = M.alpha if(M.alpha < 255 && istype(M)) From da45849334df29eb74e28332ce20a30cacce6ea4 Mon Sep 17 00:00:00 2001 From: Kugamo Date: Sun, 30 Aug 2020 15:43:23 -0500 Subject: [PATCH 4/4] splits up if statement into multiple lines --- code/game/objects/items/devices/scanners.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 88ab27a150f..c65a9c3e50b 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -72,7 +72,8 @@ REAGENT SCANNER var/turf/U = O.loc if(U && U.intact) O.invisibility = 101 - if(O) O.alpha = 255 + if(O) + O.alpha = 255 for(var/mob/living/M in T.contents) var/oldalpha = M.alpha if(M.alpha < 255 && istype(M))