I bet this will break shit somewhere (#11292)
This commit is contained in:
@@ -70,8 +70,8 @@ public class Block extends UnlockableContent implements Senseable{
|
|||||||
public boolean separateItemCapacity = false;
|
public boolean separateItemCapacity = false;
|
||||||
/** maximum items this block can carry (usually, this is per-type of item) */
|
/** maximum items this block can carry (usually, this is per-type of item) */
|
||||||
public int itemCapacity = 10;
|
public int itemCapacity = 10;
|
||||||
/** maximum total liquids this block can carry if hasLiquids = true */
|
/** maximum total liquids this block can carry if hasLiquids = true. Default value is 10, scales with max liquid consumption in ConsumeLiquid */
|
||||||
public float liquidCapacity = 10f;
|
public float liquidCapacity = -1f;
|
||||||
/** higher numbers increase liquid output speed; TODO remove and replace with better liquids system */
|
/** higher numbers increase liquid output speed; TODO remove and replace with better liquids system */
|
||||||
public float liquidPressure = 1f;
|
public float liquidPressure = 1f;
|
||||||
/** If true, this block outputs to its facing direction, when applicable.
|
/** If true, this block outputs to its facing direction, when applicable.
|
||||||
@@ -1327,6 +1327,17 @@ public class Block extends UnlockableContent implements Senseable{
|
|||||||
lightClipSize = Math.max(lightClipSize, size * 30f * 2f);
|
lightClipSize = Math.max(lightClipSize, size * 30f * 2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// some blocks dont have hasLiquids but have liquid consumers/liquid capacity
|
||||||
|
if(liquidCapacity < 0){
|
||||||
|
float consumeAmount = 1f;
|
||||||
|
for(var cons : consumeBuilder){
|
||||||
|
if(cons instanceof ConsumeLiquid liq){
|
||||||
|
consumeAmount = Math.max(consumeAmount, liq.amount * 60f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
liquidCapacity = Mathf.round(10f * consumeAmount);
|
||||||
|
}
|
||||||
|
|
||||||
if(emitLight){
|
if(emitLight){
|
||||||
lightClipSize = Math.max(lightClipSize, lightRadius * 2f);
|
lightClipSize = Math.max(lightClipSize, lightRadius * 2f);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ public class Drill extends Block{
|
|||||||
solid = true;
|
solid = true;
|
||||||
group = BlockGroup.drills;
|
group = BlockGroup.drills;
|
||||||
hasLiquids = true;
|
hasLiquids = true;
|
||||||
liquidCapacity = 5f;
|
|
||||||
hasItems = true;
|
hasItems = true;
|
||||||
ambientSound = Sounds.loopDrill;
|
ambientSound = Sounds.loopDrill;
|
||||||
ambientSoundVolume = 0.019f;
|
ambientSoundVolume = 0.019f;
|
||||||
|
|||||||
Reference in New Issue
Block a user