Actions

Template

ResourceCraftedWith: Difference between revisions

From Dune Awakening DB

Created page with "<includeonly><!-- Template:ResourceCraftedWith (fixed) --> {{#get_external_data: source = externaldb |from = data_recipe_outcomes JOIN data_recipes ON data_recipe_outcomes.recipe_id = data_recipes.id JOIN data_recipe_ingredients ON data_recipes.id = data_recipe_ingredients.recipe_id JOIN data_recipe_stations ON data_recipes.id = data_recipe_stations.recipe_id |data = OutputItem = outp..."
 
mNo edit summary
 
Line 1: Line 1:
<includeonly><!-- Template:ResourceCraftedWith (fixed) -->
{{#get_external_data:
  source = externaldb
  |from  = data_recipe_outcomes
          JOIN data_recipes            ON data_recipe_outcomes.recipe_id  = data_recipes.id
          JOIN data_recipe_ingredients ON data_recipes.id                = data_recipe_ingredients.recipe_id
          JOIN data_recipe_stations    ON data_recipes.id                = data_recipe_stations.recipe_id
  |data  = OutputItem = output_label,
          Resources  = GROUP_CONCAT(
                          DISTINCT CONCAT(
                            ingredient_label, CHAR(32), CHAR(120), amount
                          ) SEPARATOR CHAR(59)            /* “;” */
                        ),
          Stations  = GROUP_CONCAT(
                          DISTINCT production_type
                          SEPARATOR CHAR(59)
                        ),
          WaterML    = water_ml_total,
          CraftTime  = crafting_time_s,
          Schematic  = schematic_requirement
  |where = output_label = {{{resource|{{PAGENAME}}}}}
  |group by = output_label
  |order by = output_label
  |cache = yes
}}
<table class="infobox-dune-standard-table recipe-popup-table">
<table class="infobox-dune-standard-table recipe-popup-table">
  <thead>
     <tr class="tr-dark">
     <tr class="tr-dark">
       <th>Item Created</th>
       <th>Item</th>
       <th>Resources Needed</th>
       <th>Resources</th>
       <th>Stations</th>
       <th>Station</th>
       <th>Water&nbsp;(mL)</th>
       <th>Water Needed&nbsp;(mL)</th>
       <th>Craft&nbsp;Time</th>
       <th>Time</th>
       <th>Schematic</th>
       <th>Schematic</th>
     </tr>
     </tr>
  </thead>
{{#for_external_table:|
  <tbody>
    <tr>
    {{#for_external_table:|
      <td>{{#invoke:DataTableParserV2|iconize|{{{OutputItem}}}}}</td>
      <tr>
      <td>{{#invoke:DataTableParserV2|formatRecipeList|{{{Resources}}}}}</td>
        <td>{{#invoke:DataTableParserV2|iconize|{{{OutputItem}}}}}</td>
      <td>{{{Station}}}</td>
        <td>{{#invoke:DataTableParserV2|formatRecipeList|{{{Resources}}}}}</td>
      <td>{{{WaterML|0}}}</td>
        <td>{{{Stations}}}</td>
      <td>{{{CraftTime|0}}}&nbsp;s</td>
        <td>{{{WaterML|0}}}</td>
      <td>{{#if:{{{Schematic|}}}|[[{{{Schematic}}}]]|None}}</td>
        <td>{{{CraftTime|0}}}&nbsp;sec</td>
    </tr>
        <td>{{#if:{{{Schematic|}}}|[[{{{Schematic}}}]]|None}}</td>
}}
      </tr>
    }}
  </tbody>
</table>
</table>
</includeonly>

Latest revision as of 22:09, 26 May 2025

Item Resources Station Water Needed (mL) Time Schematic