Skip to content

Commit

Permalink
Merge pull request #5 from FlashyReese/1.6
Browse files Browse the repository at this point in the history
Update for Stardew Valley 1.6.

Fixes #3 and #4.
  • Loading branch information
gucci-on-fleek authored Apr 13, 2024
2 parents 954cc5d + 9e9fbb0 commit 49b7664
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/items.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<xsl:for-each select="Item[not(@xsi:nil)]">
<item>
<name>
<xsl:value-of select="Name" />
<xsl:value-of select="Name | name" />
</name>
<xsl:if test="quality &gt; 0">
<quality>
Expand All @@ -26,7 +26,7 @@
</quality>
</xsl:if>
<count>
<xsl:value-of select="Stack" />
<xsl:value-of select="Stack | stack" />
</count>
<actual_price>
<xsl:call-template name="price_adjustments">
Expand All @@ -43,21 +43,21 @@
<contained_in>
<xsl:variable name="parent_items" select="parent::items" />
<xsl:choose>
<xsl:when test="$parent_items/parent::player or $parent_items/parent::farmhand">
<xsl:when test="$parent_items/parent::player or $parent_items/parent::farmhand or $parent_items/parent::Farmer">
<type>Player</type>
<!-- Do not include a location for the player since they can move -->
<description>
<xsl:value-of select="$parent_items/parent::player/name | $parent_items/parent::farmhand/name" />
<xsl:value-of select="$parent_items/parent::player/name | $parent_items/parent::farmhand/name | $parent_items/parent::Farmer/name" />
</description>
</xsl:when>
<xsl:when test="$parent_items/parent::fridge">
<type>Fridge</type>
<xsl:call-template name="location" />
</xsl:when>
<xsl:when test="$parent_items/parent::Object/Name">
<xsl:when test="$parent_items/parent::Object/Name | $parent_items/parent::Object/name">
<!-- Mini-Fridges, etc. -->
<type>
<xsl:value-of select="$parent_items/parent::Object/DisplayName" />
<xsl:value-of select="$parent_items/parent::Object/DisplayName | $parent_items/parent::Object/displayName | $parent_items/parent::Object/name" />
</type>
<xsl:if test="$parent_items/parent::Object/playerChoiceColor">
<xsl:call-template name="colours">
Expand All @@ -66,17 +66,17 @@
</xsl:if>
<xsl:call-template name="location" />
</xsl:when>
<xsl:when test="$parent_items/parent::heldObject/parent::Object/Name">
<xsl:when test="$parent_items/parent::heldObject/parent::Object/Name | $parent_items/parent::heldObject/parent::Object/name">
<!-- Autopickers -->
<type>
<xsl:value-of select="$parent_items/parent::heldObject/parent::Object/Name" />
<xsl:value-of select="$parent_items/parent::heldObject/parent::Object/Name | $parent_items/parent::heldObject/parent::Object/name" />
</type>
<xsl:call-template name="location" />
</xsl:when>
<xsl:when test="$parent_items/parent::output/parent::Building">
<xsl:when test="$parent_items/parent::output/parent::Building | $parent_items/parent::Chest/parent::buildingChests/parent::Building">
<!-- Junimo Huts, Mills, etc. -->
<type>
<xsl:value-of select="$parent_items/parent::output/parent::Building/buildingType" />
<xsl:value-of select="$parent_items/parent::output/parent::Building/buildingType | $parent_items/parent::Chest/parent::buildingChests/parent::Building/buildingType" />
</type>
<xsl:call-template name="location" />
</xsl:when>
Expand Down Expand Up @@ -196,6 +196,9 @@
<xsl:when test="ancestor::Building/buildingType">
<xsl:value-of select="ancestor::Building/buildingType"/>
</xsl:when>
<xsl:when test="ancestor::Chest/parent::buildingChests/parent::Building/buildingType">
<xsl:value-of select="ancestor::Chest/parent::buildingChests/parent::Building/buildingType"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="ancestor::GameLocation/name" />
</xsl:otherwise>
Expand Down

0 comments on commit 49b7664

Please sign in to comment.