lsft/cl_lsft.txt
2021-12-14 18:11:04 -07:00

47 lines
1.2 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
prop.createSent(chip():getPos()+Vector(0,0,90),Angle(0,0,0),"Seat_Airboat",true)
--]]
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.start("LSFT-Get-Config")
net.writeString("hello there!")
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)
end