diff --git a/config/params.ini b/config/params.ini index 1da04c7fb..6aa80f957 100644 --- a/config/params.ini +++ b/config/params.ini @@ -70,6 +70,8 @@ stand_still=capslock ; teleport: leave empty if you can't use teleport= town_portal=f9 +;close all windows without hitting escape and ending up in the game menu - used to close vendor tabs and inventories. +clear_screen=space ; call to arms settings: weapon_switch=x battle_orders=f7 diff --git a/src/config.py b/src/config.py index 81f57b9a2..9c552f86d 100644 --- a/src/config.py +++ b/src/config.py @@ -211,6 +211,8 @@ def load_data(self): "sell_junk": bool(int(self._select_val("char", "sell_junk"))), "enable_no_pickup": bool(int(self._select_val("char", "enable_no_pickup"))), "safer_routines": bool(int(self._select_val("char", "safer_routines"))), + "clear_screen": self._select_val("char", "clear_screen"), + } # Sorc base config sorc_base_cfg = dict(self.configs["config"]["parser"]["sorceress"]) diff --git a/src/inventory/common.py b/src/inventory/common.py index 0bedc1d04..97eb1f611 100644 --- a/src/inventory/common.py +++ b/src/inventory/common.py @@ -61,7 +61,8 @@ def close(img: np.ndarray = None) -> np.ndarray | None: img = grab() if img is None else img if inventory_is_open(img): # close open inventory - keyboard.send("esc") + if Config().char["clear_screen"]: + keyboard.send(Config().char["clear_screen"]) # check to ensure it closed wait(0.04, 0.08) timer = True