#8 bugfixes, redstone RTU session

This commit is contained in:
Mikayla Fischler
2022-05-14 20:27:06 -04:00
parent bc6453de2b
commit 94931ef5a2
6 changed files with 246 additions and 45 deletions

View File

@@ -133,14 +133,14 @@ emachine.new = function (session_id, advert, out_queue)
-- update this runner
---@param time_now integer milliseconds
public.update = function (time_now)
if not self.has_build and self.next_build_req <= time_now then
if not self.has_build and self.periodics.next_build_req <= time_now then
_request_build()
self.next_build_req = time_now + PERIODICS.BUILD
self.periodics.next_build_req = time_now + PERIODICS.BUILD
end
if self.next_storage_req <= time_now then
if self.periodics.next_storage_req <= time_now then
_request_storage()
self.next_storage_req = time_now + PERIODICS.STORAGE
self.periodics.next_storage_req = time_now + PERIODICS.STORAGE
end
end