-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserver.lua
More file actions
40 lines (37 loc) · 863 Bytes
/
server.lua
File metadata and controls
40 lines (37 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
--[[ MOST OF THIS IS JUST TEMPORARY, OK? ]]--
server = { }
--temporary from below. will be replaced with actual server collection (through LOVE or Polycode)
elements = { }
rank = 1
energy = 4000
name = "terrabyte_aura"
function server.get(cat) --short for category
if cat == "elements" then
--get elements
return elements
elseif cat == "rank" then
--get rank
return rank
elseif cat == "energy" then
--get energy
return energy
elseif cat == "name" then
--get name w/ Twitter APT
return name
end
end
function server.send(cat,val) --if there's some way to check then do that too
if cat == "elements" then
elements = val
--send elements. send requires: category,value,username
return 1
elseif cat == "rank" then
rank = val
--send rank
return 1
elseif cat == "energy" then
energy = val
--send elements
return 1
end
end