Просмотр исходного кода

keep raw id for projectiles implementation

SaltyMonkey лет назад: 6
Родитель
Сommit
7f91672e56
2 измененных файлов с 11 добавлено и 5 удалено
  1. 5 2
      lib/unitFps.js
  2. 6 3
      settings/presets/common.json

+ 5 - 2
lib/unitFps.js

@@ -64,7 +64,7 @@ class unitFps {
 		};
 
 		const isCollectionBlockable = () => {
-			if (data.activeMode.blockGatherNode)
+			if (data.activeMode.blockGatherNode || data.activeMode.blockGatherNodes)
 				return true;
 			return false;
 		};
@@ -141,7 +141,10 @@ class unitFps {
 		const isProjectileBlockable = (event) => {
 			if (data.activeMode.blockProjectiles && data.activeMode.blockProjectiles.players) {
 				if (data.activeMode.blockProjectiles.keepParty && partyMembers.has(event.gameId)) return false;
-				if (data.activeMode.blockProjectiles.players && tracker.spawnedPlayers.has(event.gameId)) return true;
+				else if (data.activeMode.blockProjectiles.keepRawId && utils.arraysHasIntersect(event.skill.id, data.activeMode.blockProjectiles.keepRawId))
+					return false;
+
+				if (tracker.spawnedPlayers.has(event.gameId)) return true;
 			}
 			return false;
 		};

+ 6 - 3
settings/presets/common.json

@@ -21,7 +21,7 @@
 			"blockAchievementsInCombat": false,
 			"blockInventoryInCombat": false,
 			"blockShakeEffects": false,
-			"blockGatherNode": false,
+			"blockGatherNodes": false,
 			"blockPetBaloons": false,
 			"blockHits": {
 				"area": false,
@@ -44,6 +44,7 @@
 			},
 			"blockProjectiles": {
 				"players": false,
+				"keepRawId": [],
 				"keepParty": false
 			},
 			"blockDropItems": {
@@ -89,7 +90,7 @@
 			"blockAchievementsInCombat": false,
 			"blockInventoryInCombat": false,
 			"blockShakeEffects": true,
-			"blockGatherNode": true,
+			"blockGatherNodes": true,
 			"blockPetBaloons": true,
 			"blockHits": {
 				"area": true,
@@ -112,6 +113,7 @@
 			},
 			"blockProjectiles": {
 				"players": false,
+				"keepRawId": [],
 				"keepParty": false
 			},
 			"blockDropItems": {
@@ -157,7 +159,7 @@
 			"blockAchievementsInCombat": true,
 			"blockInventoryInCombat": true,
 			"blockShakeEffects": true,
-			"blockGatherNode": true,
+			"blockGatherNodes": true,
 			"blockPetBaloons": true,
 			"blockHits": {
 				"area": true,
@@ -180,6 +182,7 @@
 			},
 			"blockProjectiles": {
 				"players": true,
+				"keepRawId": [],
 				"keepParty": false
 			},
 			"blockDropItems": {