From a6aa3486ad2822cdb40f3e915b4a34fc395f58c0 Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Wed, 1 Sep 2021 15:33:39 +0200 Subject: [PATCH] Added implementaiton for Signal's `handles(ulong)` --- source/eventy/signal.d | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/source/eventy/signal.d b/source/eventy/signal.d index 44b3ca1..6530011 100644 --- a/source/eventy/signal.d +++ b/source/eventy/signal.d @@ -25,6 +25,8 @@ public class Signal this.handler = handler; } + + /** * Returns true if this signal handles the given typeID * false otherwise @@ -32,7 +34,15 @@ public class Signal public bool handles(ulong typeID) { /* FIXME: Implement */ - return true; + foreach(ulong id; typeIDs) + { + if(id == typeID) + { + return true; + } + } + + return false; } public void registerTypeID(ulong typeID)