Star sprite bonus now drops bonus ore if inventory is full

Rocks mined attribute now takes into account bonus ore
This commit is contained in:
Player Name 2025-02-01 14:07:03 +00:00 committed by Ryan
parent 0a26d5039a
commit cd43f8d269
2 changed files with 6 additions and 8 deletions

View file

@ -106,10 +106,9 @@ class MiningListener : InteractionListener {
} }
// Give the mining reward, increment 'rocks mined' attribute // Give the mining reward, increment 'rocks mined' attribute
if(addItem(player, reward, rewardAmount)) { addItemOrDrop(player, reward, rewardAmount)
var rocksMined = getAttribute(player, "$STATS_BASE:$STATS_ROCKS", 0) var rocksMined = getAttribute(player, "$STATS_BASE:$STATS_ROCKS", 0)
setAttribute(player, "/save:$STATS_BASE:$STATS_ROCKS", ++rocksMined) setAttribute(player, "/save:$STATS_BASE:$STATS_ROCKS", rocksMined + rewardAmount)
}
// Calculate bonus gem chance while mining // Calculate bonus gem chance while mining
if (!isEssence) { if (!isEssence) {

View file

@ -164,10 +164,9 @@ class MiningSkillPulse(private val player: Player, private val node: Node) : Pul
} }
// Give the mining reward, increment 'rocks mined' attribute // Give the mining reward, increment 'rocks mined' attribute
if(addItem(player, reward, rewardAmount)) { addItemOrDrop(player, reward, rewardAmount)
var rocksMined = getAttribute(player, "$STATS_BASE:$STATS_ROCKS", 0) var rocksMined = getAttribute(player, "$STATS_BASE:$STATS_ROCKS", 0)
setAttribute(player, "/save:$STATS_BASE:$STATS_ROCKS", ++rocksMined) setAttribute(player, "/save:$STATS_BASE:$STATS_ROCKS", rocksMined + rewardAmount)
}
// Calculate bonus gem chance while mining // Calculate bonus gem chance while mining
if (!isMiningEssence) { if (!isMiningEssence) {