« Modèle:MetaInfobox/Chantier » : différence entre les versions

De MHWiki
(Suppression des PV dans l'infobox Chantier puisque info inutile pour la grande majorité)
m (Simplification de DataResourceLoop)
 
(6 versions intermédiaires par 2 utilisateurs non affichées)
Ligne 1 : Ligne 1 :
<includeonly>
<includeonly>
   {{#ifeq:{{Data|{{PAGENAME}}|evoluable}}|oui|
   {{#ifeq:{{Data|{{{nom|{{PAGENAME}}}}}|evoluable}}|oui|
   <tr>
   <tr>
     <td align="center" colspan="2">{{MetaInline|Évolutions du jour|displayname=Évoluable}}</td>
     <td align="center" colspan="2">{{MetaInline|Évolutions du jour|displayname=Évoluable}}</td>
   </tr>|}}
   </tr>|}}
   {{#ifeq:{{Data|{{PAGENAME}}|temporaire}}|oui|
   {{#ifeq:{{Data|{{{nom|{{PAGENAME}}}}}|temporaire}}|oui|
   <tr>
   <tr>
     <td align="center" colspan="2">{{MetaInline|Chantiers temporaires|displayname=Temporaire}}</td>
     <td align="center" colspan="2">{{MetaInline|Chantiers temporaires|displayname=Temporaire}}</td>
   </tr>|}}
   </tr>|}}
   {{#if:{{Data|{{PAGENAME}}|chantierParent}}|
   {{#if:{{Data|{{{nom|{{PAGENAME}}}}}|chantierParent}}|
   <tr>
   <tr>
     <td>'''Chantier parent :'''</td>
     <td>'''Chantier parent :'''</td>
     <td align="left">{{MetaInline|{{Data|{{PAGENAME}}|chantierParent}}}}</td>
     <td align="right">{{MetaInline|{{Data|{{{nom|{{PAGENAME}}}}}|chantierParent}}}}</td>
   </tr>|}}
   </tr>|}}
   {{#ifeq:{{Data|{{PAGENAME}}|typePlan}}|Commun|
   {{#ifeq:{{Data|{{{nom|{{PAGENAME}}}}}|typePlan}}|Commun|
   <tr>
   <tr>
     <td>'''Plan :'''</td>
     <td>'''Plan :'''</td>
     <td align="left">{{Cliquable|image=item_bplan_c.gif|link=Plans de chantier}}</td>
     <td align="right">{{Cliquable|image=item_bplan_c.gif|link=Plans de chantier}}</td>
   </tr>|}}
   </tr>|}}
   {{#ifeq:{{Data|{{PAGENAME}}|typePlan}}|Inhabituel|
   {{#ifeq:{{Data|{{{nom|{{PAGENAME}}}}}|typePlan}}|Inhabituel|
   <tr>
   <tr>
     <td>'''Plan :'''</td>
     <td>'''Plan :'''</td>
     <td align="left">{{Cliquable|image=item_bplan_u.gif|link=Plans de chantier}}</td>
     <td align="right">{{Cliquable|image=item_bplan_u.gif|link=Plans de chantier}}<!--
      -->{{#ifeq:{{Data|{{{nom|{{PAGENAME}}}}}|planHotel}}|oui|{{Cliquable|image=item_mbplan_u.gif|link=Plan de chantier (inhabituel) (Hôtel)}}|}}<!--
      -->{{#ifeq:{{Data|{{{nom|{{PAGENAME}}}}}|planHopital}}|oui|{{Cliquable|image=item_hbplan_u.gif|link=Plan de chantier (inhabituel) (Hôpital)}}|}}<!--
      -->{{#ifeq:{{Data|{{{nom|{{PAGENAME}}}}}|planBunker}}|oui|{{Cliquable|image=item_bbplan_u.gif|link=Plan de chantier (inhabituel) (Bunker)}}|}}
    </td>
   </tr>|}}
   </tr>|}}
   {{#ifeq:{{Data|{{PAGENAME}}|typePlan}}|Rare|
   {{#ifeq:{{Data|{{{nom|{{PAGENAME}}}}}|typePlan}}|Rare|
   <tr>
   <tr>
     <td>'''Plan :'''</td>
     <td>'''Plan :'''</td>
     <td align="left">{{Cliquable|image=item_bplan_r.gif|link=Plans de chantier}}</td>
     <td align="right">{{Cliquable|image=item_bplan_r.gif|link=Plans de chantier}}<!--
      -->{{#ifeq:{{Data|{{{nom|{{PAGENAME}}}}}|planHotel}}|oui|{{Cliquable|image=item_mbplan_r.gif|link=Plan de chantier (rare) (Hôtel)}}|}}<!--
      -->{{#ifeq:{{Data|{{{nom|{{PAGENAME}}}}}|planHopital}}|oui|{{Cliquable|image=item_hbplan_r.gif|link=Plan de chantier (rare) (Hôpital)}}|}}<!--
      -->{{#ifeq:{{Data|{{{nom|{{PAGENAME}}}}}|planBunker}}|oui|{{Cliquable|image=item_bbplan_r.gif|link=Plan de chantier (rare) (Bunker)}}|}}
    </td>
   </tr>|}}
   </tr>|}}
   {{#ifeq:{{Data|{{PAGENAME}}|typePlan}}|Très rare|
   {{#ifeq:{{Data|{{{nom|{{PAGENAME}}}}}|typePlan}}|Très rare|
   <tr>
   <tr>
     <td>'''Plan :'''</td>
     <td>'''Plan :'''</td>
     <td align="left">{{Cliquable|image=item_bplan_e.gif|link=Plans de chantier}}</td>
     <td align="right">{{Cliquable|image=item_bplan_e.gif|link=Plans de chantier}}<!--
      -->{{#ifeq:{{Data|{{{nom|{{PAGENAME}}}}}|planHotel}}|oui|{{Cliquable|image=item_mbplan_e.gif|link=Plan de chantier (très rare !) (Hôtel)}}|}}<!--
      -->{{#ifeq:{{Data|{{{nom|{{PAGENAME}}}}}|planHopital}}|oui|{{Cliquable|image=item_hbplan_e.gif|link=Plan de chantier (très rare !) (Hôpital)}}|}}<!--
      -->{{#ifeq:{{Data|{{{nom|{{PAGENAME}}}}}|planBunker}}|oui|{{Cliquable|image=item_bbplan_e.gif|link=Plan de chantier (très rare !) (Bunker)}}|}}
    </td>
   </tr>|}}
   </tr>|}}
   {{#if:{{Data|{{PAGENAME}}|gainEau}}|
   {{#if:{{Data|{{{nom|{{PAGENAME}}}}}|gainEau}}|
   {{#ifexpr: {{Data|{{PAGENAME}}|gainEau}} > 0|
   {{#ifexpr: {{Data|{{{nom|{{PAGENAME}}}}}|gainEau}} > 0|
   <tr>
   <tr>
     <td>'''Gain en eau :'''</td>
     <td>'''Gain en eau :'''</td>
     <td align="left">{{Data|{{PAGENAME}}|gainEau}} {{Cliquable|image=item_water.gif|link=Puits}}</td>
     <td align="right">{{Data|{{{nom|{{PAGENAME}}}}}|gainEau}} {{Cliquable|image=item_water.gif|link=Puits}}</td>
   </tr>|}}|}}
   </tr>|}}|}}
   {{#if:{{Data|{{PAGENAME}}|defense}}|
   {{#if:{{Data|{{{nom|{{PAGENAME}}}}}|defense}}|
   {{#ifexpr: {{Data|{{PAGENAME}}|defense}} > 0|
   {{#ifexpr: {{Data|{{{nom|{{PAGENAME}}}}}|defense}} > 0|
   <tr>
   <tr>
     <td>'''Défense :'''</td>
     <td>'''Défense :'''</td>
     <td align="left">{{Data|{{PAGENAME}}|defense}} {{Cliquable|image=small_def.gif|link=Défenses}}</td>
     <td align="right">{{Data|{{{nom|{{PAGENAME}}}}}|defense}} {{Cliquable|image=small_def.gif|link=Défenses}}</td>
   </tr>|}}|}}
   </tr>|}}|}}
   {{#if:{{Data|{{PAGENAME}}|coutPA}}|
   {{#if:{{Data|{{{nom|{{PAGENAME}}}}}|coutPA}}|
   <tr>
   <tr>
     <td>'''Coût :'''</td>
     <td>'''Coût :'''</td>
     <td align="left">{{Data|{{PAGENAME}}|coutPA}} {{Cliquable|image=pa.gif|link=Point d'action}}</td>
     <td align="right">{{Data|{{{nom|{{PAGENAME}}}}}|coutPA}} {{Cliquable|image=pa.gif|link=Point d'action}}</td>
   </tr>|}}
   </tr>|}}
  {{#if:{{Data|{{PAGENAME}}|ressources}}|
  {{#if:{{Data|{{{nom|{{PAGENAME}}}}}|ressources}}|
  <tr valign="top">
  <tr valign="top">
   <td style="white-space: nowrap; font-weight: bold;">Ressources :</td>
   <td style="white-space: nowrap; font-weight: bold;">Ressources :</td>
   <td>{{DataResourceLoop|{{PAGENAME}}|{{Data|{{PAGENAME}}|ressources|0}}}}</td>
   <td style="text-align:right">{{DataResourceLoop|{{{nom|{{PAGENAME}}}}}}}</td>
  </tr>|}}
  </tr>|}}
</includeonly><noinclude> {{MetaInfobox}}Ce modèle n'est fait que pour être utilisé dans [[Modèle:MetaInfobox|le modèle MetaInfobox]], dans le quel il sert à afficher les informations spécifiques aux chantiers à partir de leur page [[:Catégorie:Data|Data]].
</includeonly><noinclude>__NOTOC__
{{MetaInfobox}}
Ce sous modèle de [[Modèle:MetaInfobox|MetaInfobox]] permet d'afficher les informations spécifiques aux chantiers à partir de leur page [[:Catégorie:Data|Data]].


[[Catégorie:Modèles]]
[[Catégorie:Modèles de l’infoboîte]]


</noinclude>
</noinclude>

Dernière version du 11 août 2024 à 10:56

ÉditerModèle:MetaInfobox/Chantier
Template:MetaInfobox/Buildings
Catégorie Chantiers
Ce Modèle sert à être inclus dans le Modèle MetaInfobox et gère les informations spécifiques aux chantiers.
Évoluable
Temporaire
Chantier parent : Pompe
Plan :
Gain en eau : 70
Défense : 999
Coût : 60
Ressources : Ration d'eau×10 Poutre rafistolée×10 Produits pharmaceutiques×10

Ce sous modèle de MetaInfobox permet d'afficher les informations spécifiques aux chantiers à partir de leur page Data.