1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! The points of the Area loot mod (`area-loot`).
use crateEntity;
/// Whether a loot container around an emptied one comes along,
/// `area-loot:eligible`: the answer is whether it does.
///
/// Asked only for a full enemy loot container within the mod's radius
/// that no other player is at, with the answer true, so a link can leave
/// it out but never take in one the mod passed over. Asked on the server's
/// game thread when a player empties a container, once per container
/// around it.
///
/// # Examples
///
/// ```
/// use enshwick::points::area_loot::Eligible;
/// use enshwick::points::{Order, Verdict};
///
/// fn init(load: &mut enshwick::Load<'_>) -> Result<(), enshwick::Off> {
/// // Only the loot within five metres comes along.
/// load.extend_point(&Order::new(), |loot: &Eligible, _: &bool| {
/// if loot.distance > 5.0 { Verdict::Set(false) } else { Verdict::Pass }
/// })
/// }
/// ```