diff options
Diffstat (limited to 'internal/game/action_identify.go')
| -rw-r--r-- | internal/game/action_identify.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/internal/game/action_identify.go b/internal/game/action_identify.go index 3f63e62..b04bf97 100644 --- a/internal/game/action_identify.go +++ b/internal/game/action_identify.go @@ -14,7 +14,7 @@ func (g *Game) advanceIdentify(sess *net.Session, p *player.Player) { scrapCount := p.CountItem("scrap_metal") if scrapCount == 0 { sess.WriteLine("You don't have any scrap metal.") - g.CancelAction(p) + g.cancelAction(p) return } @@ -32,7 +32,7 @@ func (g *Game) advanceIdentify(sess *net.Session, p *player.Player) { } if !hasExistingStack && p.FirstFreeSlot() == -1 { sess.WriteLine("Your inventory is too full!") - g.CancelAction(p) + g.cancelAction(p) return } @@ -65,10 +65,7 @@ func (g *Game) advanceIdentify(sess *net.Session, p *player.Player) { msg := fmt.Sprintf("The altar hums. You identify %d scrap metal into %d %s.", scrapCount, totalJunk, junkName) - if newLevel := p.AddSkillXP(player.Scavenging, totalXP); newLevel > 0 { - sess.WriteLine(g.colorize(sess, "level_up", - fmt.Sprintf("*** You are now level %d scavenging! ***", newLevel))) - } + g.awardSkillXP(sess, p, player.Scavenging, totalXP) if p.OptionBool("xp_drops") && totalXP > 0 { msg += g.colorize(sess, "xp", fmt.Sprintf(" (+%dxp scv)", totalXP)) @@ -76,5 +73,5 @@ func (g *Game) advanceIdentify(sess *net.Session, p *player.Player) { sess.WriteLine(msg) g.AccountStore.SaveCharacter(p) - g.CancelAction(p) + g.cancelAction(p) } |
