User:Oflameo/Sandbox
Jump to navigation
Jump to search
Debug data:
![]() | ||||||
---|---|---|---|---|---|---|
Name | Role | Aliases | Cost | HP | ||
![]() |
Conjurer | ![]() |
Construction | 120 | 450 | |
![]() |
Glaive | ![]() |
Raider | 65 | 200 | |
![]() |
Scythe | ![]() |
Raider | 250 | 820 | |
![]() |
Ronin | ![]() |
Skirmisher | 90 | 420 | |
![]() |
Reaver | ![]() |
Riot | 220 | 820 | |
![]() |
Knight | ![]() |
Assault | 350 | 2400 | |
![]() |
Sling | ![]() |
Artillery | 110 | 350 | |
![]() |
Phantom | ![]() |
Artillery | 750 | 560 | |
![]() |
Gremlin | ![]() |
Anti-Air | 150 | 550 | |
![]() |
Imp | ![]() |
Bomb | 120 | 50 | |
![]() |
Iris | ![]() |
Other | 600 | 600 |
Lua widget code to generate:
local fileOutputDir = "temp/"
local function getDescString(unitDef)
local desc = Spring.Utilities.GetDescription(unitDef)
if desc:find("Raider") then
return "Raider"
elseif desc:find("Riot") then
return "Riot"
elseif desc:find("Skirmisher") then
return "Skirmisher"
elseif desc:find("Assault") then
return "Assault"
elseif desc:find("Artillery") then
return "Artillery"
elseif desc:find("Anti%-Air") then
return "Anti-Air"
elseif desc:find("Construction") then
return "Construction"
elseif desc:find("Scout") then
return "Scout"
elseif desc:find("Support") then
return "Support"
elseif desc:find("Anti-Heavy") then
return "Anti-Heavy"
elseif desc:find("Fighter") then
return "Fighter"
elseif desc:find("Bomber") then
return "Bomber"
elseif desc:find("Transport") then
return "Transport"
elseif desc:find("Bomb") then
return "Bomb"
else
return "Other"
end
end
local function generateTable(factoryDefName)
local factoryDef = UnitDefNames[factoryDefName]
local output = '{| class="wikitable" style="text-align:center;"\n'
local imagePath = "http://manual.zero-k.info/unitpics/" .. factoryDefName .. ".png"
output = output .. '! colspan="7" | ' .. imagePath .. "[[" .. factoryDef.humanName .. "]]\n"
output = output .. "|-\n"
output = output .. '! || Name || colspan="2" | Role || Aliases || Cost || HP\n'
output = output .. "|-\n"
for index, unitDefID in ipairs(factoryDef.buildOptions) do
local unitDef = UnitDefs[unitDefID]
local unitName = unitDef.name
imagePath = "http://manual.zero-k.info/unitpics/" .. unitName .. ".png"
local icon = '<img src="http://manual.zero-k.info/icons/' .. unitDef.iconType .. '.png" width="32px" />'
output = output .. "| " .. imagePath .. " || [[" .. unitDef.humanName .. "]] || "
.. icon .. " || " .. getDescString(unitDef) .. " || || " .. unitDef.metalCost .. " || "
.. unitDef.health .. "\n"
output = output .. "|-\n"
end
output = output .. "|}"
return output
end
local function printTable(factoryDefName, outputDir)
local str = generateTable(factoryDefName)
local file = io.open (outputDir .. "/" .. factoryDefName .. ".txt", "w")
if (file== nil) then Spring.Echo ("could not open file for writing!") return end
file:write(str)
file:flush()
file:close()
end
function widget:Initialize()
printTable("factorycloak", fileOutputDir)
end
Debug data:
[SQLBagOStuff] MainObjectStash using store ReplicatedBagOStuff
[objectcache] MainWANObjectCache using store EmptyBagOStuff
IP: 216.73.216.236
Start request GET /mediawiki/User:Oflameo/Sandbox
HTTP HEADERS:
CONTENT-TYPE:
CONTENT-LENGTH: 0
X-ORIGINAL-URL: /mediawiki/User:Oflameo/Sandbox
X-FORWARDED-FOR: 10.3.31.230
USER-AGENT: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HOST: zero-k.info
COOKIE: wikidb229_mw__session=tji6mf2f3uhhk1oh648anbicng0sma92
ACCEPT-ENCODING: gzip, br, zstd, deflate
ACCEPT: */*
VIA: 1.1 squid-proxy-5b5d847c96-555vm (squid/6.10)
CONNECTION: keep-alive
CACHE-CONTROL: max-age=259200[localisation] LocalisationCache: using store LCStoreDB
[session] SessionManager using store SqlBagOStuff
[session] Session "tji6mf2f3uhhk1oh648anbicng0sma92" requested without UserID cookie
[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: request info {
"IPAddress": "216.73.216.236",
"UserAgent": "Mozilla\/5.0 AppleWebKit\/537.36 (KHTML, like Gecko; compatible; ClaudeBot\/1.0; +claudebot@anthropic.com)",
"ChronologyProtection": false,
"ChronologyPositionIndex": 0,
"ChronologyClientId": false
}[DBConnection] Wikimedia\Rdbms\LoadBalancer::lazyLoadReplicationPositions: executed chronology callback.
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
[SQLBagOStuff] Connection mysql object #124 (handle id #118) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #124 (handle id #118) will be used for SqlBagOStuff
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
Title::getRestrictionTypes: applicable restrictions to [[User:Oflameo/Sandbox]] are {edit,move}
[ContentHandler] Created handler for wikitext: WikitextContentHandler
[MessageCache] MessageCache using store SqlBagOStuff
[SQLBagOStuff] Connection mysql object #124 (handle id #118) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #124 (handle id #118) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #124 (handle id #118) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #124 (handle id #118) will be used for SqlBagOStuff
[SQLBagOStuff] SqlBagOStuff::lock failed due to timeout for wikidb229-mw_:messages:en.
[SQLBagOStuff] Connection mysql object #124 (handle id #118) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #124 (handle id #118) will be used for SqlBagOStuff
[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database
ParserFactory: using preprocessor: Preprocessor_Hash
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct
[caches] parser: SqlBagOStuff
Article::view using parser cache: yes
[SQLBagOStuff] Connection mysql object #124 (handle id #118) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #124 (handle id #118) will be used for SqlBagOStuff
Parser cache options found.
[SQLBagOStuff] Connection mysql object #124 (handle id #118) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #124 (handle id #118) will be used for SqlBagOStuff
ParserOutput cache found.
Article::view: showing parser cache contents
MediaWiki::preOutputCommit: primary transaction round committed
MediaWiki::preOutputCommit: pre-send deferred updates completed
MediaWiki::preOutputCommit: session changes committed
MediaWiki::preOutputCommit: LBFactory shutdown completed
Title::getRestrictionTypes: applicable restrictions to [[User:Oflameo/Sandbox]] are {edit,move}