From b4ba2024aea646b2a237ebb87b99f2cbf486cbc0 Mon Sep 17 00:00:00 2001
From: DarkGod <darkgod@net-core.org>
Date: Thu, 6 Aug 2020 20:10:11 +0200
Subject: [PATCH] Actors with inventory access disabled can not access stores
 either. Sorry!

---
 game/modules/tome/class/Store.lua | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/game/modules/tome/class/Store.lua b/game/modules/tome/class/Store.lua
index dba27a5093..f056a9e7e5 100644
--- a/game/modules/tome/class/Store.lua
+++ b/game/modules/tome/class/Store.lua
@@ -280,6 +280,12 @@ end
 --- Actor interacts with the store
 -- @param who the actor who interacts
 function _M:interact(who, name)
+	-- Nice try
+	if who.no_inventory_access then
+		game.logPlayer(who, "This entity can not access inventories.") 
+		return
+	end
+
 	-- Lore-ize me?
 	if who.level < (self.store.minimum_level or 0) then 
 		game.logPlayer(who, "You must be level %d to access this shop.", self.store.minimum_level or 0) 
-- 
GitLab