From 6f9755f98e023d757a3e95fb480697e1add864d3 Mon Sep 17 00:00:00 2001 From: wixoa Date: Fri, 15 Sep 2023 12:04:40 -0400 Subject: [PATCH] Use a for loop in `DreamList.ContainsValue()` (#1470) --- OpenDreamRuntime/Objects/Types/DreamList.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OpenDreamRuntime/Objects/Types/DreamList.cs b/OpenDreamRuntime/Objects/Types/DreamList.cs index 750091cd67..55862fb108 100644 --- a/OpenDreamRuntime/Objects/Types/DreamList.cs +++ b/OpenDreamRuntime/Objects/Types/DreamList.cs @@ -142,7 +142,12 @@ public virtual void AddValue(DreamValue value) { //Does not include associations public virtual bool ContainsValue(DreamValue value) { - return _values.Contains(value); + for (int i = 0; i < _values.Count; i++) { + if (_values[i].Equals(value)) + return true; + } + + return false; } public virtual bool ContainsKey(DreamValue value) {