Slightly less conservative message block max length

This commit is contained in:
Anuken
2026-04-22 18:45:35 -04:00
parent ecc873096e
commit ccfb280293
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -188,8 +188,8 @@ public class TypeIO{
case 4 -> {
byte exists = read.b();
if(exists != 0){
//in a safe context, strings can only be 1000 chars
yield read.str(safe ? 1000 : 0);
//in a safe context, strings can only be 1200 chars
yield read.str(safe ? 1200 : 0);
}else{
yield null;
}
@@ -25,9 +25,9 @@ import static mindustry.Vars.*;
public class MessageBlock extends Block{
private static final int maxByteLength = 999;
//maximum UTF-8 length per char is 4, so 4*250 = 1000 bytes, the max byte array size
/** maximum UTF-8 length per char is 4, so 4*300 = 1200 bytes, the max string byte size */
@NoPatch
public int maxTextLength = 250;
public int maxTextLength = 300;
public int maxNewlines = 24;
public MessageBlock(String name){