# Conflicts:

#	core/src/mindustry/content/Blocks.java
This commit is contained in:
Anuken
2021-10-14 19:17:50 -04:00
parent 082edbff6f
commit ef399d349c
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ public class Blocks implements ContentList{
message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell, memoryBank, message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell, memoryBank,
//campaign //campaign
launchPad, payloadLaunchPad, interplanetaryAccelerator, launchPad, interplanetaryAccelerator,
//nuclear? //nuclear?
nuclearWarhead, warheadAssembler, ballisticSilo //TODO nuclearWarhead, warheadAssembler, ballisticSilo //TODO
@@ -80,16 +80,16 @@ public class PayloadBlock extends Block{
} }
@Override @Override
public boolean canControlSelect(Unit player){ public boolean canControlSelect(Player player){
return !player.spawnedByCore && this.payload == null && acceptUnitPayload(player) && player.tileOn() != null && player.tileOn().build == this; return !player.unit().spawnedByCore && this.payload == null && acceptUnitPayload(player.unit()) && player.tileOn() != null && player.tileOn().build == this;
} }
@Override @Override
public void onControlSelect(Unit player){ public void onControlSelect(Player player){
float x = player.x, y = player.y; float x = player.x, y = player.y;
handleUnitPayload(player, p -> payload = (T)p); acceptPlayerPayload(player, p -> payload = (T)p);
this.payVector.set(x, y).sub(this).clamp(-size * tilesize / 2f, -size * tilesize / 2f, size * tilesize / 2f, size * tilesize / 2f); this.payVector.set(x, y).sub(this).clamp(-size * tilesize / 2f, -size * tilesize / 2f, size * tilesize / 2f, size * tilesize / 2f);
this.payRotation = player.rotation; this.payRotation = player.unit().rotation;
} }
@Override @Override