2021-12-14 20:11:04 -05:00
|
|
|
--@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
|
2021-12-16 02:03:25 -05:00
|
|
|
TODO: Clientside core:log, with network to owner
|
2021-12-14 20:11:04 -05:00
|
|
|
prop.createSent(chip():getPos()+Vector(0,0,90),Angle(0,0,0),"Seat_Airboat",true)
|
|
|
|
--]]
|
|
|
|
|
2021-12-16 02:03:25 -05:00
|
|
|
core = {}
|
|
|
|
|
2021-12-14 20:11:04 -05:00
|
|
|
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
|
|
|
|
|