From 017f7c2776d7e66e5b8f71ea3451ddea433f00b0 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Fri, 30 Dec 2016 00:53:52 -0800 Subject: [PATCH] Tweaks the listdiff proc to work as prior to avoid runtimes I adjusted the noir glasses accordingly so that they would work with this --- code/__HELPERS/lists.dm | 3 +-- code/modules/clothing/glasses/glasses.dm | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index 7d7f0365dc1..f54726c4161 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -116,8 +116,7 @@ else result = first - second - if(result.len) - return result + return result /* * Returns list containing entries that are in either list but not both. diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 5ca2b346064..4fde338ba54 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -259,10 +259,10 @@ if(slot == slot_glasses) if(noir_mode) - if(color_view && user.client && (!user.client.color || difference)) + if(color_view && user.client && (!user.client.color || difference.len)) animate(user.client, color = color_view, time = 10) else - if(user.client && user.client.color && !difference) + if(user.client && user.client.color && !difference.len) animate(user.client, color = initial(user.client.color), time = 10) ..(user, slot) @@ -270,7 +270,7 @@ var/list/difference = difflist(user.client.color, color_view) if(istype(user) && user.glasses == src) - if(user.client && user.client.color && !difference) + if(user.client && user.client.color && !difference.len) animate(user.client, color = initial(user.client.color), time = 10) ..(user)