Minor bugfixes

This commit is contained in:
Anuken
2022-04-19 09:14:56 -04:00
parent 78c44bf237
commit a74c5ef943
3 changed files with 8 additions and 4 deletions

View File

@@ -1157,6 +1157,7 @@ public class Blocks{
researchCostMultiplier = 1.2f;
craftTime = 10f;
rotate = true;
invertFlip = true;
liquidCapacity = 50f;
@@ -3591,7 +3592,7 @@ public class Blocks{
reloadMultiplier = 1.7f;
knockback = 0.3f;
}},
Items.pyratite, new BasicBulletType(8f, 80){{
Items.thorium, new BasicBulletType(8f, 80){{
hitSize = 5;
width = 16f;
height = 23f;
@@ -3600,7 +3601,7 @@ public class Blocks{
pierceBuilding = true;
knockback = 0.7f;
}},
Items.thorium, new BasicBulletType(7f, 70){{
Items.pyratite, new BasicBulletType(7f, 70){{
hitSize = 5;
width = 16f;
height = 21f;

View File

@@ -1,11 +1,12 @@
package mindustry.entities.effect;
import arc.graphics.*;
import mindustry.content.*;
import mindustry.entities.*;
/** Wraps an effect with some parameters. */
public class WrapEffect extends Effect{
public Effect effect;
public Effect effect = Fx.none;
public Color color = Color.white.cpy();
public float rotation = Float.NaN;

View File

@@ -96,6 +96,8 @@ public class Block extends UnlockableContent implements Senseable{
public boolean rotate;
/** if rotate is true and this is false, the region won't rotate when drawing */
public boolean rotateDraw = true;
/** if true, schematic flips with this block are inverted. */
public boolean invertFlip = false;
/** number of different variant regions to use */
public int variants = 0;
/** whether to draw a rotation arrow - this does not apply to lines of blocks */
@@ -1276,7 +1278,7 @@ public class Block extends UnlockableContent implements Senseable{
}
public void flipRotation(BuildPlan req, boolean x){
if(x == (req.rotation % 2 == 0)){
if((x == (req.rotation % 2 == 0)) != invertFlip){
req.rotation = Mathf.mod(req.rotation + 2, 4);
}
}