From 0272d2a3038477551de024cfbb7a8aef3b62d468 Mon Sep 17 00:00:00 2001 From: Anavrins Date: Sat, 26 Dec 2020 19:22:46 -0500 Subject: [PATCH] fix: missing damage value in tl3 --- swshop/swshop.lua | 1 + turtle/init/6.tl3.lua | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/swshop/swshop.lua b/swshop/swshop.lua index 0fadd48..5634e11 100644 --- a/swshop/swshop.lua +++ b/swshop/swshop.lua @@ -79,6 +79,7 @@ local function handleTransaction(transaction) to = transaction.to, from = transaction.from, value = transaction.value, + txid = transaction.id, id = metadata.name, time = math.floor(os.epoch('utc')/1000), recipient = recipient, diff --git a/turtle/init/6.tl3.lua b/turtle/init/6.tl3.lua index d6a352b..118e11c 100644 --- a/turtle/init/6.tl3.lua +++ b/turtle/init/6.tl3.lua @@ -798,15 +798,15 @@ function turtle.getSlot(indexOrId, slots) if detail then return { name = detail.name, - damage = detail.damage, + damage = detail.damage or 0, count = detail.count, - key = detail.name .. ':' .. detail.damage, + key = detail.name .. ':' .. (detail.damage or 0), index = indexOrId, -- deprecate qty = detail.count, - dmg = detail.damage, + dmg = detail.damage or 0, id = detail.name, } end