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

stop using items when abnormalities are not set

TeraProxy лет назад: 8
Родитель
Сommit
bda2271393
2 измененных файлов с 4 добавлено и 4 удалено
  1. 3 3
      index.js
  2. 1 1
      manifest.json

+ 3 - 3
index.js

@@ -23,7 +23,7 @@ module.exports = function Essentials(mod) {
 	// ### Hooks ### //
 	// ############# //
 
-	mod.game.on('enter_game', () => { start() })
+	mod.game.on('enter_game', () => { setTimeout(start, 5000) })
 	mod.game.on('leave_game', () => {
 		stop()
 		abnormalities = {}
@@ -101,12 +101,12 @@ module.exports = function Essentials(mod) {
 
 	function useItem(item) {
 		counter++
-		if(counter > 2) {
+		if(counter > 3) {
 			let missing = (item == mod.settings.nostrum) ? 'Nostrums' : 'Crystalbinds'
 			enabled = false
 			mod.command.message('You ran out of ' + missing + ' (ID: ' + item + '). Essentials has been disabled. Please restock and enable the module again by typing "essentials" in this chat.')
 			console.log('You ran out of ' + missing + ' (ID: ' + item + '). Essentials has been disabled. Please restock and enable the module again by typing "essentials" in proxy chat.')
-			setTimeout(() => { counter = 0 }, 4000)
+			setTimeout(() => { counter = 0 }, 6000)
 			return
 		}
 		mod.toServer('C_USE_ITEM', 3, {

+ 1 - 1
manifest.json

@@ -6,7 +6,7 @@
 			"overwrite": false,
 			"hash": "a74387d37fd9a2823c4d0bad54ede9279a51595eb59db4e5abfb3b0c0f695628"
 		},
-		"index.js": "cfccd62dc0479838d064f9dbb5be50d0f3eaedd9e29a2c60e591afdae3329d67",
+		"index.js": "c5e16a069164d2879994c43322154ba757171297849b5643715bfcd299c3b0a1",
 		"module.json": "ff65da8b58525c2468a904b0c5cda7490b98d395dd352dcc12bf58ca67faf3cb",
 		"settings_migrator.js": "1e910f071a6542ea586144b5b8b57e2be8cc5cd196244b0ef294eca578c8eca5"
 	},