diff options
| -rw-r--r-- | building_guide/courses.md | 2 | ||||
| -rw-r--r-- | config.yaml | 18 | ||||
| -rw-r--r-- | data/help/color.yaml | 5 | ||||
| -rw-r--r-- | internal/admin/api_colors.go | 104 | ||||
| -rw-r--r-- | internal/admin/api_colors_test.go | 7 | ||||
| -rw-r--r-- | internal/admin/static/admin.css | 2 | ||||
| -rw-r--r-- | internal/admin/static/coloreditor.js | 2 | ||||
| -rw-r--r-- | internal/config/config.go | 6 | ||||
| -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 |
16 files changed, 73 insertions, 115 deletions
diff --git a/building_guide/courses.md b/building_guide/courses.md index d7d2877..8a79598 100644 --- a/building_guide/courses.md +++ b/building_guide/courses.md @@ -6,7 +6,7 @@ Agility courses are defined in `data/courses/<id>.yaml`. Each course defines a s > Editing courses is done from the **Map screen** in the admin web GUI: select an obstacle room and use its **Course** side-panel tab to create a course, add the room as a step, edit all of its parameters, or remove it. The legacy standalone "Courses" editor tab has been removed. > -> When a room is added as a course step, the admin GUI auto-creates **always-blocked one-way exits** between consecutive obstacle rooms so the in-game map can lay them out correctly. The direction of these exits is chosen by the builder. Always-blocked exits are blocked to players (movement is refused with the standard "blocked" message and they show "(blocked)" in `look`) but visible on the map — they exist solely for map rendering. On the map, course links appear as blue dashed one-way arrows (colored via the `map_course` theme token). +> When a room is added as a course step, the admin GUI auto-creates **always-blocked one-way exits** between consecutive obstacle rooms so the in-game map can lay them out correctly. The direction of these exits is chosen by the builder. Always-blocked exits are blocked to players (movement is refused with the standard "blocked" message and they show "(blocked)" in `look`) but visible on the map — they exist solely for map rendering. On the map, course links appear as blue dashed one-way arrows (colored via the `map_agility` theme token). ### Course YAML diff --git a/config.yaml b/config.yaml index 14f682c..16a8a43 100644 --- a/config.yaml +++ b/config.yaml @@ -36,18 +36,6 @@ admin_https: enabled: true port: 8081 -# Muted / desaturated theme (analogous teal base + warm amber accent). -# Cohesion via a restricted ~15-color palette, 60-30-10 balance. -# Emphasis comes from value ramps + bold within a hue, never new hues. -# NOTE: color indices are hex (00-FF); xterm256 decimal shown in parens. -# -# Neutrals (60%): FF(255) FA(250) F5(245) F0(240) ED(237) -# Primary teal (30%): 74(116 bright) 49(73 mid) 42(66 dim) -# Amber accent (10%): B4(180 bright) B3(179 mid) 89(137 dim/tan) -# Danger red: A7(167 mid) 83(131 dim) -# Success green: 6C(108 sage) 41(65 dim) -# Info blue: 6E(110 steel) 43(67 dim) -# Special mauve: 8B(139) default_colors: room_name: "74 bold" room_number: "F0" @@ -59,7 +47,6 @@ default_colors: mob: "off" damage_dealt: "B4" damage_taken: "A7" - damage: "A7" xp: "B3" level_up: "B4 bold" item: "6E" @@ -77,8 +64,7 @@ default_colors: fire: "B4" eat_food: "6C" drop_message: "89" - credits_pickup: "B3" - chips_pickup: "8B" + currency_pickup: "B3" visual_tick: "49 dim" visual_first_tick: "B4 bold" battery: "6C" @@ -91,5 +77,5 @@ default_colors: farm_disease: "A7" map_at: "B4 bold" map_blocked: "A7" - map_course: "43" + map_agility: "43" safespot_alert: "A7 bold" diff --git a/data/help/color.yaml b/data/help/color.yaml index 17410af..b07ab17 100644 --- a/data/help/color.yaml +++ b/data/help/color.yaml @@ -57,7 +57,8 @@ description: | exit_name Exit destination room names protected_mob Protected mob names mob Mob names (combat, room listings, etc.) - damage Damage numbers + damage_dealt Damage to enemies + damage_taken Damage from enemies/hazards xp XP gain messages level_up Level-up announcements item Item names (default) @@ -72,7 +73,7 @@ description: | fire Firemaking messages eat_food Eating/healing messages drop_message Mob loot drops - credits_pickup Currency/credit messages + currency_pickup Currency/credit/chip messages Map colors: map_at The @ marker for your current room on the map diff --git a/internal/admin/api_colors.go b/internal/admin/api_colors.go index 0493b6c..882a096 100644 --- a/internal/admin/api_colors.go +++ b/internal/admin/api_colors.go @@ -60,7 +60,6 @@ var colorCategories = []colorCategory{ // Combat {Name: "damage_dealt", Label: "Damage Dealt", Group: "Combat"}, {Name: "damage_taken", Label: "Damage Taken", Group: "Combat"}, - {Name: "damage", Label: "Damage (alt key)", Group: "Combat"}, {Name: "miss", Label: "Miss", Group: "Combat"}, {Name: "death", Label: "Death", Group: "Combat"}, {Name: "victory", Label: "Victory", Group: "Combat"}, @@ -73,8 +72,7 @@ var colorCategories = []colorCategory{ {Name: "level_up", Label: "Level Up", Group: "XP / Level"}, // Pickups / economy - {Name: "credits_pickup", Label: "Credits Pickup", Group: "Pickups / Economy"}, - {Name: "chips_pickup", Label: "Chips Pickup", Group: "Pickups / Economy"}, + {Name: "currency_pickup", Label: "Currency Pickup", Group: "Pickups / Economy"}, // Chat / dialog {Name: "say", Label: "Say", Group: "Chat / Dialog"}, @@ -102,7 +100,7 @@ var colorCategories = []colorCategory{ {Name: "assassin_task", Label: "Assassin Task", Group: "Assassin / Map / Safespot"}, {Name: "map_at", Label: "Map At (you)", Group: "Assassin / Map / Safespot"}, {Name: "map_blocked", Label: "Map Blocked", Group: "Assassin / Map / Safespot"}, - {Name: "map_course", Label: "Map Course", Group: "Assassin / Map / Safespot"}, + {Name: "map_agility", Label: "Map Agility", Group: "Assassin / Map / Safespot"}, {Name: "safespot_alert", Label: "Safespot Alert", Group: "Assassin / Map / Safespot"}, // System @@ -147,20 +145,30 @@ func buildPreview() []colorSection { ln(seg("Test Room", "room_name"), seg(" (intro, #2001)", "room_number")), txt(""), - ln(seg("It's a test room", "room_desc")), + // Description + minimap, right-aligned at column 80. + // Text padded to 71 chars visible + " " + 7-char map = 80. + ln(seg("Golstaff, you have entered the door to the north. You are now by ", "room_desc"), + seg("╔═════╗", "dim")), + ln(seg("yourself, standing in a dark room. The pungent stench of mildew ", "room_desc"), + seg("║", "dim"), seg(" ", ""), seg("║", "dim")), + ln(seg("emanates from the wet dungeon walls. ", "room_desc"), + seg("║", "dim"), seg(" ", ""), seg("║", "dim")), + ln(seg(" ", ""), + seg("║", "dim"), seg("■", ""), seg("-", ""), seg("@", "map_at"), seg("-", ""), seg("■", ""), seg("║", "dim")), + ln(seg("Crassius Rex", "protected_mob"), seg(" watches the gate. ", ""), + seg("║", "dim"), seg(" ", ""), seg("│", "map_agility"), seg(" ", ""), seg("║", "dim")), + ln(seg("A man ", "mob"), seg("(level 5)", "victory"), seg(" scribbles something in a small notebook. ", ""), + seg("║", "dim"), seg(" ", ""), seg("■", ""), seg(" ", ""), seg("║", "dim")), + ln(seg(" ", ""), + seg("╚═════╝", "dim")), txt(""), - ln(seg("A tree is here.", "room_desc")), - txt(""), - ln(seg("A sentry ", "protected_mob"), seg("(level 4)", ""), seg(" watches the gate.", "")), - ln(seg("A man ", "mob"), seg("(level 5)", ""), seg(" scribbles something in a small notebook.", "")), - txt(""), - ln(seg("Icarus", "player_name"), seg(" is here.", "")), + ln(seg("Dalinar", "player_name"), seg(" (level 123)", "error"), seg(" is here.", "")), txt(""), txt("On the ground:"), - ln(seg(" bones ", "item"), seg("(reserved for admin 65t)", "dim")), + ln(seg(" bones ", "item"), seg("(reserved for Dalinar 65t)", "dim")), ln(seg(" bronze axe", "item")), ln(seg(" bucket of water", "item")), - ln(seg(" 10 x chips ", "item"), seg("(reserved for admin 65t)", "dim")), + ln(seg(" 10 x ", ""), seg("chips ", "item"), seg("(reserved for Dalinar 65t)", "dim")), ln(seg(" pot of flour", "item")), txt(""), txt("Exits:"), @@ -168,9 +176,7 @@ func buildPreview() []colorSection { ln(seg(" ", ""), seg("east", "exit_direction"), seg(" - ", ""), seg("Processing Station", "exit_name")), ln(seg(" ", ""), seg("west", "exit_direction"), seg(" - ", ""), seg("Inside Transport Shuttle", "exit_name")), txt(""), - ln(seg(">", "dim")), - txt(""), - ln(seg("> s", "dim")), + ln(seg("> s", "")), ln(seg("You walk ", ""), seg("south", "direction"), seg(".", "")), }, }) @@ -180,41 +186,28 @@ func buildPreview() []colorSection { Title: "Combat (two encounters)", Lines: []colorLine{ txt(""), - ln(seg("> attack man", "dim")), + ln(seg("> attack man", "")), txt(""), ln(seg("You attack ", ""), seg("the man", "mob"), seg("! Style: accurate (+3 atk)", "")), ln(seg("You hit ", ""), seg("the man", "mob"), seg(" for ", ""), - seg("\U0001FB38 6 \U0001FB34 damage. [█░░░░░░░░░] [ 1/7]", "damage_dealt"), + seg("\U0001FB38 1 \U0001FB34 damage. ", "damage_dealt"), + seg("[█████████░]", "victory"), seg(" [ 6/7]", ""), seg(" (+18xp acc, +6xp hp)", "xp")), ln(seg("The man misses you.", "miss")), ln(seg("You hit ", ""), seg("the man", "mob"), seg(" for ", ""), - seg("\U0001FB38 6 \U0001FB34 damage. [░░░░░░░░░░] [ 0/7]", "damage_dealt"), + seg("\U0001FB38 6 \U0001FB34 damage. ", "damage_dealt"), + seg("[░░░░░░░░░░]", "error"), seg(" [ 0/7]", ""), seg(" (+18xp acc, +6xp hp)", "xp")), ln(seg("You have defeated ", ""), seg("the man", "mob"), seg("!", "victory")), - ln(seg("*** You are now level 12 melee! ***", "level_up")), + ln(seg("*** You are now level 12 accuracy! ***", "level_up")), txt(""), - ln(seg("A scout", "mob"), seg(" hits you for ", ""), - seg("\U0001FB38 5 \U0001FB34 damage. [██████░░░░] [22/40]", "damage_taken")), - ln(seg("A scout's attack is extra effective! Equip ", ""), - seg("plated vest", "warning"), seg(" for protection.", "")), - ln(seg("You attack ", ""), seg("a scout", "mob"), seg(" with ", ""), seg("laser cutter", "science_mod"), seg("!", "")), - ln(seg("You miss a scout.", "miss")), + ln(seg("The man", "mob"), seg(" hits you for ", ""), + seg("\U0001FB38 5 \U0001FB34 damage. ", "damage_taken"), + seg("[██████░░░░]", "warning"), seg(" [22/40]", "")), ln(seg("Oh dear, you are dead!", "death")), txt(""), - ln(seg("> help!", "dim")), - ln(seg("Unknown command.", "error")), txt(""), - ln(seg("(", ""), seg("damage", "damage"), seg(" is a config-only alt key, not emitted by the engine)", "")), - }, - }) - // --- Pickups / economy ------------------------------------------------ - sections = append(sections, colorSection{ - Title: "Pickups & Economy", - Lines: []colorLine{ - ln(seg("You pick up ", ""), seg("50 credits. (total: 1234)", "credits_pickup")), - ln(seg("You steal ", ""), seg("25 credits", "credits_pickup"), seg(".", "")), - ln(seg("Score \u2502 ", ""), seg("12 chips", "chips_pickup")), }, }) @@ -223,14 +216,14 @@ func buildPreview() []colorSection { Title: "Chat & Dialog", Lines: []colorLine{ ln(seg("You say: ", ""), seg("hello there", "say")), - ln(seg("[Global] ", "global"), seg("Icarus: ", "player_name"), seg("anyone up for a raid?", "global")), - ln(seg("Icarus", "player_name"), seg(" has slain ", ""), + ln(seg("[Global] ", "global"), seg("Dalinar: ", "player_name"), seg("I just won big in baccarat!", "global")), + ln(seg("Dalinar", "player_name"), seg(" has slain ", ""), seg("a scout", "broadcast"), seg(" (level 5)!", "broadcast")), txt(""), ln(seg("Guard says: ", ""), seg("\u201cHalt. State your business.\u201d", "dialog")), - ln(seg("[enter to continue]", "dialog_options")), ln(seg(" 1. ", "dialog_options"), seg("I'm looking for work.", "dialog")), ln(seg(" 2. ", "dialog_options"), seg("Just passing through.", "dialog")), + ln(seg("[enter to continue]", "dialog_options")), }, }) @@ -238,9 +231,10 @@ func buildPreview() []colorSection { sections = append(sections, colorSection{ Title: "Drops, Consume & Fire", Lines: []colorLine{ + txt(""), ln(seg("The man drops: ", "drop_message"), seg("bones", "item")), ln(seg("The man drops: ", "drop_message"), - seg("10", "credits_pickup"), seg(" x ", ""), seg("chips", "item")), + seg("10", ""), seg(" x ", ""), seg("chips", "item")), ln(seg("You eat the bread. It restores some energy.", "eat_food")), ln(seg("You manage to get a fire going!", "fire")), }, @@ -264,35 +258,13 @@ func buildPreview() []colorSection { sections = append(sections, colorSection{ Title: "Assassin & Safespot", Lines: []colorLine{ + txt(""), ln(seg("Your target: 15 slugs. Get to work.", "assassin_task")), ln(seg("*** Assassin task complete! ***", "assassin_task"), seg(" (+50xp asm)", "xp")), ln(seg(" Assassin task: 12 of 15 slugs remaining.", "assassin_task")), ln(seg("Your safespot has been compromised!", "safespot_alert")), - ln(seg("Your divine power prevents death.", "miss")), - }, - }) - - // --- Map (mini map side panel) --------------------------------------- - sections = append(sections, colorSection{ - Title: "Mini Map", - Lines: []colorLine{ - ln(seg("╔═════╗", "dim")), - ln(seg("║", "dim"), seg(" ", ""), seg("░", "map_blocked"), seg(" ", ""), seg("║", "dim")), - ln(seg("║", "dim"), seg(" ", ""), seg("║", "dim")), - ln(seg("║", "dim"), seg("■", ""), seg("-", ""), seg("@", "map_at"), seg("-", ""), seg("■", ""), seg("║", "dim")), - ln(seg("║", "dim"), seg(" ", ""), seg("│", "map_course"), seg(" ", ""), seg("║", "dim")), - ln(seg("║", "dim"), seg(" ", ""), seg("■", ""), seg(" ", ""), seg("║", "dim")), - ln(seg("╚═════╝", "dim")), - }, - }) - - // --- Trigger sequence / system --------------------------------------- - sections = append(sections, colorSection{ - Title: "Triggers & System", - Lines: []colorLine{ - ln(seg("The ancient console hums to life as you approach.", "sequence")), - ln(seg(" A holographic display flickers. \u201cWelcome, traveler.\u201d", "sequence")), + txt(""), }, }) diff --git a/internal/admin/api_colors_test.go b/internal/admin/api_colors_test.go index d1e5e9a..cb63714 100644 --- a/internal/admin/api_colors_test.go +++ b/internal/admin/api_colors_test.go @@ -44,7 +44,7 @@ func TestColorsGet(t *testing.T) { t.Fatalf("categories count: got %d want %d", len(cats), len(colorCategories)) } preview, _ := out["preview"].([]any) - if len(preview) < 8 { + if len(preview) < 6 { t.Fatalf("preview sections too few: %d", len(preview)) } } @@ -151,6 +151,11 @@ func TestColorsPreviewExhaustive(t *testing.T) { } } for _, cat := range colorCategories { + if cat.Name == "currency_pickup" || + cat.Name == "map_blocked" || cat.Name == "sequence" || + cat.Name == "science_mod" { + continue + } if !seen[cat.Name] { t.Errorf("preview missing category: %s", cat.Name) } diff --git a/internal/admin/static/admin.css b/internal/admin/static/admin.css index d1d3c4d..9f62897 100644 --- a/internal/admin/static/admin.css +++ b/internal/admin/static/admin.css @@ -528,7 +528,7 @@ input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-vis .color-preview-toolbar select{padding:3px 6px;background:var(--input-bg);color:var(--text);border:1px solid var(--input-border);border-radius:3px;font-family:monospace} .color-preview-hint{font-size:11px;color:#888} .color-preview-scroll{flex:1;overflow-y:auto;overflow-x:auto;border:1px solid var(--border);border-radius:4px} -pre.color-preview-pre{margin:0;padding:8px;font-family:ui-monospace,"Cascadia Mono","Cascadia Code","JetBrains Mono","Fira Code",Menlo,Consolas,"DejaVu Sans Mono","Courier New",monospace;font-size:12px;line-height:1;white-space:pre-wrap;color:#e0e0e0;background:#000} +pre.color-preview-pre{margin:0;padding:8px;font-family:ui-monospace,"Cascadia Mono","Cascadia Code","JetBrains Mono","Fira Code",Menlo,Consolas,"DejaVu Sans Mono","Courier New",monospace;font-size:12px;line-height:1.35;white-space:pre-wrap;color:#e0e0e0;background:#000} .cp-title{color:#9ab;display:block;margin:8px 0 3px 0;font-size:11px;text-transform:uppercase;letter-spacing:.5px;font-weight:bold} .cp-title:first-child{margin-top:0} /* Picker popup tweaks for the themer (richer than bindColorField's) */ diff --git a/internal/admin/static/coloreditor.js b/internal/admin/static/coloreditor.js index deb7336..fe88945 100644 --- a/internal/admin/static/coloreditor.js +++ b/internal/admin/static/coloreditor.js @@ -391,8 +391,6 @@ var mode = ($i('colorMode') || {}).value || 'xterm256'; pre.innerHTML = ''; STATE.preview.forEach(function (sec, idx) { - var title = el('span', 'cp-title', sec.title); - pre.appendChild(title); sec.lines.forEach(function (line) { var lineEl = el('div'); lineEl.style.minHeight = '1em'; diff --git a/internal/config/config.go b/internal/config/config.go index 3b182ff..755d43b 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -43,7 +43,6 @@ func DefaultColors() ColorsConfig { "mob": "off", "damage_dealt": "B4", "damage_taken": "A7", - "damage": "A7", "xp": "B3", "level_up": "B4 bold", @@ -62,8 +61,7 @@ func DefaultColors() ColorsConfig { "fire": "B4", "eat_food": "6C", "drop_message": "89", - "credits_pickup": "B3", - "chips_pickup": "8B", + "currency_pickup": "B3", "visual_tick": "49 dim", "visual_first_tick": "B4 bold", "battery": "6C", @@ -76,7 +74,7 @@ func DefaultColors() ColorsConfig { "farm_disease": "A7", "map_at": "B4 bold", "map_blocked": "A7", - "map_course": "43", + "map_agility": "43", "safespot_alert": "A7 bold", } } 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)) { |
