forked from Mirrors/openclonk
Fix save as scenario for Dialogue.
Add GameCall as fallback mechanism for dialog implementation if no local function is defined.Controls
parent
44ffc5c470
commit
13a60848c6
|
@ -157,7 +157,8 @@ public func Interact(object clonk)
|
|||
var progress = dlg_progress;
|
||||
dlg_progress++;
|
||||
// Then call relevant functions.
|
||||
Call(Format("Dlg_%s_%d", dlg_name, progress), clonk);
|
||||
if (!Call(Format("Dlg_%s_%d", dlg_name, progress), clonk))
|
||||
GameCall(Format("Dlg_%s_%d", dlg_name, progress), this, clonk, dlg_target);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -218,6 +219,22 @@ public func MenuOK(proplist menu_id, object clonk)
|
|||
Interact(clonk);
|
||||
}
|
||||
|
||||
/* Scenario saving */
|
||||
|
||||
// Scenario saving
|
||||
func SaveScenarioObject(props)
|
||||
{
|
||||
if (!inherited(props, ...)) return false;
|
||||
if (!dlg_target) return false; // don't save dead dialogue object
|
||||
// Dialog has its own creation procedure
|
||||
props->RemoveCreation();
|
||||
props->Add(SAVEOBJ_Creation, "%s->SetDialogue(%v)", dlg_target->MakeScenarioSaveName(), dlg_name);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/* Properties */
|
||||
|
||||
local ActMap = {
|
||||
Dialogue = {
|
||||
Prototype = Action,
|
||||
|
|
Loading…
Reference in New Issue