Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2612 closed enhancement (fixed)

[PATCH] Allow logical combinations (and/or) in class checks

Reported by: sanderd17 Owned by: sanderd17
Priority: Should Have Milestone: Alpha 17
Component: UI & Simulation Keywords: patch
Cc: mimo Patch:

Description (last modified by sanderd17)

Currently, technologies is the only place where affected classes are denoted with 2D lists. Where the first dimension means OR, and the second means AND.

It's not possible to combine required classes with AND in other filters (s.a. attackability, garrisonability, ...)

I have a patch for that, allowing to use the '+'-sign in entity templates to denote AND. But I wonder if this will cause problems with the AI.

The function to check classes is a global function though. So all logic could be united this time.

This example unifies the Technology handling with the new method, and also implements it to check garrisonability.

Attachments (1)

classes.diff (6.6 KB ) - added by sanderd17 10 years ago.

Download all attachments as: .zip

Change History (5)

by sanderd17, 10 years ago

Attachment: classes.diff added

comment:1 by sanderd17, 10 years ago

Description: modified (diff)
Keywords: patch review added

comment:2 by sanderd17, 10 years ago

Summary: Allow logical combinations (and/or) in class checks[PATCH] Allow logical combinations (and/or) in class checks

comment:3 by sanderd17, 10 years ago

Owner: set to sanderd17
Resolution: fixed
Status: newclosed

In 15294:

Allow for unification in identity class matching + add the opportunity to combine with AND and OR. Fixes #2612

comment:4 by sanderd17, 10 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.