compile fix

This commit is contained in:
Anuken 2021-10-15 18:46:11 -04:00
parent a04e8f87a9
commit 73dae0da47
2 changed files with 6 additions and 6 deletions

View File

@ -138,7 +138,7 @@ public class AsteroidGenerator extends BlankPlanetGenerator{
camPos = new Vec3(1.2388899f, 1.6047299f, 2.4758825f);
}};
//state.rules.backgroundTexture = "sprites/space.png";
state.rules.dragMultiplier = 0.5f;
state.rules.dragMultiplier = 0.7f; //yes, yes space has 0 drag but 0% drag is very annoying
state.rules.borderDarkness = false;
state.rules.environment = Env.space;
}

View File

@ -81,16 +81,16 @@ public class PayloadBlock extends Block{
}
@Override
public boolean canControlSelect(Player player){
return !player.unit().spawnedByCore && this.payload == null && acceptUnitPayload(player.unit()) && player.tileOn() != null && player.tileOn().build == this;
public boolean canControlSelect(Unit player){
return !player.spawnedByCore && this.payload == null && acceptUnitPayload(player) && player.tileOn() != null && player.tileOn().build == this;
}
@Override
public void onControlSelect(Player player){
public void onControlSelect(Unit player){
float x = player.x, y = player.y;
acceptPlayerPayload(player, p -> payload = (T)p);
handleUnitPayload(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.unit().rotation;
this.payRotation = player.rotation;
}
@Override