summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/craft/smith.txt1
-rw-r--r--npc/craft/tweak.txt6
2 files changed, 7 insertions, 0 deletions
diff --git a/npc/craft/smith.txt b/npc/craft/smith.txt
index 8cb76f568..9f5a4d903 100644
--- a/npc/craft/smith.txt
+++ b/npc/craft/smith.txt
@@ -27,6 +27,7 @@ function script SmithSystem {
copyarray(.knowledge,RECIPES_EQUIPMENT,getarraysize(RECIPES_EQUIPMENT));
.success=false;
+ mesc l("WARNING: Strange bugs may happen if you attempt to craft an item you already have on inventory!"), 1;
setskin "craft4";
.@var$ = requestcraft(4);
.@craft = initcraft(.@var$);
diff --git a/npc/craft/tweak.txt b/npc/craft/tweak.txt
index 4110bd3a1..ef1614e3d 100644
--- a/npc/craft/tweak.txt
+++ b/npc/craft/tweak.txt
@@ -72,6 +72,12 @@ function script SmithTweakSystem {
return false;
}
+ // No duplicates
+ if (countitem(.@x) > 1) {
+ mesc l("You are carrying duplicates of the same item. Sorry, but I have no idea which one you want to tweak."), 1;
+ return false;
+ }
+
// Take the money and AP away
POL_PlayerMoney(.@price);
SMITH_TWEAKS+=1;