Dacite decoration block / Environmental renaming

This commit is contained in:
Anuken
2020-09-10 15:17:10 -04:00
parent 88e3022db0
commit 74cefb3ec9
95 changed files with 10486 additions and 10175 deletions

View File

@@ -18,9 +18,9 @@ abstract class BlockUnitComp implements Unitc{
this.tile = tile;
//sets up block stats
maxHealth(tile.block().health);
maxHealth(tile.block.health);
health(tile.health());
hitSize(tile.block().size * tilesize * 0.7f);
hitSize(tile.block.size * tilesize * 0.7f);
set(tile);
}

View File

@@ -829,7 +829,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
if(other != null && other.block instanceof PowerNode && ((PowerNode)other.block).linkValid(other, base()) && !PowerNode.insulated(other, base())
&& !other.proximity().contains(this.<Building>base()) &&
!(block.outputsPower && proximity.contains(p -> p.power != null && p.power.graph == other.power.graph))){
tempTiles.add(other.tile());
tempTiles.add(other.tile);
}
});
tempTiles.sort(Structs.comparingFloat(t -> t.dst2(tile)));

View File

@@ -112,9 +112,9 @@ abstract class PayloadComp implements Posc, Rotc, Hitboxc, Unitc{
/** @return whether the tile has been successfully placed. */
boolean dropBlock(BlockPayload payload){
Building tile = payload.entity;
int tx = Vars.world.toTile(x - tile.block().offset), ty = Vars.world.toTile(y - tile.block().offset);
int tx = Vars.world.toTile(x - tile.block.offset), ty = Vars.world.toTile(y - tile.block.offset);
Tile on = Vars.world.tile(tx, ty);
if(on != null && Build.validPlace(tile.block(), tile.team, tx, ty, tile.rotation)){
if(on != null && Build.validPlace(tile.block, tile.team, tx, ty, tile.rotation)){
int rot = (int)((rotation + 45f) / 90f) % 4;
payload.place(on, rot);