From 913352bb0c0fdb30c35bdaea930a1bdcb47db132 Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Mon, 29 Jul 2019 23:34:02 +0200 Subject: Replace arr[GetLength(arr)] with arr[] --- Items.c4d/Extractor.c4d/Script.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Items.c4d/Extractor.c4d/Script.c') diff --git a/Items.c4d/Extractor.c4d/Script.c b/Items.c4d/Extractor.c4d/Script.c index 05a1fc6..7dddbc8 100644 --- a/Items.c4d/Extractor.c4d/Script.c +++ b/Items.c4d/Extractor.c4d/Script.c @@ -120,9 +120,9 @@ func AddQueue(array args) } else { - produceQueue[GetLength(produceQueue)] = args; + produceQueue[] = args; } - + if(GetLength(produceQueue) == 1 || !GetCommand(worker)) { ContinueQueue(); @@ -153,7 +153,7 @@ func ShowQueue() for(var i = 1; i <= GetLength(produceQueue); ++i) { var id = produceQueue[i] && produceQueue[i][0]; - + if(lastID == id) { ++cnt; @@ -174,7 +174,7 @@ func ShowQueue() } cnt = 0; } - + lastID = id; } if(i < GetLength(produceQueue)) @@ -264,7 +264,7 @@ func GetProducableIDs() { if(GetDefCollectible(type) && GetHomebaseMaterial(plr, type) && GetWealth(plr) >= GetValue(0, type, attached, plr)) { - ret[GetLength(ret)] = type; + ret[] = type; } } } @@ -276,7 +276,7 @@ func GetProducableIDs() { if(attached->~IsProducerOf(worker, type)) { - ret[GetLength(ret)] = type; + ret[] = type; } } } @@ -306,7 +306,7 @@ func SensorCallbacks() { for(var id in part) { - ret[GetLength(ret)] = [Format("$SendObjectType$", GetName(0, id)), BindCallback("SendObjectThroughTube", [Bind(id), 2]), id]; + ret[] = [Format("$SendObjectType$", GetName(0, id)), BindCallback("SendObjectThroughTube", [Bind(id), 2]), id]; } } } -- cgit v1.2.3-54-g00ecf