Enhancement: Make Nopickup command optional (#819)
* Making Nopickup command optional * Update bot.py * Update config.py * set default on, rework logic Co-authored-by: mgleed <[email protected]>
This commit is contained in:
committed by
GitHub
co-authored by
mgleed
parent
baa6bf0e9b
commit
ac3e79401b
+1
-1
@@ -264,7 +264,7 @@ class Bot:
|
||||
Logger.info(f"Please Enter the region ip and hot ip on config to use")
|
||||
|
||||
# Run /nopickup command to avoid picking up stuff on accident
|
||||
if not self._ran_no_pickup and not self._game_stats._nopickup_active:
|
||||
if Config().char["enable_no_pickup"] and (not self._ran_no_pickup and not self._game_stats._nopickup_active):
|
||||
self._ran_no_pickup = True
|
||||
if view.enable_no_pickup():
|
||||
self._game_stats._nopickup_active = True
|
||||
|
||||
@@ -300,6 +300,7 @@ class Config:
|
||||
"runs_per_repair": False if not self._select_val("char", "runs_per_repair") else int(self._select_val("char", "runs_per_repair")),
|
||||
"gamble_items": False if not self._select_val("char", "gamble_items") else self._select_val("char", "gamble_items").replace(" ","").split(","),
|
||||
"sell_junk": bool(int(self._select_val("char", "sell_junk"))),
|
||||
"enable_no_pickup": bool(int(self._select_val("char", "enable_no_pickup"))),
|
||||
}
|
||||
# Sorc base config
|
||||
sorc_base_cfg = dict(self.configs["config"]["parser"]["sorceress"])
|
||||
|
||||
Reference in New Issue
Block a user