Harvestry: Difference between revisions

21 bytes added ,  00:37, 2 October 2021
cleaner query
(Enhance the cargo table)
(cleaner query)
Line 13: Line 13:


== List of Harvestables ==
== List of Harvestables ==
{{#cargo_compound_query:
{{#cargo_query:
 
  | tables   = GeneralData=GD, ItemsTable=IT, Characters=CH, Food=F1, Food=F2,
|tables=ItemsTable=IT,Food=F,GeneralData=GD1,GeneralData=GD2;
              GeneralData=HarvestData1, GeneralData=HarvestData2,
   join on=IT.HarvestedInto=F.ObjectID,F.JoinKey=GD1.JoinKey,F.PreservedInto=GD2.ObjectID;
              GeneralData=PreserveData1, GeneralData=PreserveData2
 
   | join on = GD.JoinKey=IT.JoinKey, GD.JoinKey=CH.JoinKey, IT.HarvestedInto=F1.ObjectID, CH.HarvestedInto=F2.ObjectID,
   fields=
              F1.ObjectID=HarvestData1.ObjectID, F2.ObjectID=HarvestData2.ObjectID,
    CONCAT('{{(}}favilink id{{!}}',IT.ObjectID,'{{)}}')=Harvestable,
              F1.PreservedInto=PreserveData1.ObjectID, F2.PreservedInto=PreserveData2.ObjectID
    CONCAT('{{(}}favilink id{{!}}',IT.HarvestedInto,'{{)}} <span class="cargoFieldName">(Value: {{(}}qud text{{!}}&B$&C',GD1.Commerce,'{{)}} - Weight: {{(}}qud text{{!}}',GD1.Weight,'&amp;K#{{)}})</span>')=HarvestedInto,
   | fields   = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Harvestable,
    CONCAT(CASE WHEN F.PreservedInto IS NULL THEN '-' ELSE CONCAT('{{(}}favilink id{{!}}',F.PreservedInto,'{{!}}prefix:',F.PreservedQuantity,'x{{)}} <span class="cargoFieldName">(Value: {{(}}qud text{{!}}&B$&C',GD2.Commerce,'{{)}} - Weight: {{(}}qud text{{!}}',GD2.Weight,'&amp;K#{{)}})</span>') END)=PreservedInto;
              CONCAT('{{(}}favilink id{{!}}',CASE WHEN IT.HarvestedInto IS NOT NULL THEN IT.HarvestedInto ELSE CH.HarvestedInto END,'{{)}}')=HarvestedInto,
 
              CONCAT('{{(}}qud text{{!}}&B$&C',COALESCE(HarvestData1.Commerce, HarvestData2.Commerce),'{{)}}')=H. Value,
    where=IT.HarvestedInto IS NOT NULL
              CONCAT('{{(}}qud text{{!}}',COALESCE(HarvestData1.Weight, HarvestData2.Weight),'&amp;K#{{)}}')=H. Weight,
 
              COALESCE(CONCAT('{{(}}favilink id{{!}}',F1.PreservedInto,'{{!}}prefix:',F1.PreservedQuantity,'x{{)}}'),
|tables=Characters=IT,Food=F,GeneralData=GD1,GeneralData=GD2;
                        CONCAT('{{(}}favilink id{{!}}',F2.PreservedInto,'{{!}}prefix:',F2.PreservedQuantity,'x{{)}}'),'-')=PreservedInto,
  join on=IT.HarvestedInto=F.ObjectID,F.JoinKey=GD1.JoinKey,F.PreservedInto=GD2.ObjectID;
              CONCAT('{{(}}qud text{{!}}&B$&C',COALESCE(PreserveData1.Commerce, PreserveData2.Commerce),'{{)}} <span style="color:#155352;">/ea.</span>')=P. Value,
 
              CONCAT('{{(}}qud text{{!}}',COALESCE(PreserveData1.Weight, PreserveData2.Weight),'&amp;K#{{)}}')=P. Weight
  fields=
  | where   = IT.HarvestedInto IS NOT NULL OR CH.HarvestedInto IS NOT NULL
    CONCAT('{{(}}favilink id{{!}}',IT.ObjectID,'{{)}}')=Harvestable,
  | order by = GD.PlainName
    CONCAT('{{(}}favilink id{{!}}',IT.HarvestedInto,'{{)}} <span class="cargoFieldName">(Value: {{(}}qud text{{!}}&B$&C',GD1.Commerce,'{{)}} - Weight: {{(}}qud text{{!}}',GD1.Weight,'&amp;K#{{)}})</span>')=HarvestedInto,
  | format   = table
    CONCAT(CASE WHEN F.PreservedInto IS NULL THEN '-' ELSE CONCAT('{{(}}favilink id{{!}}',F.PreservedInto,'{{!}}prefix:',F.PreservedQuantity,'x{{)}} <span class="cargoFieldName">(Value: {{(}}qud text{{!}}&B$&C',GD2.Commerce,'{{)}} - Weight: {{(}}qud text{{!}}',GD2.Weight,'&amp;K#{{)}})</span>') END)=PreservedInto;
 
    where=IT.HarvestedInto IS NOT NULL
 
|format=table
}}
}}


{{Skills and Powers Navbox}}
{{Skills and Powers Navbox}}