* Added PrintChar operation

* Added 1ue999 to contributors

* Added PrintChar description, and improved the design of it.

* Ok intellij, removing the int cast

* Added capability to print content icons (@flare or @router)
https://github.com/Anuken/Mindustry/pull/10451#discussion_r1941282280

* Formatting changes (hopefully all of them)

* Update core/src/mindustry/logic/LStatements.java

* Update core/src/mindustry/logic/LStatements.java

---------

Co-authored-by: Anuken <arnukren@gmail.com>
This commit is contained in:
1ue999
2025-02-05 01:39:33 +01:00
committed by GitHub
parent fbd2944663
commit c4e25e312f
4 changed files with 65 additions and 0 deletions

View File

@@ -988,6 +988,29 @@ public class LExecutor{
}
}
public static class PrintCharI implements LInstruction{
public LVar value;
public PrintCharI(LVar value){
this.value = value;
}
PrintCharI(){}
@Override
public void run(LExecutor exec){
if(exec.textBuffer.length() >= maxTextBuffer) return;
if(value.isobj){
if(!(value.objval instanceof UnlockableContent cont)) return;
exec.textBuffer.append((char)cont.emojiChar());
return;
}
exec.textBuffer.append((char)Math.floor(value.numval));
}
}
public static class FormatI implements LInstruction{
public LVar value;