Logic tweaks

This commit is contained in:
Anuken
2020-10-05 19:59:15 -04:00
parent 5cc6ac0216
commit c87f0c27b3
8 changed files with 46 additions and 6 deletions

View File

@@ -194,6 +194,21 @@ public class LExecutor{
}
}
/** Binds the processor to a unit based on some filters. */
public static class UnitLocateI implements LInstruction{
@Override
public void run(LExecutor exec){
Object unitObj = exec.obj(varUnit);
LogicAI ai = UnitControlI.checkLogicAI(exec, unitObj);
if(unitObj instanceof Unit unit && ai != null){
ai.controlTimer = LogicAI.logicControlTimeout;
}
}
}
/** Controls the unit based on some parameters. */
public static class UnitControlI implements LInstruction{
public LUnitControl type = LUnitControl.move;