allow partial rules for specific item types
This commit is contained in:
@@ -156,6 +156,12 @@ func (r Rule) Evaluate(it data.Item) (RuleResult, error) {
|
||||
continue
|
||||
}
|
||||
|
||||
if itemTypes, found := blockedStatsForItemType[statName[0]]; found {
|
||||
if slices.Contains(itemTypes, it.TypeAsString()) {
|
||||
return RuleResultNoMatch, fmt.Errorf("property %s is not supported for item type %s", statName[0], it.TypeAsString())
|
||||
}
|
||||
}
|
||||
|
||||
layer := 0
|
||||
if len(statData) > 1 {
|
||||
layer = statData[1]
|
||||
|
||||
Reference in New Issue
Block a user