Modal time.
This commit is contained in:
@@ -5,8 +5,7 @@ static func itemGetCallable(params:Dictionary) -> int:
|
|||||||
assert(params.has('stack'))
|
assert(params.has('stack'))
|
||||||
PARTY.BACKPACK.addStack(params['stack'])
|
PARTY.BACKPACK.addStack(params['stack'])
|
||||||
|
|
||||||
# var text = "Obtained %s x%d." % [Item.getItemName(params['stack'].item), params['stack'].quantity]
|
var text = "Obtained %s x%d." % [Item.getItemName(params['stack'].item), params['stack'].quantity]
|
||||||
var text = Item.getItemName(Item.Id.POTION)
|
|
||||||
params['cutscene'].addCallable(ConversationAction.getTextboxCallable(text).merged({
|
params['cutscene'].addCallable(ConversationAction.getTextboxCallable(text).merged({
|
||||||
'position': Cutscene.CUTSCENE_ADD_NEXT,
|
'position': Cutscene.CUTSCENE_ADD_NEXT,
|
||||||
}))
|
}))
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ static func itemDefine(params:Dictionary) -> Dictionary:
|
|||||||
assert(params.has('id'))
|
assert(params.has('id'))
|
||||||
assert(params.has('handle'))
|
assert(params.has('handle'))
|
||||||
assert(params.has('type'))
|
assert(params.has('type'))
|
||||||
assert(!ITEM_DATA.has(params['id']))
|
|
||||||
|
|
||||||
var obj:Dictionary = {}
|
var obj:Dictionary = {}
|
||||||
ITEM_DATA.insert(params['id'], obj)
|
ITEM_DATA.insert(params['id'], obj)
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ func _onItemInteract(_other:Entity) -> void:
|
|||||||
assert(entity.oneTimeItem != null)
|
assert(entity.oneTimeItem != null)
|
||||||
var cutscene:Cutscene = Cutscene.new()
|
var cutscene:Cutscene = Cutscene.new()
|
||||||
cutscene.addCallable(ItemAction.getItemCallable(entity.oneTimeItem.toItemStack()))
|
cutscene.addCallable(ItemAction.getItemCallable(entity.oneTimeItem.toItemStack()))
|
||||||
cutscene.addCallable(ConversationAction.getTextboxCallable('This should be last'))
|
await cutscene.start()
|
||||||
cutscene.start()
|
entity.queue_free()
|
||||||
|
|
||||||
func onInteract(other:Entity) -> void:
|
func onInteract(other:Entity) -> void:
|
||||||
if entity.interactType == Entity.InteractType.NONE:
|
if entity.interactType == Entity.InteractType.NONE:
|
||||||
|
|||||||
Reference in New Issue
Block a user