Skip to content

Commit d25b461

Browse files
committed
Added targeting settings group
1 parent a57d69e commit d25b461

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/main/kotlin/com/lambda/config/groups/Targeting.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,33 +60,33 @@ abstract class Targeting(
6060
* The range within which entities can be targeted. This value is configurable and constrained
6161
* between 1.0 and [maxRange].
6262
*/
63-
override val targetingRange by owner.setting("Targeting Range", defaultRange, 1.0..maxRange, 0.05) { predicate() }
63+
override val targetingRange by owner.setting("Targeting Range", defaultRange, 1.0..maxRange, 0.05) { predicate() }.group(baseGroup)
6464

6565
/**
6666
* Whether players are included in the targeting scope.
6767
*/
68-
override val players by owner.setting("Players", true) { predicate() }
68+
override val players by owner.setting("Players", true) { predicate() }.group(baseGroup)
6969

7070
/**
7171
* Whether friends are included in the targeting scope.
7272
* Requires [players] to be true.
7373
*/
74-
override val friends by owner.setting("Friends", false) { predicate() && players }
74+
override val friends by owner.setting("Friends", false) { predicate() && players }.group(baseGroup)
7575

7676
/**
7777
* Whether mobs are included in the targeting scope.
7878
*/
79-
private val mobs by owner.setting("Mobs", true) { predicate() }
79+
private val mobs by owner.setting("Mobs", true) { predicate() }.group(baseGroup)
8080

8181
/**
8282
* Whether hostile mobs are included in the targeting scope
8383
*/
84-
private val hostilesSetting by owner.setting("Hostiles", true) { predicate() && mobs }
84+
private val hostilesSetting by owner.setting("Hostiles", true) { predicate() && mobs }.group(baseGroup)
8585

8686
/**
8787
* Whether passive animals are included in the targeting scope
8888
*/
89-
private val animalsSetting by owner.setting("Animals", true) { predicate() && mobs }
89+
private val animalsSetting by owner.setting("Animals", true) { predicate() && mobs }.group(baseGroup)
9090

9191
/**
9292
* Indicates whether hostile entities are included in the targeting scope.
@@ -101,12 +101,12 @@ abstract class Targeting(
101101
/**
102102
* Whether invisible entities are included in the targeting scope.
103103
*/
104-
override val invisible by owner.setting("Invisible", true) { predicate() }
104+
override val invisible by owner.setting("Invisible", true) { predicate() }.group(baseGroup)
105105

106106
/**
107107
* Whether dead entities are included in the targeting scope.
108108
*/
109-
override val dead by owner.setting("Dead", false) { predicate() }
109+
override val dead by owner.setting("Dead", false) { predicate() }.group(baseGroup)
110110

111111
/**
112112
* Validates whether a given entity is targetable by the player based on current settings.
@@ -144,7 +144,7 @@ abstract class Targeting(
144144
/**
145145
* The field of view limit for targeting entities. Configurable between 5 and 180 degrees.
146146
*/
147-
val fov by owner.setting("FOV Limit", 180, 5..180, 1) { predicate() }.group(baseGroup)
147+
val fov by owner.setting("FOV Limit", 180, 5..180, 1) { predicate() && priority == Priority.FOV }.group(baseGroup)
148148

149149
/**
150150
* The priority used to determine which entity is targeted. Configurable with default set to [Priority.DISTANCE].

0 commit comments

Comments
 (0)