From 39d93616d23cbb3716b6b47fe1e9914b55c48f7d Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 22 Jun 2021 21:15:40 -0400 Subject: [PATCH] comment support for CoolUtil.cooltextFile() --- source/CoolUtil.hx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/CoolUtil.hx b/source/CoolUtil.hx index 4d76c9231..9f5bbac95 100644 --- a/source/CoolUtil.hx +++ b/source/CoolUtil.hx @@ -24,7 +24,16 @@ class CoolUtil public static function coolTextFile(path:String):Array { - var daList:Array = Assets.getText(path).trim().split('\n'); + var daList:Array = []; + + var swagArray:Array = Assets.getText(path).trim().split('\n'); + + for (item in swagArray) + { + // comment support in the quick lil text formats??? using // + if (!item.trim().startsWith('//')) + daList.push(item); + } for (i in 0...daList.length) {