itemTransferRange proper usage

This commit is contained in:
Anuken
2022-03-11 00:35:34 -05:00
parent da1517879a
commit 846a697d2e
9 changed files with 14 additions and 13 deletions

View File

@@ -1467,7 +1467,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
}
/**
* Called when another tile is tapped while this block is selected.
* Called when another tile is tapped while this building is selected.
* @return whether this block should be deselected.
*/
public boolean onConfigureBuildTapped(Building other){
@@ -1483,7 +1483,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
}
/**
* Called when a position is tapped when this building is selected.
* Called when a position is tapped while this building is selected.
*
* @return whether the tap event is consumed - if true, the player will not start shooting or interact with things under the cursor.
* */
@@ -1492,7 +1492,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
}
/**
* Called when this block's config menu is closed
* Called when this block's config menu is closed.
*/
public void onConfigureClosed(){}

View File

@@ -175,7 +175,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
@Replace
public float clipSize(){
if(isBuilding()){
return state.rules.infiniteResources ? Float.MAX_VALUE : Math.max(type.clipSize, type.region.width) + buildingRange + tilesize*4f;
return state.rules.infiniteResources ? Float.MAX_VALUE : Math.max(type.clipSize, type.region.width) + type.buildRange + tilesize*4f;
}
if(mining()){
return type.clipSize + type.miningRange;