Merge pull request #121 from ViPro-Technologies/NEO-85-client-combat-feedback-hp-hud

Neo 85 client combat feedback hp hud
pull/122/head^2
VinPropane 2026-05-25 13:54:12 -04:00 committed by GitHub
commit c82724a4f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 24 additions and 4 deletions

View File

@ -91,15 +91,11 @@ func _apply_highlight_states() -> void:
var highlighted: bool = target_id == _locked_target_id and not _locked_target_id.is_empty()
if highlighted:
body_mat.albedo_color = tint.lightened(0.25)
body_mat.emission_enabled = true
body_mat.emission = tint
body_mat.emission_energy_multiplier = 1.4
var ring_c := tint
ring_c.a = 0.78
ring_mat.albedo_color = ring_c
else:
body_mat.albedo_color = Color(tint.r, tint.g, tint.b, 0.88)
body_mat.emission_enabled = false
var ring_c2 := tint
ring_c2.a = 0.45
ring_mat.albedo_color = ring_c2

View File

@ -0,0 +1,23 @@
extends GdUnitTestSuite
## NEO-85: lock highlight uses albedo-only tuning on unshaded dummy materials.
const Markers := preload("res://scripts/prototype_target_markers.gd")
const ALPHA_ID := "prototype_target_alpha"
func test_set_locked_target_brightens_body_albedo_without_emission() -> void:
# Arrange
var markers: Node3D = Markers.new()
auto_free(markers)
add_child(markers)
await get_tree().process_frame
var body: MeshInstance3D = markers.get_node("Marker_%s/DummyBody" % ALPHA_ID) as MeshInstance3D
var body_mat: StandardMaterial3D = body.material_override as StandardMaterial3D
var idle_color: Color = body_mat.albedo_color
# Act
markers.set_locked_target(ALPHA_ID)
# Assert
assert_that(body_mat.albedo_color).is_not_equal(idle_color)
assert_that(body_mat.emission_enabled).is_false()

View File

@ -0,0 +1 @@
uid://cneo85ptgtmarkers1