Dmitry S 4 years ago
parent
commit
4b061d57ba
7 changed files with 20 additions and 91 deletions
  1. 3 0
      .gitignore
  2. 0 3
      README.md
  3. 0 33
      S_DIALOG.def
  4. 0 29
      config_generator.js
  5. 2 10
      index.js
  6. 6 8
      manifest.json
  7. 9 8
      module.json

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+.eslintrc.json
+manifest-generator.bat
+manifest-generator.js

+ 0 - 3
README.md

@@ -1,6 +1,3 @@
 # JustSpamF
 
 Changes npc interactions to a form that let you hit `F` to progress including teleportals
-
-# Commands
-toggle on/off with `/8 jsf`

+ 0 - 33
S_DIALOG.def

@@ -1,33 +0,0 @@
-uint64 gameId
-int32  type
-uint32 key1
-uint32 key2
-int32  questTaskId
-int32  textId
-uint32 id
-bool   autoClose
-uint32 unk5
-int32  unk6
-int32  unk7
-int32  unk8
-int32  maxRepeatCount
-byte   unk10
-
-array buttons
-- int32  id
-- int32  index
-- int32  type
-- string text
-
-array unkArray
-- uint32 unk1
-- uint32 unk2
-- uint32 unk3
-- uint32 unk4
-- uint32 unk5
-- uint32 unk6
-- uint32 unk7
-- uint32 unk8
-- uint32 unk9
-- uint32 unk10
-- uint32 unk11

+ 0 - 29
config_generator.js

@@ -1,29 +0,0 @@
-'use strict'
-
-const DefaultSettings = { enabled: true }//why am I using this bloat?
-
-module.exports = function MigrateSettings(from_ver, to_ver, settings) {
-  if (from_ver === undefined) {
-    return Object.assign(Object.assign({}, DefaultSettings), settings)
-  } else if (from_ver === null) {
-    return DefaultSettings
-  } else {
-    if (from_ver + 1 < to_ver) {
-      settings = MigrateSettings(from_ver, from_ver + 1, settings)
-      return MigrateSettings(from_ver + 1, to_ver, settings)
-    }
-    switch (to_ver) {
-      default:
-        let oldsettings = settings
-
-        settings = Object.assign(DefaultSettings, {})
-
-        for (let option in oldsettings) {
-          if (settings[option]) { settings[option] = oldsettings[option] }
-        }
-        break
-    }
-
-    return settings
-  }
-}

+ 2 - 10
index.js

@@ -1,15 +1,7 @@
 module.exports = function justspamf(d) {
-  if(d.majorPatchVersion == 92) d.dispatch.addDefinition('S_DIALOG', 99, __dirname + '/S_DIALOG.def', true)
-  d.hook('S_DIALOG', '*', (e) => {
-    if (!e.buttons.length || !d.settings.enabled) return
-    for (let i = 0; i < e.buttons.length; i++) { if ([1, 2, 3, 4, 5, 51, 53, 54, 55, 56, 63].includes(e.buttons[i].type)) e.buttons[i].type = 43 }
+  d.hook('S_DIALOG', 2, (e) => {
+    for (let i = 0; i < e.options.length; i++) {e.options[i].style = 43}
     e.type = 1
     return true
   })
-  d.command.add('jsf', (arg) => {
-    if (!arg) {
-      d.settings.enabled = !d.settings.enabled
-      d.command.message(`${d.settings.enabled ? 'en' : 'dis'}abled`)
-    }
-  })
 }

+ 6 - 8
manifest.json

@@ -1,9 +1,7 @@
 {
-	"files": {
-		"README.md": "c188202dee9f587fdc405f021367b7bf7ea7469af9010610f943001c3fc8bd57",
-		"S_DIALOG.def": "86dedec41fdb60dcf55aa9fc8dc8dd1d6da294c7cf3c08fc0aa7ba865209fd9e",
-		"config_generator.js": "fd4ec54089ed0a66a8d85784d5d0f61fbe93e5b72ac33f765b86a432b98889b4",
-		"index.js": "3524d6d683e2ba5862066d8199c08d0b47670713a7de03668bbb95fa61543543",
-		"module.json": "719b5e0c0f09eb702bfe77cf470208d0ecd4e0d65942debdd847988b3673a875"
-	}
-}
+    "files": {
+        "README.md": "316aa12aaf8aae78c3ff92ab4c97c75c1fa07872be1eed3e47b7853622317913",
+        "index.js": "927d90b15411759a56e4a177ae725ea39fa8a632aadec18176782d3abd46a4b0",
+        "module.json": "9651ea2208fdf2a840af6bb777ffc79c899aec0bed86aaf4ad6ef8533fb2fd41"
+    }
+}

+ 9 - 8
module.json

@@ -1,11 +1,12 @@
 {
-	"disableAutoUpdate": false,
-    "options": {"niceName": "JustSpamF", "guiName": "JustSpamF", "settingsVersion": 4, "settingsFile": "config.json", "settingsMigrator": "config_generator.js"},
+    "disableAutoUpdate": false,
+    "options": {
+        "niceName": "JustSpamF",
+        "guiName": "JustSpamF"
+    },
     "name": "JustSpamF",
     "author": "Snug",
-	"donationUrl": "https://play.google.com/store/apps/details?id=com.CarvedGames.SD",
-    "description": "Changes npc interactions to a form that let you hit F to progress including teleportals(/8 jsf to toggle on/off)",
-    "version": "1.4",
-	"servers": ["https://raw.githubusercontent.com/Snugglez/JustSpamF/master/"],
-	"supportUrl": "https://github.com/Snugglez/JustSpamF/blob/master/README.md"
-}
+    "description": "Changes npc interactions to a form that let you hit F to progress including teleportals",
+    "version": "1",
+    "servers": ["https://raw.githubusercontent.com/tera-private-mods/JustSpamF/master/"]
+}