Removed "on" prefix from all remote methods
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user