Assembler sprites mostly done

This commit is contained in:
Anuken
2021-12-19 13:06:23 -05:00
parent 94583d468d
commit 59550f58ee
7 changed files with 8 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1023 B

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -10,6 +10,7 @@ import arc.struct.*;
import arc.util.*; import arc.util.*;
import arc.util.io.*; import arc.util.io.*;
import mindustry.ai.types.*; import mindustry.ai.types.*;
import mindustry.annotations.Annotations.*;
import mindustry.content.*; import mindustry.content.*;
import mindustry.entities.*; import mindustry.entities.*;
import mindustry.entities.units.*; import mindustry.entities.units.*;
@@ -33,6 +34,9 @@ import static mindustry.Vars.*;
* 3. * 3.
* */ * */
public class UnitAssembler extends PayloadBlock{ public class UnitAssembler extends PayloadBlock{
public @Load("@-side1") TextureRegion sideRegion1;
public @Load("@-side2") TextureRegion sideRegion2;
public int areaSize = 11; public int areaSize = 11;
public UnitType droneType = UnitTypes.assemblyDrone; public UnitType droneType = UnitTypes.assemblyDrone;
public int dronesCreated = 4; public int dronesCreated = 4;
@@ -87,7 +91,7 @@ public class UnitAssembler extends PayloadBlock{
@Override @Override
public void drawRequestRegion(BuildPlan plan, Eachable<BuildPlan> list){ public void drawRequestRegion(BuildPlan plan, Eachable<BuildPlan> list){
Draw.rect(region, plan.drawx(), plan.drawy()); Draw.rect(region, plan.drawx(), plan.drawy());
//Draw.rect(outRegion, plan.drawx(), plan.drawy(), plan.rotation * 90); Draw.rect(plan.rotation >= 2 ? sideRegion2 : sideRegion1, plan.drawx(), plan.drawy(), plan.rotation * 90);
Draw.rect(topRegion, plan.drawx(), plan.drawy()); Draw.rect(topRegion, plan.drawx(), plan.drawy());
} }
@@ -359,6 +363,8 @@ public class UnitAssembler extends PayloadBlock{
} }
} }
Draw.rect(rotation >= 2 ? sideRegion2 : sideRegion1, x, y, rotdeg());
Draw.z(Layer.blockOver); Draw.z(Layer.blockOver);
payRotation = rotdeg(); payRotation = rotdeg();

View File

@@ -24,4 +24,4 @@ android.useAndroidX=true
#used for slow jitpack builds; TODO see if this actually works #used for slow jitpack builds; TODO see if this actually works
org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.socketTimeout=100000
org.gradle.internal.http.connectionTimeout=100000 org.gradle.internal.http.connectionTimeout=100000
archash=224e6c07e0 archash=15f2f63a9f