Actions

Template

ResourceDisplayCard: Difference between revisions

From Dune Awakening DB

Created page with "<!-- Template:ResourceDisplayCard --> {{#get_external_data: source = externaldb |from = data_resources |data = Name = name, Description = description, Weight = weight, Rarity = rarity, Image = 'Image Link' |where = name = 'Copper Ingot' |limit = 1 }} {{#for_external_table:| {{#vardefine:Name | {{{Name}}} }} {{#vardefine:Desc | {{{Description}}} }} {{#vardefin..."
 
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<!-- Template:ResourceDisplayCard -->
<!-- Template:ResourceDisplayCard -->
{{#get_external_data:
{{#get_external_data:source = externaldb|from = data_resources|data = Name        = name,Description = description,Rarity      = rarity,Subclass    = resource_subclass,Weight      = weight,XP          = xp_per_harvest,Faction    = faction,ImageFile  = image_link, Category1        = category_1,
  source       = externaldb
       Category2        = category_2,
  |from       = data_resources
       Category3 = category_3|where = name = 'Copper Ingot'|limit = 1}}
  |data       =
{{#for_external_table:|
      Name        = name,
  {{#vardefine:Name      | {{{Name}}} }}
      Description = description,
  {{#vardefine:Desc      | {{{Description}}} }}
      Weight      = weight,
  {{#vardefine:Rare      | {{lc:{{{Rarity}}}}} }}
       Rarity      = rarity,
  {{#vardefine:Subclass  | {{{Subclass}}} }}
       Image      = 'Image Link'
  {{#vardefine:Weight    | {{{Weight}}} }}
  |where       = name = 'Copper Ingot'
  {{#vardefine:XP        | {{{XP}}} }}
  |limit       = 1
  {{#vardefine:Fact      | {{{Faction}}} }}
  {{#vardefine:ImageFile | {{{ImageFile}}} }}
  {{#vardefine:Category1    | {{{Category1}}} }}
  {{#vardefine:Category2    | {{{Category2}}} }}
  {{#vardefine:Category3    | {{{Category3}}} }}
}}
}}
{{#vardefine:Tint|
  {{#switch: {{#var:Rare}}
    | uncommon  = #2d862d
    | rare      = #2970c3
    | epic      = #9c43c8
    | legendary = #cf7a30
    | #default  =}}}}
<div class="dune-breadcrumb-nav"><span id="menuRadialTrigger" class="menu-button-wrapper" style="cursor:pointer;">[[File:MenuButton.png|100px|link=|alt=Menu]]</span><span class="dune-breadcrumb-separator">/</span>[[{{#var:Category1}}|{{#var:Category1}}]]<span class="dune-breadcrumb-separator">/</span>[[{{#var:Category2}}|{{#var:Category2}}]]{{#if:{{#var:Category3}}|<span class="dune-breadcrumb-separator">/</span>[[{{#var:Category3}}|{{#var:Category3}}]]}}<span class="dune-breadcrumb-separator">/</span><span>{{PAGENAME}}</span>
</div>
<div class="responsive-col col1">
  <div class="skin-pivot">
    <div class="dune-card" style="--resource-tint:{{#var:Tint}}">
      <div class="dune-card-decoration"></div>
      <div class="dune-card-inner">
        <!-- top strip & title -->
        <div class="dune-card-label">RESOURCE – {{ucfirst:{{#var:Subclass}}}}</div>
        <div class="dune-card-title"><span class="icon">&#x1F6C8;</span> Resource Information</div>
        <div style="padding:3px;"></div>
        <!-- image -->
        <div class="dune-card-image" style="text-align:center;">
          <div class="has-border">
            {{#if:{{#var:ImageFile}}
              | [[File:{{#var:ImageFile}}|200px|alt={{#var:Name}}]]
              | [[File:Placeholder.png|200px|alt=No image available]]
            }}
          </div>
        </div>
        <div style="padding:3px;"></div>
        <!-- description -->
        <div class="dune-card-description">{{#var:Desc}}</div>
        <!-- stats table -->
        <div class="dune-table-wrapper">
          <table class="infobox-dune-two-column">
            <tr><th><span class="icon">[[File:BuildingRecipeIcon.png]]</span>Rarity</th>          <td>{{ucfirst:{{#var:Rare}}}}</td></tr>
            <tr><th><span class="icon">[[File:BuildingInventoryIcon.png]]</span>Subclass</th>        <td>{{#var:Subclass}}</td></tr>
            <tr><th><span class="icon">[[File:BuildingCapacityIcon.png]]</span>Volume</th>          <td>{{#var:Weight}} V</td></tr>
            <tr><th><span class="icon">[[File:BuildingPowerIcon.png]]</span>XP per Harvest</th>  <td>{{#var:XP}} XP</td></tr>
            <tr><th><span class="icon">[[File:BuildingHealthIcon.png]]</span>Faction</th>          <td>{{#var:Fact}}</td></tr>
          </table>
        </div>
      </div><!-- dune-card-inner -->
    </div><!-- dune-card -->
  </div><!-- skin-pivot -->
</div><!-- responsive-col -->


{{#for_external_table:|
  {{#vardefine:Name      | {{{Name}}} }}
  {{#vardefine:Desc      | {{{Description}}} }}
  {{#vardefine:Weight    | {{{Weight}}} }}
  {{#vardefine:Cat        | {{{Category}}} }}
  {{#vardefine:Rarity    | {{{Rarity}}} }}
  {{#vardefine:Image      | {{{Image}}} }}
}}


<!-- ────────────────  MIDDLE COLUMN  –  “Used In” card  ──────────────── -->
<div class="responsive-col col2">
  <div class="skin-pivot">
    <div class="dune-card">
      <div class="dune-card-decoration"></div>
      <div class="dune-card-inner">


<div class="skin-pivot">
        <!-- header -->
  <div class="dune-card dune-resource-card"
        <div class="dune-card-label">CRAFTING</div>
      style="--resource-tint:{{#var:Tint}}">
        <div class="dune-card-title"><span class="icon">&#9883;</span> Used In</div>
     
        <div style="padding:3px;"></div>
    <div class="dune-resource-header">
        <div class="dune-card-description">
      <span>MISC — {{ucfirst:{{#var:Cat}}}}</span>
          This resource is required for the following recipes.
      <span class="dune-resource-title">{{#var:Name}}</span>
        </div>
    </div>
<div id="usedInFilterHolder"></div>
        <!-- Used-In table -->
        <div class="dune-card-infobox-left">
          {{#get_external_data:
            source = externaldb
            |from  = data_crafting_recipes
            |data  =
                Output  = name,
                Time    = time_to_craft,
                Recipe  = recipe_to_build,
                Station  = where_to_craft
            |cache = yes
            |where = recipe_to_build LIKE '%[[Copper Ingot]]%'
          }}
          <div class="dune-table-wrapper" style="overflow-x:auto;">
            <table class="infobox-dune-standard-table">
              <tr class="tr-dark">
                <th style="text-align:left; width:30%;">Output</th>
                <th style="text-align:left; width:45%;">Recipe</th>
                <th style="text-align:left; width:25%;">Crafted At</th>
              </tr>
              {{#for_external_table:|
                <tr><td style="text-align:left;">{{#invoke:DataTableParserV2|iconize|1=[[{{{Output}}}]]}}
                  </td>
                  <td style="text-align:left;">{{#invoke:DataTableParserV2|formatRecipeList|1={{{Recipe}}}}}
                  </td>
                  <td style="text-align:left;">{{{Station}}}</td>
                </tr>
              }}
            </table>
          </div>
        </div>


     <div class="dune-resource-thumb">
      </div><!-- dune-card-inner -->
      {{#if:{{#var:Image}}
     </div><!-- dune-card -->
        | [[File:{{#var:Image}}|120px|center|alt={{#var:Name}}]]
  </div><!-- skin-pivot -->
        | [[File:Placeholder.png|120px]()]()
</div><!-- responsive-col -->

Latest revision as of 02:54, 7 May 2025









Menu/Resources/Refined Resource/Refining/ResourceDisplayCard
RESOURCE – Refined Resource
🛈 Resource Information
           Copper Ingot
A Copper ingot, refined from Copper Ore at any Ore Refinery. Used to create products that require Copper
Rarity Common
Subclass Refined Resource
Volume 0.20 V
XP per Harvest XP
Faction Factionless


CRAFTING
Used In
         This resource is required for the following recipes.
         The query SELECT  name,time_to_craft,recipe_to_build,where_to_craft  FROM `data_crafting_recipes`    WHERE recipe_to_build LIKE '%Copper Ingot%'   is invalid (Error 1146: Table 'dunedbco_ddb.data_crafting_recipes' doesn't exist

Function: EDConnectorRdbms::fetch Query: SELECT name,time_to_craft,recipe_to_build,where_to_craft FROM `data_crafting_recipes` WHERE recipe_to_build LIKE '%Copper Ingot%' ).

Output Recipe Crafted At
[[{{{Output}}}]] {{{Recipe}}} {{{Station}}}