Some event stuff
This commit is contained in:
@@ -15,8 +15,6 @@ var conversationEvent:EventConversation = null
|
||||
var textboxEvent:EventTextbox = null
|
||||
|
||||
func start() -> void:
|
||||
getInventory().addItem(itemType, quantity)
|
||||
|
||||
# Should show text?
|
||||
if !showText:
|
||||
super.start()
|
||||
@@ -50,10 +48,18 @@ func start() -> void:
|
||||
textboxEvent.count = quantity
|
||||
conversationEvent.addChildEvent(textboxEvent)
|
||||
|
||||
conversationEvent.eventEnded.connect(func():
|
||||
# Reward the item
|
||||
rewardItem()
|
||||
)
|
||||
|
||||
# Begin processing
|
||||
super.start()
|
||||
startChild(conversationEvent)
|
||||
|
||||
func rewardItem():
|
||||
getInventory().addItem(itemType, quantity)
|
||||
|
||||
func isDone() -> bool:
|
||||
if !super.isDone():
|
||||
return false
|
||||
|
Reference in New Issue
Block a user