diff options
Diffstat (limited to 'internal/game/ui_xpdrop.go')
| -rw-r--r-- | internal/game/ui_xpdrop.go | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/internal/game/ui_xpdrop.go b/internal/game/ui_xpdrop.go deleted file mode 100644 index a9bff23..0000000 --- a/internal/game/ui_xpdrop.go +++ /dev/null @@ -1,31 +0,0 @@ -package game - -import ( - "fmt" - "strings" - - "thehouseoficarus/internal/net" - "thehouseoficarus/internal/player" -) - -// formatXpDrop returns the colored XP-drop suffix for a slice of gains, or "" -// if xp_drops are disabled or there are no gains. -func (g *Game) formatXpDrop(sess *net.Session, p *player.Player, gains []xpGain) string { - if !p.OptionBool("xp_drops") || len(gains) == 0 { - return "" - } - var parts []string - for _, gain := range gains { - parts = append(parts, fmt.Sprintf("+%dxp %s", gain.XP, player.SkillAbbr[player.SkillName(gain.Skill)])) - } - return g.colorize(sess, "xp", " ("+strings.Join(parts, ", ")+")") -} - -// formatXpDropSingle returns the colored XP-drop suffix for a single skill, or "" -// if xp_drops are disabled or xp is 0. -func (g *Game) formatXpDropSingle(sess *net.Session, p *player.Player, skill player.SkillName, xp int) string { - if !p.OptionBool("xp_drops") || xp <= 0 { - return "" - } - return g.colorize(sess, "xp", fmt.Sprintf(" (+%dxp %s)", xp, player.SkillAbbr[skill])) -} |
