User:Lariat2301/SandPit
From The Urban Dead Wiki
See: Sand Pit, Sand Box, SandBox2 and SandBox3.
Contents |
Studying use of 'template' option in templates
Looking at one of User:The Rooster's templates
If {{User:MobilePhoneMastBot/DRDFormat}} is
{{{suburb|Havercroft}}};{{{mast_status}}};{{{user}}}##
then
{{User:DangerReport/Heckworthy Towers|template=User:MobilePhoneMastBot/DRDFormat|suburb=Santlerville}}
produces
Santlerville;active;--~
Zach016 D.H.H.S. 03:57, 4 April 2012 (BST)##
{{User:DangerReport/Heckworthy Towers}}
produces
| Heckworthy Towers EHB |
At this editing, the key portion of [[User:DangerReport/Heckworthy Towers]] is:
|mast_status=unknown
|status=safe
|comment=Powered, and operating a radio.
|user={{User:The_Rooster/Sig}} 15:18, 24 May 2009 (BST)
Examining the StatusMap templates
So, playing with [], which is currently:
{| style="width:7px; height:7px; background:{{StatusMap {{{status|unknown}}}}}" | <!-- Hah! Nothing in the box! -->
|}
In which case
{{User:DangerReport/Heckworthy Towers|template=User:Lariat2301/SandBox3}}
produces
Testing multiple experimental boxes
Looking for buildings that instantiate each of the colors (skimming the BICs in order):
- safe = green
| Heckworthy Towers EHB |
- under attack = #EE0
| St. Wilfrid's Hospital lit Greenwarrior 17:55, 22 March 2012 (UTC)
|
- under siege = #F80
| The Dewes Building 25.96 MHz: "... power's on at the Dewes Building ..." Bob Moncrief 17:32, 28 May 2012 (BST)
|
- ransacked = #BE3939
| Calvert Mall Ruined and pinata'd, with at least five Zs inside. // 25.96 MHz: "... Calvert Mall has fallen - repeat, Calvert Mall has fallen ..." Amy Flood 15:55, 16 May 2012 (BST) // Bob Moncrief 21:04, 20 May 2012 (BST)
|
- ruined = #BE3939
| Gerrish Place Police Department vsb Greenwarrior 16:39, 21 March 2012 (UTC)
|
- in zombie hands = red
| The Eagan Building EHB, lit, no zombies outside. § § § Chief Seagull § § § squawk 14:24, 19 March 2012 (UTC)
|
- rebuilding = #60BF60
| The Woolsett Building EHB, lit, no zombies outside -- § § § Chief Seagull § § § squawk 14:26, 19 March 2012 (UTC)
|
- rot revive = #630
| The Greatorex Building damaged Cityfeedback 06:22, 24 April 2012 (BST)
|
- unknown = gray
| The Nix Building EHB, lit, no zombies outside. § § § Chief Seagull § § § squawk 14:22, 19 March 2012 (UTC)
|
But those should be turned into very different colors:
| safe | under attack | under siege | ransacked | ruined | in zombie hands | rebuilding | rot revive | unknown |
Unfortunately, the #color format breaks the template. (Why?) So I've substituted:
| green | yellow | orange | DarkRed | DarkRed | red | lime | DarkOliveGreen | gray |
So using the alter-templated DangerResports, we get:
These are all slammed together on one long line. I don't know what is creating the <br> between the color boxes.
|
|
|
| |||
|
|
|
| |||
|
|
|
|
Or the spaces in the grid. But that's enough for now.
Studying ifdef and ifndef
1: {{{test1Result}}}
2:
ifdef:
1: {{{test1test{{{test1test|}}}|{{{test1Result}}}}}}
ifndef:
2: {{{test2Result{{{test2test|}}}|}}}