Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features

This commit is contained in:
Anuken
2021-10-12 12:36:20 -04:00
80 changed files with 2247 additions and 187 deletions

View File

@@ -1241,6 +1241,14 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
return amount;
}
public boolean absorbLasers(){
return block.absorbLasers;
}
public boolean isInsulated(){
return block.insulated;
}
public boolean collide(Bullet other){
return true;
}

View File

@@ -9,7 +9,6 @@ import arc.util.*;
import arc.util.pooling.*;
import mindustry.annotations.Annotations.*;
import mindustry.content.*;
import mindustry.core.*;
import mindustry.entities.units.*;
import mindustry.game.EventType.*;
import mindustry.game.*;
@@ -310,10 +309,15 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
Draw.z(z);
}
/** @return name with a markup color prefix */
String coloredName(){
return "[#" + color.toString().toUpperCase() + "]" + name;
}
void sendMessage(String text){
if(isLocal()){
if(ui != null){
ui.chatfrag.addMessage(text, null);
ui.chatfrag.addMessage(text);
}
}else{
Call.sendMessage(con, text, null, null);
@@ -321,16 +325,16 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
}
void sendMessage(String text, Player from){
sendMessage(text, from, NetClient.colorizeName(from.id(), from.name));
sendMessage(text, from, null);
}
void sendMessage(String text, Player from, String fromName){
void sendMessage(String text, Player from, String unformatted){
if(isLocal()){
if(ui != null){
ui.chatfrag.addMessage(text, fromName);
ui.chatfrag.addMessage(text);
}
}else{
Call.sendMessage(con, text, fromName, from);
Call.sendMessage(con, text, unformatted, from);
}
}

View File

@@ -88,7 +88,7 @@ abstract class WaterMoveComp implements Posc, Velc, Hitboxc, Flyingc, Unitc{
@Replace
public float floorSpeedMultiplier(){
Floor on = isFlying() ? Blocks.air.asFloor() : floorOn();
return (on.isDeep() ? 1.3f : 1f) * speedMultiplier;
return (on.shallow ? 1f : 1.3f) * speedMultiplier;
}
public boolean onLiquid(){