Misc bugfixes
This commit is contained in:
@@ -684,7 +684,6 @@ public class UnitTypes{
|
|||||||
hitSize = 15f;
|
hitSize = 15f;
|
||||||
rotateSpeed = 3f;
|
rotateSpeed = 3f;
|
||||||
health = 1000;
|
health = 1000;
|
||||||
immunities = ObjectSet.with(StatusEffects.burning, StatusEffects.melting);
|
|
||||||
legCount = 6;
|
legCount = 6;
|
||||||
legLength = 13f;
|
legLength = 13f;
|
||||||
legForwardScl = 0.8f;
|
legForwardScl = 0.8f;
|
||||||
|
|||||||
@@ -90,6 +90,8 @@ public class Block extends UnlockableContent implements Senseable{
|
|||||||
public boolean destructible;
|
public boolean destructible;
|
||||||
/** whether unloaders work on this block */
|
/** whether unloaders work on this block */
|
||||||
public boolean unloadable = true;
|
public boolean unloadable = true;
|
||||||
|
/** if true, this block acts a duct and will connect to armored ducts from the side. */
|
||||||
|
public boolean isDuct = false;
|
||||||
/** whether units can resupply by taking items from this block */
|
/** whether units can resupply by taking items from this block */
|
||||||
public boolean allowResupply = false;
|
public boolean allowResupply = false;
|
||||||
/** whether this is solid */
|
/** whether this is solid */
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public class DirectionalUnloader extends Block{
|
|||||||
itemCapacity = 0;
|
itemCapacity = 0;
|
||||||
noUpdateDisabled = true;
|
noUpdateDisabled = true;
|
||||||
unloadable = false;
|
unloadable = false;
|
||||||
|
isDuct = true;
|
||||||
envDisabled = Env.none;
|
envDisabled = Env.none;
|
||||||
clearOnDoubleTap = true;
|
clearOnDoubleTap = true;
|
||||||
priority = TargetPriority.transport;
|
priority = TargetPriority.transport;
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ public class Duct extends Block implements Autotiler{
|
|||||||
underBullets = true;
|
underBullets = true;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
noSideBlend = true;
|
noSideBlend = true;
|
||||||
|
isDuct = true;
|
||||||
priority = TargetPriority.transport;
|
priority = TargetPriority.transport;
|
||||||
envEnabled = Env.space | Env.terrestrial | Env.underwater;
|
envEnabled = Env.space | Env.terrestrial | Env.underwater;
|
||||||
}
|
}
|
||||||
@@ -74,7 +75,7 @@ public class Duct extends Block implements Autotiler{
|
|||||||
return Point2.equals(tile.x + Geometry.d4(rotation).x, tile.y + Geometry.d4(rotation).y, otherx, othery)
|
return Point2.equals(tile.x + Geometry.d4(rotation).x, tile.y + Geometry.d4(rotation).y, otherx, othery)
|
||||||
|| ((!otherblock.rotatedOutput(otherx, othery) && Edges.getFacingEdge(otherblock, otherx, othery, tile) != null &&
|
|| ((!otherblock.rotatedOutput(otherx, othery) && Edges.getFacingEdge(otherblock, otherx, othery, tile) != null &&
|
||||||
Edges.getFacingEdge(otherblock, otherx, othery, tile).relativeTo(tile) == rotation) ||
|
Edges.getFacingEdge(otherblock, otherx, othery, tile).relativeTo(tile) == rotation) ||
|
||||||
//basically the only change here is that it treats overflow ducts specially, since they're... weird
|
|
||||||
((otherblock.rotatedOutput(otherx, othery)) && Point2.equals(otherx + Geometry.d4(otherrot).x, othery + Geometry.d4(otherrot).y, tile.x, tile.y)));
|
((otherblock.rotatedOutput(otherx, othery)) && Point2.equals(otherx + Geometry.d4(otherrot).x, othery + Geometry.d4(otherrot).y, tile.x, tile.y)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,7 +176,8 @@ public class Duct extends Block implements Autotiler{
|
|||||||
return current == null && items.total() == 0 &&
|
return current == null && items.total() == 0 &&
|
||||||
(armored ?
|
(armored ?
|
||||||
//armored acceptance
|
//armored acceptance
|
||||||
((source.block.rotate && source.front() == this && source.block.hasItems && (source.block instanceof Duct)) || Edges.getFacingEdge(source.tile(), tile).relativeTo(tile) == rotation) :
|
((source.block.rotate && source.front() == this && source.block.hasItems && source.block.isDuct) ||
|
||||||
|
Edges.getFacingEdge(source.tile(), tile).relativeTo(tile) == rotation) :
|
||||||
//standard acceptance - do not accept from front
|
//standard acceptance - do not accept from front
|
||||||
!(source.block.rotate && next == source) && Math.abs(Edges.getFacingEdge(source.tile, tile).relativeTo(tile.x, tile.y) - rotation) != 2
|
!(source.block.rotate && next == source) && Math.abs(Edges.getFacingEdge(source.tile, tile).relativeTo(tile.x, tile.y) - rotation) != 2
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ public class DuctBridge extends DirectionBridge{
|
|||||||
itemCapacity = 4;
|
itemCapacity = 4;
|
||||||
hasItems = true;
|
hasItems = true;
|
||||||
underBullets = true;
|
underBullets = true;
|
||||||
|
isDuct = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DuctBridgeBuild extends DirectionBridgeBuild{
|
public class DuctBridgeBuild extends DirectionBridgeBuild{
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ public class Drill extends Block{
|
|||||||
public void setStats(){
|
public void setStats(){
|
||||||
super.setStats();
|
super.setStats();
|
||||||
|
|
||||||
stats.add(Stat.drillTier, StatValues.blocks(b -> b instanceof Floor f && f.itemDrop != null && f.itemDrop.hardness <= tier && f.itemDrop != blockedItem));
|
stats.add(Stat.drillTier, StatValues.blocks(b -> b instanceof Floor f && !f.wallOre && f.itemDrop != null && f.itemDrop.hardness <= tier && f.itemDrop != blockedItem));
|
||||||
|
|
||||||
stats.add(Stat.drillSpeed, 60f / drillTime * size * size, StatUnit.itemsSecond);
|
stats.add(Stat.drillSpeed, 60f / drillTime * size * size, StatUnit.itemsSecond);
|
||||||
if(liquidBoostIntensity != 1){
|
if(liquidBoostIntensity != 1){
|
||||||
|
|||||||
Reference in New Issue
Block a user