Template:Locking Standard/Sandbox View history

No edit summary
No edit summary
Line 73: Line 73:
}}<!--close the opening if/DG-->
}}<!--close the opening if/DG-->
|}}
|}}
|<!--start table row then - LOGIC!-->{{#if:{{{title2|}}}<!-- if there is a second set of values-->
|<!--start table row then - LOGIC!-->has2?{{#if:{{{title2|}}}<!-- if there is a second set of values-->
|{{#if:{{{title3|}}}<!--if there is a third set of values-->
|has2:has3?{{#if:{{{title3|}}}<!--if there is a third set of values-->
|{{#ifeq:{{{Fwy|4}}}|{{{Fwy2|{{{Fwy|4}}}}}}<!--three sets - are the first two the same?-->
|has2:has3:twins?-{{#ifeq:{{{Fwy|4}}}|{{{Fwy2|{{{Fwy|4}}}}}}<!--three sets - are the first two the same?-->
|{{#ifeq:{{{Fwy2|{{{Fwy|4}}}}}}|{{{Fwy3|{{{Fwy|4}}}}}}<!--first 2 same, is third also the same?-->
|has2:has3:twins:triplets?{{#ifeq:{{{Fwy2|{{{Fwy|4}}}}}}|{{{Fwy3|{{{Fwy|4}}}}}}<!--first 2 same, is third also the same?-->
|emit1 colspan=3{{!}}Abc{{{Fwy|4}}}<!-- all 3 same do |colspan=3|value-->
|emit1triplets! colspan=3{{!}}Abc{{{Fwy|4}}}<!-- all 3 same do |colspan=3|value-->
|emit2 colspan=2{{!}}AbC{{{Fwy|4}}}{{!}}{{!}}{{{Fwy3|{{{Fwy|4}}}}}}<!--
|emit2triplets-no! colspan=2{{!}}AbC{{{Fwy|4}}}{{!}}{{!}}{{{Fwy3|{{{Fwy|4}}}}}}<!--
...else A=B<>C so do wide col A/B||C ... then end the innermost if 3 same: -->
...else A=B<>C so do wide col A/B||C ... then end the innermost if 3 same: -->
}}
}}(triplets?)
|{{#ifeq:{{{Fwy2|{{{Fwy|4}}}}}}|{{{Fwy3|{{{Fwy|4}}}}}}<!--else: A<>B, maybe B=C?-->
|has2:has3:twins-no:othertwins?{{#ifeq:{{{Fwy2|{{{Fwy|4}}}}}}|{{{Fwy3|{{{Fwy|4}}}}}}<!--else: A<>B, maybe B=C?-->
|emit3 {{{Fwy|4}}}{{!}}{{!}}colspan=2{{!}}ABc{{{Fwy2|{{{Fwy|4}}}}}}<!--yup, 1 col A, double col BC-->
|emit3other! {{{Fwy|4}}}{{!}}{{!}}colspan=2{{!}}ABc{{{Fwy2|{{{Fwy|4}}}}}}<!--yup, 1 col A, double col BC-->
|emit4 {{{Fwy|4}}}{{!}}{{!}}ABC{{{Fwy2|{{{Fwy|4}}}}}}{{!}}{{!}}{{{Fwy3|{{{Fwy|4}}}}}}<!--3 unique, zero combo-->
|emit4other-no! {{{Fwy|4}}}{{!}}{{!}}ABC{{{Fwy2|{{{Fwy|4}}}}}}{{!}}{{!}}{{{Fwy3|{{{Fwy|4}}}}}}<!--3 unique, zero combo-->
}}<!-- end if B=C or not-->
}}(other?)<!-- end if B=C or not-->
}}<!--end three sets (if from line 3)... now on to two sets
}}(twins)<!--end three sets (if from line 3)... now on to two sets
|<!--else no 3 sets, must be 2 sets-->{{#ifeq:{{{Fwy|4}}}|{{{Fwy2|4}}}<!-- A=B (there is no C)-->
|has2:has3-no:lonelytwins?<!--else no 3 sets, must be 2 sets-->{{#ifeq:{{{Fwy|4}}}|{{{Fwy2|4}}}<!-- A=B (there is no C)-->
|emit5 colspan=2{{!}}Ab{{{Fwy|4}}}<!--output a single column double wide-->
|emit5lonely! colspan=2{{!}}Ab{{{Fwy|4}}}<!--output a single column double wide-->
|emit6 AB{{{Fwy|4}}}{{!}}{{!}}{{{Fwy2|{{{Fwy|4}}}}}}<!-- else output two sep cols-->
|emit6lonely-no! AB{{{Fwy|4}}}{{!}}{{!}}{{{Fwy2|{{{Fwy|4}}}}}}<!-- else output two sep cols-->
}}<!--end nested if 3 lines above(2 sets then (check for same or differing))-->
}}(lonely)<!--end nested if 3 lines above(2 sets then (check for same or differing))-->
}}<!--end second line if 3/not 3 only 2-->
}}(has3)<!--end second line if 3/not 3 only 2-->
|emit7 A{{{Fwy|4}}}<!--else of 1st line: if there are 2/else is only 1 set of values, so emit just the first column as a singe column but what col marker?-->
|emit7 A{{{Fwy|4}}}<!--else of 1st line: if there are 2/else is only 1 set of values, so emit just the first column as a singe column but what col marker?-->
}}<!--close the opening if/DG-->
}}(has2)<!--close the opening if/DG-->
|}
|}
</center><includeonly>
</center><includeonly>
[[Category:Locking standards]]</onlyinclude>
[[Category:Locking standards]]</onlyinclude>

