From 3b2669fa216044d25ad93e4b9253da3f2c843b64 Mon Sep 17 00:00:00 2001 From: DeltaNedas <39013340+DeltaNedas@users.noreply.github.com> Date: Sat, 24 Oct 2020 17:23:54 +0000 Subject: [PATCH] pattern variables? --- core/src/mindustry/logic/LExecutor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/logic/LExecutor.java b/core/src/mindustry/logic/LExecutor.java index ed93b7aeaa..d287e9e482 100644 --- a/core/src/mindustry/logic/LExecutor.java +++ b/core/src/mindustry/logic/LExecutor.java @@ -876,11 +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 MappableContent ? ((MappableContent)v.objval).name : + 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).block.name : - v.objval instanceof Unit ? ((Unit)v.objval).type.name : + v.objval instanceof Building build ? build.block.name : + v.objval instanceof Unit unit ? unit.type.name : "[object]"; exec.textBuffer.append(strValue);