Merge pull request #3093 from DeltaNedas/patch-11

add more info to print object
This commit is contained in:
Anuken 2020-10-24 15:09:50 -04:00 committed by GitHub
commit 94e40a32b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -876,10 +876,11 @@ public class LExecutor{
if(v.isobj && value != 0){
String strValue =
v.objval == null ? "null" :
v.objval instanceof String ? (String)v.objval :
v.objval instanceof String s ? s :
v.objval instanceof MappableContent content ? content.name :
v.objval instanceof Content ? "[content]" :
v.objval instanceof Building ? "[building]" :
v.objval instanceof Unit ? "[unit]" :
v.objval instanceof Building build ? build.block.name :
v.objval instanceof Unit unit ? unit.type.name :
"[object]";
exec.textBuffer.append(strValue);