Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -874,6 +874,7 @@ public class Blocks implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
thruster = new Thruster("thruster"){{
|
thruster = new Thruster("thruster"){{
|
||||||
|
requirements(Category.defense, BuildVisibility.sandboxOnly, with(Items.scrap, 96));
|
||||||
health = 55 * 16 * wallHealthMultiplier;
|
health = 55 * 16 * wallHealthMultiplier;
|
||||||
size = 4;
|
size = 4;
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
|
|
||||||
}).tooltip(c.localizedName);
|
}).tooltip(c.localizedName);
|
||||||
|
|
||||||
if(++i % Math.min(Core.graphics.getWidth() / Scl.scl(110), 14) == 0) cs.row();
|
if(++i % (int)Math.min(Core.graphics.getWidth() / Scl.scl(110), 14) == 0) cs.row();
|
||||||
}
|
}
|
||||||
}).grow();
|
}).grow();
|
||||||
d.addCloseButton();
|
d.addCloseButton();
|
||||||
|
|||||||
@@ -202,10 +202,16 @@ public class Block extends UnlockableContent{
|
|||||||
public int outlinedIcon = -1;
|
public int outlinedIcon = -1;
|
||||||
/** Whether this block has a shadow under it. */
|
/** Whether this block has a shadow under it. */
|
||||||
public boolean hasShadow = true;
|
public boolean hasShadow = true;
|
||||||
/** Sounds made when this block is destroyed.*/
|
/** Should the sound made when this block is built change in pitch. */
|
||||||
public Sound destroySound = Sounds.boom;
|
public boolean placePitchChange = true;
|
||||||
|
/** Should the sound made when this block is deconstructed change in pitch. */
|
||||||
|
public boolean breakPitchChange = true;
|
||||||
|
/** Sound made when this block is built. */
|
||||||
|
public Sound placeSound = Sounds.place;
|
||||||
/** Sound made when this block is deconstructed. */
|
/** Sound made when this block is deconstructed. */
|
||||||
public Sound breakSound = Sounds.breaks;
|
public Sound breakSound = Sounds.breaks;
|
||||||
|
/** Sounds made when this block is destroyed.*/
|
||||||
|
public Sound destroySound = Sounds.boom;
|
||||||
/** How reflective this block is. */
|
/** How reflective this block is. */
|
||||||
public float albedo = 0f;
|
public float albedo = 0f;
|
||||||
/** Environmental passive light color. */
|
/** Environmental passive light color. */
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class ConstructBlock extends Block{
|
|||||||
block.breakEffect.at(tile.drawx(), tile.drawy(), block.size, block.mapColor);
|
block.breakEffect.at(tile.drawx(), tile.drawy(), block.size, block.mapColor);
|
||||||
Events.fire(new BlockBuildEndEvent(tile, builder, team, true, null));
|
Events.fire(new BlockBuildEndEvent(tile, builder, team, true, null));
|
||||||
tile.remove();
|
tile.remove();
|
||||||
if(shouldPlay()) block.breakSound.at(tile, calcPitch(false));
|
if(shouldPlay()) block.breakSound.at(tile, block.breakPitchChange ? calcPitch(false) : 1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Remote(called = Loc.server)
|
@Remote(called = Loc.server)
|
||||||
@@ -97,7 +97,7 @@ public class ConstructBlock extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
Fx.placeBlock.at(tile.drawx(), tile.drawy(), block.size);
|
Fx.placeBlock.at(tile.drawx(), tile.drawy(), block.size);
|
||||||
if(shouldPlay()) Sounds.place.at(tile, calcPitch(true));
|
if(shouldPlay()) block.placeSound.at(tile, block.placePitchChange ? calcPitch(true) : 1f);
|
||||||
|
|
||||||
Events.fire(new BlockBuildEndEvent(tile, builder, team, false, config));
|
Events.fire(new BlockBuildEndEvent(tile, builder, team, false, config));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,24 +127,32 @@ public class GenericCrafter extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(progress >= 1f){
|
if(progress >= 1f){
|
||||||
consume();
|
craft();
|
||||||
|
|
||||||
if(outputItems != null){
|
|
||||||
for(ItemStack output : outputItems){
|
|
||||||
for(int i = 0; i < output.amount; i++){
|
|
||||||
offload(output.item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(outputLiquid != null){
|
|
||||||
handleLiquid(this, outputLiquid.liquid, outputLiquid.amount);
|
|
||||||
}
|
|
||||||
|
|
||||||
craftEffect.at(x, y);
|
|
||||||
progress %= 1f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dumpOutputs();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void craft(){
|
||||||
|
consume();
|
||||||
|
|
||||||
|
if(outputItems != null){
|
||||||
|
for(ItemStack output : outputItems){
|
||||||
|
for(int i = 0; i < output.amount; i++){
|
||||||
|
offload(output.item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(outputLiquid != null){
|
||||||
|
handleLiquid(this, outputLiquid.liquid, outputLiquid.amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
craftEffect.at(x, y);
|
||||||
|
progress %= 1f;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void dumpOutputs(){
|
||||||
if(outputItems != null && timer(timerDump, dumpTime / timeScale)){
|
if(outputItems != null && timer(timerDump, dumpTime / timeScale)){
|
||||||
for(ItemStack output : outputItems){
|
for(ItemStack output : outputItems){
|
||||||
dump(output.item);
|
dump(output.item);
|
||||||
|
|||||||
@@ -46,5 +46,9 @@
|
|||||||
{
|
{
|
||||||
"name": "SubZero",
|
"name": "SubZero",
|
||||||
"address": ["minty-server.ddns.net"]
|
"address": ["minty-server.ddns.net"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Shiza Minigames",
|
||||||
|
"address": ["shizashizashiza.ml"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user