Skip to content

Commit

Permalink
eoh
Browse files Browse the repository at this point in the history
  • Loading branch information
Him188 committed Mar 30, 2024
1 parent 16b21ab commit 37702d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions EOH/v1.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ local function getComponent(type, idPrefix)
matchedK = k
matchedV = v
matched = matched + 1
log("[init] getComponent: match " .. type .. " with prefix '" .. idPrefix .. "', found: " .. k)
end
end
if matched == 1 then
Expand Down Expand Up @@ -226,7 +227,7 @@ local function update()
end

if state == States.WAITING_FOR_MATERIALS then

local hasMaterial = false
local hasProduct = false
local items = input.getAllItems()
Expand All @@ -241,7 +242,7 @@ local function update()
end
end
end

if hasMaterial == false or hasProduct == false then
-- 没有原料
return
Expand Down Expand Up @@ -276,7 +277,7 @@ local function update()
input.moveItem(i + 1, output, 1)
end
end

timeCounter = 0
setState(States.WAITING_FOR_MATERIALS)
end
Expand Down
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ rm v1.lua && wget http://e404.top:1111/PowerBank/v1.lua && ./v1.lua 741 ce8 9f6
## 鸿蒙之眼

```shell
rm v1.lua && wget http://e404.top:1111/EOH/v1.lua && ./v1.lua 741 ce8 9f6
rm v1.lua && wget http://e404.top:1111/EOH/v1.lua && ./v1.lua 5 5
```

0 comments on commit 37702d6

Please sign in to comment.