Drownable tar and lava
This commit is contained in:
@@ -16,7 +16,8 @@ import io.anuke.ucore.graphics.Lines;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
public class Blocks extends BlockList implements ContentList{
|
||||
public static Block air, blockpart, spawn, space, metalfloor, deepwater, water, lava, tar, stone, blackstone, dirt, sand, ice, snow, grass, shrub, rock, icerock, blackrock;
|
||||
public static Block air, blockpart, spawn, space, metalfloor, deepwater, water, lava, tar, stone,
|
||||
blackstone, dirt, sand, ice, snow, grass, shrub, rock, icerock, blackrock;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -90,6 +91,7 @@ public class Blocks extends BlockList implements ContentList{
|
||||
}};
|
||||
|
||||
lava = new Floor("lava"){{
|
||||
drownTime = 100f;
|
||||
liquidColor = Color.valueOf("ed5334");
|
||||
speedMultiplier = 0.2f;
|
||||
damageTaken = 0.5f;
|
||||
@@ -103,6 +105,7 @@ public class Blocks extends BlockList implements ContentList{
|
||||
}};
|
||||
|
||||
tar = new Floor("tar"){{
|
||||
drownTime = 150f;
|
||||
liquidColor = Color.valueOf("292929");
|
||||
status = StatusEffects.tarred;
|
||||
statusIntensity = 1f;
|
||||
|
||||
@@ -40,7 +40,6 @@ import io.anuke.ucore.util.Mathf;
|
||||
import io.anuke.ucore.util.Strings;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
@@ -171,8 +170,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
}
|
||||
});
|
||||
|
||||
loadDialog = new MapLoadDialog(map -> {
|
||||
|
||||
loadDialog = new MapLoadDialog(map ->
|
||||
ui.loadGraphics(() -> {
|
||||
try(DataInputStream stream = new DataInputStream(map.stream.get())){
|
||||
MapMeta meta = MapIO.readMapMeta(stream);
|
||||
@@ -180,12 +178,11 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
|
||||
editor.beginEdit(data, meta.tags, false);
|
||||
view.clearStack();
|
||||
}catch(IOException e){
|
||||
}catch(Exception e){
|
||||
ui.showError(Bundles.format("text.editor.errormapload", Strings.parseException(e, false)));
|
||||
Log.err(e);
|
||||
}
|
||||
});
|
||||
});
|
||||
}));
|
||||
|
||||
setFillParent(true);
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public class PlacementFragment extends Fragment{
|
||||
}
|
||||
|
||||
boolean gridUpdate(InputHandler input){
|
||||
if(!Inputs.keyDown("gridMode")) return false;
|
||||
if(!Inputs.keyDown("gridMode") || ui.chatfrag.chatOpen()) return false;
|
||||
if(Inputs.keyDown("gridModeShift")){ //select category
|
||||
int i = 0;
|
||||
for(Input key : inputCatGrid){
|
||||
|
||||
Reference in New Issue
Block a user