# Conflicts:
# core/src/mindustry/content/Blocks.java
This commit is contained in:
@@ -102,7 +102,7 @@ public class Blocks implements ContentList{
|
||||
message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell, memoryBank,
|
||||
|
||||
//campaign
|
||||
launchPad, payloadLaunchPad, interplanetaryAccelerator,
|
||||
launchPad, interplanetaryAccelerator,
|
||||
|
||||
//nuclear?
|
||||
nuclearWarhead, warheadAssembler, ballisticSilo //TODO
|
||||
|
||||
@@ -80,16 +80,16 @@ public class PayloadBlock extends Block{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canControlSelect(Unit player){
|
||||
return !player.spawnedByCore && this.payload == null && acceptUnitPayload(player) && player.tileOn() != null && player.tileOn().build == this;
|
||||
public boolean canControlSelect(Player player){
|
||||
return !player.unit().spawnedByCore && this.payload == null && acceptUnitPayload(player.unit()) && player.tileOn() != null && player.tileOn().build == this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onControlSelect(Unit player){
|
||||
public void onControlSelect(Player player){
|
||||
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.payRotation = player.rotation;
|
||||
this.payRotation = player.unit().rotation;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user