merge: integrate remote player quest slices
This commit is contained in:
@@ -78,6 +78,7 @@ func _present(context: VillagerInspectionResult, animate: bool) -> void:
|
||||
else:
|
||||
need_label.visible = false
|
||||
reason_label.text = "Why · %s" % context.decision_reason
|
||||
_present_opportunity_note(context.opportunity_note)
|
||||
visible = true
|
||||
accent.pivot_offset = accent.size * 0.5
|
||||
if not animate:
|
||||
@@ -95,6 +96,20 @@ func _present(context: VillagerInspectionResult, animate: bool) -> void:
|
||||
motion_tween.tween_property(accent, "scale:y", 1.0, 0.26)
|
||||
|
||||
|
||||
func _present_opportunity_note(note: VillagerOpportunityNote) -> void:
|
||||
if note == null:
|
||||
return
|
||||
if not note.has_need:
|
||||
return
|
||||
need_label.visible = true
|
||||
var existing_text := need_label.text.strip_edges()
|
||||
var note_text := note.help_text.strip_edges()
|
||||
if existing_text.is_empty():
|
||||
need_label.text = "Need · %s" % note.need_text
|
||||
if not note_text.is_empty() and note_text not in need_label.text:
|
||||
need_label.text += "\n" + note_text
|
||||
|
||||
|
||||
func _hide_note() -> void:
|
||||
if not visible or is_hiding:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user