Skip to content

Conversations/subject matter table#2

Merged
jamiltron merged 4 commits intomasterfrom
conversations/subject_matter_table
Apr 25, 2017
Merged

Conversations/subject matter table#2
jamiltron merged 4 commits intomasterfrom
conversations/subject_matter_table

Conversation

@jamiltron
Copy link
Copy Markdown
Collaborator

  • Updating console to allow for setting/getting conversation subjects.

@jamiltron jamiltron requested a review from lindacai1 April 24, 2017 21:55
end

function Commands:get_conversation_subject_command(session, response, entity, subject)
local conversation_component = entity:add_component('stonehearth:conversation')
Copy link
Copy Markdown
Collaborator

@lindacai1 lindacai1 Apr 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The getters should check if the component exists before calling a function on it instead of automatically adding the component. Otherwise players may add the conversation component to any selected entity if they call this on it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I considered that but kind of wanted to just add it to anything to test. But now that we're formalizing how it should work, changing it to work the way you describe is better. Thanks!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, the conversation component is added to base humans from the json file, so you shouldn't have to add it for testing unless you're testing on goblins or something else.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks!

radiant.console.register('add_conversation_subject', {
call: function(cmdobj, fn, args) {
var subject = args._[0];
var polarity = args.polarity;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably mean sentiment, instead of polarity

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, thanks for catching that.

@jamiltron jamiltron merged commit 50086d1 into master Apr 25, 2017
@jamiltron jamiltron deleted the conversations/subject_matter_table branch April 25, 2017 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants