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