Allow markers to use content/displays as textures (#11142)

* Allow markers to use content/displays as textures

* Don't process empty commands

* Allow canvases to be used as marker textures

* Proper Json serialization

---------

Co-authored-by: Anuken <arnukren@gmail.com>
This commit is contained in:
Redstonneur1256
2025-12-28 03:37:03 +01:00
committed by GitHub
parent 7d3e3155f7
commit 59c3b18a6f
5 changed files with 118 additions and 41 deletions

View File

@@ -2067,7 +2067,7 @@ public class LExecutor{
marker.setTexture(exec.textBuffer.toString());
exec.textBuffer.setLength(0);
}else{
marker.setTexture(PrintI.toString(p2.obj()));
marker.setTexture(p2.obj());
}
}else{
marker.control(type, p1.numOrNan(), p2.numOrNan(), p3.numOrNan());
@@ -2138,10 +2138,10 @@ public class LExecutor{
}
@Remote(called = Loc.server, variants = Variant.both, unreliable = true)
public static void updateMarkerTexture(int id, String textureName){
public static void updateMarkerTexture(int id, Object texture){
var marker = state.markers.get(id);
if(marker != null){
marker.setTexture(textureName);
marker.setTexture(texture);
}
}