Browse Source

added rng boxes visuals block

SaltyMonkey 6 years ago
parent
commit
9fc8a64222
3 changed files with 24 additions and 0 deletions
  1. 12 0
      data/protoData.json
  2. 9 0
      lib/unitFps.js
  3. 3 0
      settings/presets/common.json

+ 12 - 0
data/protoData.json

@@ -178,5 +178,17 @@
 	},
 	"S_LOCKON_YOU": {
 		"default": 1
+	},
+	"S_SPAWN_EVENT_SEED": {
+		"default": 2
+	},
+	"S_UPDATE_EVENT_SEED_STATE": {
+		"default": 4
+	},
+	"S_RESULT_EVENT_SEED": {
+		"default": 2
+	},
+	"S_DESPAWN_EVENT_SEED": {
+		"default": 1
 	}
 }

+ 9 - 0
lib/unitFps.js

@@ -473,6 +473,10 @@ class unitFps {
 			if (data.activeMode.blockAnnoyingScreenMessages) return false;
 		};
 
+		const eventBoxSeedHandler = () => {
+			if (data.activeMode.blockRngBoxesVisuals) return false;
+		};
+
 		const dropIfBlockedHandler = (event) => {
 			let id = event.target || event.gameId;
 			if (isEntityBlocked(id)) return false;
@@ -564,6 +568,11 @@ class unitFps {
 		mod.hook(...proto.getData("S_SYSTEM_MESSAGE"), HOOK_SETTINGS.LAST, smtHandler);
 		mod.hook("S_LOCKON_YOU", RAW_HOOK_MODE.EVENT, HOOK_SETTINGS.LAST, lockYouHandler);
 
+		mod.hook("S_SPAWN_EVENT_SEED", RAW_HOOK_MODE.EVENT, HOOK_SETTINGS.LAST, eventBoxSeedHandler);
+		mod.hook("S_UPDATE_EVENT_SEED_STATE", RAW_HOOK_MODE.EVENT, HOOK_SETTINGS.LAST, eventBoxSeedHandler);
+		mod.hook("S_RESULT_EVENT_SEED", RAW_HOOK_MODE.EVENT, HOOK_SETTINGS.LAST, eventBoxSeedHandler);
+		mod.hook("S_DESPAWN_EVENT_SEED", RAW_HOOK_MODE.EVENT, HOOK_SETTINGS.LAST, eventBoxSeedHandler);
+
 		mod.hook(...proto.getData("S_DESPAWN_COLLECTION"), HOOK_SETTINGS.LAST, collectionHandler.bind(null, ENTITY_HOOK_TYPE.DESPAWN));
 		mod.hook(...proto.getData("S_SPAWN_COLLECTION"), HOOK_SETTINGS.LAST, collectionHandler.bind(null, ENTITY_HOOK_TYPE.SPAWN));
 		mod.hook(...proto.getData("S_REQUEST_SPAWN_SERVANT"), HOOK_SETTINGS.LAST, servantsHandler.bind(null, ENTITY_HOOK_TYPE.SPAWN));

+ 3 - 0
settings/presets/common.json

@@ -15,6 +15,7 @@
 			"blockCustomAppearanceChanges": false,
 			"blockUselessPackets": false,
 			"blockAnnoyingScreenMessages": false,
+			"blockRngBoxesVisuals": false,
 			"blockNoctsEffect": false,
 			"blockActionScripts": false,
 			"blockNpcsDeathAnimations": false,
@@ -85,6 +86,7 @@
 			"blockCustomAppearanceChanges": true,
 			"blockUselessPackets": true,
 			"blockAnnoyingScreenMessages": true,
+			"blockRngBoxesVisuals": true,
 			"blockNoctsEffect": true,
 			"blockActionScripts": true,
 			"blockNpcsDeathAnimations": true,
@@ -155,6 +157,7 @@
 			"blockCustomAppearanceChanges": true,
 			"blockUselessPackets": true,
 			"blockAnnoyingScreenMessages": true,
+			"blockRngBoxesVisuals": true,
 			"blockNoctsEffect": true,
 			"blockActionScripts": true,
 			"blockNpcsDeathAnimations": true,