mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Display conditions - Loosened up type rules for dynamic comparisons
Display conditions - Improved static value input and added support for int and double
This commit is contained in:
1 parent
68b9a4b933
commit
f617a6461a
21 files changed
+197
-172
No files matched your search
@@ -4,6 +4,7 @@ using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using Artemis.Core.Events;
|
||||
using Artemis.Core.Exceptions;
|
||||
using Artemis.Core.Extensions;
|
||||
using Artemis.Core.Models.Profile.Conditions;
|
||||
using Artemis.Core.Models.Profile.Conditions.Operators;
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
@@ -141,7 +142,7 @@ namespace Artemis.Core.Services
|
||||
{
|
||||
if (type == null)
|
||||
return new List<DisplayConditionOperator>(_registeredConditionOperators);
|
||||
return _registeredConditionOperators.Where(c => c.CompatibleTypes.Any(t => t.IsAssignableFrom(type))).ToList();
|
||||
return _registeredConditionOperators.Where(c => c.CompatibleTypes.Any(t => t.IsCastableFrom(type))).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user