A UI pass: prompts that tell the truth, and a HUD that does not collide
ci / verify (push) Successful in 53s
ci / verify (push) Successful in 53s
Prompts named the default keys whatever was bound. Every action is rebindable, but the HUD said "WASD move", "LMB fire", "hold F" and "1-4 use", the quartermaster said "E talk" and the upgrade screen "Close (E)". All of them now go through Settings.short_label(), and a test rebinds fire, escape, interact and a slot key and checks each prompt follows. The HUD's top-left was a developer's status line -- name, instance id, health as text, frame rate -- with the boss bar drawn over its right end and the level-up notice sharing a row with the escape bar. It is now name and level, where you are, health with its numbers, experience, escape and level-ups, stacked by a running cursor so nothing has a fixed row to collide on. Instance and fps moved behind F1, which is who they were for. Arrival protection is a centred banner rather than a note beside the health bar, because it is the one moment the rules change. A hit used to tint the whole screen red, which in a bullet hell dims the bullets at exactly the moment you are among them. It is an edge now, and the same edge pulses below a third of your health. New: a message feed above the inventory for what the server just confirmed -- items taken, used and dropped, levels gained -- and party health top-right in a dungeon, where the hub shows who is online. The pickup prompt now also names the dungeon under your feet when you stand on its ring, in the same order the server resolves that key: loot first, then the entrance. The boss bar used to announce the boss to anyone within the actor interest radius -- which passes through walls -- so a player in the entrance room was told the Warden was near. It waits until the fog has actually lit the boss once, then stays for the fight. Permadeath was announced only by the roster screen appearing. The client records its own death from the server's event and the roster says who fell, at what level, and where. The connect screen lost a name field that did nothing for a person -- it only named the characters bots create -- gained a proper panel, remembers the last server, and shows the protocol number a mismatch refusal will quote. And screenshot.tscn ran as the player's real account against their real character store, walking their character into dungeons for pictures -- with health now carried between runs, a stray hit would have stuck. It has its own store and account now, like every diagnostic, and a seeded character. The real store was checked: nothing it carries changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
069abdb3fa
commit
19d2295bec
14 files changed
+903
-229
No files matched your search
@@ -0,0 +1,45 @@
|
||||
extends GutTest
|
||||
## Permadeath is announced. The server unbinds a character on the tick it dies,
|
||||
## so before this the only sign anything had happened was the roster appearing.
|
||||
|
||||
const GAME_SCENE := preload("res://src/view/game_scene.gd")
|
||||
|
||||
|
||||
func test_the_line_names_who_fell_how_far_they_got_and_where() -> void:
|
||||
var line: String = GAME_SCENE.fallen_line(
|
||||
{"name": "Bramcreek", "level": 7, "where": "Warden's Descent"})
|
||||
assert_string_contains(line, "Bramcreek")
|
||||
assert_string_contains(line, "level 7")
|
||||
assert_string_contains(line, "in the Warden's Descent")
|
||||
|
||||
|
||||
func test_a_dungeon_already_called_the_something_is_not_the_the_something() -> void:
|
||||
var line: String = GAME_SCENE.fallen_line(
|
||||
{"name": "Wren", "level": 3, "where": "The Choir Vault"})
|
||||
assert_string_contains(line, "in the Choir Vault")
|
||||
assert_false(line.contains("the The"))
|
||||
|
||||
|
||||
func test_the_client_records_its_own_death_from_the_server_event() -> void:
|
||||
var c: ClientRuntime = autofree(ClientRuntime.new())
|
||||
c.my_peer = 5
|
||||
c.characters = [{"id": "a", "name": "Ash", "active": true}] as Array[Dictionary]
|
||||
c.selected_character = "a"
|
||||
c.instance_kind = Protocol.InstanceKind.DUNGEON
|
||||
c.dungeon_id = Dungeons.VAULT
|
||||
c.my_total_xp = Progression.total_xp_for_level(4)
|
||||
c.on_events(NetCodec.encode_events(10,
|
||||
[{"t": SimEvent.Type.PLAYER_DIED, "peer": 5}] as Array[Dictionary]))
|
||||
assert_eq(c.last_fallen.get("name", ""), "Ash")
|
||||
assert_eq(int(c.last_fallen.get("level", 0)), 4)
|
||||
assert_eq(String(c.last_fallen.get("where", "")), "The Choir Vault")
|
||||
|
||||
|
||||
func test_someone_elses_death_is_not_yours() -> void:
|
||||
var c: ClientRuntime = autofree(ClientRuntime.new())
|
||||
c.my_peer = 5
|
||||
c.characters = [{"id": "a", "name": "Ash", "active": true}] as Array[Dictionary]
|
||||
c.selected_character = "a"
|
||||
c.on_events(NetCodec.encode_events(10,
|
||||
[{"t": SimEvent.Type.PLAYER_DIED, "peer": 6}] as Array[Dictionary]))
|
||||
assert_true(c.last_fallen.is_empty())
|
||||
Reference in new issue
Block a user