summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-07-06 18:21:58 -0300
committerJesusaves <cpntb1@ymail.com>2020-07-06 18:21:58 -0300
commit8370437358bb75e80738166f7f9c8597fb700eae (patch)
tree2c2927704c9b8cd6c0e01fa661e6f590f373c317
parentbccc68f1c8c50195cf660e9aebfb3b44498460e8 (diff)
downloadserverdata-jesusalva/craft.tar.gz
serverdata-jesusalva/craft.tar.bz2
serverdata-jesusalva/craft.tar.xz
serverdata-jesusalva/craft.zip
Blank blueprints handlingjesusalva/craft
-rw-r--r--npc/items/recipes.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/npc/items/recipes.txt b/npc/items/recipes.txt
index e85bf2ba..485336e3 100644
--- a/npc/items/recipes.txt
+++ b/npc/items/recipes.txt
@@ -169,7 +169,13 @@ function script MakeBlueprint {
}
- // We now (maybe) have a .@recipes array set
+ // We don't have a .@recipes array D:
+ if (array_entries(.@recipes) <= 0) {
+ dispbottom l("This blueprint was blank.");
+ return;
+ }
+
+ // Select a recipe randomly
.@rcp=any_of(.@recipes);
// Double precision failsafe