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