Removed "on" prefix from all remote methods

This commit is contained in:
Anuken
2020-07-03 18:48:31 -04:00
parent 7ff2e98420
commit 8576d535bd
22 changed files with 108 additions and 84 deletions

View File

@@ -118,7 +118,7 @@ abstract class BuilderComp implements Unitc{
}else{
if(entity.construct(base(), core, 1f / entity.buildCost * Time.delta() * type().buildSpeed * state.rules.buildSpeedMultiplier, current.hasConfig)){
if(current.hasConfig){
Call.onTileConfig(null, tile.build, current.config);
Call.tileConfig(null, tile.build, current.config);
}
}
}

View File

@@ -174,12 +174,12 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
public void configure(Object value){
//save last used config
block.lastConfig = value;
Call.onTileConfig(player, base(), value);
Call.tileConfig(player, base(), value);
}
/** Configure from a server. */
public void configureAny(Object value){
Call.onTileConfig(null, base(), value);
Call.tileConfig(null, base(), value);
}
/** Deselect this tile from configuration. */
@@ -1128,6 +1128,30 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
return tile.build == base() && !dead();
}
@Replace
@Override
public void kill(){
Call.tileDestroyed(base());
}
@Replace
@Override
public void damage(float damage){
if(dead()) return;
if(Mathf.zero(state.rules.blockHealthMultiplier)){
damage = health + 1;
}else{
damage /= state.rules.blockHealthMultiplier;
}
Call.tileDamage(base(), health - handleDamage(damage));
if(health <= 0){
Call.tileDestroyed(base());
}
}
@Override
public void remove(){
if(sound != null){

View File

@@ -262,6 +262,6 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
if(dead || net.client()) return;
//deaths are synced; this calls killed()
Call.onUnitDeath(base());
Call.unitDeath(base());
}
}