Read from MessageBlocks/Builds (#10981)
* Added ability to read content of messages and sensing the length of the content. Also some bundle changes for read/write * this commit will make mindustry unable to compile trust * oop missed a space
This commit is contained in:
@@ -580,6 +580,8 @@ public class LExecutor{
|
||||
output.numval = fromVar.numval;
|
||||
output.isobj = fromVar.isobj;
|
||||
}
|
||||
}else if(from instanceof MessageBuild msg){
|
||||
output.setnum(address < 0 || address >= msg.message.length() ? Double.NaN : (int)msg.message.charAt(address));
|
||||
}else if(target.isobj && target.objval instanceof CharSequence str){
|
||||
output.setnum(address < 0 || address >= str.length() ? Double.NaN : (int)str.charAt(address));
|
||||
}else if(from instanceof CanvasBuild canvas && (exec.privileged || (from.team == exec.team))){
|
||||
|
||||
Reference in New Issue
Block a user