From c48f3f2fcf3da1147581000d91ee8001bdfa7ff1 Mon Sep 17 00:00:00 2001 From: redlock Date: Thu, 10 Mar 2011 14:40:35 +0100 Subject: [PATCH] declare function for perm variables --- LICK/lib/hlpr.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/LICK/lib/hlpr.lua b/LICK/lib/hlpr.lua index 0529b09..13ded41 100644 --- a/LICK/lib/hlpr.lua +++ b/LICK/lib/hlpr.lua @@ -8,7 +8,16 @@ sin = math.sin deg = math.deg rad = math.rad +State = State or {} +function declare(t) + for i,v in pairs(t) do + if not State[i] then + State[i] = v + _G[i] = State[i] + end + end +end require "LICK/lib/color" module(...,package.seeall)