Read-only component fields / Removed get/set prefix

This commit is contained in:
Anuken
2020-02-04 12:14:09 -05:00
parent 1d0cfd4435
commit 36b9451e01
93 changed files with 637 additions and 587 deletions

View File

@@ -584,7 +584,7 @@ public class Blocks implements ContentList{
drawIcons = () -> new TextureRegion[]{Core.atlas.find(name + "-bottom"), Core.atlas.find(name + "-top")};
drawer = tile -> {
LiquidModule mod = tile.entity.getLiquids();
LiquidModule mod = tile.entity.liquids();
int rotation = rotate ? tile.rotation() * 90 : 0;
@@ -680,7 +680,7 @@ public class Blocks implements ContentList{
Draw.rect(region, tile.drawx(), tile.drawy());
Draw.rect(reg(frameRegions[(int)Mathf.absin(entity.totalProgress, 5f, 2.999f)]), tile.drawx(), tile.drawy());
Draw.color(Color.clear, tile.entity.getLiquids().current().color, tile.entity.getLiquids().total() / liquidCapacity);
Draw.color(Color.clear, tile.entity.liquids().current().color, tile.entity.liquids().total() / liquidCapacity);
Draw.rect(reg(liquidRegion), tile.drawx(), tile.drawy());
Draw.color();
Draw.rect(reg(topRegion), tile.drawx(), tile.drawy());
@@ -1537,7 +1537,7 @@ public class Blocks implements ContentList{
@Override
public void init(Bulletc b){
for(int i = 0; i < rays; i++){
Damage.collideLine(b, b.getTeam(), hitEffect, b.x, b.y, b.rot(), rayLength - Math.abs(i - (rays / 2)) * 20f);
Damage.collideLine(b, b.team(), hitEffect, b.x, b.y, b.rot(), rayLength - Math.abs(i - (rays / 2)) * 20f);
}
}

View File

@@ -513,7 +513,7 @@ public class Bullets implements ContentList{
@Override
public void update(Bulletc b){
if(b.timer.get(1, 5f)){
Damage.collideLine(b, b.getTeam(), hitEffect, b.x, b.y, b.rot(), length, true);
Damage.collideLine(b, b.team(), hitEffect, b.x, b.y, b.rot(), length, true);
}
Effects.shake(1f, 1f, b.x, b.y);
}
@@ -587,7 +587,7 @@ public class Bullets implements ContentList{
@Override
public void init(Bulletc b){
Lightning.create(b.getTeam(), Pal.lancerLaser, damage * (b.getOwner() instanceof Player ? state.rules.playerDamageMultiplier : 1f), b.x, b.y, b.rot(), 30);
Lightning.create(b.team(), Pal.lancerLaser, damage * (b.getOwner() instanceof Player ? state.rules.playerDamageMultiplier : 1f), b.x, b.y, b.rot(), 30);
}
};

View File

@@ -191,7 +191,7 @@ public class Mechs implements ContentList{
if(player.timer.get(Player.timerAbility, healReload)){
wasHealed = false;
Units.nearby(player.getTeam(), player.x, player.y, healRange, unit -> {
Units.nearby(player.team(), player.x, player.y, healRange, unit -> {
if(unit.health < unit.maxHealth()){
Fx.heal.at(unit);
wasHealed = true;
@@ -310,7 +310,7 @@ public class Mechs implements ContentList{
if(player.timer.get(Player.timerAbility, effectReload)){
Units.nearby(player.getTeam(), player.x, player.y, effectRange, unit -> {
Units.nearby(player.team(), player.x, player.y, effectRange, unit -> {
//unit.applyEffect(StatusEffects.overdrive, effectDuration);
});
@@ -368,7 +368,7 @@ public class Mechs implements ContentList{
float scl = scld(player);
if(Mathf.chance(Time.delta() * (0.15 * scl))){
Fx.hitLancer.at(Pal.lancerLaser, player.x, player.y);
Lightning.create(player.getTeam(), Pal.lancerLaser, 10f * Vars.state.rules.playerDamageMultiplier,
Lightning.create(player.team(), Pal.lancerLaser, 10f * Vars.state.rules.playerDamageMultiplier,
player.x + player.velocity().x, player.y + player.velocity().y, player.rotation, 14);
}
}

View File

@@ -2,7 +2,6 @@ package mindustry.content;
import arc.*;
import arc.math.Mathf;
import mindustry.entities.Effects;
import mindustry.ctype.ContentList;
import mindustry.game.EventType.*;
import mindustry.type.StatusEffect;
@@ -47,7 +46,7 @@ public class StatusEffects implements ContentList{
init(() -> {
trans(shocked, ((unit, time, newTime, result) -> {
unit.damage(20f);
if(unit.getTeam() == state.rules.waveTeam){
if(unit.team() == state.rules.waveTeam){
Events.fire(Trigger.shock);
}
result.set(this, time);