Revision as of 03:52, 9 January 2015

Documentation icon Template documentation[view] [edit] [history] [purge]

Documentation for Template:Locking Standard/Sandbox, which is the test version of Template:Locking Standard

Parameters

Note: Exact capitalization of parameter names matters:

  • lede: Lead-in paragraph. There is some default text otherwise. To have no lede paragraph, make sure to set it to a blank value: |Lede=|
  • caption: The title above the table (not a wiki heading). Defaults to Xyzyz Locking Standard, where Xyzyz is taking from the page title (and would be the state name if you use Kent's state template scheme)
  • title: The title of the first column of lock values (sometimes the only column). Default value is "Default lock"
  • title2, title3: Column titles for second and third variants. If you do not specify a title, the column will not appear. No default.
  • note, append: text to be added below the table, which can include full wiki markup. If you use note, the text is automatically started with "Note: " in bold (the rest is not automatically bold
  • Fwy, Fwy2, Fwy3: The Freeway values, defaults to 4; Fwy is the first column, Fwy2 and Fwy3 are the second and third columns
  • MH, MH2, MH3: Major Highway values; defaults to 3 (note that the "m" is uppercase)
  • mH, mH2, mH3: Minor highway values, defaults to 2 (note that the "m" is lowercase)
  • PS, Street, PS2, Street2, PS3, Street3: Primary Street values and Street values; defaults to 1
  • RR, RR2, RR3: Railroad values; defaults to 2
  • Ferry, Ferry2, Ferry3: Ferry values; defaults to 5
  • Private, Private2, Private3: Private Road segment values. If you do not specify any of these three values, no row will display for Private. If you specify Private2 and/or Private3, but not Private, then Private defaults to 1


Samples

In Locking Standard we have a set minimum standard for locking roads based on segment type. Any road of a certain segment type must be locked at least to the rank (level) in the chart below. Roads may be locked higher for protection and special situations (areas with construction, tricky design, frequent mistakes, imaging inaccuracies, and the like), but should not be locked lower.

A great time to implement these locks is while performing the FC Upgrade of an area. Lock the roads based on type after they've been set to FC standards.

Locking Standard Minimum Locking Rank Standard
Segment Type Default locks
 Freeway  4
 Ramp  highest rank of connected segment
 Major Highway  3
 Minor Highway  2
 Primary Street  1
 Street  1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway A4
}

|has2?emit7 A4(has2) |}

  • The above first sample calls the template with no parameters at all, and displays completely default behavior.

x3 - All Default
Segment Type First Column  Second Column  Third Column
 Freeway  4
 Ramp  highest rank of connected segment highest rank of connected segment highest rank of connected segment
 Major Highway  3 3 3
 Minor Highway  2 2 2
 Primary Street  1 1 1
 Street  1 1 1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway Abc4colspan=2|Ab4
}

|has2?has2:has3?has2:has3:twins?-has2:has3:twins:triplets?emit1triplets! colspan=3|Abc4(triplets?)(twins)emit5lonely! colspan=2|Ab4(lonely)(has3)(has2) |}

