Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
Revert "Another fix attempt"
Browse files Browse the repository at this point in the history
This reverts commit 3518bb6.
  • Loading branch information
SmokeyStack committed Feb 14, 2024
1 parent 6682b21 commit aae7f37
Show file tree
Hide file tree
Showing 7 changed files with 4,820 additions and 946 deletions.
File renamed without changes.
1,139 changes: 1,139 additions & 0 deletions docs/entities/Client-Entity.md

Large diffs are not rendered by default.

File renamed without changes.
67 changes: 67 additions & 0 deletions docs/entities/Filters-Entity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: Entity Filters
---


# Filters

Filters allow data objects to specify test criteria which allows their use.

For example, a model that includes a filter will only be used when the filter criteria is true.



A typical filter consists of four parameters:

name: the name of the test to apply.

domain: the domain the test should be performed in. An armor slot, for example. This parameter is only used by a few tests.

operator: the comparison to apply with the value, such as 'equal' or 'greater'.

value: the value being compared with the test.



A typical filter looks like the following:

{ "test" : "moon_intensity", "subject" : "self", "operator" : "greater", "value" : "0.5" }

Which results in the calling entity (self) calculating the moon_intensity at its location and returning true if the result is greater than 0.5.



Tests can be combined into groups using the collections 'all_of', 'any_of', or 'none_of'.

All tests in an 'all_of' group must pass in order for the group to pass.

One or more tests in an 'any_of' group must pass in order for the group to pass.

All tests in a 'none_of' group must fail in order for the group to pass.





## has_biome_tag

Tests whether the biome the subject is in has the specified tag.

| Type| Name| Default| Description |
|:-----------:|:-----------:|:-----------:|:-----------:|
| String| operator| equals| (Optional) The comparison to apply with 'value'.<br/><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;"><tr> <th style="border-style:solid; border-width:2;">Options</th> <th style="border-style:solid; border-width:2;">Description</th> </tr><tr><td style="border-style:solid; border-width:2; padding:8px">!=</td><td style="border-style:solid; border-width:2; padding:8px">Test for inequality.</br></td></tr><tr><td style="border-style:solid; border-width:2; padding:8px"><</td><td style="border-style:solid; border-width:2; padding:8px">Test for less-than the value.</br></td></tr><tr><td style="border-style:solid; border-width:2; padding:8px"><=</td><td style="border-style:solid; border-width:2; padding:8px">Test for less-than or equal to the value.</br></td></tr><tr><td style="border-style:solid; border-width:2; padding:8px"><></td><td style="border-style:solid; border-width:2; padding:8px">Test for inequality.</br></td></tr><tr><td style="border-style:solid; border-width:2; padding:8px">=</td><td style="border-style:solid; border-width:2; padding:8px">Test for equality.</br></td></tr><tr><td style="border-style:solid; border-width:2; padding:8px">==</td><td style="border-style:solid; border-width:2; padding:8px">Test for equality.</br></td></tr><tr><td style="border-style:solid; border-width:2; padding:8px">></td><td style="border-style:solid; border-width:2; padding:8px">Test for greater-than the value.</br></td></tr><tr><td style="border-style:solid; border-width:2; padding:8px">>=</td><td style="border-style:solid; border-width:2; padding:8px">Test for greater-than or equal to the value.</br></td></tr><tr><td style="border-style:solid; border-width:2; padding:8px">equals</td><td style="border-style:solid; border-width:2; padding:8px">Test for equality.</br></td></tr><tr><td style="border-style:solid; border-width:2; padding:8px">not</td><td style="border-style:solid; border-width:2; padding:8px">Test for inequality.</br></td></tr></table> |
| String| subject| self| (Optional) The subject of this filter test.<br/><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;"><tr> <th style="border-style:solid; border-width:2;">Options</th> <th style="border-style:solid; border-width:2;">Description</th> </tr><tr><td style="border-style:solid; border-width:2; padding:8px">block</td><td style="border-style:solid; border-width:2; padding:8px">The block involved with the interaction.</br></td></tr><tr><td style="border-style:solid; border-width:2; padding:8px">damager</td><td style="border-style:solid; border-width:2; padding:8px">The damaging actor involved with the interaction.</br></td></tr><tr><td style="border-style:solid; border-width:2; padding:8px">other</td><td style="border-style:solid; border-width:2; padding:8px">The other member of an interaction, not the caller.</br></td></tr><tr><td style="border-style:solid; border-width:2; padding:8px">parent</td><td style="border-style:solid; border-width:2; padding:8px">The caller's current parent.</br></td></tr><tr><td style="border-style:solid; border-width:2; padding:8px">player</td><td style="border-style:solid; border-width:2; padding:8px">The player involved with the interaction.</br></td></tr><tr><td style="border-style:solid; border-width:2; padding:8px">self</td><td style="border-style:solid; border-width:2; padding:8px">The entity or object calling the test</br></td></tr><tr><td style="border-style:solid; border-width:2; padding:8px">target</td><td style="border-style:solid; border-width:2; padding:8px">The caller's current target.</br></td></tr></table> |
| String| value| | (Required) The tag to look for |


### Examples

**Full..**
```
{ "test": "has_biome_tag", "subject": "self", "operator": "equals", "value": " " }
```

**Short (using Defaults)..**
```
{ "test": "has_biome_tag", "value": " " }
```
Loading

0 comments on commit aae7f37

Please sign in to comment.