a bit less broken but still broken

This commit is contained in:
Anuken
2019-05-05 19:05:46 -04:00
parent 35b158dba7
commit bf073a84c8
57 changed files with 274 additions and 445 deletions

View File

@@ -112,16 +112,19 @@ public class Blocks implements ContentList{
//create special blockpart variants
for(int dx = 0; dx < BlockPart.maxSize; dx++){
for(int dy = 0; dy < BlockPart.maxSize; dy++){
new BlockPart(dx - BlockPart.maxSize/2, dy - BlockPart.maxSize/2);
int fx = dx - BlockPart.maxSize/2, fy = dy - BlockPart.maxSize/2;
if(fx != 0 || fy != 0){
new BlockPart(fx, fy);
}
}
}
spawn = new Block("spawn");
//Registers build blocks from size 1-6
//Registers build blocks
//no reference is needed here since they can be looked up by name later
for(int i = 1; i <= 6; i++){
new BuildBlock("build" + i);
for(int i = 1; i <= BuildBlock.maxSize; i++){
new BuildBlock(i);
}
deepwater = new Floor("deepwater"){{
@@ -561,7 +564,7 @@ public class Blocks implements ContentList{
drawer = tile -> {
LiquidModule mod = tile.entity.liquids;
int rotation = rotate ? tile.getRotation() * 90 : 0;
int rotation = rotate ? tile.rotation() * 90 : 0;
Draw.rect(reg(bottomRegion), tile.drawx(), tile.drawy(), rotation);

View File

@@ -398,9 +398,9 @@ public class Bullets implements ContentList{
@Override
public void hitTile(Bullet b, Tile tile){
super.hit(b);
tile = tile.target();
tile = tile.link();
if(tile != null && tile.getTeam() == b.getTeam() && !(tile.block() instanceof BuildBlock)){
if(tile.getTeam() == b.getTeam() && !(tile.block() instanceof BuildBlock)){
Effects.effect(Fx.healBlockFull, Pal.heal, tile.drawx(), tile.drawy(), tile.block().size);
tile.entity.healBy(healPercent / 100f * tile.entity.maxHealth());
}