Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -94,16 +94,18 @@ public class Blocks{
|
||||
//sandbox
|
||||
powerSource, powerVoid, itemSource, itemVoid, liquidSource, liquidVoid, payloadSource, payloadVoid, illuminator, heatSource,
|
||||
|
||||
//defense
|
||||
//walls
|
||||
copperWall, copperWallLarge, titaniumWall, titaniumWallLarge, plastaniumWall, plastaniumWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge,
|
||||
phaseWall, phaseWallLarge, surgeWall, surgeWallLarge,
|
||||
|
||||
scrapWall, scrapWallLarge, scrapWallHuge, scrapWallGigantic, thruster, //ok, these names are getting ridiculous, but at least I don't have humongous walls yet
|
||||
|
||||
//walls - erekir
|
||||
berylliumWall, berylliumWallLarge, tungstenWall, tungstenWallLarge, blastDoor, reinforcedSurgeWall, reinforcedSurgeWallLarge, carbideWall, carbideWallLarge,
|
||||
shieldedWall,
|
||||
|
||||
//defense
|
||||
mender, mendProjector, overdriveProjector, overdriveDome, forceProjector, shockMine,
|
||||
scrapWall, scrapWallLarge, scrapWallHuge, scrapWallGigantic, thruster, //ok, these names are getting ridiculous, but at least I don't have humongous walls yet
|
||||
|
||||
//defense - erekir
|
||||
radar,
|
||||
|
||||
@@ -176,8 +176,8 @@ public class UnitTypes{
|
||||
bullet = new ArtilleryBulletType(2f, 20, "shell"){{
|
||||
hitEffect = Fx.blastExplosion;
|
||||
knockback = 0.8f;
|
||||
lifetime = 120f - 35f / 2f;
|
||||
rangeOverride = 240f;
|
||||
lifetime = 120f - (35f - 8f) / 2f;
|
||||
maxRange = 240f;
|
||||
width = height = 14f;
|
||||
collides = true;
|
||||
collidesTiles = true;
|
||||
|
||||
@@ -89,7 +89,8 @@ abstract class TankComp implements Posc, Hitboxc, Unitc, ElevationMovec{
|
||||
&& Math.max(Math.abs(dx), Math.abs(dy)) <= r - 1){
|
||||
|
||||
if(t.build != null && t.build.team != team){
|
||||
t.build.damage(team, type.crushDamage * Time.delta * t.block().crushDamageMultiplier * state.rules.unitDamage(team));
|
||||
t.build.damage(team, type.crushDamage * Time.delta * t.block().crushDamageMultiplier * state.rules.unitDamage(team)
|
||||
* ((speedMultiplier- 1) / 5 + 1));
|
||||
}else if(t.block().unitMoveBreakable){
|
||||
ConstructBlock.deconstructFinish(t, t.block(), self());
|
||||
}
|
||||
|
||||
@@ -980,7 +980,7 @@ public class LExecutor{
|
||||
if(p1.obj() instanceof UnlockableContent u){
|
||||
packed = (u.id << 5) | (u.getContentType().ordinal() & 31);
|
||||
}else if(p1.obj() instanceof LogicDisplayBuild d){
|
||||
packed = (d.index << 5) | LogicDisplay.displayDrawType;
|
||||
packed = (d.rootDisplay.index << 5) | LogicDisplay.displayDrawType;
|
||||
}
|
||||
num1 = packed & 0x3FF;
|
||||
num4 = packed >> 10;
|
||||
|
||||
@@ -544,6 +544,8 @@ public class ContentParser{
|
||||
child.isArray() ? new ConsumeItems(parser.readValue(ItemStack[].class, child)) :
|
||||
child.isString() ? new ConsumeItems(new ItemStack[]{parser.readValue(ItemStack.class, child)}) :
|
||||
parser.readValue(ConsumeItems.class, child));
|
||||
case "itemsBoost" -> block.consume(child.isArray() ? new ConsumeItems(parser.readValue(ItemStack[].class, child)) :
|
||||
parser.readValue(ConsumeItems.class, child)).boost();
|
||||
|
||||
case "liquidFlammable" -> block.consume((Consume)parser.readValue(ConsumeLiquidFlammable.class, child));
|
||||
case "liquid" -> block.consume((Consume)parser.readValue(ConsumeLiquid.class, child));
|
||||
@@ -551,6 +553,8 @@ public class ContentParser{
|
||||
child.isArray() ? new ConsumeLiquids(parser.readValue(LiquidStack[].class, child)) :
|
||||
parser.readValue(ConsumeLiquids.class, child));
|
||||
case "coolant" -> block.consume((Consume)parser.readValue(ConsumeCoolant.class, child));
|
||||
case "liquidsBoost" -> block.consume(child.isArray() ? new ConsumeLiquids(parser.readValue(LiquidStack[].class, child)) :
|
||||
parser.readValue(ConsumeLiquids.class, child)).boost();
|
||||
case "power" -> {
|
||||
if(child.isNumber()){
|
||||
block.consumePower(child.asFloat());
|
||||
|
||||
@@ -736,6 +736,12 @@ public class Block extends UnlockableContent implements Senseable{
|
||||
setBars();
|
||||
offset = ((size + 1) % 2) * tilesize / 2f;
|
||||
sizeOffset = -((size - 1) / 2);
|
||||
|
||||
if(consumeBuilder.size != 0){
|
||||
for(var consume : consumeBuilder){
|
||||
consume.apply(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean consumesItem(Item item){
|
||||
|
||||
@@ -268,8 +268,10 @@ public class LogicDisplay extends Block{
|
||||
super.remove();
|
||||
|
||||
if(index != -1){
|
||||
displays.get(displays.size - 1).index = index;
|
||||
displays.remove(index);
|
||||
LogicDisplayBuild last = displays.get(displays.size - 1);
|
||||
last.index = index;
|
||||
displays.set(index, last);
|
||||
displays.remove(displays.size - 1);
|
||||
index = -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user