forked from Mirrors/openclonk
Add description and EditorHelp for dialogue properties and actions
parent
35a5df6c9b
commit
aa68c7ee16
|
@ -581,6 +581,7 @@ local ActMap = {
|
|||
}
|
||||
};
|
||||
local Name = "$Name$";
|
||||
local Description = "$Description$";
|
||||
|
||||
|
||||
/* EditorProps */
|
||||
|
@ -667,7 +668,7 @@ public func IsDialogue() { return true; }
|
|||
public func Definition(def)
|
||||
{
|
||||
// Actions provided by this definition
|
||||
UserAction->AddEvaluator("Action", "$Dialogue$", "$Message$", "message", [def, def.EvalAct_Message], def.GetDefaultMessageProp, { Type="proplist", Display="{{Speaker}}: \"{{Text}}\" {{Options}}", EditorProps = {
|
||||
UserAction->AddEvaluator("Action", "$Dialogue$", "$Message$", "$MessageDesc$", "message", [def, def.EvalAct_Message], def.GetDefaultMessageProp, { Type="proplist", Display="{{Speaker}}: \"{{Text}}\" {{Options}}", EditorProps = {
|
||||
Speaker = new UserAction.Evaluator.Object { Name = "$Speaker$" },
|
||||
Text = { Type="string" },
|
||||
TargetPlayers = new UserAction.Evaluator.PlayerList { Name = "$TargetPlayers$" },
|
||||
|
@ -677,26 +678,26 @@ public func Definition(def)
|
|||
Goto = { Type="int", Min=0 }
|
||||
} } }
|
||||
} } );
|
||||
UserAction->AddEvaluator("Action", "$Dialogue$", "$SetAttention$", "dialogue_set_attention", [def, def.EvalAct_SetAttention], { Target = { Function="action_object" }, Status = { Function="bool_constant", Value=true } }, { Type="proplist", Display="{{Target}}: {{Status}}", EditorProps = {
|
||||
UserAction->AddEvaluator("Action", "$Dialogue$", "$SetAttention$", "$SetAttentionDesc$", "dialogue_set_attention", [def, def.EvalAct_SetAttention], { Target = { Function="action_object" }, Status = { Function="bool_constant", Value=true } }, { Type="proplist", Display="{{Target}}: {{Status}}", EditorProps = {
|
||||
Target = UserAction->GetObjectEvaluator("IsDialogue", "$Dialogue$"),
|
||||
Status = new UserAction.Evaluator.Boolean { Name = "$Status$" }
|
||||
} } );
|
||||
UserAction->AddEvaluator("Action", "$Dialogue$", "$SetEnabled$", "dialogue_set_enabled", [def, def.EvalAct_SetEnabled], { Target = { Function="action_object" }, Status = { Function="bool_constant", Value=true } }, { Type="proplist", Display="{{Target}}: {{Status}}", EditorProps = {
|
||||
UserAction->AddEvaluator("Action", "$Dialogue$", "$SetEnabled$", "$SetEnabledDesc$", "dialogue_set_enabled", [def, def.EvalAct_SetEnabled], { Target = { Function="action_object" }, Status = { Function="bool_constant", Value=true } }, { Type="proplist", Display="{{Target}}: {{Status}}", EditorProps = {
|
||||
Target = UserAction->GetObjectEvaluator("IsDialogue", "$Dialogue$"),
|
||||
Status = new UserAction.Evaluator.Boolean { Name = "$Status$" }
|
||||
} } );
|
||||
UserAction->AddEvaluator("Object", nil, "$NPC$", "npc", [def, def.EvalObj_NPC]);
|
||||
UserAction->AddEvaluator("Object", nil, "$NPC$", "$NPCDesc$", "npc", [def, def.EvalObj_NPC]);
|
||||
// Clonks can create a dialogue
|
||||
if (!Clonk.EditorActions) Clonk.EditorActions = {};
|
||||
Clonk.EditorActions.Dialogue = { Name="$Dialogue$", Command="SetDialogue(GetName(), true, true)", Select=true };
|
||||
// Dialogue EditorProps
|
||||
if (!def.EditorProps) def.EditorProps = {};
|
||||
def.EditorProps.dlg_target = { Name="$Target$", Type="object", Filter="IsClonk", Set="SetDialogueTarget" };
|
||||
def.EditorProps.user_dialogue = { Name="$Dialogue$", Type="enum", OptionKey="Function", Options = [ { Name="$NoDialogue$" }, new UserAction.EvaluatorDefs.sequence { Group=nil } ] };
|
||||
def.EditorProps.dlg_target = { Name="$Target$", EditorHelp="$TargetDesc$", Type="object", Filter="IsClonk", Set="SetDialogueTarget" };
|
||||
def.EditorProps.user_dialogue = { Name="$Dialogue$", EditorHelp="$DialogueDesc$", Type="enum", OptionKey="Function", Options = [ { Name="$NoDialogue$" }, new UserAction.EvaluatorDefs.sequence { Group=nil } ] };
|
||||
def.EditorProps.user_dialogue_allow_parallel = UserAction.PropParallel;
|
||||
def.EditorProps.user_dialogue_progress_mode = UserAction.PropProgressMode;
|
||||
def.EditorProps.dlg_attention = { Name="$Attention$ (!)", Type="bool", Set="SetAttention" };
|
||||
def.EditorProps.dlg_interact = { Name="$Enabled$", Type="bool", Set="SetEnabled" };
|
||||
def.EditorProps.dlg_attention = { Name="$Attention$ (!)", EditorHelp="$AttentionDesc$", Type="bool", Set="SetAttention" };
|
||||
def.EditorProps.dlg_interact = { Name="$Enabled$", EditorHelp="$EnabledDesc$", Type="bool", Set="SetEnabled" };
|
||||
}
|
||||
|
||||
private func GetDefaultMessageProp(object target_object)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Name=Dialogue
|
||||
Name=Dialog
|
||||
Description=Der Dialog erlaubt es dem Spieler, mit diesem Clonk zu interagieren und Nachrichten anzuzeigen oder andere Aktionen auszufuehren. Eine Sequenz von Nachrichten und anderen Aktionen kann in der 'Dialog'-Eigenschaft definiert werden.
|
||||
MsgSpeak=%s ansprechen
|
||||
Next=Weiter
|
||||
Dialogue=Dialog
|
||||
|
@ -17,8 +18,16 @@ DefaultOptionText=Auswahltext
|
|||
Options=Optionen
|
||||
NoDialogue=Kein Dialog
|
||||
Attention=Markierung
|
||||
AttentionDesc=Aktiviert oder deaktiviert das rote Ausrufezeichen ueber dem Dialog.
|
||||
Enabled=Aktiviert
|
||||
SetAttention=Dialogmarkierung (!)
|
||||
Status=Status
|
||||
SetEnabled=Dialogaktivierung
|
||||
Target=Zielobjekt
|
||||
MessageDesc=Zeigt eine Dialognachricht mit Rahmen und Portrait oben in der Mitte des Bildschirms an.
|
||||
SetAttentionDesc=Aktiviert oder deaktiviert das rote Ausrufezeichen ueber einem Dialog.
|
||||
SetEnabledDesc=Aktiviert oder deaktiviert einen Dialog.
|
||||
NPCDesc=Das Zielobjekt dieses Dialogs. Nur gueltig in Sequenzen von Dialogen.
|
||||
TargetDesc=Der NPC-Clonk, zu dem dieser Dialog gehoert.
|
||||
DialogueDesc=Sequenz von Aktionen oder Nachrichten, die fuer diesen Dialog ausgefuehrt werden soll.
|
||||
EnabledDesc=Aktiviert oder deaktiviert diesen Dialog.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Name=Dialogue
|
||||
Description=The dialogue allows the player to interact with this clonk and show messages or perform other action. Define a sequence of messages or actions in the 'Dialogue' property.
|
||||
MsgSpeak=Speak to %s
|
||||
Next=Next
|
||||
Dialogue=Dialogue
|
||||
|
@ -17,8 +18,16 @@ DefaultOptionText=Option text
|
|||
Options=Options
|
||||
NoDialogue=No dialogue
|
||||
Attention=Marker
|
||||
AttentionDesc=Activates or deactivates the red attention marker above this dialogue.
|
||||
Enabled=Enabled
|
||||
SetAttention=Set dialogue marker (!)
|
||||
Status=Status
|
||||
SetEnabled=Set dialogue enabled
|
||||
Target=Target object
|
||||
MessageDesc=Shows a dialogue message with a border and portrait in the upper central area of the screen.
|
||||
SetAttentionDesc=Activates or deactivates the red attention marker above a dialogue.
|
||||
SetEnabledDesc=Activates or deactivates a dialogue.
|
||||
NPCDesc=The target clonk of this dialogue. Only valid in sequences of dialogues.
|
||||
TargetDesc=The NPC-clonk to which this dialogue belongs.
|
||||
DialogueDesc=Sequence of actions or messages to be executed for this dialogue.
|
||||
EnabledDesc=Activate or deactivate this dialogue.
|
||||
|
|
Loading…
Reference in New Issue