diff options
Diffstat (limited to 'internal/game')
| -rw-r--r-- | internal/game/act_steal.go | 2 | ||||
| -rw-r--r-- | internal/game/cmd_bank.go | 6 | ||||
| -rw-r--r-- | internal/game/cmd_color.go | 6 | ||||
| -rw-r--r-- | internal/game/cmd_get.go | 4 | ||||
| -rw-r--r-- | internal/game/cmd_score.go | 4 | ||||
| -rw-r--r-- | internal/game/cmd_shop.go | 8 | ||||
| -rw-r--r-- | internal/game/cmd_trigger_utility.go | 2 | ||||
| -rw-r--r-- | internal/game/render_map.go | 10 |
8 files changed, 20 insertions, 22 deletions
diff --git a/internal/game/act_steal.go b/internal/game/act_steal.go index bf0ce14..880acff 100644 --- a/internal/game/act_steal.go +++ b/internal/game/act_steal.go @@ -419,7 +419,7 @@ func (g *Game) giveStealLoot(sess *net.Session, p *player.Player, drop *behavior if drop.ItemID == "credits" { p.Credits += qty - sess.WriteLine(g.colorize(sess, "credits_pickup", fmt.Sprintf("You steal %d credits.", qty))) + sess.WriteLine(g.colorize(sess, "currency_pickup", fmt.Sprintf("You steal %d credits.", qty))) return } diff --git a/internal/game/cmd_bank.go b/internal/game/cmd_bank.go index 06ae828..3c4cac3 100644 --- a/internal/game/cmd_bank.go +++ b/internal/game/cmd_bank.go @@ -120,7 +120,7 @@ func (g *Game) showBankBrowse(sess *net.Session) { } if p.BankedCredits > 0 { - sess.WriteLine(g.colorize(sess, "credits_pickup", fmt.Sprintf("Banked credits: %s", formatInt(p.BankedCredits)))) + sess.WriteLine(g.colorize(sess, "currency_pickup", fmt.Sprintf("Banked credits: %s", formatInt(p.BankedCredits)))) } } @@ -353,7 +353,7 @@ func (g *Game) doBankDepositCredits(sess *net.Session, parts []string) { p.Credits -= amount p.BankedCredits += amount g.AccountStore.SaveCharacter(p) - sess.WriteLine(g.colorize(sess, "credits_pickup", fmt.Sprintf("You deposit %s credits. (Banked: %s)", formatInt(amount), formatInt(p.BankedCredits)))) + sess.WriteLine(g.colorize(sess, "currency_pickup", fmt.Sprintf("You deposit %s credits. (Banked: %s)", formatInt(amount), formatInt(p.BankedCredits)))) g.showBankBrowse(sess) } @@ -375,7 +375,7 @@ func (g *Game) doBankWithdrawCredits(sess *net.Session, parts []string) { p.BankedCredits -= amount p.Credits += amount g.AccountStore.SaveCharacter(p) - sess.WriteLine(g.colorize(sess, "credits_pickup", fmt.Sprintf("You withdraw %s credits.", formatInt(amount)))) + sess.WriteLine(g.colorize(sess, "currency_pickup", fmt.Sprintf("You withdraw %s credits.", formatInt(amount)))) g.showBankBrowse(sess) } diff --git a/internal/game/cmd_color.go b/internal/game/cmd_color.go index 95ccbc4..01e2b9a 100644 --- a/internal/game/cmd_color.go +++ b/internal/game/cmd_color.go @@ -144,7 +144,6 @@ var colorCategoryOrder = []string{ "mob", "damage_dealt", "damage_taken", - "damage", "xp", "level_up", @@ -162,12 +161,11 @@ var colorCategoryOrder = []string{ "fire", "eat_food", "drop_message", - "credits_pickup", - "chips_pickup", + "currency_pickup", "map_at", "map_blocked", - "map_course", + "map_agility", "safespot_alert", } diff --git a/internal/game/cmd_get.go b/internal/game/cmd_get.go index ea1c667..afd9ae6 100644 --- a/internal/game/cmd_get.go +++ b/internal/game/cmd_get.go @@ -373,9 +373,9 @@ func (g *Game) pickupCredits(sess *net.Session, p *player.Player, itemID string) p.Credits += qty g.AccountStore.SaveCharacter(p) if qty == 1 { - sess.WriteLine(g.colorize(sess, "credits_pickup", "You pick up 1 credit.")) + sess.WriteLine(g.colorize(sess, "currency_pickup", "You pick up 1 credit.")) } else { - sess.WriteLine(g.colorize(sess, "credits_pickup", fmt.Sprintf("You pick up %d credits. (total: %d)", qty, p.Credits))) + sess.WriteLine(g.colorize(sess, "currency_pickup", fmt.Sprintf("You pick up %d credits. (total: %d)", qty, p.Credits))) } } diff --git a/internal/game/cmd_score.go b/internal/game/cmd_score.go index 5e850d1..31caf1e 100644 --- a/internal/game/cmd_score.go +++ b/internal/game/cmd_score.go @@ -97,8 +97,8 @@ func (g *Game) doScore(sess *net.Session) { row1 := padded(nameStr, 20) + padded(clStr, 24) + roomStr content(row1) - creditsStr := g.colorize(sess, "credits_pickup", formatInt(p.Credits)) - chipsStr := g.colorize(sess, "chips_pickup", formatInt(countChips(p))) + creditsStr := g.colorize(sess, "currency_pickup", formatInt(p.Credits)) + chipsStr := g.colorize(sess, "currency_pickup", formatInt(countChips(p))) styleStr := color.Render(mode, color.Parse("49"), fmt.Sprintf("Style: %s", p.AttackStyle)) invStr := fmt.Sprintf("Inv: %d/28", 28-p.FreeSlots()) row2 := padded("Credits: "+creditsStr, 19) + padded("Chips: "+chipsStr, 16) + padded(styleStr, 22) + invStr diff --git a/internal/game/cmd_shop.go b/internal/game/cmd_shop.go index e47c84d..e9f16b8 100644 --- a/internal/game/cmd_shop.go +++ b/internal/game/cmd_shop.go @@ -209,8 +209,8 @@ func (g *Game) showShopInventory(sess *net.Session, mob *world.MobInstance) { t.Rows = append(t.Rows, []string{ g.itemColorize(sess, c.def, c.name), fmt.Sprintf("%d", c.stock), - g.colorize(sess, "credits_pickup", fmt.Sprintf("%d cr", value)), - g.colorize(sess, "credits_pickup", sellStr), + g.colorize(sess, "currency_pickup", fmt.Sprintf("%d cr", value)), + g.colorize(sess, "currency_pickup", sellStr), }) } for _, line := range t.Render(unicode, wrapWidth) { @@ -292,7 +292,7 @@ func (g *Game) doShopBuy(sess *net.Session, mob *world.MobInstance, input string g.AccountStore.SaveCharacter(p) itemColor := g.itemColorize(sess, c.def, c.name) - credits := g.colorize(sess, "credits_pickup", fmt.Sprintf("%d", total)) + credits := g.colorize(sess, "currency_pickup", fmt.Sprintf("%d", total)) if taken == 1 { sess.WriteLine(fmt.Sprintf("You buy a %s for %s credits.", itemColor, credits)) } else { @@ -355,7 +355,7 @@ func (g *Game) doShopSell(sess *net.Session, mob *world.MobInstance, input strin g.MobStore.ShopAdd(mob.InstanceID, match.ID, actualQty) g.AccountStore.SaveCharacter(p) - credits := g.colorize(sess, "credits_pickup", fmt.Sprintf("%d", total)) + credits := g.colorize(sess, "currency_pickup", fmt.Sprintf("%d", total)) if actualQty == 1 { sess.WriteLine(fmt.Sprintf("You sell a %s for %s credits.", itemColor, credits)) } else { diff --git a/internal/game/cmd_trigger_utility.go b/internal/game/cmd_trigger_utility.go index d06551a..b48742a 100644 --- a/internal/game/cmd_trigger_utility.go +++ b/internal/game/cmd_trigger_utility.go @@ -70,7 +70,7 @@ func (g *Game) triggerProcessing(sess *net.Session, p *player.Player, mod *ModDe g.triggerModReward(sess, p, mod, 1.0) sess.WriteLine(fmt.Sprintf("You process the %s. You receive %s credits.", - g.itemColorize(sess, itemDef, itemDef.Name), g.colorize(sess, "credits_pickup", fmt.Sprint(creditValue)))) + g.itemColorize(sess, itemDef, itemDef.Name), g.colorize(sess, "currency_pickup", fmt.Sprint(creditValue)))) } func (g *Game) triggerBonesToNuts(sess *net.Session, p *player.Player, mod *ModDef) { diff --git a/internal/game/render_map.go b/internal/game/render_map.go index a28538b..e8d7cea 100644 --- a/internal/game/render_map.go +++ b/internal/game/render_map.go @@ -106,7 +106,7 @@ func buildTinyMap(g *Game, sess *net.Session, roomID int, mg mapGlyphs) []string dimSpec := resolveDim(g, sess) ctx := &mapRenderCtx{ g: g, sess: sess, bg: bg, visited: visited, currentRoom: roomID, - atSpec: atSpec, dimSpec: dimSpec, blockedSpec: resolveMapBlocked(g, sess), courseSpec: resolveMapCourse(g, sess), mg: mg, + atSpec: atSpec, dimSpec: dimSpec, blockedSpec: resolveMapBlocked(g, sess), courseSpec: resolveMapAgility(g, sess), mg: mg, diagPairs: make(map[[2]int][2]int), } @@ -279,7 +279,7 @@ func buildFullMap(g *Game, sess *net.Session, roomID, mapWidth, mapHeight int, m dimSpec := resolveDim(g, sess) ctx := &mapRenderCtx{ g: g, sess: sess, bg: bg, visited: visited, currentRoom: roomID, - atSpec: atSpec, dimSpec: dimSpec, blockedSpec: resolveMapBlocked(g, sess), courseSpec: resolveMapCourse(g, sess), mg: mg, + atSpec: atSpec, dimSpec: dimSpec, blockedSpec: resolveMapBlocked(g, sess), courseSpec: resolveMapAgility(g, sess), mg: mg, diagPairs: make(map[[2]int][2]int), } @@ -444,9 +444,9 @@ func resolveMapBlocked(g *Game, sess *net.Session) color.ColorSpec { return color.Parse("A7") } -func resolveMapCourse(g *Game, sess *net.Session) color.ColorSpec { +func resolveMapAgility(g *Game, sess *net.Session) color.ColorSpec { if sess != nil { - return g.resolveColor(sess, "map_course") + return g.resolveColor(sess, "map_agility") } return color.Parse("43") } @@ -545,7 +545,7 @@ func (c *mapRenderCtx) isCourseLink(roomA, roomB int) bool { return false } -// courseColoredCell draws a one-way course arrow using the map_course color +// courseColoredCell draws a one-way course arrow using the map_agility color // (dimmed if either endpoint is unvisited). func (c *mapRenderCtx) courseColoredCell(roomA, roomB int, glyph rune) (mapCell, bool) { if c.visited != nil && (!c.visited.Has(roomA) || !c.visited.Has(roomB)) { |