x3 All 5 (manual)
Segment Type First Column  Second Column  Third Column
 Freeway  5
 Ramp  highest rank of connected segment highest rank of connected segment highest rank of connected segment
 Major Highway  3 3 3
 Minor Highway  2 2 2
 Primary Street  1 1 1
 Street  1 1 1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway Abc5colspan=2|Ab5
}

|has2?has2:has3?has2:has3:twins?-has2:has3:twins:triplets?emit1triplets! colspan=3|Abc5(triplets?)(twins)emit5lonely! colspan=2|Ab5(lonely)(has3)(has2) |}

x3 A=custom, B=same custom, C=default
Segment Type First Column  Second Column  Third Column
 Freeway  5
 Ramp  highest rank of connected segment highest rank of connected segment highest rank of connected segment
 Major Highway  3 3 3
 Minor Highway  2 2 2
 Primary Street  1 1 1
 Street  1 1 1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway Abc5colspan=2|Ab5
}

|has2?has2:has3?has2:has3:twins?-has2:has3:twins:triplets?emit1triplets! colspan=3|Abc5(triplets?)(twins)emit5lonely! colspan=2|Ab5(lonely)(has3)(has2) |}


x3 A=custom, B=default, C=same custom
Segment Type First Column  Second Column  Third Column
 Freeway  5
 Ramp  highest rank of connected segment highest rank of connected segment highest rank of connected segment
 Major Highway  3 3 3
 Minor Highway  2 2 2
 Primary Street  1 1 1
 Street  1 1 1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway Abc5AB5 5
}

|has2?has2:has3?has2:has3:twins?-has2:has3:twins:triplets?emit1triplets! colspan=3|Abc5(triplets?)(twins)emit6lonely-no! AB5||5(lonely)(has3)(has2) |}


x3 Region 1 & 2 Match (manual)
Segment Type First Column  Second Column  Third Column
 Freeway  5 3
 Ramp  highest rank of connected segment highest rank of connected segment highest rank of connected segment
 Major Highway  3 3 3
 Minor Highway  2 2 2
 Primary Street  1 1 1
 Street  1 1 1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway AbC5 Ab5
}

|has2?has2:has3?has2:has3:twins?-has2:has3:twins:triplets?emit2triplets-no! colspan=2|AbC5||3(triplets?)(twins)emit5lonely! colspan=2|Ab5(lonely)(has3)(has2) |}

x3 Region 2 & 3 Match
Segment Type First Column  Second Column  Third Column
 Freeway  4 5
 Ramp  highest rank of connected segment highest rank of connected segment highest rank of connected segment
 Major Highway  3 3 3
 Minor Highway  2 2 2
 Primary Street  1 1 1
 Street  1 1 1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway 4 ABc5AB4 5
}

|has2?has2:has3?has2:has3:twins?-has2:has3:twins-no:othertwins?emit3other! 4||colspan=2|ABc5(other?)(twins)emit6lonely-no! AB4||5(lonely)(has3)(has2) |}

x3 All Different
Segment Type First Column  Second Column  Third Column
 Freeway  4 5 3
 Ramp  highest rank of connected segment highest rank of connected segment highest rank of connected segment
 Major Highway  3 3 3
 Minor Highway  2 2 2
 Primary Street  1 1 1
 Street  1 1 1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway 4 ABC5 3AB4 5
}

|has2?has2:has3?has2:has3:twins?-has2:has3:twins-no:othertwins?emit4other-no! 4||ABC5||3(other?)(twins)emit6lonely-no! AB4||5(lonely)(has3)(has2) |}

x3 A/C match (manual)
Segment Type First Column  Second Column  Third Column
 Freeway  99 5 99
 Ramp  highest rank of connected segment highest rank of connected segment highest rank of connected segment
 Major Highway  3 3 3
 Minor Highway  2 2 2
 Primary Street  1 1 1
 Street  1 1 1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway 99 ABC5 99AB99 5
}

|has2?has2:has3?has2:has3:twins?-has2:has3:twins-no:othertwins?emit4other-no! 99||ABC5||99(other?)(twins)emit6lonely-no! AB99||5(lonely)(has3)(has2) |}

x3 A/C match (default C)
Segment Type First Column  Second Column  Third Column
 Freeway  313 5 313
 Ramp  highest rank of connected segment highest rank of connected segment highest rank of connected segment
 Major Highway  3 3 3
 Minor Highway  2 2 2
 Primary Street  1 1 1
 Street  1 1 1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway 313 ABC5 313AB313 5
}

