Template:SurgerySteps: Difference between revisions

From Nova Sector 13
Jump to navigation Jump to search
(You might ask yourself: who the fuck would make something so convoluted just to make another page less editable? Me. I would.)
m (wrong tests)
Line 76: Line 76:
Thus, a simple two-step surgery consisting of a default mechanic_open and a custom-named pry_off_plating called "yank them open." would look like
Thus, a simple two-step surgery consisting of a default mechanic_open and a custom-named pry_off_plating called "yank them open." would look like


<code><nowiki>{{Surgery|mechanic_open||pry_off_plating|yank them open.}}</nowiki></code>
<code><nowiki>{{SurgerySteps|mechanic_open||pry_off_plating|yank them open.}}</nowiki></code>


which would render as:
which would render as:


{{Surgery|mechanic_open||pry_off_plating|yank them open.}}
{{SurgerySteps|mechanic_open||pry_off_plating|yank them open.}}


If you're going to stretch this across multiple lines, break the line '''before''' the pipe (the | symbol) instead of immediately after.
If you're going to stretch this across multiple lines, break the line '''before''' the pipe (the | symbol) instead of immediately after.


<code><nowiki>{{</nowiki>Surgery|mechanic_open|custom open text|
<code><nowiki>{{</nowiki>SurgerySteps|mechanic_open|custom open text|


pry_off_plating|yank them open.<nowiki>}}</nowiki></code> will fail.
pry_off_plating|yank them open.<nowiki>}}</nowiki></code> will fail.


<code><nowiki>{{</nowiki>Surgery|mechanic_open|custom open text
<code><nowiki>{{</nowiki>SurgerySteps|mechanic_open|custom open text


|pry_off_plating|yank them open.<nowiki>}}</nowiki></code> will succeed.
|pry_off_plating|yank them open.<nowiki>}}</nowiki></code> will succeed.
Line 96: Line 96:
Test of using all parameters. Step 3 should be the default text:
Test of using all parameters. Step 3 should be the default text:


{{Surgery|mechanic_wrench|a|pry_off_plating|b|mechanic_wrench||mechanic_wrench|d|pry_off_plating|e|mechanic_wrench|f|mechanic_wrench|g|pry_off_plating|h|mechanic_wrench|i|mechanic_wrench|j|pry_off_plating|k}}
{{SurgerySteps|mechanic_wrench|a|pry_off_plating|b|mechanic_wrench||mechanic_wrench|d|pry_off_plating|e|mechanic_wrench|f|mechanic_wrench|g|pry_off_plating|h|mechanic_wrench|i|mechanic_wrench|j|pry_off_plating|k}}

Revision as of 07:08, 14 July 2025

ERROR: NO SURGERY STEP 1.
Procedure

(Above should show ERROR: No surgery step 1, don't worry!)

The SurgerySteps template takes a carefully curated list of up to surgery_steps, which should each be a subpage of Template:SurgeryStep, e.g. Template:SurgeryStep/mechanic_wrench.

The arguments alternate between a SurgeryStep, and a string replacing the default text for the surgery step. Leave the description argument blank if you want to use the default text.

(Note that a few SurgerySteps do not support custom names, though I don't see a reason why they shouldn't.)

Thus, a simple two-step surgery consisting of a default mechanic_open and a custom-named pry_off_plating called "yank them open." would look like

{{SurgerySteps|mechanic_open||pry_off_plating|yank them open.}}

which would render as:

Procedure
Step 1: Screwdriver Screwdriver: unscrew the shell. Scalpel(75%) Kitchen Knife (50%) Any other sharp item (10%)
Step 3: Crowbar Crowbar: yank them open. Hemostat (10%)

If you're going to stretch this across multiple lines, break the line before the pipe (the | symbol) instead of immediately after.

{{SurgerySteps|mechanic_open|custom open text|

pry_off_plating|yank them open.}} will fail.

{{SurgerySteps|mechanic_open|custom open text

|pry_off_plating|yank them open.}} will succeed.


Test of using all parameters. Step 3 should be the default text:

Procedure
Step 1: Wrench Wrench: a Retractor (10%)
Step 3: Crowbar Crowbar: b Hemostat (10%)
Step 3: Wrench Wrench: wrench bolts. Retractor (10%)
Step 7: Wrench Wrench: d Retractor (10%)
Step 9: Crowbar Crowbar: e Hemostat (10%)
Step 11: Wrench Wrench: f Retractor (10%)
Step 3: Wrench Wrench: g Retractor (10%)
Step 5: Crowbar Crowbar: h Hemostat (10%)
Step 7: Wrench Wrench: i Retractor (10%)
Step 9: Wrench Wrench: j Retractor (10%)