aboutsummaryrefslogtreecommitdiff
path: root/gamemode/shared/sparkel.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/shared/sparkel.lua')
-rw-r--r--gamemode/shared/sparkel.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/gamemode/shared/sparkel.lua b/gamemode/shared/sparkel.lua
index 5882aac..c839059 100644
--- a/gamemode/shared/sparkel.lua
+++ b/gamemode/shared/sparkel.lua
@@ -1,5 +1,6 @@
-function sparkel(...)
+
+local function sparkel(...)
local arg = {...}
local looparg = type(arg[1]) == "string" and string.Explode(" ",arg[1],false) or arg
--One pass to find the high and low point
@@ -9,9 +10,11 @@ function sparkel(...)
max = max > v and max or v
min = min < v and min or v
end
- local scale = (max-min)/7
+ local scale = (max-min) / 7
for k,v in pairs(looparg) do
- Msg(utf8.char(9600+(1+(v/scale))))
+ Msg(utf8.char(9600 + ( 1 + (v / scale))))
end
Msg("\n")
end
+
+return sparkel