From 4eb988e28c8d7f0d0139ad0867229a0c99e5db46 Mon Sep 17 00:00:00 2001
From: Jesusaves <cpntb1@ymail.com>
Date: Tue, 28 Jul 2020 06:07:20 -0300
Subject: Prevent players from tweaking currently equipped items

---
 npc/craft/tweak.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/npc/craft/tweak.txt b/npc/craft/tweak.txt
index 971f731b5..56f0874e8 100644
--- a/npc/craft/tweak.txt
+++ b/npc/craft/tweak.txt
@@ -73,7 +73,11 @@ function	script	SmithTweakSystem	{
         return false;
     }
 
-    // FIXME Skip equipped items
+    // Skip equipped items
+    if (isequipped(.@x)) {
+        mesc l("You should unequip this item first."), 1;
+        return false;
+    }
 
     // If the item have no bonuses - fail
     setarray .@AlwaysTweaks, 65535, BlacksmithAxe, Dustynator, Lightbringer,
-- 
cgit v1.2.3-70-g09d2