aboutsummaryrefslogtreecommitdiff
path: root/features/events
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-06-20 18:05:48 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-06-20 18:05:48 +0800
commitbd3a4ae6b17af8f7812fb7988a4bc0246725fee8 (patch)
tree29187d3e49c412bbb766f4aa5f4e3d2105bad977 /features/events
parentf1dfd307ee4672a050af173bef7c33b5e3752a6c (diff)
downloadSoopyV2-bd3a4ae6b17af8f7812fb7988a4bc0246725fee8.tar.gz
SoopyV2-bd3a4ae6b17af8f7812fb7988a4bc0246725fee8.tar.bz2
SoopyV2-bd3a4ae6b17af8f7812fb7988a4bc0246725fee8.zip
+ option to only send inquis location to party members
+ when disabling inquis alert it wont send ur locations to anyone
Diffstat (limited to 'features/events')
-rw-r--r--features/events/index.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/features/events/index.js b/features/events/index.js
index e917d94..19ff72f 100644
--- a/features/events/index.js
+++ b/features/events/index.js
@@ -59,9 +59,9 @@ class Events extends Feature {
ChatLib.command("togglemusic")
}, false).requires(this.showBurrialGuess)
- this.otherInquisWaypoints = new ToggleSetting("Show other users inquis locations", "May be usefull for loot share", true, "inquis_location_other", this).requires(this.loadFromParticles)
+ this.otherInquisWaypoints = new ToggleSetting("Show other users inquis locations", "If disabled others wont be able to see urs", true, "inquis_location_other", this).requires(this.loadFromParticles)
this.otherInquisPing = new ToggleSetting("Show cool title when someone's inquis spawned", "May be usefull for loot share", true, "inquis_ping_other", this).requires(this.loadFromParticles)
-
+ this.limitPMemb = new ToggleSetting("Only send inquis ping to party members", "If not in a party it works as default", true, "inquis_ping_party", this).requires(this.otherInquisPing)
this.shinyBlocks = []
this.lastDing = 0
@@ -121,10 +121,16 @@ class Events extends Feature {
warpData.worldload = [Player.getX(), Player.getY(), Player.getZ()]
ChatLib.chat(this.FeatureManager.messagePrefix + "Set /hub location!")
})
+ this.registerCommand("setpmemb", (...memb) => {
+ this.FeatureManager.features["dataLoader"].class.partyMembers.clear()
+ memb.forEach(m => {
+ this.FeatureManager.features["dataLoader"].class.partyMembers.add(memb)
+ })
+ })
}
entityJoinWorldEvent(e) {
- this.todoE.push(e.entity);
+ if (this.otherInquisWaypoints.getValue()) this.todoE.push(e.entity);
}
inquisData(loc, user) {
@@ -233,7 +239,9 @@ class Events extends Feature {
}
})
if (self) {
- socketConnection.sendInquisData({ loc: [Math.round(Player.getX()), Math.round(Player.getY()), Math.round(Player.getZ())] });
+ let pmemb = []
+ this.FeatureManager.features["dataLoader"].class.partyMembers.forEach(a => pmemb.push(a))
+ socketConnection.sendInquisData({ loc: [Math.round(Player.getX()), Math.round(Player.getY()), Math.round(Player.getZ())], pmemb, limitPMemb: pmemb.length !== 0 && this.limitPMemb.getValue() });
this.inquisWaypointSpawned = true
}
}