Mindustry

Mindustry

评价数不足
Pulsar mining logic
   
奖励
收藏
已收藏
取消收藏
标签: schematic
文件大小
发表于
987.000 B
12 月 7 日 上午 7:28
1 项改动说明 ( 查看 )

订阅以下载
Pulsar mining logic

描述
Attention! This processor is only for starting the game! It is recommended to replace it with a more powerful one at the first opportunity.

This processor operates in two modes: comparative and priority. The name indicates what each mode is responsible for. The processor can also avoid using a unit controlled by another processor and can clear groups of unused units. The processor will stop if no pulsars is found and will send them to the core if it is filled with resources.

Processor ver. 1.9
_________________________

Processor code:

printflush message1
print "[green]Pulsar[] mining processor "
print ".\nMade by: <[cyan]x[blue]y[red]z["
print "white]>AlWx."
ubind @pulsar
jump 9 notEqual @unit null
control enabled switch1 0 0 0 0
control config sorter1 null 0 0 0
end
sensor Check @unit @flag
jump 14 equal Check 0
sensor Check @unit @controlled
jump 4 notEqual Check 0
ucontrol flag 0 999 0 0 0
ucontrol boost 1 999 0 0 0
print "\nSelected mode:[#ffcf00] "
sensor Check switch1 @enabled
jump 23 equal Check 0
print "priority[].\n[#99999999]They only "
print "extract the resource selected in t"
print "he sorter (,,,).\n\n"
sensor Ore sorter1 @config
set @counter 42
print "comparative[].\n[#99999999]They ex"
print "tracts the resource that is least "
print "abundant in the core (,,,)\n\n"
ulocate building core 0 @copper Xpos Ypos 0 Core
sensor Res Core @copper
sensor Check Core @lead
set Ore @copper
jump 33 greaterThanEq Res Check
set Ore @lead
set Res Check
sensor Check Core @sand
jump 37 greaterThanEq Res Check
set Ore @sand
set Res Check
sensor Check Core @coal
jump 41 greaterThanEq Res Check
set Ore @coal
set Res Check
control config sorter1 Ore 0 0 0
print "Use the switch to change the mode."
sensor Check Core @itemCapacity
jump 53 greaterThanEq Res Check
sensor Check @unit @firstItem
jump 48 equal Check null
jump 53 notEqual Check Ore
ulocate ore core 0 Ore Xpos Ypos 0 0
ucontrol approach Xpos Ypos 7 0 0
ucontrol mine Xpos Ypos 5 0 0
sensor Check @unit @totalItems
jump 0 lessThan Check 40
ulocate building core 0 @copper Xpos Ypos 0 Core
ucontrol stop 0 0 0 0 0
ucontrol move Xpos Ypos 0 0 0
ucontrol itemDrop Core 9999 0 0 0