1 // Makes sure the guide message is hidden when starting a dialogue and shown again when closing.
2 
3 #appendto Dialogue
4 
Interact(object clonk)5 public func Interact(object clonk)
6 {
7 	if (!dlg_interact || !dlg_name)
8 		return inherited(clonk, ...);
9 	var guide = FindObject(Find_ID(TutorialGuide), Find_Owner(clonk->GetOwner()));
10 	if (!guide)
11 		return inherited(clonk, ...);
12 	if (dlg_status == DLG_Status_Stop)
13 	{
14 		if (this.guide_was_shown)
15 		{
16 			this.guide_was_shown = false;
17 			guide->ShowGuide();
18 		}
19 	}
20 	else if (dlg_status != DLG_Status_Remove && dlg_status != DLG_Status_Wait)
21 	{
22 		if (!guide->IsHidden())
23 		{
24 			this.guide_was_shown = true;
25 			guide->HideGuide();
26 		}
27 	}
28 	return inherited(clonk, ...);
29 }