From 9849750e4b0d37e5ddb7ed7161f8abf98101cc3d Mon Sep 17 00:00:00 2001 From: KeinerTTV Date: Mon, 12 May 2025 14:08:20 +0200 Subject: [PATCH] feat(database): setup drive --- automate_farming/database_main.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/automate_farming/database_main.lua b/automate_farming/database_main.lua index ecbd5c8..a296016 100644 --- a/automate_farming/database_main.lua +++ b/automate_farming/database_main.lua @@ -1,2 +1,6 @@ +local databaseStorage = peripheral.find("drive") or error("No drive attached", 0) +if (databaseStorage.isDiskPresent() == false or databaseStorage.getDiskLabel() ~= "Farming Data") then error("Missing or wrong drive", 0) end +local databasePath = databaseStorage.getMountPath() + local databaseModem = peripheral.find("modem") or error("No modem attached", 0) local databaseStorage = peripheral.find("drive") or error("No modem attached", 0) \ No newline at end of file