Browse Source

Update legacy proxy warning. Remove pre-79 stuff.

Caali 7 years ago
parent
commit
2a97267dd6
2 changed files with 11 additions and 12 deletions
  1. 9 7
      index.js
  2. 2 5
      manifest.json

+ 9 - 7
index.js

@@ -1,8 +1,11 @@
 const SettingsUI = require('tera-mod-ui').Settings;
 
 module.exports = function InstantEverything(mod) {
-    if (mod.proxyAuthor !== 'caali' || !global.TeraProxy)
-        mod.warn('You are trying to use InstantEverything on an unsupported version of tera-proxy. It may not work as expected, and even if it does now it may break at any point in the future!');
+    if(mod.proxyAuthor !== 'caali' || !global.TeraProxy) {
+        mod.warn('You are trying to use InstantEverything on an unsupported legacy version of tera-proxy.');
+        mod.warn('The module may not work as expected, and even if it works for now, it may break at any point in the future!');
+        mod.warn('It is highly recommended that you download the latest official version from the #proxy channel in https://discord.gg/dUNDDtw');
+    }
 
 
     const PURPOSES = ['enchant', 'upgrade', 'soulbind', 'merge', 'dismantle'];
@@ -34,17 +37,16 @@ module.exports = function InstantEverything(mod) {
             }
 
             case 'upgrade': {
-                const upgrading_method = mod.majorPatchVersion >= 79 ? 'EVOLUTION' : 'UPGRADE';
-                hook('upgrade', 'C_REGISTER_' + upgrading_method + '_ITEM', 1, event => { upgrading = event });
+                hook('upgrade', 'C_REGISTER_EVOLUTION_ITEM', 1, event => { upgrading = event });
 
-                hook('upgrade', 'C_START_' + upgrading_method, 1, event => {
+                hook('upgrade', 'C_START_EVOLUTION', 1, event => {
                     if (upgrading && event.contract === upgrading.contract) {
-                        mod.send('C_REQUEST_' + upgrading_method, 1, upgrading);
+                        mod.send('C_REQUEST_EVOLUTION', 1, upgrading);
                         return false;
                     }
                 });
 
-                hook('upgrade', 'C_REQUEST_' + upgrading_method, 'raw', _ => false);
+                hook('upgrade', 'C_REQUEST_EVOLUTION', 'raw', _ => false);
                 break;
             }
 

+ 2 - 5
manifest.json

@@ -1,6 +1,6 @@
 {
     "files": {
-        "index.js": "143f2060a04f8df4f63fea3f51fe3056841c90427f018af4b8c5b978f23a478b",
+        "index.js": "aa1470527c8ff2b69b15a2d7dc704e2250e5cbf27dbebb3cea736d4a62ec7f1e",
         "settings_migrator.js": "823fc1c204003a4a782e23b1a0781b9ee48d2865004a8acb73359777c0c067bc",
         "settings_structure.js": "76520793fad024750498529f19c830819b5d9e3b0ab6aa408caaf32c0c7b2000",
         "module.json": "90ec2cfc4ebf9d639a1e02f55f7c6520442d4878c10119113dfcd23bdac68f8e"
@@ -10,9 +10,6 @@
         "C_REQUEST_ENCHANT": ["raw", 1],
         "C_START_ENCHANT": 1,
 
-        "C_REGISTER_UPGRADE_ITEM": 1,
-        "C_REQUEST_UPGRADE": ["raw", 1],
-        "C_START_UPGRADE": 1,
         "C_REGISTER_EVOLUTION_ITEM": 1,
         "C_REQUEST_EVOLUTION": ["raw", 1],
         "C_START_EVOLUTION": 1,
@@ -21,7 +18,7 @@
         "C_BIND_ITEM_EXECUTE": ["raw", 1],
 
         "C_MERGE_ITEM_EXECUTE": ["raw", 1],
-        
+
         "C_RQ_START_SOCIAL_ON_PROGRESS_DECOMPOSITION": 1,
         "C_RQ_COMMIT_DECOMPOSITION_CONTRACT": ["raw", 1],