From a1e98015daae57188bb99777b54aab9cef0b1992 Mon Sep 17 00:00:00 2001 From: Lucas Date: Tue, 3 May 2016 17:47:51 +0200 Subject: [PATCH] Optimised brush fix --- Fifth/resources/scripts/Standard/BuilderController.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Fifth/resources/scripts/Standard/BuilderController.lua b/Fifth/resources/scripts/Standard/BuilderController.lua index 3b7bf13..37f61b7 100644 --- a/Fifth/resources/scripts/Standard/BuilderController.lua +++ b/Fifth/resources/scripts/Standard/BuilderController.lua @@ -211,6 +211,9 @@ function BuilderController:onLoop() end if(self.isTiling) then + if (self.brush > table.getn(self.brushes)) do + self.brush = table.getn(self.brushes) + end tileSize = game.tileSize() if(self.mouseDown) then @@ -291,4 +294,4 @@ end function create(parent, component) return BuilderController(parent, component) -end \ No newline at end of file +end