Dacite decoration block / Environmental renaming
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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)));
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user