lsft/cl_lsft.txt

69 lines
No EOL
1.7 KiB
Text

--@name Logan's Starfall Toolkit
--@author logan2611
--@client
--@includedir lsft/modules/client
--@includedir lsft/modules/shared
--[[
_ ____ _____ _____
| | / ___|| ___|_ _|
| | _____ \___ \| |_ | |
| |___ |_____| ___) | _| | |
|_____| |____/|_| |_|
--]]
--[[
TODO: Literally everything
TODO: Update checker
TODO: On module load, grab default config values. Write changed values
TODO: Clientside core:log, with network to owner or server
prop.createSent(chip():getPos()+Vector(0,0,90),Angle(0,0,0),"Seat_Airboat",true)
--]]
core = {}
if player() == owner() then
if not file.exists("lsftconf.txt") then
file.write("lsftconf.txt", "{}")
config = "{}"
else
config = file.read("lsftconf.txt")
end
net.start("LSFT-Config-Read")
net.writeStream(config)
net.send()
net.receive("LSFT-Config-Write", function(data)
print("Got net message to write config, waiting for stream...")
net.readStream(function(data)
print("Stream finished, writing")
file.write("lsftconf.txt", data)
end)
end)
--[[
net.receive("LSFT-Get-Config-Resp-Test", function()
print(unpack(net.readTable()))
print(unpack(net.readTable()))
end)
--]]
end
net.receive("LSFT-Loaded", function()
dodir("lsft/modules/client")
dodir("lsft/modules/shared")
--[[
if player() == owner() then
net.start("LSFT-Get-Config")
net.writeString("LSFT-Get-Config-Resp-Test")
net.writeTable({"core","command_prefix"})
net.writeTable({"spectate","controls","forward"})
net.writeTable({})
net.send()
end
--]]
end)