Plastanium conveyor + bugfixes
This commit is contained in:
@@ -5,6 +5,7 @@ import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
|
||||
@EntityDef(value = {Decalc.class}, pooled = true)
|
||||
@Component
|
||||
@@ -16,6 +17,8 @@ abstract class DecalComp implements Drawc, Timedc, Rotc, Posc{
|
||||
|
||||
@Override
|
||||
public void draw(){
|
||||
Draw.z(Layer.scorch);
|
||||
|
||||
Draw.color(color);
|
||||
Draw.alpha(1f - Mathf.curve(fin(), 0.98f));
|
||||
Draw.rect(region, x, y, rotation);
|
||||
|
||||
@@ -86,6 +86,18 @@ abstract class TileComp implements Posc, Teamc, Healthc, Tilec, Timerc, QuadTree
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Replace
|
||||
public int tileX(){
|
||||
return tile.x;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Replace
|
||||
public int tileY(){
|
||||
return tile.y;
|
||||
}
|
||||
|
||||
//endregion
|
||||
//region io
|
||||
|
||||
@@ -963,6 +975,10 @@ abstract class TileComp implements Posc, Teamc, Healthc, Tilec, Timerc, QuadTree
|
||||
proximity.add(tile);
|
||||
}
|
||||
|
||||
for(Tilec other : tmpTiles){
|
||||
other.onProximityUpdate();
|
||||
}
|
||||
|
||||
onProximityAdded();
|
||||
onProximityUpdate();
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc{
|
||||
//shoot if applicable
|
||||
if(mount.reload <= 0.0001f && Angles.within(mount.rotation, mount.targetRotation, 1.5f)){
|
||||
for(int i : (weapon.mirror && !weapon.alternate ? Mathf.signs : Mathf.one)){
|
||||
i *= Mathf.sign(weapon.flipped) * Mathf.sign(mount.side);
|
||||
i *= Mathf.sign(weapon.flipped) * (mount.weapon.mirror ? Mathf.sign(mount.side) : 1);
|
||||
|
||||
//m a t h
|
||||
float weaponRotation = rotation + (weapon.rotate ? mount.rotation : 0);
|
||||
@@ -106,7 +106,7 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc{
|
||||
shoot(weapon, shootX, shootY, shootAngle, -i);
|
||||
}
|
||||
|
||||
mount.side = !mount.side;
|
||||
if(mount.weapon.mirror) mount.side = !mount.side;
|
||||
mount.reload = weapon.reload;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user