SaltyMonkey лет назад: 6
Родитель
Сommit
5208be7ce2
6 измененных файлов с 22 добавлено и 4 удалено
  1. 3 1
      fpsManager.js
  2. 2 0
      lib/unitControl.js
  3. 4 0
      lib/unitFps.js
  4. 2 0
      lib/unitProto.js
  5. 5 0
      lib/unitState.js
  6. 6 3
      lib/unitTracker.js

+ 3 - 1
fpsManager.js

@@ -38,6 +38,8 @@ class FpsManager {
 		*/
 		let deps = {};
 		
+		console.log("DEBUG: FpsManager -> constructor");
+		
 		//check compatibility (only warning atm)
 		if (mod.proxyAuthor !== "caali") 
 			mod.error(msg.runtimeWarning);
@@ -45,7 +47,7 @@ class FpsManager {
 			mod.error(msg.proxyWarning);
 		// eslint-disable-next-line node/no-missing-require
 		else if(!require("tera-data-parser").types)
-			mod.error(msg.proxyWarning);
+			mod.error(msg.runtimeWarning);
 		
 		mod.game.initialize("me");
 

+ 2 - 0
lib/unitControl.js

@@ -20,6 +20,8 @@ class unitControl {
 	constructor(deps) {
 		let prefixes = ["fm", "fps"];
 
+		console.log("DEBUG: unitControl -> constructor");
+
 		if(deps.data.settings.customCommandTag && deps.data.settings.customCommandTag.length)
 			prefixes.push(deps.data.settings.customCommandTag);
 

+ 4 - 0
lib/unitFps.js

@@ -33,6 +33,8 @@ class unitFps {
 		const blockedServants = new Set();
 		const blockedDrop = new Set();
 
+		console.log("DEBUG: unitFps -> constructor");
+		
 		//-------------------------------------
 		// Basic internal functions 
 		//-------------------------------------
@@ -271,6 +273,7 @@ class unitFps {
 		const blockAchievementsInCombat = () => ((data.activeMode.blockAchievementSpamInCombat && meInCombat()) ? false : undefined);
 
 		const cleanup = () => {
+			console.log("DEBUG: unitFps -> cleanup");
 			blockedPlayers.clear();
 			blockedNpcs.clear();
 			blockedSummons.clear();
@@ -351,6 +354,7 @@ class unitFps {
 		mod.hook(...proto.getData("S_USER_CHANGE_FACE_CUSTOM"), HOOK_SETTINGS.LAST, appearanceChangeHandler);
 
 		deps.data.on(EVENTS.RECONFIGURE, (oldMode, newMode) => {
+			console.log("DEBUG: unitFps -> constructor -> reconfigureEvent");
 			let spawnCollections = oldMode.blockCollections !== newMode.blockCollections && newMode.blockCollections === false;
 			let spawnOwnServants = oldMode.blockOwnServants !== newMode.blockOwnServants && newMode.blockOwnServants === false;
 			let spawnAreaServants = oldMode.blockAreaServants !== newMode.blockAreaServants && newMode.blockAreaServants === false;

+ 2 - 0
lib/unitProto.js

@@ -19,6 +19,8 @@ class unitProto {
 	 */
 	constructor(deps) {
 		this.__mod = deps.mod;
+
+		console.log("DEBUG: unitProto -> constructor");
 	}
 
 	/**

+ 5 - 0
lib/unitState.js

@@ -34,6 +34,8 @@ class unitState extends EventEmitter {
 	constructor(deps) {
 		super();
 		
+		console.log("DEBUG: unitState -> constructor");
+
 		this.__mod = deps.mod;
 		this.__proto = deps.proto;
 		this.__fps = deps.fps;
@@ -75,6 +77,8 @@ class unitState extends EventEmitter {
 	}
 
 	Init() {
+		console.log("DEBUG: unitState -> Init");
+		
 		this.settings = utils.loadJson(utils.getFullPath(__dirname, "../settings/settings.json"));
 		if (!this.settings) throw new Error("Settings file can't be loaded! Critical error. ");
 
@@ -131,6 +135,7 @@ class unitState extends EventEmitter {
 	}
 
 	_eventTrigger() {
+		console.log("DEBUG: unitState -> _eventTrigger");
 		this.emit(EVENTS.RECONFIGURE, this.prevMode, this.activeMode);
 	}
 }

+ 6 - 3
lib/unitTracker.js

@@ -12,7 +12,7 @@
 
 const { ENTITY_HOOK_TYPE, HOOK_SETTINGS, RAW_HOOK_MODE, SPECIAL_ZONES } = require("./helpers/enums");
 
-class unitState {
+class unitTracker {
 	/**
 	 *Creates an instance of unitState.
 	 * @param {deps} deps dependencies
@@ -21,7 +21,9 @@ class unitState {
 	constructor(deps) {
 		const mod = deps.mod;
 		const proto = deps.proto;
-
+		
+		console.log("DEBUG: unitTracker -> constructor");
+		
 		// portals "shapeId": 652992,
 		// ninja log "shapeId": 303030
 		// sentinel "shapeId": 730500
@@ -120,6 +122,7 @@ class unitState {
 		};
 
 		const cleanup = () => {
+			console.log("DEBUG: unitTracker -> cleanup");
 			this.npcs.clear();
 			this.summons.clear();
 			this.users.clear();
@@ -158,4 +161,4 @@ class unitState {
 	}
 }
 
-module.exports = unitState;
+module.exports = unitTracker;