add dialog
This commit is contained in:
parent
c92c0f6ff7
commit
5413823b26
13 changed files with 390 additions and 32 deletions
11
dialogable.lua
Normal file
11
dialogable.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
-- Dialogable: a mixin that makes any Entity subclass talkable. `include` it and
|
||||
-- give the entity a `self.book` (an Ink book); bumping the entity then opens the
|
||||
-- modal Dialogue. npcs, signs, artifacts — anything you can talk to — are just
|
||||
-- Dialogables. For now an entity carries one book; later it can swap books as it
|
||||
-- progresses. All it does is route a bump to the dialogue manager.
|
||||
Dialogable = {}
|
||||
|
||||
function Dialogable:onBump()
|
||||
if self.book then Dialogue.open(self.book) end
|
||||
return true
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue