Difference between revisions of "User:Histidine/Sandbox"
Jump to navigation
Jump to search
Debug data:
Line 4: | Line 4: | ||
! || Name || Role || Aliases || Cost || HP | ! || Name || Role || Aliases || Cost || HP | ||
|- | |- | ||
− | | http://manual.zero-k.info/unitpics/cloakcon.png || [[Conjurer]] || Construction || || 120 || 450 | + | | http://manual.zero-k.info/unitpics/cloakcon.png || [[Conjurer]] || <img src="http://manual.zero-k.info/icons/builder.png" width="32px" />Construction || || 120 || 450 |
|- | |- | ||
− | | http://manual.zero-k.info/unitpics/cloakraid.png || [[Glaive]] || Raider || || 65 || 200 | + | | http://manual.zero-k.info/unitpics/cloakraid.png || [[Glaive]] || <img src="http://manual.zero-k.info/icons/kbotraider.png" width="32px" />Raider || || 65 || 200 |
|- | |- | ||
− | | http://manual.zero-k.info/unitpics/cloakheavyraid.png || [[Scythe]] || Raider || || 250 || 820 | + | | http://manual.zero-k.info/unitpics/cloakheavyraid.png || [[Scythe]] || <img src="http://manual.zero-k.info/icons/stealth.png" width="32px" />Raider || || 250 || 820 |
|- | |- | ||
− | | http://manual.zero-k.info/unitpics/cloakskirm.png || [[Ronin]] || Skirmisher || || 90 || 420 | + | | http://manual.zero-k.info/unitpics/cloakskirm.png || [[Ronin]] || <img src="http://manual.zero-k.info/icons/kbotskirm.png" width="32px" />Skirmisher || || 90 || 420 |
|- | |- | ||
− | | http://manual.zero-k.info/unitpics/cloakriot.png || [[Reaver]] || Riot || || 220 || 820 | + | | http://manual.zero-k.info/unitpics/cloakriot.png || [[Reaver]] || <img src="http://manual.zero-k.info/icons/kbotriot.png" width="32px" />Riot || || 220 || 820 |
|- | |- | ||
− | | http://manual.zero-k.info/unitpics/cloakassault.png || [[Knight]] || Assault || || 350 || 2400 | + | | http://manual.zero-k.info/unitpics/cloakassault.png || [[Knight]] || <img src="http://manual.zero-k.info/icons/kbotassault.png" width="32px" />Assault || || 350 || 2400 |
|- | |- | ||
− | | http://manual.zero-k.info/unitpics/cloakarty.png || [[Sling]] || Artillery || || 110 || 350 | + | | http://manual.zero-k.info/unitpics/cloakarty.png || [[Sling]] || <img src="http://manual.zero-k.info/icons/kbotarty.png" width="32px" />Artillery || || 110 || 350 |
|- | |- | ||
− | | http://manual.zero-k.info/unitpics/cloaksnipe.png || [[Phantom]] || Artillery || || 750 || 560 | + | | http://manual.zero-k.info/unitpics/cloaksnipe.png || [[Phantom]] || <img src="http://manual.zero-k.info/icons/sniper.png" width="32px" />Artillery || || 750 || 560 |
|- | |- | ||
− | | http://manual.zero-k.info/unitpics/cloakaa.png || [[Gremlin]] || | + | | http://manual.zero-k.info/unitpics/cloakaa.png || [[Gremlin]] || <img src="http://manual.zero-k.info/icons/kbotaa.png" width="32px" />Anti-Air || || 150 || 550 |
|- | |- | ||
− | | http://manual.zero-k.info/unitpics/cloakbomb.png || [[Imp]] || Bomb || || 120 || 50 | + | | http://manual.zero-k.info/unitpics/cloakbomb.png || [[Imp]] || <img src="http://manual.zero-k.info/icons/spiderbomb.png" width="32px" />Bomb || || 120 || 50 |
|- | |- | ||
− | | http://manual.zero-k.info/unitpics/cloakjammer.png || [[Iris]] || Other || || 600 || 600 | + | | http://manual.zero-k.info/unitpics/cloakjammer.png || [[Iris]] || <img src="http://manual.zero-k.info/icons/kbotjammer.png" width="32px" />Other || || 600 || 600 |
|- | |- | ||
|} | |} | ||
Line 44: | Line 44: | ||
elseif desc:find("Artillery") then | elseif desc:find("Artillery") then | ||
return "Artillery" | return "Artillery" | ||
− | elseif desc:find("Anti-Air") then | + | elseif desc:find("Anti%-Air") then |
return "Anti-Air" | return "Anti-Air" | ||
elseif desc:find("Construction") then | elseif desc:find("Construction") then | ||
Line 81: | Line 81: | ||
local unitName = unitDef.name | local unitName = unitDef.name | ||
imagePath = "http://manual.zero-k.info/unitpics/" .. unitName .. ".png" | 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 .. "]] || " | output = output .. "| " .. imagePath .. " || [[" .. unitDef.humanName .. "]] || " | ||
− | .. getDescString(unitDef) .. " || || " .. unitDef.metalCost .. " || " | + | .. icon .. getDescString(unitDef) .. " || || " .. unitDef.metalCost .. " || " |
.. unitDef.health .. "\n" | .. unitDef.health .. "\n" | ||
output = output .. "|-\n" | output = output .. "|-\n" |
Revision as of 06:48, 6 April 2019
![]() | |||||
---|---|---|---|---|---|
Name | Role | Aliases | Cost | HP | |
![]() |
Conjurer | ![]() |
120 | 450 | |
![]() |
Glaive | ![]() |
65 | 200 | |
![]() |
Scythe | ![]() |
250 | 820 | |
![]() |
Ronin | ![]() |
90 | 420 | |
![]() |
Reaver | ![]() |
220 | 820 | |
![]() |
Knight | ![]() |
350 | 2400 | |
![]() |
Sling | ![]() |
110 | 350 | |
![]() |
Phantom | ![]() |
750 | 560 | |
![]() |
Gremlin | ![]() |
150 | 550 | |
![]() |
Imp | ![]() |
120 | 50 | |
![]() |
Iris | ![]() |
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="6" | ' .. imagePath .. "[[" .. factoryDef.humanName .. "]]\n" output = output .. "|-\n" output = output .. "! || Name || 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: 3.144.121.179
Start request GET /mediawiki/index.php?diff=5311&oldid=5310&title=User%3AHistidine%2FSandbox
HTTP HEADERS:
CONTENT-TYPE:
CONTENT-LENGTH: 0
USER-AGENT: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HOST: zero-k.info
ACCEPT-ENCODING: gzip, br, zstd, deflate
ACCEPT: */*[localisation] LocalisationCache: using store LCStoreDB
[session] SessionManager using store SqlBagOStuff
[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: request info {
"IPAddress": "3.144.121.179",
"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 #127 (handle id #121) will be used for SqlBagOStuff
[session] SessionBackend "h18keho2qrl411bd1v1qhsdae52uigoj" is unsaved, marking dirty in constructor
[session] SessionBackend "h18keho2qrl411bd1v1qhsdae52uigoj" save: dataDirty=1 metaDirty=1 forcePersist=0
[cookie] already deleted setcookie: "wikidb229_mw__session", "", "1710338939", "/", "", "", "1"
[cookie] already deleted setcookie: "wikidb229_mw_UserID", "", "1710338939", "/", "", "", "1"
[cookie] already deleted setcookie: "wikidb229_mw_Token", "", "1710338939", "/", "", "", "1"
[cookie] already deleted setcookie: "forceHTTPS", "", "1710338939", "/", "", "", "1"
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
Title::getRestrictionTypes: applicable restrictions to [[User:Histidine/Sandbox]] are {edit,move}
[ContentHandler] Created handler for wikitext: WikitextContentHandler
Article::view: showing diff page
DifferenceEngine old '5310' new '5311' rcid ''
[MessageCache] MessageCache using store SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] SqlBagOStuff::lock failed due to timeout for wikidb229-mw_:messages:en.
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) 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
DifferenceEngine old '0' new '0' rcid '0'
WikiPage::getParserOutput: using parser cache: no
[caches] parser: SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
Parser cache options found.
[Preprocessor] Cached preprocessor output (key: wikidb229-mw_:preprocess-hash:d839f3d043026fcb8af5e915c27283f7:0)
[Preprocessor] Cached preprocessor output (key: wikidb229-mw_:preprocess-hash:d839f3d043026fcb8af5e915c27283f7:0)
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:Histidine/Sandbox]] are {edit,move}