Increased bridge range / Bugfixes
This commit is contained in:
@@ -27,12 +27,13 @@ public class DistributionBlocks extends BlockList implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
bridgeConveyor = new BufferedItemBridge("bridge-conveyor"){{
|
bridgeConveyor = new BufferedItemBridge("bridge-conveyor"){{
|
||||||
range = 3;
|
range = 4;
|
||||||
|
speed = 60f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
phaseConveyor = new ItemBridge("phase-conveyor"){{
|
phaseConveyor = new ItemBridge("phase-conveyor"){{
|
||||||
range = 7;
|
range = 11;
|
||||||
hasPower = false;
|
hasPower = true;
|
||||||
consumes.power(0.05f);
|
consumes.power(0.05f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|||||||
@@ -58,13 +58,13 @@ public class LiquidBlocks extends BlockList implements ContentList{
|
|||||||
liquidJunction = new LiquidJunction("liquid-junction");
|
liquidJunction = new LiquidJunction("liquid-junction");
|
||||||
|
|
||||||
bridgeConduit = new LiquidExtendingBridge("bridge-conduit"){{
|
bridgeConduit = new LiquidExtendingBridge("bridge-conduit"){{
|
||||||
range = 3;
|
range = 4;
|
||||||
hasPower = false;
|
hasPower = false;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
phaseConduit = new LiquidBridge("phase-conduit"){{
|
phaseConduit = new LiquidBridge("phase-conduit"){{
|
||||||
range = 7;
|
range = 11;
|
||||||
hasPower = false;
|
hasPower = true;
|
||||||
consumes.power(0.05f);
|
consumes.power(0.05f);
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,6 +112,8 @@ public class MapEditor{
|
|||||||
boolean isfloor = drawBlock instanceof Floor && drawBlock != Blocks.air;
|
boolean isfloor = drawBlock instanceof Floor && drawBlock != Blocks.air;
|
||||||
|
|
||||||
if(drawBlock.isMultiblock()){
|
if(drawBlock.isMultiblock()){
|
||||||
|
x = Mathf.clamp(x, (drawBlock.size-1)/2, map.width() - drawBlock.size/2 - 1);
|
||||||
|
y = Mathf.clamp(y, (drawBlock.size-1)/2, map.height() - drawBlock.size/2 - 1);
|
||||||
|
|
||||||
int offsetx = -(drawBlock.size - 1) / 2;
|
int offsetx = -(drawBlock.size - 1) / 2;
|
||||||
int offsety = -(drawBlock.size - 1) / 2;
|
int offsety = -(drawBlock.size - 1) / 2;
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ import static io.anuke.mindustry.Vars.world;
|
|||||||
public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
||||||
protected static Translator vec = new Translator();
|
protected static Translator vec = new Translator();
|
||||||
protected static float wobblyness = 0.6f;
|
protected static float wobblyness = 0.6f;
|
||||||
|
|
||||||
protected Trail trail = new Trail(8);
|
|
||||||
protected CarriableTrait carrying;
|
|
||||||
|
|
||||||
protected final UnitState
|
protected final UnitState
|
||||||
|
|
||||||
resupply = new UnitState(){
|
resupply = new UnitState(){
|
||||||
@@ -44,6 +40,7 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
idle = new UnitState(){
|
idle = new UnitState(){
|
||||||
public void update(){
|
public void update(){
|
||||||
retarget(() -> {
|
retarget(() -> {
|
||||||
@@ -62,6 +59,7 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
|||||||
velocity.scl(0.8f);
|
velocity.scl(0.8f);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
attack = new UnitState(){
|
attack = new UnitState(){
|
||||||
public void entered(){
|
public void entered(){
|
||||||
target = null;
|
target = null;
|
||||||
@@ -88,7 +86,7 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
|||||||
attack(150f);
|
attack(150f);
|
||||||
|
|
||||||
if((Mathf.angNear(angleTo(target), rotation, 15f) || !inventory.getAmmo().bullet.keepVelocity) //bombers don't care about rotation
|
if((Mathf.angNear(angleTo(target), rotation, 15f) || !inventory.getAmmo().bullet.keepVelocity) //bombers don't care about rotation
|
||||||
&& distanceTo(target) < inventory.getAmmo().getRange()){
|
&& distanceTo(target) < inventory.getAmmo().getRange()){
|
||||||
AmmoType ammo = inventory.getAmmo();
|
AmmoType ammo = inventory.getAmmo();
|
||||||
inventory.useAmmo();
|
inventory.useAmmo();
|
||||||
|
|
||||||
@@ -117,6 +115,8 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
protected Trail trail = new Trail(8);
|
||||||
|
protected CarriableTrait carrying;
|
||||||
|
|
||||||
//instantiation only
|
//instantiation only
|
||||||
public FlyingUnit(){
|
public FlyingUnit(){
|
||||||
@@ -149,7 +149,7 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
|||||||
|
|
||||||
updateRotation();
|
updateRotation();
|
||||||
trail.update(x + Angles.trnsx(rotation + 180f, 6f) + Mathf.range(wobblyness),
|
trail.update(x + Angles.trnsx(rotation + 180f, 6f) + Mathf.range(wobblyness),
|
||||||
y + Angles.trnsy(rotation + 180f, 6f) + Mathf.range(wobblyness));
|
y + Angles.trnsy(rotation + 180f, 6f) + Mathf.range(wobblyness));
|
||||||
|
|
||||||
wobble();
|
wobble();
|
||||||
}
|
}
|
||||||
@@ -173,7 +173,7 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
|||||||
@Override
|
@Override
|
||||||
public void behavior(){
|
public void behavior(){
|
||||||
if(health <= health * type.retreatPercent && !isWave &&
|
if(health <= health * type.retreatPercent && !isWave &&
|
||||||
Geometry.findClosest(x, y, world.indexer().getAllied(team, BlockFlag.repair)) != null){
|
Geometry.findClosest(x, y, world.indexer().getAllied(team, BlockFlag.repair)) != null){
|
||||||
setState(retreat);
|
setState(retreat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,18 +9,12 @@ import io.anuke.ucore.core.Events;
|
|||||||
import io.anuke.ucore.core.Settings;
|
import io.anuke.ucore.core.Settings;
|
||||||
|
|
||||||
public class ContentDatabase{
|
public class ContentDatabase{
|
||||||
/**
|
/** Maps unlockable type names to a set of unlocked content.*/
|
||||||
* Maps unlockable type names to a set of unlocked content.
|
|
||||||
*/
|
|
||||||
private ObjectMap<String, ObjectSet<String>> unlocked = new ObjectMap<>();
|
private ObjectMap<String, ObjectSet<String>> unlocked = new ObjectMap<>();
|
||||||
/**
|
/** Whether unlockables have changed since the last save.*/
|
||||||
* Whether unlockables have changed since the last save.
|
|
||||||
*/
|
|
||||||
private boolean dirty;
|
private boolean dirty;
|
||||||
|
|
||||||
/**
|
/** Returns whether or not this piece of content is unlocked yet.*/
|
||||||
* Returns whether or not this piece of content is unlocked yet.
|
|
||||||
*/
|
|
||||||
public boolean isUnlocked(UnlockableContent content){
|
public boolean isUnlocked(UnlockableContent content){
|
||||||
if(!unlocked.containsKey(content.getContentTypeName())){
|
if(!unlocked.containsKey(content.getContentTypeName())){
|
||||||
unlocked.put(content.getContentTypeName(), new ObjectSet<>());
|
unlocked.put(content.getContentTypeName(), new ObjectSet<>());
|
||||||
@@ -57,16 +51,12 @@ public class ContentDatabase{
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Returns whether unlockables have changed since the last save.*/
|
||||||
* Returns whether unlockables have changed since the last save.
|
|
||||||
*/
|
|
||||||
public boolean isDirty(){
|
public boolean isDirty(){
|
||||||
return dirty;
|
return dirty;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Clears all unlocked content.*/
|
||||||
* Clears all unlocked content.
|
|
||||||
*/
|
|
||||||
public void reset(){
|
public void reset(){
|
||||||
unlocked.clear();
|
unlocked.clear();
|
||||||
dirty = true;
|
dirty = true;
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ public class LevelDialog extends FloatingDialog{
|
|||||||
pane.setFadeScrollBars(false);
|
pane.setFadeScrollBars(false);
|
||||||
table.row();
|
table.row();
|
||||||
for(GameMode mode : GameMode.values()){
|
for(GameMode mode : GameMode.values()){
|
||||||
table.labelWrap("[accent]" + mode.toString() + ":[] [lightgray]" + mode.description()).width(600f);
|
table.labelWrap("[accent]" + mode.toString() + ":[] [lightgray]" + mode.description()).width(400f);
|
||||||
table.row();
|
table.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,8 +99,8 @@ public class ItemBridge extends Block{
|
|||||||
Lines.dashLine(
|
Lines.dashLine(
|
||||||
x * tilesize + Geometry.d4[i].x * (tilesize / 2f + 2),
|
x * tilesize + Geometry.d4[i].x * (tilesize / 2f + 2),
|
||||||
y * tilesize + Geometry.d4[i].y * (tilesize / 2f + 2),
|
y * tilesize + Geometry.d4[i].y * (tilesize / 2f + 2),
|
||||||
x * tilesize + Geometry.d4[i].x * range * tilesize,
|
x * tilesize + Geometry.d4[i].x * (range + 0.5f) * tilesize,
|
||||||
y * tilesize + Geometry.d4[i].y * range * tilesize,
|
y * tilesize + Geometry.d4[i].y * (range + 0.5f) * tilesize,
|
||||||
range);
|
range);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user