From 5f87854323aa59709fa5379d1bf06900d4cbf316 Mon Sep 17 00:00:00 2001 From: lisacvuk Date: Thu, 14 Mar 2019 09:29:17 +0000 Subject: [PATCH 1/2] Create mod.conf #4 --- mod.conf | 1 + 1 file changed, 1 insertion(+) create mode 100644 mod.conf diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..d3162ad --- /dev/null +++ b/mod.conf @@ -0,0 +1 @@ +name = toolranks From ea5426316ecbde8b99218193b1b550a792473271 Mon Sep 17 00:00:00 2001 From: Argyle Date: Thu, 14 Mar 2019 20:13:16 -0400 Subject: [PATCH 2/2] Crash fix - check if description is nil before trying to search it. (#3) --- init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 49488a1..393727f 100644 --- a/init.lua +++ b/init.lua @@ -10,7 +10,9 @@ toolranks.colors = { } function toolranks.get_tool_type(description) - if string.find(description, "Pickaxe") then + if not description then + return "tool" + elseif string.find(description, "Pickaxe") then return "pickaxe" elseif string.find(description, "Axe") then return "axe"