feat: add stylized villager presentation
This commit is contained in:
@@ -78,6 +78,10 @@ func _run() -> void:
|
||||
waterfall_mist.draw_pass_1 != null,
|
||||
"Waterfall mist particles should have visible billboard geometry"
|
||||
)
|
||||
_check(
|
||||
waterfall_mist.position.distance_to(Vector3(25.0, 0.8, -24.0)) < 0.01,
|
||||
"Waterfall mist should stay at the waterfall base instead of obscuring the village"
|
||||
)
|
||||
_check(world.has_node("WaterRoot/RiverSurface"), "WaterRoot should include a river surface")
|
||||
var environment: Environment = (
|
||||
(world.get_node("WorldEnvironment") as WorldEnvironment).environment
|
||||
@@ -97,16 +101,25 @@ func _run() -> void:
|
||||
"VillageRoot should include the mill and bridge blockouts"
|
||||
)
|
||||
var smoke_count := 0
|
||||
var smoke_is_translucent := true
|
||||
for suffix in ["House_01", "House_02", "House_03"]:
|
||||
if world.has_node("VillageRoot/%s/Smoke" % suffix):
|
||||
var smoke: GPUParticles3D = world.get_node("VillageRoot/%s/Smoke" % suffix)
|
||||
if smoke.draw_pass_1 == null:
|
||||
continue
|
||||
var smoke_material := (smoke.draw_pass_1 as QuadMesh).material as StandardMaterial3D
|
||||
smoke_is_translucent = (
|
||||
smoke_is_translucent
|
||||
and smoke_material != null
|
||||
and smoke_material.transparency != BaseMaterial3D.TRANSPARENCY_DISABLED
|
||||
and smoke_material.albedo_color.a < 0.5
|
||||
)
|
||||
smoke_count += 1
|
||||
_check(
|
||||
smoke_count >= 2,
|
||||
"At least two houses should have chimney smoke particles (found %s)" % smoke_count
|
||||
)
|
||||
_check(smoke_is_translucent, "Chimney smoke should not render as opaque white quads")
|
||||
var lookdev: Node3D = load("res://world/jajce/JajceLookdev.tscn").instantiate()
|
||||
_check(lookdev.has_node("JajceWorld"), "Lookdev should instance JajceWorld")
|
||||
_check(lookdev.has_node("BeautyCamera"), "Lookdev should provide a beauty camera")
|
||||
|
||||
@@ -27,6 +27,15 @@ func _run() -> void:
|
||||
body.material_override.albedo_color == profession_definition.visual_color,
|
||||
"NPC body color should come from its profession definition"
|
||||
)
|
||||
_check(
|
||||
(
|
||||
body.mesh is CylinderMesh
|
||||
and visual.has_node("Head")
|
||||
and visual.has_node("ArmLeft")
|
||||
and visual.has_node("LegRight/Foot")
|
||||
),
|
||||
"NPC presentation should use a readable multi-part villager silhouette"
|
||||
)
|
||||
_check(
|
||||
visual.get_node("ProfessionProp").mesh != null
|
||||
and profession_definition.display_name in visual.get_node("ProfessionLabel").text,
|
||||
@@ -74,6 +83,14 @@ func _run() -> void:
|
||||
npc.remove_inventory(SimulationIds.RESOURCE_FOOD, 1.0)
|
||||
manager.emit_signal("npc_inventory_changed", npc, SimulationIds.RESOURCE_FOOD, 0.0)
|
||||
_check(not carried_food.visible, "Deposited or eaten food should be hidden")
|
||||
var carried_wood: Node3D = visual.get_node("CarriedWood")
|
||||
_check(not carried_wood.visible, "NPC should begin without carried logs")
|
||||
npc.add_inventory(SimulationIds.RESOURCE_WOOD, 2.0)
|
||||
manager.emit_signal("npc_inventory_changed", npc, SimulationIds.RESOURCE_WOOD, 2.0)
|
||||
_check(carried_wood.visible, "Carried wood should show a visible log bundle")
|
||||
npc.remove_inventory(SimulationIds.RESOURCE_WOOD, 2.0)
|
||||
manager.emit_signal("npc_inventory_changed", npc, SimulationIds.RESOURCE_WOOD, 0.0)
|
||||
_check(not carried_wood.visible, "Deposited wood should hide the log bundle")
|
||||
|
||||
var resource_state: ResourceStateRecord = manager.get_resource_state(&"berry_bush_01")
|
||||
npc.set_task(SimulationIds.ACTION_GATHER_FOOD)
|
||||
|
||||
Reference in New Issue
Block a user