Code: Select all
if n%30 == 1 then
local myteam = Spring.GetMyTeamID()
local _, _, spectator = Spring.GetPlayerInfo(myteam)
--Spring.Echo(spectator)
resourcePrompts = Spring.GetConfigInt("evo_resourceprompts", 1)
simplifiedResourceBar = Spring.GetConfigInt("evo_simplifiedresourcebar", 1)
--Assume that if it isn't set, resourcePrompts is true
if resourcePrompts == nil then
resourcePrompts = 1
end
if spectator then
resourcePrompts = 0
end
--Spring.Echo(resourcePrompts)
end
So as I was writing this post I had an idea:
Code: Select all
if n%30 == 1 then
local myteam = Spring.GetMyTeamID()
local _, _, spectator = Spring.GetPlayerInfo(myteam)
--Spring.Echo(spectator)
resourcePrompts = Spring.GetConfigInt("evo_resourceprompts", 1)
simplifiedResourceBar = Spring.GetConfigInt("evo_simplifiedresourcebar", 1)
--Assume that if it isn't set, resourcePrompts is true
if resourcePrompts == nil then
resourcePrompts = 1
end
if not spectator then
resourcePrompts = 1
else
resourcePrompts = 0
end
Spring.Echo("I herd u liek prompts!")
Spring.Echo(resourcePrompts)
end
I fully recognize that this is likely because a widget used for spectating is likely getting cute with getplayerinfo. My question is, is there any way for me to work around it?