|has2?has2:has3?has2:has3:twins?-has2:has3:twins-no:othertwins?emit4other-no! 313||ABC5||313(other?)(twins)emit6lonely-no! AB313||5(lonely)(has3)(has2) |}


x3 A/C default
Segment Type First Column  Second Column  Third Column
 Freeway  4 144 4
 Ramp  highest rank of connected segment highest rank of connected segment highest rank of connected segment
 Major Highway  3 3 3
 Minor Highway  2 2 2
 Primary Street  1 1 1
 Street  1 1 1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway 4 ABC144 4AB4 144
}

|has2?has2:has3?has2:has3:twins?-has2:has3:twins-no:othertwins?emit4other-no! 4||ABC144||4(other?)(twins)emit6lonely-no! AB4||144(lonely)(has3)(has2) |}


x2 All Different
Segment Type First Column  Second Column
 Freeway  4 5
 Ramp  highest rank of connected segment highest rank of connected segment
 Major Highway  3 3
 Minor Highway  2 2
 Primary Street  1 1
 Street  1 1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway
}

|has2?has2:has3?(has3)(has2) |}

x2 All Default
Segment Type First Column  Second Column
 Freeway  4
 Ramp  highest rank of connected segment highest rank of connected segment
 Major Highway  3 3
 Minor Highway  2 2
 Primary Street  1 1
 Street  1 1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway
}

|has2?has2:has3?(has3)(has2) |}

x2 Manual Match
Segment Type First Column  Second Column
 Freeway  5
 Ramp  highest rank of connected segment highest rank of connected segment
 Major Highway  3 3
 Minor Highway  2 2
 Primary Street  1 1
 Street  1 1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway
}

|has2?has2:has3?(has3)(has2) |}

x1 Default - no table params
Segment Type Default locks
 Freeway  4
 Ramp  highest rank of connected segment
 Major Highway  3
 Minor Highway  2
 Primary Street  1
 Street  1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway A4
}

|has2?emit7 A4(has2) |}

x1 Custom lock
Segment Type Default locks
 Freeway  5
 Ramp  highest rank of connected segment
 Major Highway  3
 Minor Highway  2
 Primary Street  1
 Street  1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway A5
}

|has2?emit7 A5(has2) |}

x1 custom title and lock
Segment Type custom
 Freeway  5
 Ramp  highest rank of connected segment
 Major Highway  3
 Minor Highway  2
 Primary Street  1
 Street  1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway A5
}

|has2?emit7 A5(has2) |}

private
Segment Type Default locks
 Freeway  4
 Ramp  highest rank of connected segment
 Major Highway  3
 Minor Highway  2
 Primary Street  1
 Street  1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway A4
}

|has2?emit7 A4(has2) |}

private and plr
Segment Type Default locks
 Freeway  4
 Ramp  highest rank of connected segment
 Major Highway  3
 Minor Highway  2
 Primary Street  1
 Street  1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway A4
}

|has2?emit7 A4(has2) |}

private and plr (default 1, custom 2)
Segment Type Default locks  custom plr
 Freeway  4
 Ramp  highest rank of connected segment highest rank of connected segment
 Major Highway  3 3
 Minor Highway  2 2
 Primary Street  1 1
 Street  1 1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway
}

|has2?has2:has3?(has3)(has2) |}

plr
Segment Type Default locks
 Freeway  4
 Ramp  highest rank of connected segment
 Major Highway  3
 Minor Highway  2
 Primary Street  1
 Street  1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway A4
}

|has2?emit7 A4(has2) |}

The above documentation is transcluded from Template:Locking Standard/Sandbox/doc.
Please add categories to the /doc subpage.
Subpages of this template.

In Locking Standard we have a set minimum standard for locking roads based on segment type. Any road of a certain segment type must be locked at least to the rank (level) in the chart below. Roads may be locked higher for protection and special situations (areas with construction, tricky design, frequent mistakes, imaging inaccuracies, and the like), but should not be locked lower.

A great time to implement these locks is while performing the FC Upgrade of an area. Lock the roads based on type after they've been set to FC standards.

Locking Standard Minimum Locking Rank Standard
Segment Type Default locks
 Freeway  4
 Ramp  highest rank of connected segment
 Major Highway  3
 Minor Highway  2
 Primary Street  1
 Street  1
 :|:|:|:|:Railroad:|:|:|:|:  2
 Ferry  5
DG Test Freeway A4
}

|has2?emit7 A4(has2) |}