mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-02-23 15:38:29 +01:00
Added support for the extended reward system to the conversation resource files and the content editor.
Added support for different types of item requirements in conversation replies. For example, requiring the player to wear a specific item instead of just having it in inventory. git-svn-id: https://andors-trail.googlecode.com/svn/trunk@216 08aca716-68be-ccc6-4d58-36f5abd142ac
This commit is contained in:
@@ -62,10 +62,7 @@ function buildEditorForPhrase(div, phrase, tree, treeNode) {
|
||||
var dialoguePhrase = $( "#dialoguePhrase", div );
|
||||
var dialoguePhraseReplies = $( "#dialoguePhraseReplies", div );
|
||||
|
||||
checkboxHidesElement( $( '#hasProgressQuest', dialoguePhrase ), $( '#hasProgressQuestDisplay', dialoguePhrase ), phrase.progressQuest);
|
||||
checkboxHidesElement( $( '#hasRewardDroplist', dialoguePhrase ), $( '#hasRewardDroplistDisplay', dialoguePhrase ), phrase.rewardDropListID);
|
||||
bindFieldToDataStore( $( "#progressQuest", dialoguePhrase ), model.quests);
|
||||
bindFieldToDataStore( $( "#rewardDropListID", dialoguePhrase ), model.droplists);
|
||||
checkboxHidesElement( $( '#hasRewards', dialoguePhrase ), $( '#hasRewardsDisplay', dialoguePhrase ), phrase.rewards);
|
||||
|
||||
var rebuildChildNodes = function() {
|
||||
updatePhraseReplyTreeNodesBelow(tree, treeNode, phrase);
|
||||
@@ -122,6 +119,17 @@ function buildEditorForPhrase(div, phrase, tree, treeNode) {
|
||||
|
||||
$( '#message', dialoguePhrase ).change(function() { treeNode.setTitle( getPhraseNodeText(phrase) ); });
|
||||
|
||||
var createNewReward = function() { return { rewardType: 0 }; }
|
||||
var setupEditor = function(div) { }
|
||||
if (!phrase.rewards) phrase.rewards = [];
|
||||
applyTableEditor({
|
||||
table: $( '#rewards', dialoguePhrase ),
|
||||
dialog: phraseRewardDialog,
|
||||
array: phrase.rewards,
|
||||
templateFunction: createNewReward,
|
||||
editorSetup: setupEditor
|
||||
});
|
||||
|
||||
dialoguePhrase.show();
|
||||
dialoguePhraseReplies.show();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user