diff --git a/source/mikolka/JoinedLuaVariables.hx b/source/mikolka/JoinedLuaVariables.hx index 2ad50fb8..9a604ecd 100644 --- a/source/mikolka/JoinedLuaVariables.hx +++ b/source/mikolka/JoinedLuaVariables.hx @@ -9,19 +9,8 @@ class JoinedLuaVariables extends StringMap { } override function get(key:String):Null { //! P-Slice patch - var regex = ~/(.+)\[([0-9]+)\]/; - if(regex.match(key)){ - var realKey = regex.matched(1); - var index = Std.parseInt(regex.matched(2)); - var arrayValue = super.get(realKey); - if(arrayValue == null) arrayValue = resolveUnknown(realKey); - return arrayValue[index]; - } var arrayValue = super.get(key); - if(arrayValue == null) arrayValue = resolveUnknown(key); + if(arrayValue == null) arrayValue = LuaUtils.getVarInArray(PlayState.instance, key, false); return arrayValue; } - private inline function resolveUnknown(key:String):Null { - return LuaUtils.getVarInArray(PlayState.instance, key, false); - } -} \ No newline at end of file +}