Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2023-08-29 17:51:53 -04:00
36 changed files with 122 additions and 91 deletions

View File

@@ -13,6 +13,7 @@ public class DrawRegion extends DrawBlock{
public String suffix = "";
public boolean spinSprite = false;
public boolean drawPlan = true;
public boolean buildingRotate = false;
public float rotateSpeed, x, y, rotation;
/** Any number <=0 disables layer changes. */
public float layer = -1;
@@ -40,9 +41,9 @@ public class DrawRegion extends DrawBlock{
float z = Draw.z();
if(layer > 0) Draw.z(layer);
if(spinSprite){
Drawf.spinSprite(region, build.x + x, build.y + y, build.totalProgress() * rotateSpeed + rotation);
Drawf.spinSprite(region, build.x + x, build.y + y, build.totalProgress() * rotateSpeed + rotation + (buildingRotate ? build.rotdeg() : 0));
}else{
Draw.rect(region, build.x + x, build.y + y, build.totalProgress() * rotateSpeed + rotation);
Draw.rect(region, build.x + x, build.y + y, build.totalProgress() * rotateSpeed + rotation + (buildingRotate ? build.rotdeg() : 0));
}
Draw.z(z);
}
@@ -50,7 +51,7 @@ public class DrawRegion extends DrawBlock{
@Override
public void drawPlan(Block block, BuildPlan plan, Eachable<BuildPlan> list){
if(!drawPlan) return;
Draw.rect(region, plan.drawx(), plan.drawy());
Draw.rect(region, plan.drawx(), plan.drawy(), (buildingRotate ? plan.rotation * 90f : 0));
}
@Override