mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-01-21 19:08:30 +01:00
Content editor: Add support for switching active NPC in dialogue
This commit is contained in:
@@ -30,6 +30,7 @@ var ATEditor = (function(ATEditor, _) {
|
||||
if (reply.nextPhraseID && reply.nextPhraseID.length === 1) { reply.replyLeadsTo = reply.nextPhraseID; }
|
||||
reply.hasRequirements = ATEditor.utils.hasValues(reply.requires);
|
||||
});
|
||||
o.showAdvanced = _.toBool(o.switchToNPC);
|
||||
};
|
||||
prep.monster = function(o) {
|
||||
o.hasConversation = _.toBool(o.phraseID);
|
||||
@@ -94,6 +95,10 @@ var ATEditor = (function(ATEditor, _) {
|
||||
if (o.hasOnlyNextReply) {
|
||||
o.replies = [ { text: "N", nextPhraseID: o.nextPhraseID } ];
|
||||
}
|
||||
if (!o.showAdvanced) {
|
||||
delete o.switchToNPC;
|
||||
}
|
||||
delete o.showAdvanced;
|
||||
delete o.nextPhraseID;
|
||||
delete o.hasOnlyNextReply;
|
||||
delete o.tree;
|
||||
|
||||
@@ -55,6 +55,13 @@
|
||||
</table>
|
||||
<button ng-click="addReward(phrase)" class="btn" title="Add reward"><i class="icon-plus-sign"></i> Add reward</button>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="showAdvanced" ng-model="phrase.showAdvanced" />Show advanced properties</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="phrase.showAdvanced">
|
||||
<label for="switchToNPC"><span class="hint hint--top" data-hint="Id of a NPC that speaks this phrase. All subsequent phrases will be spoken by this NPC.">Switch active NPC to:</span></label>
|
||||
<input type="text" size="30" id="switchToNPC" class="field at-input-id" ng-model="phrase.switchToNPC" />
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="dialoguePhraseReplies">
|
||||
|
||||
Reference in New Issue
Block a user