Unlock menu after failed join; remove contact damage; cover clean disconnects
ci / verify (push) Successful in 45s

A failed connection left the connect buttons disabled forever. _show_menu()
returned early when a menu already existed, so the set_busy(false) that
re-enables them never ran on the way back from _abort_connect -- the player was
locked out of both joining and hosting with no way out but a restart. Also
guards against a second attempt stacking on an in-flight one.

Contact damage is gone as a concept: nothing in this game hurts you by touching
it, because every threat should be a bullet you can see and dodge. The Stalker
walked at you and dealt contact damage and nothing else, so it now carries a
point-blank shotgun instead -- five pellets, 62 degrees, 18-tick lifetime for
about 78px of reach, so it still has to close and leaves nothing lingering.
tests/unit/test_content.gd asserts every hostile enemy has an emitter, so a new
enemy cannot quietly reintroduce the mechanic.

The menu's "Disconnect" DOES get the anti-cheese protection -- verified, not
assumed. It calls Net.shutdown(), the socket closes, and the server takes the
same linkdead path as a SIGKILL, because the channel is keyed on the socket
closing rather than on how it closed. Made permanent: a --leave-after bot flag
and two smoke assertions covering the polite exit alongside the hard kill, so a
future "clean leave" message that skipped the channel would fail a test. The
menu now says so out loud in a dungeon -- the mechanic only reads as fair if
the cost is known before clicking.

103 tests, 12 smoke assertions; check.sh, test.sh and smoke.sh all pass.
This commit is contained in:
2026-09-03 19:37:26 +02:00
parent f70de1b825
commit e1f9fa8096
17 changed files with 235 additions and 40 deletions
-1
View File
@@ -17,7 +17,6 @@ damage = 10
script = ExtResource("3_e6oj1")
id = &"drifter"
display_name = "Drifter"
contact_damage = 8
speed = 55.0
emitters = Array[ExtResource("1_801wv")]([SubResource("Resource_vpd04")])
pattern_loop_ticks = 120
-1
View File
@@ -9,6 +9,5 @@ id = &"dummy"
display_name = "Target Dummy"
max_hp = 100000
radius = 20.0
contact_damage = 0
move = 0
visual = 3
+17 -4
View File
@@ -1,16 +1,29 @@
[gd_resource type="Resource" script_class="EnemyDef" format=3]
[ext_resource type="Script" path="res://src/sim/patterns/bullet_emitter.gd" id="1_dkoo8"]
[ext_resource type="Script" path="res://src/actors/enemies/enemy_def.gd" id="2_t1lyl"]
[ext_resource type="Script" path="res://src/sim/patterns/bullet_emitter.gd" id="1_t1lyl"]
[ext_resource type="Script" path="res://src/sim/patterns/aimed_spread_emitter.gd" id="2_e7xon"]
[ext_resource type="Script" path="res://src/actors/enemies/enemy_def.gd" id="3_ehenj"]
[sub_resource type="Resource" id="Resource_tpjo4"]
script = ExtResource("2_e7xon")
spread_deg = 62.0
muzzle_offset = 10.0
interval = 45
speed = 260.0
radius = 6.0
lifetime = 18
damage = 14
kind = 3
[resource]
script = ExtResource("2_t1lyl")
script = ExtResource("3_ehenj")
id = &"stalker"
display_name = "Stalker"
max_hp = 30
radius = 12.0
contact_damage = 16
move = 3
speed = 95.0
retarget_interval = 20
visual = 2
emitters = Array[ExtResource("1_t1lyl")]([SubResource("Resource_tpjo4")])
pattern_loop_ticks = 45
-1
View File
@@ -17,7 +17,6 @@ id = &"turret"
display_name = "Turret"
max_hp = 70
radius = 16.0
contact_damage = 0
move = 0
speed = 0.0
visual = 1