mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-13 12:16:53 +07:00
Better impl of #8451
This commit is contained in:
parent
b81e942479
commit
e81cd5b68e
@ -11,8 +11,6 @@ import mindustry.gen.*;
|
||||
import mindustry.world.draw.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class Battery extends PowerDistributor{
|
||||
public DrawBlock drawer;
|
||||
|
||||
@ -39,6 +37,10 @@ public class Battery extends PowerDistributor{
|
||||
public void init(){
|
||||
super.init();
|
||||
|
||||
checkDrawDefault();
|
||||
}
|
||||
|
||||
void checkDrawDefault(){
|
||||
if(drawer == null){
|
||||
drawer = new DrawMulti(new DrawDefault(), new DrawPower(){{
|
||||
emptyLightColor = Battery.this.emptyLightColor;
|
||||
@ -49,6 +51,8 @@ public class Battery extends PowerDistributor{
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
checkDrawDefault();
|
||||
|
||||
super.load();
|
||||
drawer.load(this);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user