Changes

532 bytes removed ,  18:22, 6 March 2019
change profession nested if statements into switch case
Line 75: Line 75:  
         |{{Edibility|{{{edibility|0}}}|quality={{{quality|true}}}|iridium={{{iridium|}}} }} }} }}
 
         |{{Edibility|{{{edibility|0}}}|quality={{{quality|true}}}|iridium={{{iridium|}}} }} }} }}
 
}}
 
}}
{{#ifeq:{{lc:{{{profession|}}}}} | bear's knowledge
+
{{#switch:{{lc:{{{profession|}}}}}  
|<!-- Bear's Knowledge -->
+
| bear's knowledge =
 
     {{!}}-
 
     {{!}}-
 
     {{!}}colspan="2" id="infoboxsection" style="text-align:center;"{{!}}Sell Prices
 
     {{!}}colspan="2" id="infoboxsection" style="text-align:center;"{{!}}Sell Prices
Line 87: Line 87:  
     <!-- Bear's Knowledge Prices -->
 
     <!-- Bear's Knowledge Prices -->
 
     {{!}}id="infoboxdetail"{{!}}{{Qualityprice|{{{name|{{PAGENAME}}}}}|{{#expr:trunc({{{sellprice|}}}*3)}}|iridium}}
 
     {{!}}id="infoboxdetail"{{!}}{{Qualityprice|{{{name|{{PAGENAME}}}}}|{{#expr:trunc({{{sellprice|}}}*3)}}|iridium}}
|{{#ifeq:{{lc:{{{profession|}}}}} | spring onion mastery
+
| spring onion mastery =
|<!-- Spring Onion Mastery -->
   
     {{!}}-
 
     {{!}}-
 
     {{!}}colspan="2" id="infoboxsection" style="text-align:center;"{{!}}Sell Prices
 
     {{!}}colspan="2" id="infoboxsection" style="text-align:center;"{{!}}Sell Prices
Line 99: Line 98:  
     <!-- Spring Onion Mastery Prices -->
 
     <!-- Spring Onion Mastery Prices -->
 
     {{!}}id="infoboxdetail"{{!}}{{Qualityprice|Spring Onion|{{#expr:trunc({{{sellprice|}}}*5)}}|iridium}}
 
     {{!}}id="infoboxdetail"{{!}}{{Qualityprice|Spring Onion|{{#expr:trunc({{{sellprice|}}}*5)}}|iridium}}
|{{#ifeq:{{lc:{{{profession|}}}}} | tiller
+
| tiller =
|<!-- Tiller Profession only -->
   
     {{!}}-
 
     {{!}}-
 
     {{!}}colspan="2" id="infoboxsection" style="text-align:center;"{{!}}Sell Prices
 
     {{!}}colspan="2" id="infoboxsection" style="text-align:center;"{{!}}Sell Prices
Line 122: Line 120:  
     }}
 
     }}
 
   }}
 
   }}
<!-- Other than just Tiller profession -->
+
| artisan =
|{{#ifeq:{{lc:{{{profession|}}}}} | artisan
  −
|<!-- Artisan Profession only -->
   
     {{!}}-
 
     {{!}}-
 
     {{!}}colspan="2" id="infoboxsection" style="text-align:center;"{{!}}Sell Prices
 
     {{!}}colspan="2" id="infoboxsection" style="text-align:center;"{{!}}Sell Prices
Line 146: Line 142:  
     }}
 
     }}
 
   }}
 
   }}
<!-- Other than just Artisan profession -->
+
| rancher =
|{{#ifeq:{{lc:{{{profession|}}}}} | rancher
  −
|<!-- Rancher Profession only -->
   
     {{!}}-
 
     {{!}}-
 
     {{!}}colspan="2" id="infoboxsection" style="text-align:center;"{{!}}Sell Prices
 
     {{!}}colspan="2" id="infoboxsection" style="text-align:center;"{{!}}Sell Prices
Line 170: Line 164:  
     }}
 
     }}
 
   }}
 
   }}
<!-- Other than just Rancher profession -->
+
|#default = {{#ifeq:{{#arrayprint:qualities to show}}|normal||{{#if:{{{profession|{{{type|}}}}}}|<nowiki/>
|{{#ifeq:{{#arrayprint:qualities to show}}|normal||{{#if:{{{profession|{{{type|}}}}}}|<nowiki/>
   
     {{!}}-
 
     {{!}}-
 
     {{!}}colspan="2" id="infoboxsection" style="text-align: center;"{{!}}Sell Prices
 
     {{!}}colspan="2" id="infoboxsection" style="text-align: center;"{{!}}Sell Prices
Line 211: Line 204:  
   }}
 
   }}
 
}}
 
}}
}}<!-- end if bear's knowledge only -->
+
}}<!-- end profession switch case -->
}}<!-- end if spring onion only -->
  −
}}<!-- end if tiller only -->
  −
}}<!-- end if artisan only -->
  −
}}<!-- end if rancher only -->
   
{{#switch:{{lc:{{{type|{{PAGENAME}}}}}}}
 
{{#switch:{{lc:{{{type|{{PAGENAME}}}}}}}
 
|sunflower=
 
|sunflower=
105,789

edits