Hey, so I found a bug. I joined a server with this mod running on it (I was wondering what the hell potato was). After leaving the graphics mod stayed enabled on my client until I restarted my game.
Events:Subscribe('Extension:Unloading', function()
local worldRenderSettings = ResourceManager:GetSettings("WorldRenderSettings")
if worldRenderSettings ~= nil then
local worldView = WorldRenderSettings(worldRenderSettings)
worldView.viewmode = 0
print('Potato Unloaded')
end
end)
Events:Subscribe('Extension:Loaded', function()
PatchWorldView(3)
end)
Events:Subscribe('Extension:Unloading', function()
PatchWorldView(0)
end)
function PatchWorldView(num)
local worldRenderSettings = ResourceManager:GetSettings("WorldRenderSettings")
if worldRenderSettings ~= nil then
local worldView = WorldRenderSettings(worldRenderSettings)
worldView.viewMode = num
end
end
Hey, it would pretty neat if you make a GitHub repository for it. Ya know, it will be much organized. No need to post issues in this thread. And if someone want to add changes and fixes to the mod they can just create a new Pull Request.