diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index b5b5b1bf98..b9e740e588 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -2540,6 +2540,7 @@ laccess.dead = Whether a unit/building is dead or no longer valid. laccess.controlled = Returns:\n[accent]@ctrlProcessor[] if unit controller is processor\n[accent]@ctrlPlayer[] if unit/building controller is player\n[accent]@ctrlCommand[] if unit controller is a player command\nOtherwise, 0. laccess.progress = Action progress, 0 to 1.\nReturns production, turret reload or construction progress. laccess.speed = Top speed of a unit, in tiles/sec. +laccess.size = Size of a unit/building or the length of a string. laccess.id = ID of a unit/block/item/liquid.\nThis is the inverse of the lookup operation. lcategory.unknown = Unknown diff --git a/core/src/mindustry/logic/LExecutor.java b/core/src/mindustry/logic/LExecutor.java index 8f7985b55b..d445308e88 100644 --- a/core/src/mindustry/logic/LExecutor.java +++ b/core/src/mindustry/logic/LExecutor.java @@ -652,6 +652,10 @@ public class LExecutor{ } } }else{ + if(target instanceof CharSequence seq && sense == LAccess.size){ + to.setnum(seq.length()); + return; + } to.setobj(null); } }