code: add smart vault
This commit is contained in:
parent
e52220c5a3
commit
0bd5a8e4f5
1 changed files with 11 additions and 0 deletions
11
code/vault.txt
Normal file
11
code/vault.txt
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
sensor itemsCount vault1 @totalItems
|
||||||
|
sensor itemCapacity vault1 @itemCapacity
|
||||||
|
print "Vault capacity: "
|
||||||
|
print itemCapacity
|
||||||
|
print "\n"
|
||||||
|
print "Vault count: "
|
||||||
|
print itemsCount
|
||||||
|
printflush message1
|
||||||
|
op mul maxItemsCount itemCapacity 0.95
|
||||||
|
op greaterThanEq isUnloadEnabled itemsCount maxItemsCount
|
||||||
|
control enabled unloader1 isUnloadEnabled 0 0 0
|
Loading…
Reference in a new issue