Attempt to remove unused regions

Failed, conveyor code depends to much on it, gonna revert this.
This commit is contained in:
Patrick 'Quezler' Mounier
2019-12-30 10:53:45 +01:00
parent 20a511d940
commit 4f5b737f7c
13 changed files with 1972 additions and 2029 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 751 B

After

Width:  |  Height:  |  Size: 750 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 961 KiB

After

Width:  |  Height:  |  Size: 961 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 KiB

After

Width:  |  Height:  |  Size: 332 KiB

View File

@@ -10,9 +10,7 @@ import mindustry.type.*;
import mindustry.world.*; import mindustry.world.*;
public class CompressedConveyor extends ArmoredConveyor{ public class CompressedConveyor extends ArmoredConveyor{
protected TextureRegion start; private TextureRegion[] regions = new TextureRegion[6];
public TextureRegion end;
protected static int cooldown = 10; protected static int cooldown = 10;
public CompressedConveyor(String name){ public CompressedConveyor(String name){
@@ -23,15 +21,9 @@ public class CompressedConveyor extends ArmoredConveyor{
@Override @Override
public void load(){ public void load(){
int i; for(int i = 0; i < regions.length; i++){
for(i = 0; i < regions.length; i++){ regions[i] = Core.atlas.find(name + "-" + i);
for(int j = 0; j < 4; j++){
regions[i][j] = Core.atlas.find(name + "-" + i + "-" + 0);
}
} }
start = Core.atlas.find(name + "-5-0");
end = Core.atlas.find(name + "-6-0");
} }
@Override @Override
@@ -39,8 +31,8 @@ public class CompressedConveyor extends ArmoredConveyor{
super.draw(tile); super.draw(tile);
if(start(tile) && end(tile)) return; if(start(tile) && end(tile)) return;
if(start(tile)) Draw.rect(start, tile.drawx(), tile.drawy(), tile.rotation() * 90); if(start(tile)) Draw.rect(regions[5], tile.drawx(), tile.drawy(), tile.rotation() * 90);
if( end(tile)) Draw.rect( end, tile.drawx(), tile.drawy(), tile.rotation() * 90); if( end(tile)) Draw.rect(regions[6], tile.drawx(), tile.drawy(), tile.rotation() * 90);
} }
protected boolean start(Tile tile){ protected boolean start(Tile tile){