feat: add person history and trust reactions
This commit is contained in:
@@ -59,18 +59,38 @@ func _run() -> void:
|
||||
),
|
||||
"Runtime knowledge UI check should use a completed simulation transaction"
|
||||
)
|
||||
var world_view := main_scene.get_node("WorldViewManager")
|
||||
var contributor_visual: Node3D = world_view.active_npc_visuals[contributor.id]
|
||||
var witness_visual: Node3D = world_view.active_npc_visuals[witness.id]
|
||||
var listener_visual: Node3D = world_view.active_npc_visuals[listener.id]
|
||||
_check(
|
||||
(
|
||||
witness_visual.get_node("TrustReactionRoot").visible
|
||||
and not contributor_visual.get_node("TrustReactionRoot").visible
|
||||
),
|
||||
"A real trust consequence should blossom only above the reacting observer"
|
||||
)
|
||||
var reaction_checksum: String = simulation_manager.get_state_checksum()
|
||||
witness_visual.play_trust_gain_reaction()
|
||||
_check(
|
||||
simulation_manager.get_state_checksum() == reaction_checksum,
|
||||
"Restarting the transient trust blossom must not mutate simulation state"
|
||||
)
|
||||
var village_ui := main_scene.get_node("UI")
|
||||
village_ui.selected_npc_index = witness.id
|
||||
village_ui.call("_refresh_npc_inspector")
|
||||
_check(
|
||||
(
|
||||
"Known fact: %s deposited" % contributor.npc_name in inspector_label.text
|
||||
and "witnessed · lasting" in inspector_label.text
|
||||
and "Memory: 1 lasting · 0 recent" in inspector_label.text
|
||||
"Memories 1 lasting · 0 recent" in inspector_label.text
|
||||
and (
|
||||
"◆ lasting · %s stocked 1 food · witnessed" % contributor.npc_name
|
||||
in inspector_label.text
|
||||
)
|
||||
and "Relationship: %s" % contributor.npc_name in inspector_label.text
|
||||
and "Because:" in inspector_label.text
|
||||
and "Own history" in inspector_label.text
|
||||
),
|
||||
"NPC inspector should show the witnessed fact and its relationship consequence"
|
||||
"NPC history should show the lasting witnessed fact and its relationship consequence"
|
||||
)
|
||||
var guard_site := (
|
||||
main_scene.get_node("JajceWorld/WorldObjects/ActivitySites/GuardPost") as ActivitySite
|
||||
@@ -87,11 +107,17 @@ func _run() -> void:
|
||||
village_ui.call("_refresh_npc_inspector")
|
||||
_check(
|
||||
(
|
||||
"Known fact: %s deposited" % contributor.npc_name in inspector_label.text
|
||||
and "heard from %s · recent" % witness.npc_name in inspector_label.text
|
||||
and "Memory: 0 lasting · 1 recent" in inspector_label.text
|
||||
"Memories 0 lasting · 1 recent" in inspector_label.text
|
||||
and (
|
||||
"• recent · %s stocked 1 food · heard %s" % [contributor.npc_name, witness.npc_name]
|
||||
in inspector_label.text
|
||||
)
|
||||
),
|
||||
"NPC inspector should identify who communicated a known fact"
|
||||
"NPC history should identify who communicated a retained fact"
|
||||
)
|
||||
_check(
|
||||
not listener_visual.get_node("TrustReactionRoot").visible,
|
||||
"Learning a fact without a relationship consequence should not show a trust blossom"
|
||||
)
|
||||
_check(
|
||||
main_scene.has_node("JajceWorld/TerrainRoot/Terrain3D"),
|
||||
|
||||
Reference in New Issue
Block a user