Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function widget:GetInfo()
- return {
- name = "Show AI names",
- desc = "Test Hoiju code",
- author = "zwzsg",
- date = "nao",
- license = "Mine",
- layer = 0,
- enabled = true
- }
- end
- function widget:GameFrame(f)
- -- widgetHandler:RemoveWidget()
- end
- function widget:Update()
- end
- function widget:DrawScreenEffects(vsx,vsy)
- if true or Spring.IsDevLuaEnabled() then
- local txt=""
- for _,team in ipairs(Spring.GetTeamList()) do
- teamID,skirmishAIID,name,hostingPlayerID,shortName,version,options=Spring.GetAIInfo(team)
- txt=txt.."teamID="..tostring(teamID)
- .." skirmishAIID="..tostring(skirmishAIID)
- .." name="..tostring(name)
- .." hostingPlayerID="..tostring(hostingPlayerID)
- .."\n"
- .." shortName="..tostring(shortName)
- .." version="..tostring(version)
- .." options="..tostring(options)
- if type(options)=="table" then
- local optstr=nil
- for key,value in pairs(options) do
- optstr=(optstr and (optstr..",") or "")..tostring(key).."="..tostring(value)
- end
- txt=txt.."=\n{"..(optstr or "").."}"
- end
- txt=txt.."\n\n"
- end
- gl.Text(txt,8,vsy*4/5,16)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment