added tick to core

This commit is contained in:
2025-05-06 14:56:27 +02:00
parent 37c404603d
commit 2edb549156

View File

@@ -114,9 +114,29 @@ function Core:download(file)
return true, "Success"
end
function Core:tick()
if not self then
error("No instance!")
end
if not self.ws then
return false, "Not initilized"
end
self:send({type = "TICK"});
local success, data = self:read();
if not success then
return false, "Failed to do anything: "..data;
end
print("Server expects Action: "..textutils.serialiseJSON(data))
end
function Core:disconnect()
if not self then
return "Not instance"
error("No instance!")
end
if not self.ws then