Fixed #8667
This commit is contained in:
@@ -138,7 +138,7 @@ public class NetServer implements ApplicationListener{
|
|||||||
|
|
||||||
String uuid = packet.uuid;
|
String uuid = packet.uuid;
|
||||||
|
|
||||||
if(admins.isIPBanned(con.address) || admins.isSubnetBanned(con.address) || con.kicked) return;
|
if(admins.isIPBanned(con.address) || admins.isSubnetBanned(con.address) || con.kicked || !con.isConnected()) return;
|
||||||
|
|
||||||
if(con.hasBegunConnecting){
|
if(con.hasBegunConnecting){
|
||||||
con.kick(KickReason.idInUse);
|
con.kick(KickReason.idInUse);
|
||||||
|
|||||||
@@ -56,7 +56,9 @@ public class DrawOperation{
|
|||||||
void setTile(Tile tile, byte type, short to){
|
void setTile(Tile tile, byte type, short to){
|
||||||
editor.load(() -> {
|
editor.load(() -> {
|
||||||
if(type == OpType.floor.ordinal()){
|
if(type == OpType.floor.ordinal()){
|
||||||
tile.setFloor((Floor)content.block(to));
|
if(content.block(to) instanceof Floor floor){
|
||||||
|
tile.setFloor(floor);
|
||||||
|
}
|
||||||
}else if(type == OpType.block.ordinal()){
|
}else if(type == OpType.block.ordinal()){
|
||||||
tile.getLinkedTiles(t -> editor.renderer.updatePoint(t.x, t.y));
|
tile.getLinkedTiles(t -> editor.renderer.updatePoint(t.x, t.y));
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,8 @@ public enum EditorTool{
|
|||||||
if(!Structs.inBounds(x, y, editor.width(), editor.height())) return;
|
if(!Structs.inBounds(x, y, editor.width(), editor.height())) return;
|
||||||
Tile tile = editor.tile(x, y);
|
Tile tile = editor.tile(x, y);
|
||||||
|
|
||||||
|
if(tile == null) return;
|
||||||
|
|
||||||
if(editor.drawBlock.isMultiblock()){
|
if(editor.drawBlock.isMultiblock()){
|
||||||
//don't fill multiblocks, thanks
|
//don't fill multiblocks, thanks
|
||||||
pencil.touched(x, y);
|
pencil.touched(x, y);
|
||||||
|
|||||||
@@ -195,10 +195,12 @@ public class Mods implements Loadable{
|
|||||||
float textureScale = mod.meta.texturescale;
|
float textureScale = mod.meta.texturescale;
|
||||||
|
|
||||||
for(Fi file : sprites){
|
for(Fi file : sprites){
|
||||||
String name = file.nameWithoutExtension();
|
String
|
||||||
|
baseName = file.nameWithoutExtension(),
|
||||||
|
regionName = baseName.contains(".") ? baseName.substring(0, baseName.indexOf(".")) : baseName;
|
||||||
|
|
||||||
if(!prefix && !Core.atlas.has(name)){
|
if(!prefix && !Core.atlas.has(regionName)){
|
||||||
Log.warn("Sprite '@' in mod '@' attempts to override a non-existent sprite. Ignoring.", name, mod.name);
|
Log.warn("Sprite '@' in mod '@' attempts to override a non-existent sprite. Ignoring.", regionName, mod.name);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
//(horrible code below)
|
//(horrible code below)
|
||||||
@@ -215,7 +217,7 @@ public class Mods implements Loadable{
|
|||||||
}
|
}
|
||||||
//this returns a *runnable* which actually packs the resulting pixmap; this has to be done synchronously outside the method
|
//this returns a *runnable* which actually packs the resulting pixmap; this has to be done synchronously outside the method
|
||||||
return () -> {
|
return () -> {
|
||||||
String fullName = (prefix ? mod.name + "-" : "") + name;
|
String fullName = (prefix ? mod.name + "-" : "") + baseName;
|
||||||
packer.add(getPage(file), fullName, new PixmapRegion(pix));
|
packer.add(getPage(file), fullName, new PixmapRegion(pix));
|
||||||
if(textureScale != 1.0f){
|
if(textureScale != 1.0f){
|
||||||
textureResize.put(fullName, textureScale);
|
textureResize.put(fullName, textureScale);
|
||||||
|
|||||||
@@ -41,6 +41,11 @@ public abstract class NetConnection{
|
|||||||
this.address = address;
|
this.address = address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Kick with the standard kick reason. */
|
||||||
|
public void kick(){
|
||||||
|
kick(KickReason.kick);
|
||||||
|
}
|
||||||
|
|
||||||
/** Kick with a special, localized reason. Use this if possible. */
|
/** Kick with a special, localized reason. Use this if possible. */
|
||||||
public void kick(KickReason reason){
|
public void kick(KickReason reason){
|
||||||
kick(reason, (reason == KickReason.kick || reason == KickReason.banned || reason == KickReason.vote) ? 30 * 1000 : 0);
|
kick(reason, (reason == KickReason.kick || reason == KickReason.banned || reason == KickReason.vote) ? 30 * 1000 : 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user