diff --git a/code/modules/power/batteryrack.dm b/code/modules/power/batteryrack.dm index d272992d751..ee6a0dfd9c6 100644 --- a/code/modules/power/batteryrack.dm +++ b/code/modules/power/batteryrack.dm @@ -68,15 +68,7 @@ var/clevel = chargedisplay() if(clevel>0) - switch(clevel) - if(1) - overlays += br_cache[4] - if(2) - overlays += br_cache[5] - if(3) - overlays += br_cache[6] - if(4) - overlays += br_cache[7] + overlays += br_cache[3+clevel] return @@ -152,15 +144,7 @@ else var/clevel = chargedisplay() if(clevel>0) - switch(clevel) - if(1) - overlays += br_cache[4] - if(2) - overlays += br_cache[5] - if(3) - overlays += br_cache[6] - if(4) - overlays += br_cache[7] + overlays += br_cache[3+clevel] return //This mess of if-elses and magic numbers handles what happens if the engies don't pay attention and let it eat too much charge