mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-09 04:09:07 +07:00
Minor fixes
This commit is contained in:
parent
0d5869aad9
commit
2eed3cc2eb
@ -1,10 +1,11 @@
|
||||
package mindustry.entities.units;
|
||||
|
||||
import arc.util.*;
|
||||
import mindustry.gen.*;
|
||||
|
||||
public interface UnitController{
|
||||
void unit(Unit unit);
|
||||
Unit unit();
|
||||
@Nullable Unit unit();
|
||||
|
||||
default void hit(Bullet bullet){
|
||||
|
||||
|
@ -151,6 +151,8 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
logicCutscene = false;
|
||||
itemDepositCooldown = 0f;
|
||||
Arrays.fill(controlGroups, null);
|
||||
lastUnit = null;
|
||||
lastPlans.clear();
|
||||
});
|
||||
}
|
||||
|
||||
@ -814,6 +816,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
|
||||
if(player.isBuilder()){
|
||||
if(player.unit() != lastUnit && player.unit().plans.size <= 1){
|
||||
player.unit().plans.ensureCapacity(lastPlans.size);
|
||||
for(var plan : lastPlans){
|
||||
player.unit().plans.addLast(plan);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user