forked from minecartchris/CC-Casnio
Update prog2/ATM.lua
This commit is contained in:
+4
-4
@@ -31,6 +31,10 @@ local answer = io.read()
|
|||||||
--local db = fs.open("/disk2/log.log", "a")
|
--local db = fs.open("/disk2/log.log", "a")
|
||||||
--local id = disk.getID("bottom")
|
--local id = disk.getID("bottom")
|
||||||
if answer == "d" or answer == "deposit" then
|
if answer == "d" or answer == "deposit" then
|
||||||
|
|
||||||
|
local ironCount = turtle.getItemCount()
|
||||||
|
--local card = fs.open("/disk/money.lua", "r")
|
||||||
|
local money = tonumber(interactWithCard(nfc,"getBalance", nil))
|
||||||
local item = turtle.getItemDetail()
|
local item = turtle.getItemDetail()
|
||||||
if item.name ~= "minecraft:iron_ingot" or item.name == nil then
|
if item.name ~= "minecraft:iron_ingot" or item.name == nil then
|
||||||
print("Please insert iron ingots!")
|
print("Please insert iron ingots!")
|
||||||
@@ -38,10 +42,6 @@ if answer == "d" or answer == "deposit" then
|
|||||||
shell.run("reboot")
|
shell.run("reboot")
|
||||||
end
|
end
|
||||||
|
|
||||||
local ironCount = turtle.getItemCount()
|
|
||||||
--local card = fs.open("/disk/money.lua", "r")
|
|
||||||
local money = tonumber(interactWithCard(nfc,"getBalance", nil))
|
|
||||||
|
|
||||||
--card.close()
|
--card.close()
|
||||||
|
|
||||||
money = money + ironCount
|
money = money + ironCount
|
||||||
|
|||||||
Reference in New Issue
Block a user