mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-15 15:20:57 -08:00
Micro processor no itemdrop / itemtake
This commit is contained in:
parent
3e0eb4a875
commit
4912896472
3 changed files with 5 additions and 2 deletions
|
|
@ -6750,6 +6750,7 @@ public class Blocks{
|
|||
|
||||
instructionsPerTick = 2;
|
||||
size = 1;
|
||||
allowUnitControl = false;
|
||||
}};
|
||||
|
||||
logicProcessor = new LogicBlock("logic-processor"){{
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@ public class LExecutor{
|
|||
}
|
||||
}
|
||||
case itemDrop -> {
|
||||
if(!exec.timeoutDone(unit, LogicAI.transferDelay)) return;
|
||||
if(!exec.timeoutDone(unit, LogicAI.transferDelay) || !((LogicBlock)exec.build.block).allowUnitControl) return;
|
||||
|
||||
//clear item when dropping to @air
|
||||
if(p1.obj() == Blocks.air){
|
||||
|
|
@ -473,7 +473,7 @@ public class LExecutor{
|
|||
}
|
||||
}
|
||||
case itemTake -> {
|
||||
if(!exec.timeoutDone(unit, LogicAI.transferDelay)) return;
|
||||
if(!exec.timeoutDone(unit, LogicAI.transferDelay) || !((LogicBlock)exec.build.block).allowUnitControl) return;
|
||||
|
||||
Building build = p1.building();
|
||||
int amount = p3.numi();
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ public class LogicBlock extends Block{
|
|||
|
||||
public int maxInstructionScale = 5;
|
||||
public int instructionsPerTick = 1;
|
||||
/** Enable itemDrop and itemTake instructions.*/
|
||||
public boolean allowUnitControl = true;
|
||||
//privileged only
|
||||
public int maxInstructionsPerTick = 40;
|
||||
public float range = 8 * 10;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue